4
#include "sexpr/sexp.h"
6
sexp_t *assoc_sexp(sexp_t*, const char *);
11
OESUI_UPDATE, /* Synchronize memory spaces. */
12
OESUI_REFRESH, /* Redraw widgets */
13
OESUI_MHORIZ, /* Motion (relative) horizontal */
14
OESUI_MVERT, /* Motion (relative) vertical */
15
OESUI_WHORIZ, /* Warp (absolute) horizontal */
16
OESUI_WVERT, /* Warp (absolute) vertical */
17
OESUI_OPEN, /* First painting */
18
OESUI_CLOSE, /* closing */
19
OESUI_CLICK, /* Pointer click */
20
OESUI_KEY, /* Keypress */
21
OESUI_UNKEY, /* Keyrelease */
25
/* Property value types. */
38
MAGIC_HEAPED = 0x569A2937,
42
typedef struct llist_t {
49
typedef union oesui_atom_t {
57
typedef struct oesui_propnode_t {
65
typedef struct oesui_props_t {
70
typedef struct oesui_widget_t {
76
typedef struct oesui_signal_t {
82
#define UISIG_ARG(sig, n) ((sig)->msg[n])
83
#define UISIG_NAME(sig) (UISIG_ARG(sig, 0).s)
86
typedef struct oesui_t {
89
oesui_widget_t *toplevel;
90
oesui_widget_t *signals; /* signals for widgets. */
91
int x, y, w, h; /* draw boundaries? */
92
int px, py, pz; /* pointer position */
93
int (*sighandler)(struct oesui_t *, oesui_signal_t *);
94
int retcode; /* communications/synchronization hack. */
98
typedef struct assetcache_t {
102
oesui_propnode_t *cache; /* array of pairs. */
106
oesui_widget_t * sexp_to_widget (oesui_t *, sexp_t *);
107
llist_t * sexp_to_widgetlist (oesui_t *, sexp_t *);
110
oesui_propnode_t *oesui_propnode_init (oesui_propnode_t *, const char *key);
111
void oesui_propnode_delete (oesui_propnode_t *);
113
oesui_props_t * oeui_props_init (oesui_props_t *);
114
oesui_props_t * oeui_props_delete (oesui_props_t *);
115
oesui_propnode_t * oeui_props_get (oesui_props_t *);
116
oesui_props_t * oesui_props_set_int (oesui_props_t *, const char *key, int val);
117
oesui_props_t * oesui_props_set_float (oesui_props_t *, const char *key, float val);
118
oesui_props_t * oesui_props_set_string (oesui_props_t *, const char *key, const char * val);
119
oesui_props_t * oesui_props_set_ptr (oesui_props_t *, const char *key, void * val);
120
int oeui_props_get_int (oesui_props_t *, const char *key);
121
float oeui_props_get_float (oesui_props_t *, const char *key);
122
const char * oeui_props_get_string (oesui_props_t *, const char *key);
123
void * oeui_props_get_ptr (oesui_props_t *, const char *key);
125
oesui_t * oesui_init (oesui_t *);
126
oesui_t * oesui_init_surface (oesui_t *, SDL_Surface *sdlscreen);
127
void oesui_delete (oesui_t *);
128
int oesui_load (oesui_t *, const char *fname);
129
int oesui_event (oesui_t *, int evtype, int parm);
130
int oesui_open (oesui_t *, const char *tlname);
131
int oesui_loop (oesui_t *); /* main gui loop */
132
int oesui_sighandle (oesui_t *, int (*sighandle)(oesui_t *, oesui_signal_t *));
134
#endif /* OESUI_H_ */