Added properties to the ChimaraGlk widget: "default-font-description" and
[rodin/chimara.git] / src / chimara-glk-private.h
1 #ifndef __CHIMARA_GLK_PRIVATE_H__
2 #define __CHIMARA_GLK_PRIVATE_H__
3
4 #include <glib.h>
5 #include <gmodule.h>
6 #include <pango/pango.h>
7 #include "glk.h"
8 #include "chimara-glk.h"
9
10 G_BEGIN_DECLS
11
12 typedef struct _ChimaraGlkPrivate ChimaraGlkPrivate;
13
14 struct _ChimaraGlkPrivate {
15     /* Pointer back to the widget itself for use in thread */
16     ChimaraGlk *self;
17     /* Whether user input is expected */
18     gboolean interactive;
19     /* Whether file operations are allowed */
20     gboolean protect;
21         /* Font description of proportional font */
22         PangoFontDescription *default_font_desc;
23         /* Font description of monospace font */
24         PangoFontDescription *monospace_font_desc;
25     /* Glk program loaded in widget */
26     GModule *program;
27     /* Thread in which Glk program is run */
28     GThread *thread;
29     /* Event queue and threading stuff */
30     GQueue *event_queue;
31     GMutex *event_lock;
32     GCond *event_queue_not_empty;
33     GCond *event_queue_not_full;
34     /* Abort mechanism */
35     GMutex *abort_lock;
36     gboolean abort_signalled;
37     /* User-defined interrupt handler */
38     void (*interrupt_handler)(void);
39     /* Global tree of all windows */
40     GNode *root_window;
41     /* List of filerefs currently in existence */
42     GList *fileref_list;
43     /* Current stream */
44     strid_t current_stream;
45     /* List of streams currently in existence */
46     GList *stream_list;
47 };
48
49 #define CHIMARA_GLK_PRIVATE(obj) \
50         (G_TYPE_INSTANCE_GET_PRIVATE((obj), CHIMARA_TYPE_GLK, ChimaraGlkPrivate))
51         
52 G_END_DECLS
53
54 #endif /* __CHIMARA_GLK_PRIVATE_H__ */