1 #ifndef __CHIMARA_GLK_PRIVATE_H__
2 #define __CHIMARA_GLK_PRIVATE_H__
6 #include <pango/pango.h>
11 #include "chimara-glk.h"
15 typedef struct _ChimaraGlkPrivate ChimaraGlkPrivate;
17 struct _ChimaraGlkPrivate {
18 /* Pointer back to the widget itself for use in thread */
21 /* *** Widget properties *** */
22 /* Whether user input is expected */
24 /* Whether file operations are allowed */
26 /* Font description of proportional font */
27 PangoFontDescription *default_font_desc;
28 /* Font description of monospace font */
29 PangoFontDescription *monospace_font_desc;
30 /* Spacing between Glk windows */
32 /* The CSS file to read style defaults from */
34 /* Hashtable containing the default and current style */
35 struct StyleSet *default_styles;
36 struct StyleSet *current_styles;
38 /* *** Threading data *** */
39 /* Whether program is running */
41 /* Glk program loaded in widget */
43 /* Thread in which Glk program is run */
45 /* Event queue and threading stuff */
48 GCond *event_queue_not_empty;
49 GCond *event_queue_not_full;
52 gboolean abort_signalled;
53 /* Window arrangement locks */
56 gboolean needs_rearrange;
57 gboolean ignore_next_arrange_event;
59 /* *** Glk library data *** */
60 /* User-defined interrupt handler */
61 void (*interrupt_handler)(void);
62 /* Global tree of all windows */
64 /* List of filerefs currently in existence */
67 strid_t current_stream;
68 /* List of streams currently in existence */
72 /* Current resource blorb map */
73 giblorb_map_t *resource_map;
74 /* File stream pointing to the blorb used as current resource map */
75 strid_t resource_file;
76 /* Callbacks for registering and unregistering dispatch objects */
77 gidispatch_rock_t (*register_obj)(void *, glui32);
78 void (*unregister_obj)(void *, glui32, gidispatch_rock_t);
79 gidispatch_rock_t (*register_arr)(void *, glui32, char *);
80 void (*unregister_arr)(void *, glui32, char *, gidispatch_rock_t);
82 /* *** Platform-dependent Glk library data *** */
83 /* Flag for functions to find out if they are being called from startup code */
85 /* "Current directory" for creating filerefs */
89 #define CHIMARA_GLK_PRIVATE(obj) (G_TYPE_INSTANCE_GET_PRIVATE((obj), CHIMARA_TYPE_GLK, ChimaraGlkPrivate))
90 #define CHIMARA_GLK_USE_PRIVATE(o, n) ChimaraGlkPrivate *n = CHIMARA_GLK_PRIVATE(o)
94 #endif /* __CHIMARA_GLK_PRIVATE_H__ */