Release 940420
[wine.git] / include / menu.h
blobc5f513a087cbda4613c5fbc79f91f52c4f76ebbb
1 /* $Id$
3 * Menu definitions
4 */
6 #ifndef MENU_H
7 #define MENU_H
11 typedef struct tagMENUITEM
13 struct tagMENUITEM *next;
14 struct tagMENUITEM *prev;
15 struct tagMENUITEM *child;
16 struct tagMENUITEM *parent;
17 WORD item_flags;
18 WORD item_id;
19 WORD sel_key;
20 char *shortcut;
21 char *item_text;
22 char menu_name[10];
23 RECT rect;
24 HBITMAP hCheckBit;
25 HBITMAP hUnCheckBit;
26 } MENUITEM, *LPMENUITEM;
29 typedef struct tagPOPUPMENU
31 HWND hWnd; /* PopupMenu window handle */
32 HWND hWndParent; /* Parent PopupMenu window handle */
33 HWND ownerWnd; /* Owner window */
34 HWND hWndPrev; /* Previous Window Focus Owner */
35 WORD nItems; /* Number of items on menu */
36 MENUITEM *firstItem;
37 WORD FocusedItem;
38 WORD MouseFlags;
39 BOOL BarFlag; /* TRUE if menu is a MENUBAR */
40 BOOL SysFlag; /* TRUE if menu is a SYSMENU */
41 BOOL ChildFlag; /* TRUE if child of other menu */
42 WORD Width;
43 WORD Height;
44 WORD CheckWidth;
45 WORD PopWidth;
46 RECT rect;
47 } POPUPMENU, *LPPOPUPMENU;
49 typedef struct
51 WORD version; /* Should be zero */
52 WORD reserved; /* Must be zero */
53 } MENU_HEADER;
55 typedef struct
57 WORD item_flags; /* See windows.h */
58 char item_text[1]; /* Text for menu item */
59 } MENU_POPUPITEM;
61 typedef struct
63 WORD item_flags; /* See windows.h */
64 WORD item_id; /* Control Id for menu item */
65 char item_text[1]; /* Text for menu item */
66 } MENUITEMTEMPLATE;
68 void StdDrawMenuBar(HDC hDC, LPRECT lprect, LPPOPUPMENU lppop,
69 BOOL suppress_draw);
70 BOOL MenuButtonDown(HWND hWnd, LPPOPUPMENU lppop, int x, int y);
71 void MenuButtonUp(HWND hWnd, LPPOPUPMENU lppop, int x, int y);
72 void MenuMouseMove(HWND hWnd, LPPOPUPMENU lppop, WORD wParam, int x, int y);
73 extern void NC_TrackSysMenu(HWND hwnd);
75 #endif /* MENU_H */