--- a/ui/gtk/menu.h Mon May 22 16:17:26 2023 +0200 +++ b/ui/gtk/menu.h Mon May 22 19:44:27 2023 +0200 @@ -30,6 +30,7 @@ #define MENU_H #include "../ui/menu.h" +#include "../common/menu.h" #include <cx/list.h> #include "toolkit.h" @@ -37,67 +38,10 @@ extern "C" { #endif -typedef struct UiMenuItemI UiMenuItemI; -typedef struct UiMenu UiMenu; -typedef struct UiMenuItem UiMenuItem; -typedef struct UiStMenuItem UiStMenuItem; -typedef struct UiCheckItem UiCheckItem; -typedef struct UiCheckItemNV UiCheckItemNV; -typedef struct UiMenuItemList UiMenuItemList; typedef struct UiActiveMenuItemList UiActiveMenuItemList; -typedef GtkWidget*(*ui_menu_add_f)(GtkWidget *, int, UiMenuItemI*, UiObject*); - -struct UiMenuItemI { - UiMenuItemI *prev; - UiMenuItemI *next; - ui_menu_add_f add_to; -}; - -struct UiMenu { - UiMenuItemI item; - char *label; - UiMenuItemI *items_begin; - UiMenuItemI *items_end; - UiMenu *parent; -}; - -struct UiMenuItem { - UiMenuItemI item; - ui_callback callback; - char *label; - void *userdata; - CxList *groups; -}; - -struct UiStMenuItem { - UiMenuItemI item; - ui_callback callback; - char *stockid; - void *userdata; - CxList *groups; -}; - -struct UiCheckItem { - UiMenuItemI item; - char *label; - ui_callback callback; - void *userdata; -}; - -struct UiCheckItemNV { - UiMenuItemI item; - char *label; - char *varname; -}; - -struct UiMenuItemList { - UiMenuItemI item; - ui_callback callback; - void *userdata; - UiList *list; -}; +typedef void(*ui_menu_add_f)(GtkWidget *, int, UiMenuItemI*, UiObject*); struct UiActiveMenuItemList { UiObject *object;