1 #ifndef __CHIMARA_GLK_PRIVATE_H__
2 #define __CHIMARA_GLK_PRIVATE_H__
6 #include <pango/pango.h>
10 #include "chimara-glk.h"
14 typedef struct _ChimaraGlkPrivate ChimaraGlkPrivate;
16 struct _ChimaraGlkPrivate {
17 /* Pointer back to the widget itself for use in thread */
20 /* *** Widget properties *** */
21 /* Whether user input is expected */
23 /* Whether file operations are allowed */
25 /* Font description of proportional font */
26 PangoFontDescription *default_font_desc;
27 /* Font description of monospace font */
28 PangoFontDescription *monospace_font_desc;
29 /* Spacing between Glk windows */
31 /* The CSS file to read style defaults from */
33 /* Hashtable containing the default styles */
34 GHashTable *default_styles;
36 /* *** Threading data *** */
37 /* Glk program loaded in widget */
39 /* Thread in which Glk program is run */
41 /* Event queue and threading stuff */
44 GCond *event_queue_not_empty;
45 GCond *event_queue_not_full;
48 gboolean abort_signalled;
49 /* Window arrangement locks */
52 gboolean needs_rearrange;
53 gboolean ignore_next_arrange_event;
55 /* *** Glk library data *** */
56 /* User-defined interrupt handler */
57 void (*interrupt_handler)(void);
58 /* Global tree of all windows */
60 /* List of filerefs currently in existence */
63 strid_t current_stream;
64 /* List of streams currently in existence */
68 /* Current resource blorb map */
69 giblorb_map_t *resource_map;
70 /* File stream pointing to the blorb used as current resource map */
71 strid_t resource_file;
72 /* Callbacks for registering and unregistering dispatch objects */
73 gidispatch_rock_t (*register_obj)(void *, glui32);
74 void (*unregister_obj)(void *, glui32, gidispatch_rock_t);
75 gidispatch_rock_t (*register_arr)(void *, glui32, char *);
76 void (*unregister_arr)(void *, glui32, char *, gidispatch_rock_t);
78 /* *** Platform-dependent Glk library data *** */
79 /* Flag for functions to find out if they are being called from startup code */
81 /* "Current directory" for creating filerefs */
85 #define CHIMARA_GLK_PRIVATE(obj) \
86 (G_TYPE_INSTANCE_GET_PRIVATE((obj), CHIMARA_TYPE_GLK, ChimaraGlkPrivate))
90 #endif /* __CHIMARA_GLK_PRIVATE_H__ */