- Feeding input programmatically to the Glk program now works: chimara_glk_feed_line_...
[rodin/chimara.git] / libchimara / chimara-glk-private.h
index 4a274fba227b7939dbefb78bb6b3960b9e950924..3b1460a812c124de8a438c54e57e42cd4a9472fd 100644 (file)
@@ -5,6 +5,7 @@
 #include <gmodule.h>
 #include <pango/pango.h>
 #include "glk.h"
+#include "style.h"
 #include "gi_blorb.h"
 #include "gi_dispa.h"
 #include "chimara-glk.h"
@@ -30,10 +31,13 @@ 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;
 
        /* *** Threading data *** */
+       /* Whether program is running */
+       gboolean running;
     /* Glk program loaded in widget */
     GModule *program;
     /* Thread in which Glk program is run */
@@ -51,6 +55,9 @@ struct _ChimaraGlkPrivate {
        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,8 +89,8 @@ 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