ReactOS 0.4.16-dev-125-g798ea90
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
13typedef struct tagMENUSTATE
14{
16 struct
17 {
38 };
61
62typedef struct _SETMENUITEMRECT
63{
68
69
70//
71// Legacy ReactOS Menu transfer structures.
72//
73typedef 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
100typedef 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
129
130#define IntReleaseMenuObject(MenuObj) \
131 UserDereferenceObject(MenuObj)
132
135
137IntDestroyMenuObject(PMENU MenuObject, BOOL bRecurse);
138
141
142int FASTCALL
143IntGetMenuItemByFlag(PMENU MenuObject, UINT uSearchBy, UINT fFlag,
144 PMENU *SubMenu, PITEM *MenuItem,
145 PITEM *PrevMenuItem);
146
149
151IntInsertMenuItem(_In_ PMENU MenuObject, UINT uItem, BOOL fByPosition, PROSMENUITEMINFO ItemInfo, PUNICODE_STRING lpstr);
152
155
156UINT FASTCALL IntFindSubMenu(HMENU *hMenu, HMENU hSubTarget );
158BOOL FASTCALL IntRemoveMenuItem(PMENU Menu, UINT uPosition, UINT uFlags, BOOL bRecurse);
160BOOL FASTCALL IntMenuItemInfo(PMENU Menu, UINT Item, BOOL ByPosition, PROSMENUITEMINFO UnsafeItemInfo, BOOL SetOrGet, PUNICODE_STRING lpstr);
161BOOL FASTCALL IntSetMenu(PWND Wnd,HMENU Menu,BOOL *Changed);
162UINT MENU_DrawMenuBar( HDC hDC, LPRECT lprect, PWND pWnd, BOOL suppress_draw );
169void MENU_EndMenu( PWND pwnd );
170void FASTCALL MENU_InitSysMenuPopup(PMENU menu, DWORD style, DWORD clsStyle, LONG HitTest );
171INT FASTCALL IntMenuItemFromPoint(PWND pWnd, HMENU hMenu, POINT ptScreen);
172BOOL WINAPI IntTrackPopupMenuEx( PMENU menu, UINT wFlags, int x, int y, PWND pWnd, LPTPMPARAMS lpTpm);
static HDC hDC
Definition: 3dtext.c:33
unsigned char BOOLEAN
Arabic default style
Definition: afstyles.h:94
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
UINT uFlags
Definition: api.c:59
static const WCHAR Message[]
Definition: register.c:74
#define pt(x, y)
Definition: drawing.c:79
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
_Must_inspect_result_ _In_ PLARGE_INTEGER _In_ PLARGE_INTEGER _In_ ULONG _In_ PFILE_OBJECT _In_ PVOID Process
Definition: fsrtlfuncs.h:223
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
GLint GLint GLint GLint GLint GLint y
Definition: gl.h:1548
static const struct newhuff ht[]
Definition: huffman.h:296
BOOL FASTCALL IntCleanupMenus(struct _EPROCESS *Process, PPROCESSINFO Win32Process)
struct tagROSMENUINFO ROSMENUINFO
struct tagROSMENUITEMINFO ROSMENUITEMINFO
PMENU FASTCALL IntGetSystemMenu(PWND Window, BOOL bRevert)
Definition: menu.c:5399
INT FASTCALL IntMenuItemFromPoint(PWND pWnd, HMENU hMenu, POINT ptScreen)
Definition: menu.c:1518
BOOL MenuInit(VOID)
Definition: menu.c:359
BOOL FASTCALL IntDestroyMenuObject(PMENU MenuObject, BOOL bRecurse)
Definition: menu.c:317
struct tagMENUSTATE * PMENUSTATE
PWND MENU_IsMenuActive(VOID)
Definition: menu.c:2650
UINT FASTCALL IntFindSubMenu(HMENU *hMenu, HMENU hSubTarget)
Definition: menu.c:5031
UINT MENU_DrawMenuBar(HDC hDC, LPRECT lprect, PWND pWnd, BOOL suppress_draw)
Definition: menu.c:2742
void MENU_EndMenu(PWND pwnd)
Definition: menu.c:2662
PMENU FASTCALL IntCloneMenu(PMENU Source)
Definition: menu.c:822
struct _SETMENUITEMRECT SETMENUITEMRECT
BOOL FASTCALL IntSetMenu(PWND Wnd, HMENU Menu, BOOL *Changed)
Definition: menu.c:5475
BOOL FASTCALL IntIsMenu(HMENU)
Definition: menu.c:240
struct tagROSMENUINFO * PROSMENUINFO
BOOLEAN UserDestroyMenuObject(PVOID Object)
Definition: menu.c:311
BOOL FASTCALL IntInsertMenuItem(_In_ PMENU MenuObject, UINT uItem, BOOL fByPosition, PROSMENUITEMINFO ItemInfo, PUNICODE_STRING lpstr)
Definition: menu.c:691
BOOL FASTCALL IntSetMenuItemInfo(PMENU, PITEM, PROSMENUITEMINFO, PUNICODE_STRING)
Definition: menu.c:1033
struct tagMENUSTATE MENUSTATE
BOOL WINAPI PopupMenuWndProc(PWND Wnd, UINT Message, WPARAM wParam, LPARAM lParam, LRESULT *lResult)
Definition: menu.c:4647
void FASTCALL MENU_InitSysMenuPopup(PMENU menu, DWORD style, DWORD clsStyle, LONG HitTest)
Definition: menu.c:1362
BOOL WINAPI IntTrackPopupMenuEx(PMENU menu, UINT wFlags, int x, int y, PWND pWnd, LPTPMPARAMS lpTpm)
Definition: menu.c:4577
int FASTCALL IntGetMenuItemByFlag(PMENU MenuObject, UINT uSearchBy, UINT fFlag, PMENU *SubMenu, PITEM *MenuItem, PITEM *PrevMenuItem)
PMENU FASTCALL IntGetMenuObject(HMENU hMenu)
Definition: menu.c:192
PITEM FASTCALL MENU_FindItem(PMENU *pmenu, UINT *nPos, UINT wFlags)
Definition: menu.c:507
BOOL FASTCALL IntRemoveMenuItem(PMENU Menu, UINT uPosition, UINT uFlags, BOOL bRecurse)
Definition: menu.c:596
VOID MENU_TrackKbdMenuBar(PWND pwnd, UINT wParam, WCHAR wChar)
Definition: menu.c:4516
VOID MENU_TrackMouseMenuBar(PWND pWnd, ULONG ht, POINT pt)
Definition: menu.c:4486
struct _SETMENUITEMRECT * PSETMENUITEMRECT
struct tagROSMENUITEMINFO * PROSMENUITEMINFO
UINT FASTCALL IntGetMenuState(HMENU hMenu, UINT uId, UINT uFlags)
Definition: menu.c:4991
BOOL FASTCALL IntMenuItemInfo(PMENU Menu, UINT Item, BOOL ByPosition, PROSMENUITEMINFO UnsafeItemInfo, BOOL SetOrGet, PUNICODE_STRING lpstr)
Definition: menu.c:5092
static HBITMAP
Definition: button.c:44
static HDC
Definition: imagelist.c:88
static LPCSTR lpstr
Definition: font.c:51
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
#define _In_
Definition: ms_sal.h:308
unsigned int UINT
Definition: ndis.h:50
_In_ UINT _In_ UINT _In_ PNDIS_PACKET Source
Definition: ndis.h:3169
#define FASTCALL
Definition: nt_native.h:50
long LONG
Definition: pedump.c:60
Definition: window.c:28
UINT uItem
Definition: menu.h:64
RECTL rcRect
Definition: menu.h:66
BOOL fByPosition
Definition: menu.h:65
Definition: ntuser.h:694
DWORD dwLockCount
Definition: menu.h:43
INT cmdLast
Definition: menu.h:41
ULONG fInEndMenu
Definition: menu.h:22
HDC hdcAni
Definition: menu.h:59
INT cyAni
Definition: menu.h:57
UINT uButtonDownIndex
Definition: menu.h:47
ULONG fAutoDismiss
Definition: menu.h:29
HDC hdcWndAni
Definition: menu.h:52
ULONG fButtonAlwaysDown
Definition: menu.h:24
ULONG_PTR uButtonDownHitArea
Definition: menu.h:46
INT vkButtonDown
Definition: menu.h:48
struct tagMENUSTATE * pmnsPrev
Definition: menu.h:44
INT iyAni
Definition: menu.h:55
UINT uDraggingFlags
Definition: menu.h:51
DWORD dwAniStartTime
Definition: menu.h:53
ULONG fModelessMenu
Definition: menu.h:26
ULONG iAniDropDir
Definition: menu.h:37
UINT uDraggingIndex
Definition: menu.h:50
ULONG fIgnoreButtonUp
Definition: menu.h:31
ULONG fNotifyByPos
Definition: menu.h:35
INT ixAni
Definition: menu.h:54
ULONG_PTR uDraggingHitArea
Definition: menu.h:49
ULONG fInCallHandleMenuMessages
Definition: menu.h:27
PTHREADINFO ptiMenuStateOwner
Definition: menu.h:42
INT mnFocus
Definition: menu.h:40
ULONG fUnderline
Definition: menu.h:23
ULONG fMenuStarted
Definition: menu.h:18
ULONG fAboutToAutoDismiss
Definition: menu.h:30
POINT ptMouseLast
Definition: menu.h:39
ULONG fDragging
Definition: menu.h:25
ULONG fDragAndDrop
Definition: menu.h:28
INT cxAni
Definition: menu.h:56
ULONG fButtonDown
Definition: menu.h:21
ULONG fActiveNoForeground
Definition: menu.h:34
ULONG fInsideMenuLoop
Definition: menu.h:20
HBITMAP hbmAni
Definition: menu.h:58
ULONG fIsSysMenu
Definition: menu.h:19
PPOPUPMENU pGlobalPopupMenu
Definition: menu.h:15
POINT ptButtonDown
Definition: menu.h:45
ULONG fInDoDragDrop
Definition: menu.h:33
ULONG fMouseOffMenu
Definition: menu.h:32
ULONG fSetCapture
Definition: menu.h:36
INT iTop
Definition: menu.h:91
INT iMaxTop
Definition: menu.h:92
HMENU Self
Definition: menu.h:95
DWORD dwContextHelpID
Definition: menu.h:81
HBRUSH hbrBack
Definition: menu.h:80
UINT cItems
Definition: menu.h:86
UINT iItem
Definition: menu.h:85
DWORD dwStyle
Definition: menu.h:78
UINT cyMax
Definition: menu.h:79
HWND Wnd
Definition: menu.h:96
ULONG_PTR dwMenuData
Definition: menu.h:82
ULONG cxTextAlign
Definition: menu.h:89
ULONG fFlags
Definition: menu.h:84
BOOL TimeToHide
Definition: menu.h:97
PWND spwndNotify
Definition: menu.h:90
DWORD cbSize
Definition: menu.h:76
WORD cyMenu
Definition: menu.h:88
WORD cxMenu
Definition: menu.h:87
DWORD dwArrowsOn
Definition: menu.h:93
DWORD fMask
Definition: menu.h:77
HBITMAP hbmpItem
Definition: menu.h:114
HBITMAP hbmpUnchecked
Definition: menu.h:110
SIZE maxBmpSize
Definition: menu.h:119
HMENU hSubMenu
Definition: menu.h:108
LPWSTR dwTypeData
Definition: menu.h:112
LPWSTR lpstr
Definition: menu.h:118
HBITMAP hbmpChecked
Definition: menu.h:109
DWORD dwItemData
Definition: menu.h:111
int32_t INT
Definition: typedefs.h:58
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
_Must_inspect_result_ _In_ WDFCOLLECTION _In_ WDFOBJECT Object
_In_ WDFCOLLECTION _In_ WDFOBJECT Item
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:531
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184