| 41 #endif |
41 #endif |
| 42 |
42 |
| 43 typedef struct UiVar UiVar; |
43 typedef struct UiVar UiVar; |
| 44 typedef struct UiListPtr UiListPtr; |
44 typedef struct UiListPtr UiListPtr; |
| 45 typedef struct UiListVar UiListVar; |
45 typedef struct UiListVar UiListVar; |
| 46 typedef struct UiGroupWidget UiGroupWidget; |
46 typedef struct UiStateWidget UiStateWidget; |
| 47 typedef struct UiDestroyHandler UiDestroyHandler; |
47 typedef struct UiDestroyHandler UiDestroyHandler; |
| 48 |
48 |
| 49 typedef enum UiVarType { |
49 typedef enum UiVarType { |
| 50 UI_VAR_SPECIAL = 0, |
50 UI_VAR_SPECIAL = 0, |
| 51 UI_VAR_INTEGER, |
51 UI_VAR_INTEGER, |
| 67 void *document; |
67 void *document; |
| 68 CxList *documents; |
68 CxList *documents; |
| 69 |
69 |
| 70 CxMap *vars; |
70 CxMap *vars; |
| 71 |
71 |
| 72 CxList *groups; // int list |
72 CxList *states; // int list |
| 73 CxList *group_widgets; // UiGroupWidget list |
73 CxList *state_widgets; // UiGroupWidget list |
| 74 |
74 |
| 75 void (*attach_document)(UiContext *ctx, void *document); |
75 void (*attach_document)(UiContext *ctx, void *document); |
| 76 void (*detach_document2)(UiContext *ctx, void *document); |
76 void (*detach_document2)(UiContext *ctx, void *document); |
| 77 |
77 |
| 78 char *title; |
78 char *title; |
| 143 void uic_unbind_var(UiVar *var); |
143 void uic_unbind_var(UiVar *var); |
| 144 const char *uic_type2str(UiVarType type); |
144 const char *uic_type2str(UiVarType type); |
| 145 |
145 |
| 146 void uic_reg_var(UiContext *ctx, const char *name, UiVarType type, void *value); |
146 void uic_reg_var(UiContext *ctx, const char *name, UiVarType type, void *value); |
| 147 |
147 |
| 148 size_t uic_group_array_size(const int *groups); |
148 size_t uic_state_array_size(const int *states); |
| 149 void uic_check_group_widgets(UiContext *ctx); |
149 void uic_check_state_widgets(UiContext *ctx); |
| 150 void uic_add_group_widget(UiContext *ctx, void *widget, ui_enablefunc enable, CxList *groups); |
150 void uic_add_state_widget(UiContext *ctx, void *widget, ui_enablefunc enable, CxList *states); |
| 151 void uic_add_group_widget_i(UiContext *ctx, void *widget, ui_enablefunc enable, const int *groups, size_t numgroups); |
151 void uic_add_state_widget_i(UiContext *ctx, void *widget, ui_enablefunc enable, const int *states, size_t numstates); |
| 152 void uic_remove_group_widget(UiContext *ctx, void *widget); |
152 void uic_remove_state_widget(UiContext *ctx, void *widget); |
| 153 |
153 |
| 154 #ifdef __cplusplus |
154 #ifdef __cplusplus |
| 155 } |
155 } |
| 156 #endif |
156 #endif |
| 157 |
157 |