35 #ifdef __cplusplus |
35 #ifdef __cplusplus |
36 extern "C" { |
36 extern "C" { |
37 #endif |
37 #endif |
38 |
38 |
39 |
39 |
40 typedef struct UiActiveMenuItemList UiActiveMenuItemList; |
|
41 |
|
42 typedef int(*ui_menu_add_f)(Widget, int, UiMenuItemI*, UiObject*); |
|
43 |
|
44 struct UiActiveMenuItemList { |
|
45 UiObject *object; |
|
46 Widget menu; |
|
47 int index; |
|
48 int oldcount; |
|
49 UiList *list; |
|
50 ui_callback callback; |
|
51 void *userdata; |
|
52 }; |
|
53 |
|
54 void ui_create_menubar(UiObject *obj); |
|
55 |
|
56 int add_menu_widget(Widget parent, int i, UiMenuItemI *item, UiObject *obj); |
|
57 int add_menuitem_widget(Widget parent, int i, UiMenuItemI *item, UiObject *obj); |
|
58 int add_menuitem_st_widget(Widget parent, int i, UiMenuItemI *item, UiObject *obj); |
|
59 int add_menuseparator_widget(Widget parent, int i, UiMenuItemI *item, UiObject *obj); |
|
60 int add_checkitem_widget(Widget parent, int i, UiMenuItemI *item, UiObject *obj); |
|
61 int add_checkitemnv_widget(Widget parent, int i, UiMenuItemI *item, UiObject *obj); |
|
62 int add_menuitem_list_widget(Widget parent, int i, UiMenuItemI *item, UiObject *obj); |
|
63 |
|
64 void ui_update_menuitem_list(UiEvent *event, UiActiveMenuItemList *list); |
|
65 void ui_menu_event_wrapper(Widget widget, XtPointer udata, XtPointer cdata); |
|
66 |
|
67 |
40 |
68 #ifdef __cplusplus |
41 #ifdef __cplusplus |
69 } |
42 } |
70 #endif |
43 #endif |
71 |
44 |