[Win32k]
[reactos.git] / reactos / 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, PROSMENUITEMINFO ItemInfo, PUNICODE_STRING lpstr);
42
43 PMENU FASTCALL
44 IntGetSystemMenu(PWND Window, BOOL bRevert, BOOL RetMenu);
45
46 UINT FASTCALL IntFindSubMenu(HMENU *hMenu, HMENU hSubTarget );
47 UINT FASTCALL IntGetMenuState( HMENU hMenu, UINT uId, UINT uFlags);
48 BOOL FASTCALL IntRemoveMenuItem(PMENU Menu, UINT uPosition, UINT uFlags, BOOL bRecurse);
49 PITEM FASTCALL MENU_FindItem( PMENU *pmenu, UINT *nPos, UINT wFlags );