ui/gtk/menu.h

branch
newapi
changeset 174
0358f1d9c506
parent 157
0b33b9396851
child 175
2cb06c231057
equal deleted inserted replaced
173:809581724cc7 174:0358f1d9c506
28 28
29 #ifndef MENU_H 29 #ifndef MENU_H
30 #define MENU_H 30 #define MENU_H
31 31
32 #include "../ui/menu.h" 32 #include "../ui/menu.h"
33 #include <ucx/list.h> 33 #include <cx/list.h>
34 #include "toolkit.h" 34 #include "toolkit.h"
35 35
36 #ifdef __cplusplus 36 #ifdef __cplusplus
37 extern "C" { 37 extern "C" {
38 #endif 38 #endif
48 typedef struct UiActiveMenuItemList UiActiveMenuItemList; 48 typedef struct UiActiveMenuItemList UiActiveMenuItemList;
49 49
50 typedef GtkWidget*(*ui_menu_add_f)(GtkWidget *, int, UiMenuItemI*, UiObject*); 50 typedef GtkWidget*(*ui_menu_add_f)(GtkWidget *, int, UiMenuItemI*, UiObject*);
51 51
52 struct UiMenuItemI { 52 struct UiMenuItemI {
53 UiMenuItemI *prev;
54 UiMenuItemI *next;
53 ui_menu_add_f add_to; 55 ui_menu_add_f add_to;
54 }; 56 };
55 57
56 struct UiMenu { 58 struct UiMenu {
57 UiMenuItemI item; 59 UiMenuItemI item;
58 char *label; 60 char *label;
59 UcxList *items; 61 UiMenuItemI *items_begin;
62 UiMenuItemI *items_end;
60 UiMenu *parent; 63 UiMenu *parent;
61 }; 64 };
62 65
63 struct UiMenuItem { 66 struct UiMenuItem {
64 UiMenuItemI item; 67 UiMenuItemI item;
65 ui_callback callback; 68 ui_callback callback;
66 char *label; 69 char *label;
67 void *userdata; 70 void *userdata;
68 UcxList *groups; 71 CxList *groups;
69 }; 72 };
70 73
71 struct UiStMenuItem { 74 struct UiStMenuItem {
72 UiMenuItemI item; 75 UiMenuItemI item;
73 ui_callback callback; 76 ui_callback callback;
74 char *stockid; 77 char *stockid;
75 void *userdata; 78 void *userdata;
76 UcxList *groups; 79 CxList *groups;
77 }; 80 };
78 81
79 struct UiCheckItem { 82 struct UiCheckItem {
80 UiMenuItemI item; 83 UiMenuItemI item;
81 char *label; 84 char *label;

mercurial