]> uap-core.de Git - note.git/commitdiff
fix some cocoa stuff main
authorOlaf Wintermann <olaf.wintermann@gmail.com>
Wed, 3 Jun 2026 19:12:13 +0000 (21:12 +0200)
committerOlaf Wintermann <olaf.wintermann@gmail.com>
Wed, 3 Jun 2026 19:12:13 +0000 (21:12 +0200)
13 files changed:
ui/Makefile
ui/cocoa/ListDelegate.h
ui/cocoa/ListDelegate.m
ui/cocoa/Toolbar.m
ui/cocoa/container.m
ui/cocoa/list.m
ui/cocoa/text.h
ui/cocoa/text.m
ui/gtk/Makefile
ui/motif/Makefile
ui/motif/menu.c
ui/motif/text.c
ui/server/Makefile

index ad5aad0f563cbf93f8b7de3d6e7ed169a9abf4a8..b03b6d3d1ad64d8e2c1b7d0cf948b077aeecdb34 100644 (file)
@@ -41,8 +41,5 @@ OBJ = $(TOOLKITOBJS) $(COMMONOBJS)
 
 all: $(UI_LIB) $(UI_SHLIB)
 
+include common/Makefile
 include $(TOOLKIT)/Makefile
-
-$(COMMON_OBJPRE)uic_%$(OBJ_EXT): common/%.c
-       $(CC) -o $@ -c -I../ucx/ $(CFLAGS) $(SHLIB_CFLAGS) $(TK_CFLAGS) $<
-
index 27762f79ad8dd926eef5a23b9a5986b3877621a6..6603b82c0bdd01b7d32243cac9a4773f3a9b9380 100644 (file)
 @property UiObject    *obj;
 @property ui_callback onselection;
 @property void        *onselectiondata;
+@property NSString    *onselection_action;
 @property ui_callback onactivate;
 @property void        *onactivatedata;
+@property NSString    *onactivate_action;
 
 - (id)init:(NSTableView*) tableview obj:(UiObject*)obj;
 
index db8ab84329f262fccdcaf10ad633a6d65b0832bf..d4642315a12ed499425ebb9f830fa9afa9e7c615 100644 (file)
 
 - (void)activateEvent:(id)sender {
     NSTableView *table = sender;
+    
+    int row = (int)table.clickedRow;
+    
+    UiListSelection sel;
+    sel.count = 1;
+    sel.rows = &row;
+    
+    UiEvent  event;
+    event.obj = _obj;
+    event.window = event.obj->window;
+    event.document = event.obj->ctx->document;
+    event.eventdata = &sel;
+    event.eventdatatype = UI_EVENT_DATA_LIST_SELECTION;
+    event.intval = row;
+    event.set = ui_get_setop();
+    
     if(_onactivate) {
-        int row = (int)table.clickedRow;
-        
-        UiListSelection sel;
-        sel.count = 1;
-        sel.rows = &row;
-        
-        UiEvent  event;
-        event.obj = _obj;
-        event.window = event.obj->window;
-        event.document = event.obj->ctx->document;
-        event.eventdata = &sel;
-        event.eventdatatype = UI_EVENT_DATA_LIST_SELECTION;
-        event.intval = row;
-        event.set = ui_get_setop();
-        
         _onactivate(&event, _onactivatedata);
     }
+    
+    if(_onselection_action) {
+        uic_action_callback(&event, _onselection_action.UTF8String);
+    }
 }
 
 - (void) tableViewSelectionDidChange:(NSNotification *) notification {
-    if(_onselection && ui_selection_events_is_enabled()) {
+    if(ui_selection_events_is_enabled()) {
         UiListSelection sel = ui_tableview_selection(_tableview);
         
-        UiEvent  event;
+        UiEvent event;
         event.obj = _obj;
         event.window = event.obj->window;
         event.document = event.obj->ctx->document;
         event.eventdatatype = UI_EVENT_DATA_LIST_SELECTION;
         event.intval = 0;
         event.set = ui_get_setop();
-        _onselection(&event, _onselectiondata);
+        
+        if(_onselection) {
+            _onselection(&event, _onselectiondata);
+        }
+        
+        if(_onselection_action) {
+            uic_action_callback(&event, _onselection_action.UTF8String);
+        }
     }
 }
 
index 8817b8ecbf89d40506bc7dd0212b615ea19b5145..e9a09679fac5bc9c8af3a42b78e696efad28700d 100644 (file)
@@ -39,7 +39,21 @@ void ui_toolbar_init(void) {
     
 }
 
+static void toolitem_set_enabled(void *item, int enabled) {
+    NSToolbarItem *i = (__bridge NSToolbarItem*)item;
+    i.enabled = enabled;
+}
 
+static void toolitem_bind_action(UiContext *ctx, NSToolbarItem *item, const char *action) {
+    if(action) {
+        void *widget = (__bridge void*)item;
+        uic_bind_action(ctx, action, widget, (ui_enablefunc)toolitem_set_enabled);
+        UiAction *ui_action = uic_resolve_action(ctx, action);
+        if(!ui_action) {
+            toolitem_set_enabled(widget, FALSE);
+        }
+    }
+}
 
 /* ---------------------      UiToolbar      --------------------- */
 
@@ -219,12 +233,14 @@ NSToolbarItem* ui_nstoolbaritem_create_item(UiObject *obj, UiToolbarItem *item,
         button.image = ui_cocoa_named_icon(item->args.icon);
     }
     
-    if(item->args.onclick) {
+    if(item->args.onclick || item->args.action) {
         EventData *event = [[EventData alloc] init:item->args.onclick userdata:item->args.onclickdata action:item->args.action];
         event.obj = obj;
         button.target = event;
         button.action = @selector(handleEvent:);
         objc_setAssociatedObject(button, "eventdata", event, OBJC_ASSOCIATION_RETAIN);
+        
+        toolitem_bind_action(obj->ctx, button, item->args.action);
     }
     return button;
 }
index b1a5a1ccda19a01e4ad12e9b3273afce5c9f655d..2bd54a203bafa7edf31efed710f3a3665eb76e50 100644 (file)
@@ -143,6 +143,16 @@ UIWIDGET ui_scrolledwindow_create(UiObject *obj, UiFrameArgs *args) {
     return (__bridge void*)scrollview;
 }
 
+static int64_t tabview_get(UiInteger *i) {
+    NSView<TabView, Container> *tabview = (__bridge id)i->obj;
+    return 0;
+}
+
+static void tabview_set(UiInteger *i, int64_t value) {
+    NSView<TabView, Container> *tabview = (__bridge id)i->obj;
+    
+}
+
 UIWIDGET ui_tabview_create(UiObject *obj, UiTabViewArgs *args) {
     NSView<TabView, Container> *tabview;
     switch(args->tabview) {
index c3c45040a982b9988eec72c9c6e853f592b58f61..bf6debac049efc415a7178af0ee02e6906cfbb69 100644 (file)
@@ -54,8 +54,14 @@ static void add_listdelegate(UiObject *obj, NSTableView *tableview, UiListArgs *
     ListDelegate *delegate = [[ListDelegate alloc] init:tableview obj:obj];
     delegate.onactivate = args->onactivate;
     delegate.onactivatedata = args->onactivatedata;
+    if(args->onactivate_action) {
+        delegate.onactivate_action = [[NSString alloc]initWithUTF8String:args->onactivate_action];
+    }
     delegate.onselection = args->onselection;
     delegate.onselectiondata = args->onselectiondata;
+    if(args->onselection_action) {
+        delegate.onselection_action = [[NSString alloc]initWithUTF8String:args->onselection_action];
+    }
     tableview.delegate = delegate;
     objc_setAssociatedObject(tableview, "ui_listdelegate", delegate, OBJC_ASSOCIATION_RETAIN);
     tableview.doubleAction = @selector(activateEvent:);
index aa4d410eaf6050dbd292e2c3be271823b8a16d64..eec2fe4f88351b5712267a744862214d8fed6672 100644 (file)
@@ -48,6 +48,22 @@ void  ui_textarea_remove(UiText *text, int begin, int end);
 char* ui_textfield_get(UiString *s);
 void ui_textfield_set(UiString *s, const char *value);
 
+
+@interface TextAreaDelegate: NSObject<NSTextViewDelegate, NSTextDelegate>
+
+@property UiObject *obj;
+@property UiVar *var;
+@property ui_callback onchange;
+@property void *onchangedata;
+@property NSString *onchange_action;
+@property ui_callback ontextchanged;
+@property void *ontextchangeddata;
+@property NSString *ontextchanged_action;
+
+- (id)init:(UiObject*)obj var:(UiVar*)var args:(UiTextAreaArgs*)args;
+
+@end
+
 @interface TextFieldDelegate : NSObject<NSTextFieldDelegate>
 
 @property UiObject *obj;
index 0d6100b5379593e740d1a7d7da92421f4b6723f6..b2709d673292dba7c7607d6cba39baad146a0a1c 100644 (file)
@@ -72,6 +72,10 @@ UIWIDGET ui_textarea_create(UiObject *obj, UiTextAreaArgs *args) {
         text->remove = ui_textarea_remove;
     }
     
+    if(args->onchange || args->ontextchanged || args->onchange_action || args->ontextchanged_action) {
+        
+    }
+    
     return (__bridge void*)scrollview;
 }
 
@@ -269,6 +273,110 @@ void ui_textarea_remove(UiText *text, int begin, int end) {
 
 
 
+@implementation TextAreaDelegate
+
+- (id)init:(UiObject*)obj var:(UiVar*)var args:(UiTextAreaArgs*)args {
+    self.onchange = args->onchange;
+    self.onchangedata = args->onchangedata;
+    if(args->onchange_action) {
+        self.onchange_action = [[NSString alloc]initWithUTF8String:args->onchange_action];
+    }
+    self.ontextchanged = args->ontextchanged;
+    self.ontextchangeddata = args->ontextchangeddata;
+    if(args->ontextchanged_action) {
+        self.ontextchanged_action = [[NSString alloc]initWithUTF8String:args->ontextchanged_action];
+    }
+    self.obj = obj;
+    self.var = var;
+    return self;
+}
+
+- (BOOL) textView:(NSTextView *) textView
+    shouldChangeTextInRange:(NSRange) affectedCharRange
+    replacementString:(NSString *) replacementString {
+    
+    if(_onchange == nil && _onchange_action == nil) {
+        return YES;
+    }
+    
+    UiEvent event;
+    event.obj = _obj;
+    event.window = event.obj->window;
+    event.document = event.obj->ctx->document;
+    event.intval = 0;
+    event.set = ui_get_setop();
+    // event data not set yet
+    
+    if(affectedCharRange.length > 0) {
+        UiTextChangeEventData eventdata;
+        eventdata.type = UI_TEXT_DELETE;
+        eventdata.begin = (int)affectedCharRange.location;
+        eventdata.end = (int)(affectedCharRange.location + affectedCharRange.length);
+        eventdata.text = NULL;
+        eventdata.length = 0;
+        
+        event.eventdata = &eventdata;
+        event.eventdatatype = UI_EVENT_DATA_TEXT_CHANGED;
+        
+        if(_onchange) {
+            _onchange(&event, _onchangedata);
+        }
+        
+        if(_onchange_action) {
+            uic_action_callback(&event, _onchange_action.UTF8String);
+        }
+    }
+    
+    if(replacementString.length > 0) {
+        UiTextChangeEventData eventdata;
+        eventdata.type = UI_TEXT_INSERT;
+        eventdata.begin = (int)affectedCharRange.location;
+        eventdata.end = 0;
+        eventdata.text = replacementString.UTF8String;
+        eventdata.length = (int)replacementString.length;
+        
+        event.eventdata = &eventdata;
+        event.eventdatatype = UI_EVENT_DATA_TEXT_CHANGED;
+        
+        if(_onchange) {
+            _onchange(&event, _onchangedata);
+        }
+        
+        if(_onchange_action) {
+            uic_action_callback(&event, _onchange_action.UTF8String);
+        }
+    }
+    
+    return YES;
+}
+
+- (void) textDidChange:(NSNotification *) notification {
+    UiEvent event;
+    event.obj = _obj;
+    event.window = event.obj->window;
+    event.document = event.obj->ctx->document;
+    if(_var) {
+        event.eventdata = _var->value;
+        event.eventdatatype = UI_EVENT_DATA_TEXT_VALUE;
+    } else {
+        event.eventdata = NULL;
+        event.eventdatatype = 0;
+    }
+    event.intval = 0;
+    event.set = ui_get_setop();
+    
+    if(_ontextchanged) {
+        _ontextchanged(&event, _ontextchangeddata);
+    }
+    
+    if(_ontextchanged_action) {
+        uic_action_callback(&event, _ontextchanged_action.UTF8String);
+    }
+}
+
+@end
+
+
 /* -------------------------- TextField -------------------------- */
 
 static void textfield_geteventdata(id sender, UiVar *var, void **eventdata, int *eventdatatype, int *value) {
index d1979fb679363275ee0324300dc598bc6a5a4c83..8f43a1b5d621d8ac54e5591ef325c0d29abdb853 100644 (file)
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
-$(GTK_OBJPRE)%.o: gtk/%.c
-       $(CC) -o $@ -c -I../ucx $(CFLAGS) $(SHLIB_CFLAGS) $(TK_CFLAGS) $<
-       
 $(UI_LIB): $(OBJ)
        $(AR) $(ARFLAGS) $(UI_LIB) $(OBJ)       
 
 $(UI_SHLIB): $(OBJ)
        $(CC) -o $(UI_SHLIB) $(LDFLAGS) $(SHLIB_LDFLAGS) $(TK_LDFLAGS) $(OBJ) -L../build/lib -lucx
+
+FORCE:
+
+$(GTK_OBJPRE)action.o: gtk/action.c gtk/action.h gtk/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/../ui/toolkit.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)button.o: gtk/button.c gtk/button.h gtk/../ui/toolkit.h \
+ gtk/../ui/button.h gtk/../ui/toolkit.h gtk/toolkit.h \
+ gtk/../common/context.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/object.h gtk/container.h \
+ gtk/../ui/container.h gtk/widget.h gtk/../ui/widget.h \
+ gtk/../common/action.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)container.o: gtk/container.c gtk/container.h \
+ gtk/../ui/toolkit.h gtk/../ui/container.h gtk/../ui/toolkit.h \
+ gtk/toolkit.h gtk/../common/context.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/object.h gtk/headerbar.h \
+ gtk/../ui/toolbar.h gtk/../common/toolbar.h \
+ gtk/../common/../ui/toolbar.h gtk/../common/menu.h \
+ gtk/../common/../ui/menu.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/container.h gtk/../common/../ui/container.h \
+ gtk/../ui/properties.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)display.o: gtk/display.c gtk/display.h gtk/../ui/toolkit.h \
+ gtk/toolkit.h gtk/../common/context.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/object.h gtk/container.h \
+ gtk/../ui/container.h gtk/../ui/toolkit.h gtk/../ui/display.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)dnd.o: gtk/dnd.c gtk/dnd.h gtk/../ui/dnd.h \
+ gtk/../ui/toolkit.h gtk/toolkit.h gtk/../ui/toolkit.h \
+ gtk/../common/context.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/object.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)draw_cairo.o: gtk/draw_cairo.c gtk/container.h \
+ gtk/../ui/toolkit.h gtk/../ui/container.h gtk/../ui/toolkit.h \
+ gtk/toolkit.h gtk/../common/context.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/object.h gtk/draw_cairo.h \
+ gtk/graphics.h gtk/../ui/graphics.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)draw_gdk.o: gtk/draw_gdk.c gtk/container.h \
+ gtk/../ui/toolkit.h gtk/../ui/container.h gtk/../ui/toolkit.h \
+ gtk/toolkit.h gtk/../common/context.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/object.h gtk/draw_gdk.h \
+ gtk/graphics.h gtk/../ui/graphics.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)entry.o: gtk/entry.c gtk/../common/context.h \
+ gtk/../common/../ui/toolkit.h gtk/../common/action.h \
+ gtk/../common/object.h gtk/container.h gtk/../ui/toolkit.h \
+ gtk/../ui/container.h gtk/../ui/toolkit.h gtk/toolkit.h gtk/entry.h \
+ gtk/../ui/entry.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)graphics.o: gtk/graphics.c gtk/graphics.h \
+ gtk/../ui/graphics.h gtk/../ui/toolkit.h gtk/toolkit.h \
+ gtk/../ui/toolkit.h gtk/../common/context.h \
+ gtk/../common/../ui/toolkit.h gtk/../common/action.h \
+ gtk/../common/object.h gtk/container.h gtk/../ui/container.h \
+ gtk/draw_cairo.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)headerbar.o: gtk/headerbar.c gtk/headerbar.h gtk/toolkit.h \
+ gtk/../ui/toolkit.h gtk/../common/context.h \
+ gtk/../common/../ui/toolkit.h gtk/../common/action.h \
+ gtk/../common/object.h gtk/../ui/toolbar.h gtk/../ui/toolkit.h \
+ gtk/../common/toolbar.h gtk/../common/../ui/toolbar.h \
+ gtk/../common/menu.h gtk/../common/../ui/menu.h \
+ gtk/../common/../ui/toolkit.h gtk/button.h gtk/../ui/button.h gtk/menu.h \
+ gtk/../ui/menu.h gtk/../common/menu.h gtk/../ui/properties.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)icon.o: gtk/icon.c gtk/toolkit.h gtk/../ui/toolkit.h \
+ gtk/../common/context.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/object.h gtk/icon.h \
+ gtk/../ui/icons.h gtk/../ui/toolkit.h gtk/../common/properties.h \
+ gtk/../common/../ui/properties.h gtk/../common/../ui/toolkit.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)image.o: gtk/image.c gtk/image.h gtk/../ui/image.h \
+ gtk/../ui/toolkit.h gtk/toolkit.h gtk/../ui/toolkit.h \
+ gtk/../common/context.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/object.h gtk/container.h \
+ gtk/../ui/container.h gtk/menu.h gtk/../ui/menu.h gtk/../common/menu.h \
+ gtk/../common/../ui/menu.h gtk/widget.h gtk/../ui/widget.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)list.o: gtk/list.c gtk/../common/context.h \
+ gtk/../common/../ui/toolkit.h gtk/../common/action.h \
+ gtk/../common/object.h gtk/../common/action.h gtk/container.h \
+ gtk/../ui/toolkit.h gtk/../ui/container.h gtk/../ui/toolkit.h \
+ gtk/toolkit.h gtk/list.h gtk/../ui/list.h gtk/button.h \
+ gtk/../ui/button.h gtk/icon.h gtk/../ui/icons.h gtk/menu.h \
+ gtk/../ui/menu.h gtk/../common/menu.h gtk/../common/../ui/menu.h \
+ gtk/dnd.h gtk/../ui/dnd.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)menu.o: gtk/menu.c gtk/menu.h gtk/../ui/menu.h \
+ gtk/../ui/toolkit.h gtk/../common/menu.h gtk/../common/../ui/menu.h \
+ gtk/toolkit.h gtk/../ui/toolkit.h gtk/../common/context.h \
+ gtk/../common/../ui/toolkit.h gtk/../common/action.h \
+ gtk/../common/object.h gtk/widget.h gtk/../ui/widget.h \
+ gtk/../common/types.h gtk/../common/action.h gtk/../ui/properties.h \
+ gtk/../ui/window.h gtk/container.h gtk/../ui/container.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)range.o: gtk/range.c gtk/range.h gtk/toolkit.h \
+ gtk/../ui/toolkit.h gtk/../common/context.h \
+ gtk/../common/../ui/toolkit.h gtk/../common/action.h \
+ gtk/../common/object.h gtk/../ui/range.h gtk/../ui/toolkit.h \
+ gtk/container.h gtk/../ui/container.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)text.o: gtk/text.c gtk/text.h gtk/../ui/text.h \
+ gtk/../ui/toolkit.h gtk/toolkit.h gtk/../ui/toolkit.h \
+ gtk/../common/context.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/object.h gtk/container.h \
+ gtk/../ui/container.h gtk/widget.h gtk/../ui/widget.h \
+ gtk/../common/types.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)toolbar.o: gtk/toolbar.c gtk/toolbar.h gtk/../ui/toolbar.h \
+ gtk/../ui/toolkit.h gtk/../common/toolbar.h \
+ gtk/../common/../ui/toolbar.h gtk/../common/menu.h \
+ gtk/../common/../ui/menu.h gtk/../common/../ui/toolkit.h gtk/list.h \
+ gtk/../ui/list.h gtk/toolkit.h gtk/../ui/toolkit.h \
+ gtk/../common/context.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/object.h gtk/menu.h \
+ gtk/../ui/menu.h gtk/../common/menu.h gtk/button.h gtk/../ui/button.h \
+ gtk/icon.h gtk/../ui/icons.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)toolkit.o: gtk/toolkit.c gtk/toolkit.h gtk/../ui/toolkit.h \
+ gtk/../common/context.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/object.h gtk/toolbar.h \
+ gtk/../ui/toolbar.h gtk/../ui/toolkit.h gtk/../common/toolbar.h \
+ gtk/../common/../ui/toolbar.h gtk/../common/menu.h \
+ gtk/../common/../ui/menu.h gtk/../common/../ui/toolkit.h gtk/list.h \
+ gtk/../ui/list.h gtk/window.h gtk/icon.h gtk/../ui/icons.h \
+ gtk/../common/document.h gtk/../common/context.h \
+ gtk/../common/properties.h gtk/../common/../ui/properties.h \
+ gtk/../common/menu.h gtk/../common/threadpool.h gtk/../common/app.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)webview.o: gtk/webview.c gtk/toolkit.h gtk/../ui/toolkit.h \
+ gtk/../common/context.h gtk/../common/../ui/toolkit.h \
+ gtk/../common/action.h gtk/../common/object.h gtk/container.h \
+ gtk/../ui/container.h gtk/../ui/toolkit.h gtk/webview.h \
+ gtk/../ui/webview.h gtk/widget.h gtk/../ui/widget.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)widget.o: gtk/widget.c gtk/widget.h gtk/../ui/widget.h \
+ gtk/../ui/toolkit.h gtk/container.h gtk/../ui/toolkit.h \
+ gtk/../ui/container.h gtk/toolkit.h gtk/../common/context.h \
+ gtk/../common/../ui/toolkit.h gtk/../common/action.h \
+ gtk/../common/object.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(GTK_OBJPRE)window.o: gtk/window.c gtk/../ui/window.h \
+ gtk/../ui/toolkit.h gtk/../ui/properties.h gtk/../common/context.h \
+ gtk/../common/../ui/toolkit.h gtk/../common/action.h \
+ gtk/../common/menu.h gtk/../common/../ui/menu.h \
+ gtk/../common/../ui/toolkit.h gtk/../common/toolbar.h \
+ gtk/../common/../ui/toolbar.h gtk/../common/menu.h gtk/../common/utils.h \
+ gtk/../common/../ui/text.h gtk/menu.h gtk/../ui/menu.h gtk/toolkit.h \
+ gtk/../ui/toolkit.h gtk/../common/object.h gtk/toolbar.h \
+ gtk/../ui/toolbar.h gtk/list.h gtk/../ui/list.h gtk/container.h \
+ gtk/../ui/container.h gtk/headerbar.h gtk/button.h gtk/../ui/button.h \
+ gtk/window.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
index 7f7b420c3a41e14b1eaa972e1296b6ee7052370b..03add25107978643376a29112249b1d0817c3ca1 100644 (file)
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
-$(MOTIF_OBJPRE)%.o: motif/%.c
-       $(CC) -o $@ -c -I../ucx $(CFLAGS) $(SHLIB_CFLAGS) $(TK_CFLAGS) $<
-
 $(UI_LIB): $(OBJ)
        $(AR) $(ARFLAGS) $(UI_LIB) $(OBJ)       
 
 $(UI_SHLIB): $(OBJ)
        $(CC) -o $(UI_SHLIB) $(LDFLAGS) $(SHLIB_LDFLAGS) $(TK_LDFLAGS) $(OBJ) -L../build/lib -lucx
+
+FORCE:
+
+$(MOTIF_OBJPRE)button.o: motif/button.c motif/button.h \
+ motif/../ui/button.h motif/../ui/toolkit.h motif/toolkit.h \
+ motif/../ui/toolkit.h motif/../common/context.h \
+ motif/../common/../ui/toolkit.h motif/../common/action.h \
+ motif/../common/object.h motif/container.h motif/../ui/container.h \
+ motif/../common/action.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)container.o: motif/container.c motif/container.h \
+ motif/../ui/toolkit.h motif/../ui/container.h motif/../ui/toolkit.h \
+ motif/../common/context.h motif/../common/../ui/toolkit.h \
+ motif/../common/action.h motif/../common/object.h \
+ motif/../common/container.h motif/../common/../ui/container.h \
+ motif/Grid.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)dnd.o: motif/dnd.c motif/dnd.h motif/../ui/dnd.h \
+ motif/../ui/toolkit.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)entry.o: motif/entry.c motif/entry.h motif/../ui/entry.h \
+ motif/../ui/toolkit.h motif/container.h motif/../ui/toolkit.h \
+ motif/../ui/container.h motif/toolkit.h motif/../common/context.h \
+ motif/../common/../ui/toolkit.h motif/../common/action.h \
+ motif/../common/object.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)Fsb.o: motif/Fsb.c motif/Fsb.h motif/FsbP.h \
+ motif/pathbar.h motif/../ui/text.h motif/../ui/toolkit.h \
+ motif/../common/utils.h motif/../common/../ui/toolkit.h \
+ motif/../common/../ui/text.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)graphics.o: motif/graphics.c motif/graphics.h \
+ motif/../ui/graphics.h motif/../ui/toolkit.h motif/toolkit.h \
+ motif/../ui/toolkit.h motif/../common/context.h \
+ motif/../common/../ui/toolkit.h motif/../common/action.h \
+ motif/../common/object.h motif/container.h motif/../ui/container.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)Grid.o: motif/Grid.c motif/Grid.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)image.o: motif/image.c motif/image.h motif/../ui/image.h \
+ motif/../ui/toolkit.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)label.o: motif/label.c motif/label.h motif/../ui/display.h \
+ motif/../ui/toolkit.h motif/../common/context.h \
+ motif/../common/../ui/toolkit.h motif/../common/action.h \
+ motif/container.h motif/../ui/toolkit.h motif/../ui/container.h \
+ motif/../common/object.h motif/Grid.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)list.o: motif/list.c motif/container.h \
+ motif/../ui/toolkit.h motif/../ui/container.h motif/../ui/toolkit.h \
+ motif/list.h motif/toolkit.h motif/../common/context.h \
+ motif/../common/../ui/toolkit.h motif/../common/action.h \
+ motif/../common/object.h motif/../ui/list.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)menu.o: motif/menu.c motif/menu.h motif/../ui/menu.h \
+ motif/../ui/toolkit.h motif/../common/menu.h \
+ motif/../common/../ui/menu.h motif/../common/context.h \
+ motif/../common/../ui/toolkit.h motif/../common/action.h motif/button.h \
+ motif/../ui/button.h motif/toolkit.h motif/../ui/toolkit.h \
+ motif/../common/object.h motif/container.h motif/../ui/container.h \
+ motif/../common/types.h motif/../ui/window.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)pathbar.o: motif/pathbar.c motif/pathbar.h \
+ motif/../ui/text.h motif/../ui/toolkit.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)range.o: motif/range.c motif/range.h motif/toolkit.h \
+ motif/../ui/toolkit.h motif/../common/context.h \
+ motif/../common/../ui/toolkit.h motif/../common/action.h \
+ motif/../common/object.h motif/../ui/range.h motif/../ui/toolkit.h \
+ motif/container.h motif/../ui/container.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)text.o: motif/text.c motif/text.h motif/../ui/text.h \
+ motif/../ui/toolkit.h motif/toolkit.h motif/../ui/toolkit.h \
+ motif/../common/context.h motif/../common/../ui/toolkit.h \
+ motif/../common/action.h motif/../common/object.h motif/container.h \
+ motif/../ui/container.h motif/pathbar.h motif/../common/utils.h \
+ motif/../common/../ui/text.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)toolbar.o: motif/toolbar.c motif/toolbar.h \
+ motif/../ui/toolbar.h motif/../ui/toolkit.h motif/button.h \
+ motif/../ui/button.h motif/toolkit.h motif/../ui/toolkit.h \
+ motif/../common/context.h motif/../common/../ui/toolkit.h \
+ motif/../common/action.h motif/../common/object.h motif/list.h \
+ motif/../ui/list.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)toolkit.o: motif/toolkit.c motif/toolkit.h \
+ motif/../ui/toolkit.h motif/../common/context.h \
+ motif/../common/../ui/toolkit.h motif/../common/action.h \
+ motif/../common/object.h motif/toolbar.h motif/../ui/toolbar.h \
+ motif/../ui/toolkit.h motif/container.h motif/../ui/container.h \
+ motif/../common/menu.h motif/../common/../ui/menu.h \
+ motif/../common/../ui/toolkit.h motif/../common/toolbar.h \
+ motif/../common/../ui/toolbar.h motif/../common/menu.h \
+ motif/../common/document.h motif/../common/context.h \
+ motif/../common/properties.h motif/../common/../ui/properties.h \
+ motif/../common/app.h motif/../common/threadpool.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)widget.o: motif/widget.c motif/../ui/widget.h \
+ motif/../ui/toolkit.h motif/container.h motif/../ui/toolkit.h \
+ motif/../ui/container.h motif/../common/context.h \
+ motif/../common/../ui/toolkit.h motif/../common/action.h \
+ motif/../common/object.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(MOTIF_OBJPRE)window.o: motif/window.c motif/window.h \
+ motif/../ui/window.h motif/../ui/toolkit.h motif/../ui/widget.h \
+ motif/toolkit.h motif/../ui/toolkit.h motif/../common/context.h \
+ motif/../common/../ui/toolkit.h motif/../common/action.h \
+ motif/../common/object.h motif/menu.h motif/../ui/menu.h \
+ motif/../common/menu.h motif/../common/../ui/menu.h motif/toolbar.h \
+ motif/../ui/toolbar.h motif/container.h motif/../ui/container.h \
+ motif/pathbar.h motif/../ui/text.h motif/../common/utils.h \
+ motif/../common/../ui/text.h motif/Grid.h motif/Fsb.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
index ae2585bffc52e3b89d22bdd786adaed31efd81cb..d744bd6f537bc33f8bdc5ea1a94a465108ea05bb 100644 (file)
@@ -199,7 +199,7 @@ void add_radioitem_widget(Widget p, int index, UiMenuItemI *item, UiObject *obj)
     Widget button = XmCreateToggleButton(p, "menuradiobutton", args, n);
     XtManageChild(button);
     
-    ui_bind_radiobutton(obj, button, NULL, it->varname, it->callback, it->userdata, 0);
+    ui_bind_radiobutton(obj, button, NULL, it->varname, it->callback, it->userdata, NULL, 0);
 }
 
 static void menuitem_list_remove_binding(void *obj) {
index 43c1d65c86ff0be3e860f4650872f5d135a5f03a..dcb784fea1aa9159c7cddbcc375bd86adfcbc34e 100644 (file)
@@ -98,7 +98,7 @@ UIWIDGET ui_textarea_create(UiObject *obj, UiTextAreaArgs *args) {
                 var);
     }
     
-    if(args->onchange || args->action) {
+    if(args->onchange || args->onchange_action) {
         
     }
     
index 7efd7f609c836f6e6c942d699d0a7b3292a4a65d..14a397516271e09c93c1ba07ebe438c505daf4ff 100644 (file)
 # POSSIBILITY OF SUCH DAMAGE.
 #
 
-$(SERVER_OBJPRE)%.o: server/%.c
-       $(CC) -o $@ -c -I../ucx $(CFLAGS) $(SHLIB_CFLAGS) $(TK_CFLAGS) $<
-
 $(UI_LIB): $(OBJ)
-       $(AR) $(ARFLAGS) $(UI_LIB) $(OBJ)       
+       $(AR) $(ARFLAGS) $(UI_LIB) $(OBJ)
 
 $(UI_SHLIB): $(OBJ)
        $(CC) -o $(UI_SHLIB) $(LDFLAGS) $(SHLIB_LDFLAGS) $(TK_LDFLAGS) $(OBJ) -L../build/lib -lucx
+
+FORCE:
+
+$(SERVER_OBJPRE)args.o: server/args.c server/args.h server/toolkit.h \
+ server/../ui/toolkit.h server/../common/context.h \
+ server/../common/../ui/toolkit.h server/../common/action.h \
+ server/../common/object.h server/../common/utils.h \
+ server/../common/../ui/text.h server/../common/../ui/toolkit.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(SERVER_OBJPRE)button.o: server/button.c server/button.h \
+ server/toolkit.h server/../ui/toolkit.h server/../common/context.h \
+ server/../common/../ui/toolkit.h server/../common/action.h \
+ server/../common/object.h server/../ui/button.h server/../ui/toolkit.h \
+ server/args.h server/container.h server/../common/container.h \
+ server/../common/../ui/container.h server/../common/../ui/toolkit.h \
+ server/widget.h server/../ui/widget.h server/var.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(SERVER_OBJPRE)container.o: server/container.c server/container.h \
+ server/toolkit.h server/../ui/toolkit.h server/../common/context.h \
+ server/../common/../ui/toolkit.h server/../common/action.h \
+ server/../common/object.h server/../common/container.h \
+ server/../common/../ui/container.h server/../common/../ui/toolkit.h \
+ server/widget.h server/../ui/widget.h server/../ui/toolkit.h \
+ server/args.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(SERVER_OBJPRE)image.o: server/image.c server/image.h \
+ server/../ui/image.h server/../ui/toolkit.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(SERVER_OBJPRE)toolkit.o: server/toolkit.c server/toolkit.h \
+ server/../ui/toolkit.h server/../common/context.h \
+ server/../common/../ui/toolkit.h server/../common/action.h \
+ server/../common/object.h server/../common/message.h \
+ server/../common/threadpool.h server/../common/app.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(SERVER_OBJPRE)var.o: server/var.c server/toolkit.h \
+ server/../ui/toolkit.h server/../common/context.h \
+ server/../common/../ui/toolkit.h server/../common/action.h \
+ server/../common/object.h server/var.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(SERVER_OBJPRE)widget.o: server/widget.c server/widget.h \
+ server/../ui/widget.h server/../ui/toolkit.h server/toolkit.h \
+ server/../ui/toolkit.h server/../common/context.h \
+ server/../common/../ui/toolkit.h server/../common/action.h \
+ server/../common/object.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+
+$(SERVER_OBJPRE)window.o: server/window.c server/window.h \
+ server/../ui/window.h server/../ui/toolkit.h server/toolkit.h \
+ server/../ui/toolkit.h server/../common/context.h \
+ server/../common/../ui/toolkit.h server/../common/action.h \
+ server/../common/object.h server/container.h \
+ server/../common/container.h server/../common/../ui/container.h \
+ server/../common/../ui/toolkit.h server/widget.h server/../ui/widget.h
+       $(CC) -o $@ $(CFLAGS) -I../ucx $(SHLIB_CFLAGS) $(TK_CFLAGS) -c $<
+