38 |
38 |
39 #ifdef __cplusplus |
39 #ifdef __cplusplus |
40 extern "C" { |
40 extern "C" { |
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 UiGroupWidget UiGroupWidget; |
|
47 typedef struct UiDestroyHandler UiDestroyHandler; |
47 |
48 |
48 typedef enum UiVarType { |
49 typedef enum UiVarType { |
49 UI_VAR_SPECIAL = 0, |
50 UI_VAR_SPECIAL = 0, |
50 UI_VAR_INTEGER, |
51 UI_VAR_INTEGER, |
51 UI_VAR_DOUBLE, |
52 UI_VAR_DOUBLE, |
104 ui_enablefunc enable; |
106 ui_enablefunc enable; |
105 int *groups; |
107 int *groups; |
106 int numgroups; |
108 int numgroups; |
107 }; |
109 }; |
108 |
110 |
|
111 struct UiDestroyHandler { |
|
112 cx_destructor_func destructor; |
|
113 void *data; |
|
114 }; |
|
115 |
109 |
116 |
110 void uic_init_global_context(void); |
117 void uic_init_global_context(void); |
111 |
118 |
112 UiContext* uic_context(UiObject *toplevel, CxMempool *mp); |
119 UiContext* uic_context(UiObject *toplevel, CxMempool *mp); |
113 UiContext* uic_root_context(UiContext *ctx); |
120 UiContext* uic_root_context(UiContext *ctx); |
|
121 void uic_context_add_destructor(UiContext *ctx, cx_destructor_func func, void *data); |
114 void uic_context_set_document(UiContext *ctx, void *document); // deprecated |
122 void uic_context_set_document(UiContext *ctx, void *document); // deprecated |
115 void uic_context_detach_document(UiContext *ctx); // deprecated |
123 void uic_context_detach_document(UiContext *ctx); // deprecated |
116 |
124 |
117 void uic_context_prepare_close(UiContext *ctx); |
125 void uic_context_prepare_close(UiContext *ctx); |
118 |
126 |