ui/common/context.h

changeset 110
c00e968d018b
parent 108
77254bd6dccb
equal deleted inserted replaced
109:c3dfcb8f0be7 110:c00e968d018b
65 CxList *destroy_handler; 65 CxList *destroy_handler;
66 66
67 void *document; 67 void *document;
68 CxList *documents; 68 CxList *documents;
69 69
70 CxMap *vars; // manually created context vars 70 CxMap *vars;
71 CxMap *vars_unbound; // unbound vars created by widgets
72 71
73 CxList *groups; // int list 72 CxList *groups; // int list
74 CxList *group_widgets; // UiGroupWidget list 73 CxList *group_widgets; // UiGroupWidget list
75 74
76 void (*attach_document)(UiContext *ctx, void *document); 75 void (*attach_document)(UiContext *ctx, void *document);
90 89
91 ui_callback close_callback; 90 ui_callback close_callback;
92 void *close_data; 91 void *close_data;
93 }; 92 };
94 93
95 // UiVar replacement, rename it to UiVar when finished
96 struct UiVar { 94 struct UiVar {
97 void *value; 95 void *value;
98 void *original_value; 96 void *original_value;
99 UiVarType type; 97 UiVarType type;
100 UiVar *from; 98 UiVar *from;
131 UiVar* uic_get_var(UiContext *ctx, const char *name); 129 UiVar* uic_get_var(UiContext *ctx, const char *name);
132 UiVar* uic_create_var(UiContext *ctx, const char *name, UiVarType type); 130 UiVar* uic_create_var(UiContext *ctx, const char *name, UiVarType type);
133 UiVar* uic_create_value_var(UiContext *ctx, void *value); 131 UiVar* uic_create_value_var(UiContext *ctx, void *value);
134 void* uic_create_value(UiContext *ctx, UiVarType type); 132 void* uic_create_value(UiContext *ctx, UiVarType type);
135 133
136 UiVar* uic_widget_var(UiContext* toplevel, UiContext* current, void* value, const char* varname, UiVarType type); 134 UiVar* uic_widget_var(UiContext *toplevel, UiContext *current, void *value, const char *varname, UiVarType type);
137 135
138 void uic_copy_binding(UiVar *from, UiVar *to, UiBool copytodoc); 136 void uic_copy_binding(UiVar *from, UiVar *to, UiBool copytodoc);
139 void uic_save_var2(UiVar *var); 137 void uic_save_var(UiVar *var);
140 void uic_unbind_var(UiVar *var); 138 void uic_unbind_var(UiVar *var);
141 139
142 void uic_reg_var(UiContext *ctx, const char *name, UiVarType type, void *value); 140 void uic_reg_var(UiContext *ctx, const char *name, UiVarType type, void *value);
143 141
144 void uic_remove_bound_var(UiContext *ctx, UiVar *var); 142 void uic_remove_bound_var(UiContext *ctx, UiVar *var);

mercurial