Changed build system to Automake. Split Glk code off into a GTK widget.
[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 "glk.h"
6 #include "chimara-glk.h"
7
8 G_BEGIN_DECLS
9
10 typedef struct _ChimaraGlkPrivate ChimaraGlkPrivate;
11
12 struct _ChimaraGlkPrivate {
13     /* Pointer back to the widget itself for use in thread */
14     ChimaraGlk *self;
15     /* Whether user input is expected */
16     gboolean interactive;
17     /* Whether file operations are allowed */
18     gboolean protect;
19     /* Thread in which Glk program is run */
20     GThread *thread;
21     /* Event queue and threading stuff */
22     GQueue *event_queue;
23     GMutex *event_lock;
24     GCond *event_queue_not_empty;
25     GCond *event_queue_not_full;
26     /* Abort mechanism */
27     GMutex *abort_lock;
28     gboolean abort_signalled;
29     /* User-defined interrupt handler */
30     void (*interrupt_handler)(void);
31     /* Global tree of all windows */
32     GNode *root_window;
33     /* List of filerefs currently in existence */
34     GList *fileref_list;
35     /* Current stream */
36     strid_t current_stream;
37     /* List of streams currently in existence */
38     GList *stream_list;
39 };
40
41 #define CHIMARA_GLK_PRIVATE(obj) \
42         (G_TYPE_INSTANCE_GET_PRIVATE((obj), CHIMARA_TYPE_GLK, ChimaraGlkPrivate))
43         
44 G_END_DECLS
45
46 #endif /* __CHIMARA_GLK_PRIVATE_H__ */