ui/ui/toolkit.h

changeset 146
dd0ae1c62a72
parent 145
853685152c1d
child 147
2e384acc89a6
equal deleted inserted replaced
145:853685152c1d 146:dd0ae1c62a72
103 typedef struct UiStr UiStr; 103 typedef struct UiStr UiStr;
104 104
105 /* begin opaque types */ 105 /* begin opaque types */
106 typedef struct UiContext UiContext; 106 typedef struct UiContext UiContext;
107 typedef struct UiContainer UiContainer; 107 typedef struct UiContainer UiContainer;
108
109 typedef struct UiIcon UiIcon;
110 typedef struct UiImage UiImage;
108 /* end opaque types */ 111 /* end opaque types */
109 112
110 typedef struct UiTabbedPane UiTabbedPane; 113 typedef struct UiTabbedPane UiTabbedPane;
111 114
112 enum UiMouseEventType { UI_PRESS = 0, UI_PRESS2 }; 115 enum UiMouseEventType { UI_PRESS = 0, UI_PRESS2 };
329 void ui_notify(UiObserver *observer, void *data); 332 void ui_notify(UiObserver *observer, void *data);
330 void ui_notify_except(UiObserver *observer, UiObserver *exc, void *data); 333 void ui_notify_except(UiObserver *observer, UiObserver *exc, void *data);
331 void ui_notify_evt(UiObserver *observer, UiEvent *event); 334 void ui_notify_evt(UiObserver *observer, UiEvent *event);
332 335
333 336
334 UiList* ui_list_new(void); 337 UiList* ui_list_new(UiContext *ctx, char *name);
335 void* ui_list_first(UiList *list); 338 void* ui_list_first(UiList *list);
336 void* ui_list_next(UiList *list); 339 void* ui_list_next(UiList *list);
337 void* ui_list_get(UiList *list, int i); 340 void* ui_list_get(UiList *list, int i);
338 int ui_list_count(UiList *list); 341 int ui_list_count(UiList *list);
339 void ui_list_append(UiList *list, void *data); 342 void ui_list_append(UiList *list, void *data);
342 void ui_list_notify(UiList *list); 345 void ui_list_notify(UiList *list);
343 346
344 void ui_clipboard_set(char *str); 347 void ui_clipboard_set(char *str);
345 char* ui_clipboard_get(); 348 char* ui_clipboard_get();
346 349
347 void ui_add_image(char *imgname, char *filename); 350 void ui_add_image(char *imgname, char *filename); // TODO: remove?
348 351
349 // general widget functions 352 // general widget functions
350 void ui_set_enabled(UIWIDGET widget, int enabled); 353 void ui_set_enabled(UIWIDGET widget, int enabled);
351 void ui_set_show_all(UIWIDGET widget, int value); 354 void ui_set_show_all(UIWIDGET widget, int value);
352 void ui_set_visible(UIWIDGET widget, int visible); 355 void ui_set_visible(UIWIDGET widget, int visible);

mercurial