Release 960225
[wine] / include / menu.h
1 /* $Id$
2  *
3  * Menu definitions
4  */
5
6 #ifndef MENU_H
7 #define MENU_H
8
9 #define MENU_MAGIC   0x554d  /* 'MU' */
10
11 extern BOOL MENU_Init(void);
12 extern UINT MENU_GetMenuBarHeight( HWND hwnd, UINT menubarWidth,
13                                    int orgX, int orgY );         /* menu.c */
14 extern void MENU_TrackMouseMenuBar( HWND hwnd, POINT pt );       /* menu.c */
15 extern void MENU_TrackKbdMenuBar( HWND hwnd, UINT wParam );      /* menu.c */
16 extern UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect,
17                               HWND hwnd, BOOL suppress_draw );   /* menu.c */
18 extern LRESULT PopupMenuWndProc(HWND hwnd,UINT message,WPARAM wParam,LPARAM lParam );
19
20 typedef struct tagMENUITEM
21 {
22     WORD        item_flags;    /* Item flags */
23     UINT        item_id;       /* Item or popup id */
24     RECT        rect;          /* Item area (relative to menu window) */
25     WORD        xTab;          /* X position of text after Tab */
26     HBITMAP     hCheckBit;     /* Bitmap for checked item */
27     HBITMAP     hUnCheckBit;   /* Bitmap for unchecked item */
28     HANDLE      hText;         /* Handle to item string or bitmap */
29 } MENUITEM, *LPMENUITEM;
30
31
32 typedef struct tagPOPUPMENU
33 {
34     HMENU       hNext;        /* Next menu (compatibility only, always 0) */
35     WORD        wFlags;       /* Menu flags (MF_POPUP, MF_SYSMENU) */
36     WORD        wMagic;       /* Magic number */
37     HANDLE      hTaskQ;       /* Task queue for this menu */
38     WORD        Width;        /* Width of the whole menu */
39     WORD        Height;       /* Height of the whole menu */
40     WORD        nItems;       /* Number of items in the menu */
41     HWND        hWnd;         /* Window containing the menu */
42     HANDLE      hItems;       /* Handle to the items array */
43     UINT        FocusedItem;  /* Currently focused item */
44 } POPUPMENU, *LPPOPUPMENU;
45
46 typedef struct
47 {
48     WORD        version;                /* Should be zero                 */
49     WORD        reserved;               /* Must be zero                   */
50 } MENU_HEADER;
51
52 typedef struct
53 {
54     WORD        item_flags;             /* See windows.h                  */
55     char        item_text[1];           /* Text for menu item             */
56 } MENU_POPUPITEM;
57
58 typedef struct
59 {
60     WORD        item_flags;             /* See windows.h                  */
61     WORD        item_id;                /* Control Id for menu item       */
62     char        item_text[1];           /* Text for menu item             */
63 } MENUITEMTEMPLATE;
64
65 #endif /* MENU_H */