Sync with trunk r64222.
[reactos.git] / win32ss / user / ntuser / menu.h
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 _SETMENUITEMRECT
14 {
15 UINT uItem;
16 BOOL fByPosition;
17 RECTL rcRect;
18 } SETMENUITEMRECT, *PSETMENUITEMRECT;
19
20 PMENU FASTCALL
21 IntGetMenuObject(HMENU hMenu);
22
23 #define IntReleaseMenuObject(MenuObj) \
24 UserDereferenceObject(MenuObj)
25
26 BOOLEAN
27 UserDestroyMenuObject(PVOID Object);
28
29 BOOL FASTCALL
30 IntDestroyMenuObject(PMENU MenuObject, BOOL bRecurse);
31
32 PMENU FASTCALL
33 IntCloneMenu(PMENU Source);
34
35 int FASTCALL
36 IntGetMenuItemByFlag(PMENU MenuObject, UINT uSearchBy, UINT fFlag,
37 PMENU *SubMenu, PITEM *MenuItem,
38 PITEM *PrevMenuItem);
39
40 BOOL FASTCALL
41 IntCleanupMenus(struct _EPROCESS *Process, PPROCESSINFO Win32Process);
42
43 BOOL FASTCALL
44 IntInsertMenuItem(_In_ PMENU MenuObject, UINT uItem, BOOL fByPosition, PROSMENUITEMINFO ItemInfo, PUNICODE_STRING lpstr);
45
46 PMENU FASTCALL
47 IntGetSystemMenu(PWND Window, BOOL bRevert);
48
49 UINT FASTCALL IntFindSubMenu(HMENU *hMenu, HMENU hSubTarget );
50 UINT FASTCALL IntGetMenuState( HMENU hMenu, UINT uId, UINT uFlags);
51 BOOL FASTCALL IntRemoveMenuItem(PMENU Menu, UINT uPosition, UINT uFlags, BOOL bRecurse);
52 PITEM FASTCALL MENU_FindItem( PMENU *pmenu, UINT *nPos, UINT wFlags );
53 BOOL FASTCALL IntMenuItemInfo(PMENU Menu, UINT Item, BOOL ByPosition, PROSMENUITEMINFO UnsafeItemInfo, BOOL SetOrGet, PUNICODE_STRING lpstr);