--- a/ui/cocoa/text.m Fri May 30 17:55:57 2025 +0200 +++ b/ui/cocoa/text.m Sat May 31 20:57:26 2025 +0200 @@ -31,7 +31,7 @@ #import "Container.h" #import <objc/runtime.h> -UIWIDGET ui_textarea_create(UiObject *obj, UiTextAreaArgs args) { +UIWIDGET ui_textarea_create(UiObject *obj, UiTextAreaArgs *args) { NSTextView *textview = [[NSTextView alloc] init]; textview.autoresizingMask = NSViewWidthSizable; textview.minSize = NSMakeSize(0, 0); @@ -45,7 +45,7 @@ ui_container_add(obj, scrollview, &layout, TRUE); - UiVar* var = uic_widget_var(obj->ctx, obj->ctx, args.value, args.varname, UI_VAR_TEXT); + UiVar* var = uic_widget_var(obj->ctx, obj->ctx, args->value, args->varname, UI_VAR_TEXT); if(var) { UiText *text = var->value; text->obj = (__bridge void*)textview; @@ -137,7 +137,7 @@ /* -------------------------- TextField -------------------------- */ -static UIWIDGET textfield_create(UiObject *obj, UiTextFieldArgs args, BOOL password, BOOL frameless) { +static UIWIDGET textfield_create(UiObject *obj, UiTextFieldArgs *args, BOOL password, BOOL frameless) { NSTextField *textfield; if(password) { textfield = [[NSSecureTextField alloc] init]; @@ -152,7 +152,7 @@ UiLayout layout = UI_INIT_LAYOUT(args); ui_container_add(obj, textfield, &layout, FALSE); - UiVar* var = uic_widget_var(obj->ctx, obj->ctx, args.value, args.varname, UI_VAR_STRING); + UiVar* var = uic_widget_var(obj->ctx, obj->ctx, args->value, args->varname, UI_VAR_STRING); if(var) { UiString *s = var->value; if(s->value.ptr) { @@ -169,15 +169,15 @@ return (__bridge void*)textfield; } -UIWIDGET ui_textfield_create(UiObject *obj, UiTextFieldArgs args) { +UIWIDGET ui_textfield_create(UiObject *obj, UiTextFieldArgs *args) { return textfield_create(obj, args, FALSE, FALSE); } -UIWIDGET ui_frameless_textfield_create(UiObject* obj, UiTextFieldArgs args) { +UIWIDGET ui_frameless_textfield_create(UiObject* obj, UiTextFieldArgs *args) { return textfield_create(obj, args, FALSE, TRUE); } -UIWIDGET ui_passwordfield_create(UiObject* obj, UiTextFieldArgs args) { +UIWIDGET ui_passwordfield_create(UiObject* obj, UiTextFieldArgs *args) { return textfield_create(obj, args, TRUE, FALSE); }