X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fchimara-glk-private.h;h=903d3530705f93f2dd163692e50e35d2a6e4b3f3;hb=4b0bbd6bb235b4cad89d321cdd7f570610a97712;hp=4a274fba227b7939dbefb78bb6b3960b9e950924;hpb=d0d1517f5447d0bd95c6b9769a92054f4c7fcaae;p=rodin%2Fchimara.git diff --git a/libchimara/chimara-glk-private.h b/libchimara/chimara-glk-private.h index 4a274fb..903d353 100644 --- a/libchimara/chimara-glk-private.h +++ b/libchimara/chimara-glk-private.h @@ -5,6 +5,7 @@ #include #include #include "glk.h" +#include "style.h" #include "gi_blorb.h" #include "gi_dispa.h" #include "chimara-glk.h" @@ -30,10 +31,16 @@ struct _ChimaraGlkPrivate { guint spacing; /* The CSS file to read style defaults from */ gchar *css_file; - /* Hashtable containing the default styles */ - GHashTable *default_styles; + /* Hashtable containing the default and current style */ + struct StyleSet *default_styles; + struct StyleSet *current_styles; + gboolean style_initialized; /* Have styles been initialized */ + /* Final message displayed when game exits */ + gchar *final_message; /* *** Threading data *** */ + /* Whether program is running */ + gboolean running; /* Glk program loaded in widget */ GModule *program; /* Thread in which Glk program is run */ @@ -46,11 +53,17 @@ struct _ChimaraGlkPrivate { /* Abort mechanism */ GMutex *abort_lock; gboolean abort_signalled; + /* Key press after shutdown mechanism */ + GMutex *shutdown_lock; + GCond *shutdown_key_pressed; /* Window arrangement locks */ GMutex *arrange_lock; GCond *rearranged; gboolean needs_rearrange; gboolean ignore_next_arrange_event; + /* Input queues */ + GAsyncQueue *char_input_queue; + GAsyncQueue *line_input_queue; /* *** Glk library data *** */ /* User-defined interrupt handler */ @@ -82,9 +95,9 @@ struct _ChimaraGlkPrivate { gchar *current_dir; }; -#define CHIMARA_GLK_PRIVATE(obj) \ - (G_TYPE_INSTANCE_GET_PRIVATE((obj), CHIMARA_TYPE_GLK, ChimaraGlkPrivate)) - +#define CHIMARA_GLK_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), CHIMARA_TYPE_GLK, ChimaraGlkPrivate)) +#define CHIMARA_GLK_USE_PRIVATE(o, n) ChimaraGlkPrivate *n = CHIMARA_GLK_PRIVATE(o) + G_END_DECLS #endif /* __CHIMARA_GLK_PRIVATE_H__ */