# HG changeset patch # User Olaf Wintermann # Date 1761042857 -7200 # Node ID 6b7a178cff7c8aa5072c494829b7188363d2c4b4 # Parent be3df094f8db7c3eba889b687768a55e8fab5a59 add some missing functions (Cocoa) diff -r be3df094f8db -r 6b7a178cff7c ui/cocoa/list.m --- 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); diff -r be3df094f8db -r 6b7a178cff7c ui/cocoa/window.m --- 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 +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) {