95 typedef struct UiString UiString; |
95 typedef struct UiString UiString; |
96 typedef struct UiText UiText; |
96 typedef struct UiText UiText; |
97 typedef struct UiList UiList; |
97 typedef struct UiList UiList; |
98 typedef struct UiRange UiRange; |
98 typedef struct UiRange UiRange; |
99 |
99 |
|
100 typedef struct UiStr UiStr; |
|
101 |
100 /* begin opaque types */ |
102 /* begin opaque types */ |
101 typedef struct UiContext UiContext; |
103 typedef struct UiContext UiContext; |
102 typedef struct UiContainer UiContainer; |
104 typedef struct UiContainer UiContainer; |
103 /* end opaque types */ |
105 /* end opaque types */ |
104 |
106 |
111 typedef void(*ui_callback)(UiEvent*, void*); /* event, user data */ |
113 typedef void(*ui_callback)(UiEvent*, void*); /* event, user data */ |
112 |
114 |
113 typedef void*(*ui_model_getvalue_f)(void*, int); |
115 typedef void*(*ui_model_getvalue_f)(void*, int); |
114 |
116 |
115 typedef int(*ui_threadfunc)(void*); |
117 typedef int(*ui_threadfunc)(void*); |
|
118 |
|
119 typedef void(*ui_freefunc)(void*); |
116 |
120 |
117 struct UiObject { |
121 struct UiObject { |
118 /* |
122 /* |
119 * native widget |
123 * native widget |
120 */ |
124 */ |
205 void (*setposition)(UiText*,int); |
214 void (*setposition)(UiText*,int); |
206 int (*position)(UiText*); |
215 int (*position)(UiText*); |
207 void (*selection)(UiText*, int*, int*); /* text, begin, end */ |
216 void (*selection)(UiText*, int*, int*); /* text, begin, end */ |
208 int (*length)(UiText*); |
217 int (*length)(UiText*); |
209 void (*remove)(UiText*, int, int); /* text, begin, end */ |
218 void (*remove)(UiText*, int, int); /* text, begin, end */ |
210 char *value; |
219 UiStr value; |
211 int pos; |
220 int pos; |
212 void *obj; |
221 void *obj; |
213 void *undomgr; |
222 void *undomgr; |
214 // TODO: replacefunc, ... |
223 // TODO: replacefunc, ... |
215 UiObserver *observers; |
224 UiObserver *observers; |