--- a/ui/gtk/menu.h Sun Apr 16 10:20:21 2023 +0200 +++ b/ui/gtk/menu.h Tue May 23 11:11:28 2023 +0200 @@ -30,71 +30,18 @@ #define MENU_H #include "../ui/menu.h" -#include <ucx/list.h> +#include "../common/menu.h" +#include <cx/list.h> #include "toolkit.h" #ifdef __cplusplus 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 { - ui_menu_add_f add_to; -}; - -struct UiMenu { - UiMenuItemI item; - char *label; - UcxList *items; - UiMenu *parent; -}; - -struct UiMenuItem { - UiMenuItemI item; - ui_callback callback; - char *label; - void *userdata; - UcxList *groups; -}; - -struct UiStMenuItem { - UiMenuItemI item; - ui_callback callback; - char *stockid; - void *userdata; - UcxList *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;