ui/server/toolkit.h

changeset 981
1d47e71f26b6
parent 950
39641cf150eb
child 982
9102a53c5385
equal deleted inserted replaced
980:39cb60b6a81b 981:1d47e71f26b6
32 #include <inttypes.h> 32 #include <inttypes.h>
33 #include "../ui/toolkit.h" 33 #include "../ui/toolkit.h"
34 #include "../common/context.h" 34 #include "../common/context.h"
35 #include "../common/object.h" 35 #include "../common/object.h"
36 36
37 #include <cx/list.h>
37 #include <cx/string.h> 38 #include <cx/string.h>
38 39
39 #ifdef __cplusplus 40 #ifdef __cplusplus
40 extern "C" { 41 extern "C" {
41 #endif 42 #endif
42 43
44 typedef struct UiSrvObj UiSrvObj;
45
43 typedef struct UiServerEvent UiServerEvent; 46 typedef struct UiServerEvent UiServerEvent;
44 typedef struct UiServerEventData UiServerEventData; 47 typedef struct UiServerEventData UiServerEventData;
45 typedef void(*ui_srvevent_func)(UiServerEventData *event, void *userdata); 48 typedef void(*ui_srvevent_func)(UiServerEventData *event, void *userdata);
49
50 typedef cxmutstr (*ui_serialize_func)(UiWidget *w);
46 51
47 struct UiServerEventData { 52 struct UiServerEventData {
48 UiObject *obj; 53 UiObject *obj;
49 cxmutstr str; 54 cxmutstr str;
50 int intvalue; 55 int intvalue;
54 UiServerEventData event; 59 UiServerEventData event;
55 ui_srvevent_func callback; 60 ui_srvevent_func callback;
56 void *userdata; 61 void *userdata;
57 }; 62 };
58 63
64 struct UiSrvObj {
65 cxmutstr id;
66 };
67
68 struct UiWidget {
69 UiSrvObj *obj;
70 cxmutstr id;
71 UiVar *var;
72 cxmutstr var_id;
73 UiVarType var_type;
74 CxList *children;
75 cxmutstr args;
76 UiBool visible;
77 UiBool enabled;
78 ui_serialize_func *serialize;
79 };
80
59 void ui_server_message_received(cxstring msg); 81 void ui_server_message_received(cxstring msg);
60 82
61 83
62 #ifdef __cplusplus 84 #ifdef __cplusplus
63 } 85 }

mercurial