42 typedef struct UiListPtr UiListPtr; |
42 typedef struct UiListPtr UiListPtr; |
43 typedef struct UiListVar UiListVar; |
43 typedef struct UiListVar UiListVar; |
44 typedef struct UiGroupWidget UiGroupWidget; |
44 typedef struct UiGroupWidget UiGroupWidget; |
45 |
45 |
46 struct UiContext { |
46 struct UiContext { |
47 UiObject *toplevel; |
47 UiObject *obj; |
48 UcxMempool *mempool; |
48 UcxMempool *mempool; |
49 UcxMap *vars; // key: char* value: UiVar* |
49 UcxMap *vars; // key: char* value: UiVar* |
|
50 void *document; |
50 UcxList *groups; // int list |
51 UcxList *groups; // int list |
51 UcxList *group_widgets; // UiGroupWidget* list |
52 UcxList *group_widgets; // UiGroupWidget* list |
52 |
53 |
53 #ifdef UI_GTK |
54 #ifdef UI_GTK |
54 GtkAccelGroup *accel_group; |
55 GtkAccelGroup *accel_group; |
82 UI_VAR_TEXT, |
83 UI_VAR_TEXT, |
83 UI_VAR_LIST |
84 UI_VAR_LIST |
84 }; |
85 }; |
85 |
86 |
86 UiContext* uic_context(UiObject *toplevel, UcxMempool *mp); |
87 UiContext* uic_context(UiObject *toplevel, UcxMempool *mp); |
87 UiVar* uic_getvar(UiContext *ctx, char *name); |
88 UiVar* uic_get_var(UiContext *ctx, char *name); |
88 UiVar* uic_connect_var(UiContext *ctx, char *name, int type); |
89 UiVar* uic_connect_var(UiContext *ctx, char *name, int type); |
|
90 void uic_move_var(UiVar *from, UiVar *to, int set); |
|
91 void uic_reg_var(UiContext *ctx, char *name, int type, size_t vs, void *value); |
|
92 void uic_add_var( |
|
93 UiContext *ctx, |
|
94 char *name, |
|
95 UiVar *newvar, |
|
96 int type, |
|
97 size_t vs); |
|
98 |
89 void* uic_create_value(UcxAllocator *a, int type); |
99 void* uic_create_value(UcxAllocator *a, int type); |
90 |
100 |
91 void uic_check_group_widgets(UiContext *ctx); |
101 void uic_check_group_widgets(UiContext *ctx); |
92 void uic_add_group_widget(UiContext *ctx, void *widget, UcxList *groups); |
102 void uic_add_group_widget(UiContext *ctx, void *widget, UcxList *groups); |
93 |
103 |