Tue, 21 Oct 2025 12:34:17 +0200
add some missing functions (Cocoa)
| ui/cocoa/list.m | file | annotate | diff | comparison | revisions | |
| ui/cocoa/window.m | file | annotate | diff | comparison | revisions |
--- a/ui/cocoa/list.m Tue Oct 21 12:27:20 2025 +0200 +++ b/ui/cocoa/list.m Tue Oct 21 12:34:17 2025 +0200 @@ -363,6 +363,18 @@ /* --------------------------- SourceList --------------------------- */ +static ui_sourcelist_update_func sclist_update_callback = NULL; + +void ui_sourcelist_set_update_callback(ui_sourcelist_update_func cb) { + sclist_update_callback = cb; +} + +void ui_sourcelist_updated(void) { + if(sclist_update_callback) { + sclist_update_callback(); + } +} + static void sublist_free(const CxAllocator *a, UiSubList *sl) { cxFree(a, (char*)sl->varname); cxFree(a, (char*)sl->header);
--- a/ui/cocoa/window.m Tue Oct 21 12:27:20 2025 +0200 +++ b/ui/cocoa/window.m Tue Oct 21 12:34:17 2025 +0200 @@ -44,6 +44,11 @@ #include <cx/mempool.h> +static int window_default_width = 650; +static int window_default_height = 550; + +static int splitview_window_default_pos = -1; +static UiBool splitview_window_use_prop = TRUE; static UiObject* create_window(const char *title, BOOL simple, BOOL sidebar, BOOL splitview) { UiObject *obj = uic_object_new_toplevel(); @@ -84,6 +89,15 @@ return create_window(title, FALSE, sidebar, TRUE); } +void ui_window_size(UiObject *obj, int width, int height) { + // TODO +} + +void ui_window_default_size(int width, int height) { + window_default_width = width; + window_default_height = height; +} + /* --------------------------------- File Dialogs --------------------------------- */ void ui_openfiledialog(UiObject *obj, unsigned int mode, ui_callback file_selected_callback, void *cbdata) {