--- a/ui/motif/menu.h Sun Dec 15 22:53:51 2024 +0100 +++ b/ui/motif/menu.h Sun Dec 22 11:49:59 2024 +0100 @@ -31,11 +31,25 @@ #include "../ui/menu.h" #include "../common/menu.h" +#include "../common/context.h" #ifdef __cplusplus extern "C" { #endif +typedef struct UiActiveMenuItemList UiActiveMenuItemList; +struct UiActiveMenuItemList { + UiObject *object; + Widget menu; + int index; + int oldcount; + UiVar *var; + ui_getvaluefunc getvalue; + ui_callback callback; + void *userdata; + bool addseparator; +}; + typedef void(*ui_menu_add_f)(Widget, int, UiMenuItemI*, UiObject*); void ui_create_menubar(UiObject *obj, Widget window); @@ -50,6 +64,8 @@ void add_checkitemnv_widget(Widget p, int i, UiMenuItemI *item, UiObject *obj); void add_menuitem_list_widget(Widget p, int i, UiMenuItemI *item, UiObject *obj); +void ui_update_menuitem_list(UiEvent *event, UiActiveMenuItemList *list); + #ifdef __cplusplus } #endif