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