fix cocoa makefile

Tue, 21 Oct 2025 12:27:20 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 21 Oct 2025 12:27:20 +0200
changeset 868
be3df094f8db
parent 867
83bb0dd7123f
child 869
6b7a178cff7c

fix cocoa makefile

ui/cocoa/ListDataSource.m file | annotate | diff | comparison | revisions
ui/cocoa/label.m file | annotate | diff | comparison | revisions
ui/cocoa/objs.mk file | annotate | diff | comparison | revisions
ui/cocoa/toolkit.h file | annotate | diff | comparison | revisions
ui/cocoa/toolkit.m file | annotate | diff | comparison | revisions
ui/cocoa/widget.h file | annotate | diff | comparison | revisions
ui/cocoa/widget.m file | annotate | diff | comparison | revisions
--- a/ui/cocoa/ListDataSource.m	Mon Oct 20 21:16:53 2025 +0200
+++ b/ui/cocoa/ListDataSource.m	Tue Oct 21 12:27:20 2025 +0200
@@ -98,6 +98,12 @@
             case UI_ICON_TEXT_FREE: {
                 break;
             }
+            case UI_STRING_EDITABLE: {
+                break;
+            }
+            case UI_BOOL_EDITABLE: {
+                break;
+            }
         }
         
         if(freeResult) {
--- a/ui/cocoa/label.m	Mon Oct 20 21:16:53 2025 +0200
+++ b/ui/cocoa/label.m	Tue Oct 21 12:27:20 2025 +0200
@@ -27,7 +27,7 @@
  */
 
 #import "label.h"
-#import "container.h"
+#import "Container.h"
 
 #import <string.h>
 
--- a/ui/cocoa/objs.mk	Mon Oct 20 21:16:53 2025 +0200
+++ b/ui/cocoa/objs.mk	Tue Oct 21 12:27:20 2025 +0200
@@ -50,6 +50,7 @@
 COCOAOBJ += widget.o
 COCOAOBJ += image.o
 COCOAOBJ += entry.o
+COCOAOBJ += TabView.o
 
 TOOLKITOBJS += $(COCOAOBJ:%=$(COCOA_OBJPRE)%)
 TOOLKITSOURCE += $(COCOAOBJ:%.o=cocoa/%.m)
--- a/ui/cocoa/toolkit.h	Mon Oct 20 21:16:53 2025 +0200
+++ b/ui/cocoa/toolkit.h	Tue Oct 21 12:27:20 2025 +0200
@@ -31,10 +31,10 @@
 #include "../common/context.h"
 #include "../common/object.h"
 
-@interface UiAppCallback : NSObject {
-    ui_threadfunc callback;
-    void          *userdata;
-}
+@interface UiAppCallback : NSObject
+
+@property    ui_threadfunc callback;
+@property    void          *userdata;
 
 - (id) initWithCallback:(ui_threadfunc)func userdata:(void*)userdata;
 
--- a/ui/cocoa/toolkit.m	Mon Oct 20 21:16:53 2025 +0200
+++ b/ui/cocoa/toolkit.m	Tue Oct 21 12:27:20 2025 +0200
@@ -178,8 +178,8 @@
 @implementation UiAppCallback
 
 - (id) initWithCallback:(ui_threadfunc)func userdata:(void*)userdata {
-    self->callback = func;
-    self->userdata = userdata;
+    _callback = func;
+    _userdata = userdata;
     return self;
 }
 
@@ -190,7 +190,9 @@
 }
 
 - (void) mainThread:(id)n {
-    callback(userdata);
+    if(_callback) {
+        _callback(_userdata);
+    }
 }
 
 @end
--- a/ui/cocoa/widget.h	Mon Oct 20 21:16:53 2025 +0200
+++ b/ui/cocoa/widget.h	Tue Oct 21 12:27:20 2025 +0200
@@ -27,5 +27,5 @@
  */
 
 #import "toolkit.h"
-#import "container.h"
+#import "Container.h"
 #import "../ui/widget.h"
--- a/ui/cocoa/widget.m	Mon Oct 20 21:16:53 2025 +0200
+++ b/ui/cocoa/widget.m	Tue Oct 21 12:27:20 2025 +0200
@@ -45,6 +45,11 @@
 }
 
 
+UIWIDGET ui_separator_create(UiObject *obj, UiWidgetArgs *args) {
+    // TODO
+    return NULL;
+}
+
 
 /* custom widget */
 

mercurial