ui/motif/button.h

changeset 100
d2bd73d28ff1
parent 0
2483f517c562
--- a/ui/motif/button.h	Fri Nov 29 22:21:36 2024 +0100
+++ b/ui/motif/button.h	Thu Dec 12 20:01:43 2024 +0100
@@ -36,30 +36,22 @@
 extern "C" {
 #endif
 
-typedef struct {
-    CxList  *buttons;
-    Widget  current;
-    int     ref;
-} RadioButtonGroup;
-
-typedef struct {
-    UiObject         *obj;
-    ui_callback      callback;
-    void             *userdata;
-    RadioButtonGroup *group;
-} RadioEventData;
-
-// wrapper
-int64_t ui_toggle_button_get(UiInteger *i);
-void ui_toggle_button_set(UiInteger *i, int64_t value);
-void ui_toggle_button_callback(
-        Widget widget,
-        UiEventData *data,
-        XmToggleButtonCallbackStruct *e);
 void ui_push_button_callback(Widget widget, UiEventData *event, XtPointer d);
 
-int64_t ui_radiobutton_get(UiInteger *value);
-void ui_radiobutton_set(UiInteger *value, int64_t i);
+void ui_bind_togglebutton(
+        UiObject *obj,
+        Widget widget,
+        const char *varname,
+        UiInteger *value,
+        ui_callback onchange,
+        void *onchangedata,
+        int enable_state);
+
+int64_t ui_togglebutton_get(UiInteger *i);
+void ui_togglebutton_set(UiInteger *i, int64_t value);
+
+int64_t ui_radiobutton_get(UiInteger *i);
+void ui_radiobutton_set(UiInteger *i, int64_t value);
 
 #ifdef	__cplusplus
 }

mercurial