X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;f=libchimara%2Fchimara-glk-private.h;h=01b4a256ddfdc731d7e0fd8ee8a99545a30dbb75;hb=fd95bbfc8f01fe812d9f24d1d377079df5f968d5;hp=33e8ebf5b8ea20d26d4a1658a006f697bf870df1;hpb=39ba0dbcd29275355508e25ac5e74bfa5e075293;p=projects%2Fchimara%2Fchimara.git diff --git a/libchimara/chimara-glk-private.h b/libchimara/chimara-glk-private.h index 33e8ebf..01b4a25 100644 --- a/libchimara/chimara-glk-private.h +++ b/libchimara/chimara-glk-private.h @@ -23,17 +23,17 @@ struct _ChimaraGlkPrivate { gboolean interactive; /* Whether file operations are allowed */ gboolean protect; - /* Font description of proportional font */ - PangoFontDescription *default_font_desc; - /* Font description of monospace font */ - PangoFontDescription *monospace_font_desc; /* Spacing between Glk windows */ guint spacing; /* The CSS file to read style defaults from */ gchar *css_file; - /* Hashtable containing the default and current style */ - struct StyleSet *default_styles; - struct StyleSet *current_styles; + /* Hashtable containing the current styles set by CSS and GLK */ + struct StyleSet *styles; + struct StyleSet *glk_styles; + /* Final message displayed when game exits */ + gchar *final_message; + /* Image cache */ + GSList *image_cache; /* *** Threading data *** */ /* Whether program is running */ @@ -50,6 +50,9 @@ 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; @@ -58,8 +61,17 @@ struct _ChimaraGlkPrivate { /* Input queues */ GAsyncQueue *char_input_queue; GAsyncQueue *line_input_queue; + /* Resource loading locks */ + GMutex *resource_lock; + GCond *resource_loaded; + GCond *resource_info_available; + guint32 resource_available; /* *** Glk library data *** */ + /* Info about current plugin */ + gchar *program_name; + gchar *program_info; + gchar *story_name; /* User-defined interrupt handler */ void (*interrupt_handler)(void); /* Global tree of all windows */ @@ -70,19 +82,23 @@ struct _ChimaraGlkPrivate { strid_t current_stream; /* List of streams currently in existence */ GList *stream_list; + /* List of sound channels currently in existence */ + GList *schannel_list; /* Current timer */ guint timer_id; /* Current resource blorb map */ giblorb_map_t *resource_map; /* File stream pointing to the blorb used as current resource map */ strid_t resource_file; + /* Optional callback for loading resource data */ + ChimaraResourceLoadFunc resource_load_callback; + gpointer resource_load_callback_data; + GDestroyNotify resource_load_callback_destroy_data; /* Callbacks for registering and unregistering dispatch objects */ gidispatch_rock_t (*register_obj)(void *, glui32); void (*unregister_obj)(void *, glui32, gidispatch_rock_t); gidispatch_rock_t (*register_arr)(void *, glui32, char *); void (*unregister_arr)(void *, glui32, char *, gidispatch_rock_t); - /* Have styles been initialized */ - gboolean style_initialized; /* *** Platform-dependent Glk library data *** */ /* Flag for functions to find out if they are being called from startup code */ @@ -93,7 +109,7 @@ struct _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__ */