37 |
37 |
38 #define UI_FILEDIALOG_SELECT_SINGLE 0 |
38 #define UI_FILEDIALOG_SELECT_SINGLE 0 |
39 #define UI_FILEDIALOG_SELECT_MULTI 1 |
39 #define UI_FILEDIALOG_SELECT_MULTI 1 |
40 #define UI_FILEDIALOG_SELECT_FOLDER 2 |
40 #define UI_FILEDIALOG_SELECT_FOLDER 2 |
41 |
41 |
|
42 typedef struct UiDialogArgs { |
|
43 const char *title; |
|
44 const char *content; |
|
45 const char *button1_label; |
|
46 const char *button2_label; |
|
47 const char *closebutton_label; |
|
48 ui_callback result; |
|
49 void *resultdata; |
|
50 } UiDialogArgs; |
|
51 |
42 UIEXPORT UiObject* ui_window(const char *title, void *window_data); |
52 UIEXPORT UiObject* ui_window(const char *title, void *window_data); |
43 UIEXPORT UiObject* ui_simple_window(const char *title, void *window_data); |
53 UIEXPORT UiObject* ui_simple_window(const char *title, void *window_data); |
44 |
54 |
45 UIEXPORT void ui_window_size(UiObject *obj, int width, int height); |
55 UIEXPORT void ui_window_size(UiObject *obj, int width, int height); |
|
56 |
|
57 #define ui_dialog(parent, ...) ui_dialog_create(parent, (UiDialogArgs){ __VA_ARGS__ } ) |
|
58 |
|
59 UIEXPORT void ui_dialog_create(UiObject *parent, UiDialogArgs args); |
46 |
60 |
47 UIEXPORT void ui_openfiledialog(UiObject *obj, unsigned int mode, ui_callback file_selected_callback, void *cbdata); |
61 UIEXPORT void ui_openfiledialog(UiObject *obj, unsigned int mode, ui_callback file_selected_callback, void *cbdata); |
48 UIEXPORT void ui_savefiledialog(UiObject *obj, unsigned int mode, ui_callback file_selected_callback, void *cbdata); |
62 UIEXPORT void ui_savefiledialog(UiObject *obj, unsigned int mode, ui_callback file_selected_callback, void *cbdata); |
49 |
63 |
50 |
64 |