Wrote platform-dependent dispatch code
[rodin/chimara.git] / libchimara / chimara-glk-private.h
index 2cd928b30bda44b28b0e2f4d31449881e8ed03dd..4a274fba227b7939dbefb78bb6b3960b9e950924 100644 (file)
@@ -6,6 +6,7 @@
 #include <pango/pango.h>
 #include "glk.h"
 #include "gi_blorb.h"
+#include "gi_dispa.h"
 #include "chimara-glk.h"
 
 G_BEGIN_DECLS
@@ -15,6 +16,8 @@ typedef struct _ChimaraGlkPrivate ChimaraGlkPrivate;
 struct _ChimaraGlkPrivate {
     /* Pointer back to the widget itself for use in thread */
     ChimaraGlk *self;
+
+       /* *** Widget properties *** */
     /* Whether user input is expected */
     gboolean interactive;
     /* Whether file operations are allowed */
@@ -25,6 +28,12 @@ struct _ChimaraGlkPrivate {
        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 styles */
+       GHashTable *default_styles;
+
+       /* *** Threading data *** */
     /* Glk program loaded in widget */
     GModule *program;
     /* Thread in which Glk program is run */
@@ -39,7 +48,11 @@ struct _ChimaraGlkPrivate {
     gboolean abort_signalled;
        /* Window arrangement locks */
        GMutex *arrange_lock;
+       GCond *rearranged;
+       gboolean needs_rearrange;
        gboolean ignore_next_arrange_event;
+
+       /* *** Glk library data *** */
     /* User-defined interrupt handler */
     void (*interrupt_handler)(void);
     /* Global tree of all windows */
@@ -56,6 +69,17 @@ struct _ChimaraGlkPrivate {
        giblorb_map_t *resource_map;
        /* File stream pointing to the blorb used as current resource map */
        strid_t resource_file;
+       /* 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);
+
+       /* *** Platform-dependent Glk library data *** */
+       /* Flag for functions to find out if they are being called from startup code */
+       gboolean in_startup;
+       /* "Current directory" for creating filerefs */
+       gchar *current_dir;
 };
 
 #define CHIMARA_GLK_PRIVATE(obj) \