Sync with trunk revision 63128.
[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 BOOL FASTCALL
27 IntDestroyMenuObject(PMENU MenuObject, BOOL bRecurse, BOOL RemoveFromProcess);
28
29 PMENU FASTCALL
30 IntCloneMenu(PMENU Source);
31
32 int FASTCALL
33 IntGetMenuItemByFlag(PMENU MenuObject, UINT uSearchBy, UINT fFlag,
34 PMENU *SubMenu, PITEM *MenuItem,
35 PITEM *PrevMenuItem);
36
37 BOOL FASTCALL
38 IntCleanupMenus(struct _EPROCESS *Process, PPROCESSINFO Win32Process);
39
40 BOOL FASTCALL
41 IntInsertMenuItem(_In_ PMENU MenuObject, UINT uItem, BOOL fByPosition,
42 PROSMENUITEMINFO ItemInfo);
43
44 PMENU FASTCALL
45 IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu);
46
47 UINT FASTCALL IntFindSubMenu(HMENU *hMenu, HMENU hSubTarget );
48 UINT FASTCALL IntGetMenuState( HMENU hMenu, UINT uId, UINT uFlags);
49 BOOL FASTCALL IntRemoveMenuItem(PMENU Menu, UINT uPosition, UINT uFlags, BOOL bRecurse);
50 PITEM MENU_FindItem( PMENU *pmenu, UINT *nPos, UINT wFlags );