ui/common/context.h

changeset 1
eb5269000bc8
parent 0
1f419bd32da1
child 2
eeb50c534497
equal deleted inserted replaced
0:1f419bd32da1 1:eb5269000bc8
35 35
36 #ifdef __cplusplus 36 #ifdef __cplusplus
37 extern "C" { 37 extern "C" {
38 #endif 38 #endif
39 39
40 typedef struct UiDocument UiDocument; 40 typedef struct UiVar UiVar;
41 typedef struct UiVar UiVar;
42 41
43 struct UiContext { 42 struct UiContext {
44 UiObject *toplevel; 43 UiObject *toplevel;
45 UcxMempool *mempool; 44 UcxMempool *mempool;
46 UcxAllocator *allocator; 45 UcxAllocator *allocator;
47 UcxMap *vars; // key: char* value: UiVar* 46 UcxMap *vars; // key: char* value: UiVar*
48 }; 47 };
49 48
50 struct UiDocument {
51 UcxMempool *mempool;
52 UcxAllocator *allocator;
53 UcxMap *vars; // key: char* value: UiVar*
54 };
55
56 struct UiVar { 49 struct UiVar {
57 void *value; 50 void *value;
58 int type; 51 int type;
52 int isextern;
59 }; 53 };
60 54
61 void uic_docmgr_init();
62 UiContext* uic_context(UiObject *toplevel, UcxMempool *mp); 55 UiContext* uic_context(UiObject *toplevel, UcxMempool *mp);
63 56
64 UiVar* uic_getvar(UiObject *obj, char *name); 57 UiVar* uic_getvar(UiObject *obj, char *name);
65 UiVar* uic_addplaceholder(UiObject *obj, char *name); 58 void uic_rmvar(UiObject *obj, char *name);
66 59
67 60
68 #ifdef __cplusplus 61 #ifdef __cplusplus
69 } 62 }
70 #endif 63 #endif

mercurial