Release 940912
[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
12 typedef struct tagMENUITEM
13 {
14     WORD        item_flags;    /* Item flags */
15     WORD        item_id;       /* Item or popup id */
16     RECT        rect;          /* Item area (relative to menu window) */
17     WORD        xTab;          /* X position of text after Tab */
18     HBITMAP     hCheckBit;     /* Bitmap for checked item */
19     HBITMAP     hUnCheckBit;   /* Bitmap for unchecked item */
20     HANDLE      hText;         /* Handle to item string or bitmap */
21     char        *item_text;
22 } MENUITEM, *LPMENUITEM;
23
24
25 typedef struct tagPOPUPMENU
26 {
27     HMENU       hNext;        /* Next menu (compatibility only, always 0) */
28     WORD        wFlags;       /* Menu flags (MF_POPUP, MF_SYSMENU) */
29     WORD        wMagic;       /* Magic number */
30     HANDLE      hTaskQ;       /* Task queue for this menu */
31     WORD        Width;        /* Width of the whole menu */
32     WORD        Height;       /* Height of the whole menu */
33     WORD        nItems;       /* Number of items in the menu */
34     HWND        hWnd;         /* Window containing the menu */
35     HANDLE      hItems;       /* Handle to the items array */
36     WORD        FocusedItem;  /* Currently focused item */
37 } POPUPMENU, *LPPOPUPMENU;
38
39 typedef struct
40 {
41     WORD        version;                /* Should be zero                 */
42     WORD        reserved;               /* Must be zero                   */
43 } MENU_HEADER;
44
45 typedef struct
46 {
47     WORD        item_flags;             /* See windows.h                  */
48     char        item_text[1];           /* Text for menu item             */
49 } MENU_POPUPITEM;
50
51 typedef struct
52 {
53     WORD        item_flags;             /* See windows.h                  */
54     WORD        item_id;                /* Control Id for menu item       */
55     char        item_text[1];           /* Text for menu item             */
56 } MENUITEMTEMPLATE;
57
58 #endif /* MENU_H */