71 |
71 |
72 #ifdef __cplusplus |
72 #ifdef __cplusplus |
73 extern "C" { |
73 extern "C" { |
74 #endif |
74 #endif |
75 |
75 |
76 #define UI_GROUP_SELECTION 20000 |
76 #define UI_GROUP_SELECTION 20000 |
77 |
77 |
78 /* public types */ |
78 /* public types */ |
79 typedef int UiBool; |
79 typedef int UiBool; |
80 |
80 |
81 typedef struct UiObject UiObject; |
81 typedef struct UiObject UiObject; |
82 typedef struct UiEvent UiEvent; |
82 typedef struct UiEvent UiEvent; |
83 typedef struct UiObserver UiObserver; |
83 typedef struct UiObserver UiObserver; |
84 |
84 |
85 typedef struct UiInteger UiInteger; |
85 typedef struct UiInteger UiInteger; |
86 typedef struct UiString UiString; |
86 typedef struct UiString UiString; |
87 typedef struct UiText UiText; |
87 typedef struct UiText UiText; |
88 typedef struct UiList UiList; |
88 typedef struct UiList UiList; |
89 |
89 |
90 /* private types */ |
90 /* private types */ |
91 typedef struct UiContext UiContext; |
91 typedef struct UiContext UiContext; |
92 typedef struct UiContainer UiContainer; |
92 typedef struct UiContainer UiContainer; |
93 |
93 |
94 typedef struct UiTabbedPane UiTabbedPane; |
94 typedef struct UiTabbedPane UiTabbedPane; |
95 |
95 |
96 #define ui_getval(val) (val).get(&(val)) |
96 #define ui_getval(val) (val).get(&(val)) |
97 #define ui_setval(val, v) (val).set(&(val), v) |
97 #define ui_setval(val, v) (val).set(&(val), v) |
184 struct UiText { |
184 struct UiText { |
185 void (*set)(UiText*, char*); |
185 void (*set)(UiText*, char*); |
186 char* (*get)(UiText*); |
186 char* (*get)(UiText*); |
187 char* (*getsubstr)(UiText*, int, int); // text, begin, end |
187 char* (*getsubstr)(UiText*, int, int); // text, begin, end |
188 void (*insert)(UiText*, int, char*); |
188 void (*insert)(UiText*, int, char*); |
|
189 void (*setposition)(UiText*,int); |
189 int (*position)(UiText*); |
190 int (*position)(UiText*); |
190 void (*selection)(UiText*, int*, int*); // text, begin, end |
191 void (*selection)(UiText*, int*, int*); // text, begin, end |
191 int (*length)(UiText*); |
192 int (*length)(UiText*); |
192 void (*remove)(UiText*, int, int); // text, begin, end |
193 void (*remove)(UiText*, int, int); // text, begin, end |
193 char *value; |
194 char *value; |
|
195 int pos; |
194 void *obj; |
196 void *obj; |
195 void *undomgr; |
197 void *undomgr; |
196 // TODO: replace, ... |
198 // TODO: replace, ... |
197 }; |
199 }; |
198 |
200 |