1 #ifndef __WIN32K_MENU_H
2 #define __WIN32K_MENU_H
5 #include <napi/win32.h>
8 (((ULONG_PTR)(x) > 0x0) && ((ULONG_PTR)(x) < 0x10000))
10 #define MENU_ITEM_TYPE(flags) \
11 ((flags) & (MF_STRING | MF_BITMAP | MF_OWNERDRAW | MF_SEPARATOR))
14 #define MF_END (0x0080)
17 typedef struct _MENU_ITEM
19 struct _MENU_ITEM *Next;
25 HBITMAP hbmpUnchecked;
30 } MENU_ITEM, *PMENU_ITEM;
32 typedef struct _MENU_OBJECT
37 FAST_MUTEX MenuItemsLock;
38 PMENU_ITEM MenuItemList;
42 } MENU_OBJECT, *PMENU_OBJECT;
45 IntGetMenuObject(HMENU hMenu);
48 IntReleaseMenuObject(PMENU_OBJECT MenuObject);
51 IntFreeMenuItem(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem,
52 BOOL RemoveFromList, BOOL bRecurse);
55 IntRemoveMenuItem(PMENU_OBJECT MenuObject, UINT uPosition, UINT uFlags,
59 IntDeleteMenuItems(PMENU_OBJECT MenuObject, BOOL bRecurse);
62 IntDestroyMenuObject(PMENU_OBJECT MenuObject, BOOL bRecurse, BOOL RemoveFromProcess);
65 IntCreateMenu(PHANDLE Handle);
68 IntCloneMenu(PMENU_OBJECT Source);
71 IntSetMenuFlagRtoL(PMENU_OBJECT MenuObject);
74 IntSetMenuContextHelpId(PMENU_OBJECT MenuObject, DWORD dwContextHelpId);
77 IntGetMenuInfo(PMENU_OBJECT MenuObject, LPMENUINFO lpmi);
80 IntSetMenuInfo(PMENU_OBJECT MenuObject, LPMENUINFO lpmi);
83 IntGetMenuItemByFlag(PMENU_OBJECT MenuObject, UINT uSearchBy, UINT fFlag,
84 PMENU_ITEM *MenuItem, PMENU_ITEM *PrevMenuItem);
87 IntGetMenuItemInfo(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, LPMENUITEMINFOW lpmii);
90 IntSetMenuItemInfo(PMENU_OBJECT MenuObject, PMENU_ITEM MenuItem, LPCMENUITEMINFOW lpmii);
93 IntInsertMenuItem(PMENU_OBJECT MenuObject, UINT uItem, WINBOOL fByPosition,
94 LPCMENUITEMINFOW lpmii);
97 IntEnableMenuItem(PMENU_OBJECT MenuObject, UINT uIDEnableItem, UINT uEnable);
100 IntCheckMenuItem(PMENU_OBJECT MenuObject, UINT uIDCheckItem, UINT uCheck);
103 IntSetMenuDefaultItem(PMENU_OBJECT MenuObject, UINT uItem, UINT fByPos);
106 IntCleanupMenus(struct _EPROCESS *Process, PW32PROCESS Win32Process);
114 CleanupMenuImpl(VOID);
118 NtUserBuildMenuItemList(
133 NtUserCreateMenu(VOID);
149 NtUserDrawMenuBarTemp(
158 NtUserEnableMenuItem(
165 NtUserInsertMenuItem(
169 LPCMENUITEMINFOW lpmii);
178 NtUserGetMenuDefaultItem(
185 NtUserGetMenuBarInfo(
199 NtUserGetMenuItemRect(
207 NtUserHiliteMenuItem(
222 NtUserMenuItemFromPoint(
234 LPMENUITEMINFOW lpmii,
246 NtUserSetMenuContextHelpId(
248 DWORD dwContextHelpId);
252 NtUserSetMenuDefaultItem(
259 NtUserSetMenuFlagRtoL(
264 NtUserThunkedMenuInfo(
270 NtUserThunkedMenuItemInfo(
275 LPMENUITEMINFOW lpmii,
276 PUNICODE_STRING lpszCaption);
280 NtUserTrackPopupMenuEx(
288 #endif /* __WIN32K_MENU_H */