ReactOS  0.4.13-dev-52-g0efcfec
menu.h
Go to the documentation of this file.
1 #pragma once
2 
3 #define IS_ATOM(x) \
4  (((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
5 
6 #define MENU_ITEM_TYPE(flags) \
7  ((flags) & (MF_STRING | MF_BITMAP | MF_OWNERDRAW | MF_SEPARATOR))
8 
9 #ifndef MF_END
10 #define MF_END (0x0080)
11 #endif
12 
13 typedef struct tagMENUSTATE
14 {
16  struct
17  {
38  };
61 
62 typedef struct _SETMENUITEMRECT
63 {
68 
69 
70 //
71 // Legacy ReactOS Menu transfer structures.
72 //
73 typedef struct tagROSMENUINFO
74 {
75  /* ----------- MENUINFO ----------- */
80  HBRUSH hbrBack;
83  /* ----------- Extra ----------- */
84  ULONG fFlags; /* Menu flags (MF_POPUP, MF_SYSMENU) */
85  UINT iItem; /* Currently focused item */
86  UINT cItems; /* Number of items in the menu */
87  WORD cxMenu; /* Width of the whole menu */
88  WORD cyMenu; /* Height of the whole menu */
90  PWND spwndNotify; /* window receiving the messages for ownerdraw */
94 
95  HMENU Self; /* Handle of this menu */
96  HWND Wnd; /* Window containing the menu */
97  BOOL TimeToHide; /* Request hiding when receiving a second click in the top-level menu item */
99 
100 typedef struct tagROSMENUITEMINFO
101 {
102  /* ----------- MENUITEMINFOW ----------- */
115  /* ----------- Extra ----------- */
116  RECT Rect; /* Item area (relative to menu window) */
117  UINT dxTab; /* X position of text after Tab */
118  LPWSTR lpstr; /* Copy of the text pointer in MenuItem->Text */
119  SIZE maxBmpSize; /* Maximum size of the bitmap items in MIIM_BITMAP state */
121 //
122 //
123 //
124 
126 
128 IntGetMenuObject(HMENU hMenu);
129 
130 #define IntReleaseMenuObject(MenuObj) \
131  UserDereferenceObject(MenuObj)
132 
133 BOOLEAN
135 
137 IntDestroyMenuObject(PMENU MenuObject, BOOL bRecurse);
138 
141 
142 int FASTCALL
143 IntGetMenuItemByFlag(PMENU MenuObject, UINT uSearchBy, UINT fFlag,
144  PMENU *SubMenu, PITEM *MenuItem,
145  PITEM *PrevMenuItem);
146 
148 IntCleanupMenus(struct _EPROCESS *Process, PPROCESSINFO Win32Process);
149 
151 IntInsertMenuItem(_In_ PMENU MenuObject, UINT uItem, BOOL fByPosition, PROSMENUITEMINFO ItemInfo, PUNICODE_STRING lpstr);
152 
154 IntGetSystemMenu(PWND Window, BOOL bRevert);
155 
156 UINT FASTCALL IntFindSubMenu(HMENU *hMenu, HMENU hSubTarget );
158 BOOL FASTCALL IntRemoveMenuItem(PMENU Menu, UINT uPosition, UINT uFlags, BOOL bRecurse);
159 PITEM FASTCALL MENU_FindItem( PMENU *pmenu, UINT *nPos, UINT wFlags );
160 BOOL FASTCALL IntMenuItemInfo(PMENU Menu, UINT Item, BOOL ByPosition, PROSMENUITEMINFO UnsafeItemInfo, BOOL SetOrGet, PUNICODE_STRING lpstr);
161 BOOL FASTCALL IntSetMenu(PWND Wnd,HMENU Menu,BOOL *Changed);
162 UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, PWND pWnd, BOOL suppress_draw );
169 void MENU_EndMenu( PWND pwnd );
170 void FASTCALL MENU_InitSysMenuPopup(PMENU menu, DWORD style, DWORD clsStyle, LONG HitTest );
171 INT FASTCALL IntMenuItemFromPoint(PWND pWnd, HMENU hMenu, POINT ptScreen);
172 BOOL WINAPI IntTrackPopupMenuEx( PMENU menu, UINT wFlags, int x, int y, PWND pWnd, LPTPMPARAMS lpTpm);
ULONG fSetCapture
Definition: menu.h:36
LPWSTR lpstr
Definition: menu.h:118
BOOL fByPosition
Definition: menu.h:65
HBITMAP hbmAni
Definition: menu.h:58
INT iMaxTop
Definition: menu.h:92
DWORD dwAniStartTime
Definition: menu.h:53
ULONG fButtonDown
Definition: menu.h:21
#define pt(x, y)
Definition: drawing.c:79
INT iyAni
Definition: menu.h:55
static HDC
Definition: imagelist.c:92
WORD cyMenu
Definition: menu.h:88
HBITMAP hbmpUnchecked
Definition: menu.h:110
UINT iItem
Definition: menu.h:85
PWND spwndNotify
Definition: menu.h:90
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
SIZE maxBmpSize
Definition: menu.h:119
UINT_PTR WPARAM
Definition: windef.h:207
POINT ptButtonDown
Definition: menu.h:45
UINT uFlags
Definition: api.c:60
#define FASTCALL
Definition: nt_native.h:50
int32_t INT
Definition: typedefs.h:56
DWORD cbSize
Definition: menu.h:76
WPARAM wParam
Definition: combotst.c:138
HBRUSH hbrBack
Definition: menu.h:80
ULONG fInEndMenu
Definition: menu.h:22
uint32_t ULONG_PTR
Definition: typedefs.h:63
ULONG cxTextAlign
Definition: menu.h:89
INT cmdLast
Definition: menu.h:41
INT ixAni
Definition: menu.h:54
UINT cyMax
Definition: menu.h:79
Definition: window.c:29
ULONG fIsSysMenu
Definition: menu.h:19
HDC hdcWndAni
Definition: menu.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
HDC hdcAni
Definition: menu.h:59
ULONG fIgnoreButtonUp
Definition: menu.h:31
unsigned char BOOLEAN
ULONG fMouseOffMenu
Definition: menu.h:32
ULONG iAniDropDir
Definition: menu.h:37
LONG_PTR LPARAM
Definition: windef.h:208
PTHREADINFO ptiMenuStateOwner
Definition: menu.h:42
INT mnFocus
Definition: menu.h:40
UINT uDraggingFlags
Definition: menu.h:51
ULONG fActiveNoForeground
Definition: menu.h:34
RECTL rcRect
Definition: menu.h:66
PPOPUPMENU pGlobalPopupMenu
Definition: menu.h:15
ULONG fDragAndDrop
Definition: menu.h:28
ULONG fMenuStarted
Definition: menu.h:18
HMENU Self
Definition: menu.h:95
INT iTop
Definition: menu.h:91
HBITMAP hbmpItem
Definition: menu.h:114
ULONG_PTR uDraggingHitArea
Definition: menu.h:49
ULONG fInDoDragDrop
Definition: menu.h:33
DWORD dwItemData
Definition: menu.h:111
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define WINAPI
Definition: msvc.h:8
DWORD dwArrowsOn
Definition: menu.h:93
DWORD dwLockCount
Definition: menu.h:43
ULONG fFlags
Definition: menu.h:84
ULONG fButtonAlwaysDown
Definition: menu.h:24
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
DWORD dwContextHelpID
Definition: menu.h:81
ULONG fModelessMenu
Definition: menu.h:26
static IUnknown Object
Definition: main.c:512
CHAR Message[80]
Definition: alive.c:5
ULONG fUnderline
Definition: menu.h:23
UINT uButtonDownIndex
Definition: menu.h:47
WORD cxMenu
Definition: menu.h:87
INT cxAni
Definition: menu.h:56
UINT uItem
Definition: menu.h:64
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define _In_
Definition: no_sal2.h:204
Definition: ntuser.h:657
static HDC hDC
Definition: 3dtext.c:33
HMENU hSubMenu
Definition: menu.h:108
ULONG fInCallHandleMenuMessages
Definition: menu.h:27
DWORD fMask
Definition: menu.h:77
struct tagMENUSTATE * pmnsPrev
Definition: menu.h:44
static const struct newhuff ht[]
Definition: huffman.h:296
INT cyAni
Definition: menu.h:57
unsigned int UINT
Definition: ndis.h:50
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
ULONG_PTR dwMenuData
Definition: menu.h:82
ULONG fInsideMenuLoop
Definition: menu.h:20
ULONG fAutoDismiss
Definition: menu.h:29
ULONG fNotifyByPos
Definition: menu.h:35
INT vkButtonDown
Definition: menu.h:48
BOOL TimeToHide
Definition: menu.h:97
HWND Wnd
Definition: menu.h:96
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:219
ULONG fAboutToAutoDismiss
Definition: menu.h:30
unsigned int ULONG
Definition: retypes.h:1
HBITMAP hbmpChecked
Definition: menu.h:109
LPWSTR dwTypeData
Definition: menu.h:112
static LPCSTR lpstr
Definition: font.c:51
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3149
static HBITMAP
Definition: button.c:44
POINT ptMouseLast
Definition: menu.h:39
WCHAR * LPWSTR
Definition: xmlstorage.h:184
LONG_PTR LRESULT
Definition: windef.h:209
UINT cItems
Definition: menu.h:86
Arabic default style
Definition: afstyles.h:93
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
LPARAM lParam
Definition: combotst.c:139
ULONG fDragging
Definition: menu.h:25
ULONG_PTR uButtonDownHitArea
Definition: menu.h:46
UINT uDraggingIndex
Definition: menu.h:50
DWORD dwStyle
Definition: menu.h:78