| 1 | #cxx . . $ `<file>/src/ui.h`/ifndef OESUI_H_ |
| 2 | #define OESUI_H_cxx . . $ `src/ui.h:2:9`! |
| 3 | |
| 4 | #include "sexpr/sexp.h"cxx . . $ `<file>/src/sexpr/sexp.h`/ |
| 5 | |
| 6 | sexp_tcxx . . $ sexp_t# *assoc_sexpcxx . . $ assoc_sexp(23464af592d36b1b).(sexp_tcxx . . $ sexp_t#*, const char *); |
| 7 | |
| 8 | |
| 9 | /* UI events */ |
| 10 | enumcxx . . $ $anonymous_type_f66b8d725f53cfb5_0# { |
| 11 | OESUI_UPDATEcxx . . $ OESUI_UPDATE., /* Synchronize memory spaces. */ |
| 12 | OESUI_REFRESHcxx . . $ OESUI_REFRESH., /* Redraw widgets */ |
| 13 | OESUI_MHORIZcxx . . $ OESUI_MHORIZ., /* Motion (relative) horizontal */ |
| 14 | OESUI_MVERTcxx . . $ OESUI_MVERT., /* Motion (relative) vertical */ |
| 15 | OESUI_WHORIZcxx . . $ OESUI_WHORIZ., /* Warp (absolute) horizontal */ |
| 16 | OESUI_WVERTcxx . . $ OESUI_WVERT., /* Warp (absolute) vertical */ |
| 17 | OESUI_OPENcxx . . $ OESUI_OPEN., /* First painting */ |
| 18 | OESUI_CLOSEcxx . . $ OESUI_CLOSE., /* closing */ |
| 19 | OESUI_CLICKcxx . . $ OESUI_CLICK., /* Pointer click */ |
| 20 | OESUI_KEYcxx . . $ OESUI_KEY., /* Keypress */ |
| 21 | OESUI_UNKEYcxx . . $ OESUI_UNKEY., /* Keyrelease */ |
| 22 | }; |
| 23 | |
| 24 | |
| 25 | /* Property value types. */ |
| 26 | enumcxx . . $ $anonymous_type_f66b8d725f53cfb5_1# { |
| 27 | OESATOM_NULLcxx . . $ OESATOM_NULL., |
| 28 | OESATOM_INTcxx . . $ OESATOM_INT., |
| 29 | OESATOM_FLOATcxx . . $ OESATOM_FLOAT., |
| 30 | OESATOM_STRINGcxx . . $ OESATOM_STRING., |
| 31 | OESATOM_SYMBOLcxx . . $ OESATOM_SYMBOL., |
| 32 | OESATOM_PAIRcxx . . $ OESATOM_PAIR., |
| 33 | OESATOM_PTRcxx . . $ OESATOM_PTR., |
| 34 | }; |
| 35 | |
| 36 | |
| 37 | enumcxx . . $ $anonymous_type_f66b8d725f53cfb5_2# { |
| 38 | MAGIC_HEAPEDcxx . . $ MAGIC_HEAPED. = 0x569A2937, |
| 39 | }; |
| 40 | |
| 41 | |
| 42 | typedef struct llist_tcxx . . $ llist_t# { |
| 43 | int magiccxx . . $ llist_t#magic.; |
| 44 | void *datacxx . . $ llist_t#data.; |
| 45 | struct llist_tcxx . . $ llist_t# *nextcxx . . $ llist_t#next.; |
| 46 | } llist_tcxx . . $ llist_t#; |
| 47 | |
| 48 | |
| 49 | typedef union oesui_atom_tcxx . . $ oesui_atom_t# { |
| 50 | int icxx . . $ oesui_atom_t#i.; |
| 51 | float fcxx . . $ oesui_atom_t#f.; |
| 52 | char *scxx . . $ oesui_atom_t#s.; |
| 53 | const char *symcxx . . $ oesui_atom_t#sym.; |
| 54 | void *pcxx . . $ oesui_atom_t#p.; |
| 55 | } oesui_atom_tcxx . . $ oesui_atom_t#; |
| 56 | |
| 57 | typedef struct oesui_propnode_tcxx . . $ oesui_propnode_t# { |
| 58 | int magiccxx . . $ oesui_propnode_t#magic.; |
| 59 | int hashcxx . . $ oesui_propnode_t#hash.; |
| 60 | char *keycxx . . $ oesui_propnode_t#key.; |
| 61 | int valtypecxx . . $ oesui_propnode_t#valtype.; |
| 62 | oesui_atom_tcxx . . $ oesui_atom_t# valcxx . . $ oesui_propnode_t#val.; |
| 63 | } oesui_propnode_tcxx . . $ oesui_propnode_t#; |
| 64 | |
| 65 | typedef struct oesui_props_tcxx . . $ oesui_props_t# { |
| 66 | int magiccxx . . $ oesui_props_t#magic.; |
| 67 | llist_tcxx . . $ llist_t# *listcxx . . $ oesui_props_t#list., *tailcxx . . $ oesui_props_t#tail.; |
| 68 | } oesui_props_tcxx . . $ oesui_props_t#; |
| 69 | |
| 70 | typedef struct oesui_widget_tcxx . . $ oesui_widget_t# { |
| 71 | int magiccxx . . $ oesui_widget_t#magic.; |
| 72 | oesui_props_tcxx . . $ oesui_props_t# *propscxx . . $ oesui_widget_t#props.; |
| 73 | } oesui_widget_tcxx . . $ oesui_widget_t#; |
| 74 | |
| 75 | |
| 76 | typedef struct oesui_signal_tcxx . . $ oesui_signal_t# { |
| 77 | int magiccxx . . $ oesui_signal_t#magic.; |
| 78 | int lencxx . . $ oesui_signal_t#len.; |
| 79 | oesui_atom_tcxx . . $ oesui_atom_t# msgcxx . . $ oesui_signal_t#msg.[]; |
| 80 | } oesui_signal_tcxx . . $ oesui_signal_t#; |
| 81 | |
| 82 | #define UISIG_ARGcxx . . $ `src/ui.h:82:9`!(sig, n) ((sig)->msg[n]) |
| 83 | #define UISIG_NAMEcxx . . $ `src/ui.h:83:9`!(sig) (UISIG_ARG(sig, 0).s) |
| 84 | |
| 85 | |
| 86 | typedef struct oesui_tcxx . . $ oesui_t# { |
| 87 | int magiccxx . . $ oesui_t#magic.; |
| 88 | SDL_Surface *screencxx . . $ oesui_t#screen.; |
| 89 | oesui_widget_tcxx . . $ oesui_widget_t# *toplevelcxx . . $ oesui_t#toplevel.; |
| 90 | oesui_widget_tcxx . . $ oesui_widget_t# *signalscxx . . $ oesui_t#signals.; /* signals for widgets. */ |
| 91 | int xcxx . . $ oesui_t#x., ycxx . . $ oesui_t#y., wcxx . . $ oesui_t#w., hcxx . . $ oesui_t#h.; /* draw boundaries? */ |
| 92 | int pxcxx . . $ oesui_t#px., pycxx . . $ oesui_t#py., pzcxx . . $ oesui_t#pz.; /* pointer position */ |
| 93 | int (*sighandlercxx . . $ oesui_t#sighandler.)(struct oesui_tcxx . . $ oesui_t# *, oesui_signal_tcxx . . $ oesui_signal_t# *); |
| 94 | int retcodecxx . . $ oesui_t#retcode.; /* communications/synchronization hack. */ |
| 95 | } oesui_tcxx . . $ oesui_t#; |
| 96 | |
| 97 | |
| 98 | typedef struct assetcache_tcxx . . $ assetcache_t# { |
| 99 | int magiccxx . . $ assetcache_t#magic.; |
| 100 | int lencxx . . $ assetcache_t#len.; |
| 101 | int alloccxx . . $ assetcache_t#alloc.; |
| 102 | oesui_propnode_tcxx . . $ oesui_propnode_t# *cachecxx . . $ assetcache_t#cache.; /* array of pairs. */ |
| 103 | } assetcache_tcxx . . $ assetcache_t#; |
| 104 | |
| 105 | |
| 106 | oesui_widget_tcxx . . $ oesui_widget_t# * sexp_to_widgetcxx . . $ sexp_to_widget(d6e1caa4f9ad8b35). (oesui_tcxx . . $ oesui_t# *, sexp_tcxx . . $ sexp_t# *); |
| 107 | llist_tcxx . . $ llist_t# * sexp_to_widgetlistcxx . . $ sexp_to_widgetlist(592f72d00a6d9fdd). (oesui_tcxx . . $ oesui_t# *, sexp_tcxx . . $ sexp_t# *); |
| 108 | |
| 109 | |
| 110 | oesui_propnode_tcxx . . $ oesui_propnode_t# *oesui_propnode_initcxx . . $ oesui_propnode_init(7a7cb34a240a679b). (oesui_propnode_tcxx . . $ oesui_propnode_t# *, const char *key); |
| 111 | void oesui_propnode_deletecxx . . $ oesui_propnode_delete(e81498c30a790d49). (oesui_propnode_tcxx . . $ oesui_propnode_t# *); |
| 112 | |
| 113 | oesui_props_tcxx . . $ oesui_props_t# * oeui_props_initcxx . . $ oeui_props_init(db88831998cc2bbb). (oesui_props_tcxx . . $ oesui_props_t# *); |
| 114 | oesui_props_tcxx . . $ oesui_props_t# * oeui_props_deletecxx . . $ oeui_props_delete(db88831998cc2bbb). (oesui_props_tcxx . . $ oesui_props_t# *); |
| 115 | oesui_propnode_tcxx . . $ oesui_propnode_t# * oeui_props_getcxx . . $ oeui_props_get(6ea40962e328bbac). (oesui_props_tcxx . . $ oesui_props_t# *); |
| 116 | oesui_props_tcxx . . $ oesui_props_t# * oesui_props_set_intcxx . . $ oesui_props_set_int(bdf2c61a8b8c2010). (oesui_props_tcxx . . $ oesui_props_t# *, const char *key, int val); |
| 117 | oesui_props_tcxx . . $ oesui_props_t# * oesui_props_set_floatcxx . . $ oesui_props_set_float(f9390f2fb4865646). (oesui_props_tcxx . . $ oesui_props_t# *, const char *key, float val); |
| 118 | oesui_props_tcxx . . $ oesui_props_t# * oesui_props_set_stringcxx . . $ oesui_props_set_string(ba24942a41498f31). (oesui_props_tcxx . . $ oesui_props_t# *, const char *key, const char * val); |
| 119 | oesui_props_tcxx . . $ oesui_props_t# * oesui_props_set_ptrcxx . . $ oesui_props_set_ptr(c5b3d00dc9fd23a0). (oesui_props_tcxx . . $ oesui_props_t# *, const char *key, void * val); |
| 120 | int oeui_props_get_intcxx . . $ oeui_props_get_int(acccd196d28128ee). (oesui_props_tcxx . . $ oesui_props_t# *, const char *key); |
| 121 | float oeui_props_get_floatcxx . . $ oeui_props_get_float(31dc42f3bf4ff3d4). (oesui_props_tcxx . . $ oesui_props_t# *, const char *key); |
| 122 | const char * oeui_props_get_stringcxx . . $ oeui_props_get_string(819b9e5df68d655d). (oesui_props_tcxx . . $ oesui_props_t# *, const char *key); |
| 123 | void * oeui_props_get_ptrcxx . . $ oeui_props_get_ptr(c7650388727036bf). (oesui_props_tcxx . . $ oesui_props_t# *, const char *key); |
| 124 | |
| 125 | oesui_tcxx . . $ oesui_t# * oesui_initcxx . . $ oesui_init(9c3a3732f6a0842b). (oesui_tcxx . . $ oesui_t# *); |
| 126 | oesui_tcxx . . $ oesui_t# * oesui_init_surfacecxx . . $ oesui_init_surface(beb0cc957d9e5acc). (oesui_tcxx . . $ oesui_t# *, SDL_Surface *sdlscreen); |
| 127 | void oesui_deletecxx . . $ oesui_delete(7752674cef154eaa). (oesui_tcxx . . $ oesui_t# *); |
| 128 | int oesui_loadcxx . . $ oesui_load(4540eefb18608ff5). (oesui_tcxx . . $ oesui_t# *, const char *fname); |
| 129 | int oesui_eventcxx . . $ oesui_event(d20ac4a2bf684293). (oesui_tcxx . . $ oesui_t# *, int evtype, int parm); |
| 130 | int oesui_opencxx . . $ oesui_open(4540eefb18608ff5). (oesui_tcxx . . $ oesui_t# *, const char *tlname); |
| 131 | int oesui_loopcxx . . $ oesui_loop(7f84c27812e048a1). (oesui_tcxx . . $ oesui_t# *); /* main gui loop */ |
| 132 | int oesui_sighandlecxx . . $ oesui_sighandle(10083bca6c1c8e25). (oesui_tcxx . . $ oesui_t# *, int (*sighandle)(oesui_tcxx . . $ oesui_t# *, oesui_signal_tcxx . . $ oesui_signal_t# *)); |
| 133 | |
| 134 | #endif /* OESUI_H_ */ |
| 135 |