X-Git-Url: https://git.stderr.nl/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fchimara-glk-private.h;fp=src%2Fchimara-glk-private.h;h=c6fc556495ebe1879f0c7a9799b7c22a58cd7b12;hb=46974bb948c0a7ca82b476a578b6199e438bab41;hp=0000000000000000000000000000000000000000;hpb=5292406311d31682a850baf059cab01a6f0262b2;p=rodin%2Fchimara.git diff --git a/src/chimara-glk-private.h b/src/chimara-glk-private.h new file mode 100644 index 0000000..c6fc556 --- /dev/null +++ b/src/chimara-glk-private.h @@ -0,0 +1,46 @@ +#ifndef __CHIMARA_GLK_PRIVATE_H__ +#define __CHIMARA_GLK_PRIVATE_H__ + +#include +#include "glk.h" +#include "chimara-glk.h" + +G_BEGIN_DECLS + +typedef struct _ChimaraGlkPrivate ChimaraGlkPrivate; + +struct _ChimaraGlkPrivate { + /* Pointer back to the widget itself for use in thread */ + ChimaraGlk *self; + /* Whether user input is expected */ + gboolean interactive; + /* Whether file operations are allowed */ + gboolean protect; + /* Thread in which Glk program is run */ + GThread *thread; + /* Event queue and threading stuff */ + GQueue *event_queue; + GMutex *event_lock; + GCond *event_queue_not_empty; + GCond *event_queue_not_full; + /* Abort mechanism */ + GMutex *abort_lock; + gboolean abort_signalled; + /* User-defined interrupt handler */ + void (*interrupt_handler)(void); + /* Global tree of all windows */ + GNode *root_window; + /* List of filerefs currently in existence */ + GList *fileref_list; + /* Current stream */ + strid_t current_stream; + /* List of streams currently in existence */ + GList *stream_list; +}; + +#define CHIMARA_GLK_PRIVATE(obj) \ + (G_TYPE_INSTANCE_GET_PRIVATE((obj), CHIMARA_TYPE_GLK, ChimaraGlkPrivate)) + +G_END_DECLS + +#endif /* __CHIMARA_GLK_PRIVATE_H__ */ \ No newline at end of file