typedef struct _THREADINFO *PTHREADINFO;
struct _DESKTOP;
struct _WND;
+struct tagPOPUPMENU;
#define FIRST_USER_HANDLE 0x0020 /* first possible value for low word of user handle */
#define LAST_USER_HANDLE 0xffef /* last possible value for low word of user handle */
int allocated_handles;
} USER_HANDLE_TABLE, * PUSER_HANDLE_TABLE;
-typedef enum _USER_OBJECT_TYPE
+typedef enum _HANDLE_TYPE
{
- otFree = 0,
- otWindow,
- otMenu,
- otCursorIcon,
- otSMWP,
- otHook,
- otClipBoardData,
- otCallProc,
- otAccel,
- otDDEaccess,
- otDDEconv,
- otDDExact,
- otMonitor,
- otKBDlayout,
- otKBDfile,
- otEvent,
- otTimer,
- otInputContext,
- otHidData,
- otDeviceInfo,
- otTouchInput,
- otGestureInfo,
- USER_HANDLE_TYPE_COUNT
-} USER_OBJECT_TYPE;
+ TYPE_FREE = 0,
+ TYPE_WINDOW = 1,
+ TYPE_MENU = 2,
+ TYPE_CURSOR = 3,
+ TYPE_SETWINDOWPOS = 4,
+ TYPE_HOOK = 5,
+ TYPE_CLIPDATA = 6,
+ TYPE_CALLPROC = 7,
+ TYPE_ACCELTABLE = 8,
+ TYPE_DDEACCESS = 9,
+ TYPE_DDECONV = 10,
+ TYPE_DDEXACT = 11,
+ TYPE_MONITOR = 12,
+ TYPE_KBDLAYOUT = 13,
+ TYPE_KBDFILE = 14,
+ TYPE_WINEVENTHOOK = 15,
+ TYPE_TIMER = 16,
+ TYPE_INPUTCONTEXT = 17,
+ TYPE_HIDDATA = 18,
+ TYPE_DEVICEINFO = 19,
+ TYPE_TOUCHINPUTINFO = 20,
+ TYPE_GESTUREINFOOBJ = 21,
+ TYPE_CTYPES,
+ TYPE_GENERIC = 255
+} HANDLE_TYPE, *PHANDLE_TYPE;
typedef enum _USERTHREADINFOCLASS
{
HWND hTaskManWindow;
HWND hProgmanWindow;
HWND hShellWindow;
+ struct _WND * spwndShell;
PPROCESSINFO ppiShellProcess;
/* Menu Item fType. */
#define MFT_RTOL 0x6000
+/* Menu Item fState. */
+#define MFS_HBMMENUBMP 0x20000000
+
typedef struct tagITEM
{
UINT fType;
struct tagMENU* spSubMenu; /* Pop-up menu. */
HANDLE hbmpChecked;
HANDLE hbmpUnchecked;
- USHORT* lpstr; /* Item text pointer. */
+ USHORT* Xlpstr; /* Item text pointer. */
ULONG cch;
DWORD_PTR dwItemData;
ULONG xItem; /* Item position. left */
HBITMAP hbmp; /* bitmap */
INT cxBmp; /* Width Maximum size of the bitmap items in MIIM_BITMAP state */
INT cyBmp; /* Height " */
+ //// ReactOS
+ UNICODE_STRING lpstr;
} ITEM, *PITEM;
typedef struct tagMENULIST
#define MNF_DESKTOPMN 0x0040
#define MNF_SYSDESKMN 0x0080
#define MNF_SYSSUBMENU 0x0100
+// Hack
+#define MNF_SYSMENU 0x0200
typedef struct tagMENU
{
PROCDESKHEAD head;
ULONG fFlags; /* [Style flags | Menu flags] */
- INT iItem; /* nPos of selected item, if -1 not selected. */
+ INT iItem; /* nPos of selected item, if -1 not selected. AKA focused item */
UINT cAlloced; /* Number of allocated items. Inc's of 8 */
UINT cItems; /* Number of items in the menu */
ULONG cxMenu; /* Width of the whole menu */
INT iTop; /* Current scroll position Top */
INT iMaxTop; /* Current scroll position Max Top */
DWORD dwArrowsOn:2; /* Arrows: 0 off, 1 on, 2 to the top, 3 to the bottom. */
+ //// ReactOS
+ LIST_ENTRY ListEntry;
+ HWND hWnd; /* Window containing the menu, use POPUPMENU */
+ BOOL TimeToHide;
} MENU, *PMENU;
+typedef struct tagPOPUPMENU
+{
+ ULONG fIsMenuBar:1;
+ ULONG fHasMenuBar:1;
+ ULONG fIsSysMenu:1;
+ ULONG fIsTrackPopup:1;
+ ULONG fDroppedLeft:1;
+ ULONG fHierarchyDropped:1;
+ ULONG fRightButton:1;
+ ULONG fToggle:1;
+ ULONG fSynchronous:1;
+ ULONG fFirstClick:1;
+ ULONG fDropNextPopup:1;
+ ULONG fNoNotify:1;
+ ULONG fAboutToHide:1;
+ ULONG fShowTimer:1;
+ ULONG fHideTimer:1;
+ ULONG fDestroyed:1;
+ ULONG fDelayedFree:1;
+ ULONG fFlushDelayedFree:1;
+ ULONG fFreed:1;
+ ULONG fInCancel:1;
+ ULONG fTrackMouseEvent:1;
+ ULONG fSendUninit:1;
+ ULONG fRtoL:1;
+// ULONG fDesktopMenu:1;
+ ULONG iDropDir:5;
+ ULONG fUseMonitorRect:1;
+ struct _WND *spwndNotify;
+ struct _WND *spwndPopupMenu;
+ struct _WND *spwndNextPopup;
+ struct _WND *spwndPrevPopup;
+ PMENU spmenu;
+ PMENU spmenuAlternate;
+ struct _WND *spwndActivePopup;
+ struct tagPOPUPMENU *ppopupmenuRoot;
+ struct tagPOPUPMENU *ppmDelayedFree;
+ UINT posSelectedItem;
+ UINT posDropped;
+} POPUPMENU, *PPOPUPMENU;
+
+
typedef struct _REGISTER_SYSCLASS
{
/* This is a reactos specific class used to initialize the
HANDLE hIconSm; /* FIXME - Use pointer! */
//PCURSOR spicnSm;
+ //// ReactOS dosn't suppot cache icons.
+ HICON hIconSmIntern; /* Internal small icon, derived from hIcon */
+ ////
UINT Unicode : 1; // !CSF_ANSIPROC
UINT Global : 1; // CS_GLOBALCLASS or CSF_SERVERSIDEPROC
UINT MenuNameIsString : 1;
#define WNDS_HASPALETTE 0x00200000
#define WNDS_PAINTNOTPROCESSED 0x00400000
#define WNDS_SYNCPAINTPENDING 0x00800000
-#define WNDS_RECIEVEDQUERYSUSPENDMSG 0x01000000
-#define WNDS_RECIEVEDSUSPENDMSG 0x02000000
+#define WNDS_RECEIVEDQUERYSUSPENDMSG 0x01000000
+#define WNDS_RECEIVEDSUSPENDMSG 0x02000000
#define WNDS_TOGGLETOPMOST 0x04000000
#define WNDS_REDRAWIFHUNG 0x08000000
#define WNDS_REDRAWFRAMEIFHUNG 0x10000000
SBCALC SBCalc;
} SBWND, *PSBWND;
+typedef struct _MENUWND
+{
+ WND wnd;
+ PPOPUPMENU ppopupmenu;
+} MENUWND, *PMENUWND;
+
typedef struct _PFNCLIENT
{
WNDPROC pfnScrollBarWndProc;
TEXTMETRICW tmSysFont;
DPISERVERINFO dpiSystem;
HICON hIconSmWindows;
- HICON hIcoWindows;
+ HICON hIconWindows;
DWORD dwKeyCache;
DWORD dwAsyncKeyCache;
ULONG cCaptures;
NtUserCloseWindowStation(
HWINSTA hWinSta);
-DWORD
-NTAPI
+/* Console commands for NtUserConsoleControl */
+typedef enum _CONSOLECONTROL
+{
+ GuiConsoleWndClassAtom,
+ ConsoleMakePalettePublic = 5,
+ ConsoleAcquireDisplayOwnership,
+} CONSOLECONTROL, *PCONSOLECONTROL;
+
+NTSTATUS
+APIENTRY
NtUserConsoleControl(
- DWORD dwUnknown1,
- DWORD dwUnknown2,
- DWORD dwUnknown3);
+ IN CONSOLECONTROL ConsoleCtrl,
+ IN PVOID ConsoleCtrlInfo,
+ IN ULONG ConsoleCtrlInfoLength);
HANDLE
NTAPI
NtUserGetCursorFrameInfo(
HCURSOR hCursor,
DWORD istep,
- PDWORD rate_jiffies,
- INT *num_steps);
+ INT* rate_jiffies,
+ DWORD* num_steps);
BOOL
NTAPI
DWORD Unknown1,
DWORD Unknown2);
-DWORD
+BOOL
NTAPI
NtUserNotifyProcessCreate(
- DWORD dwUnknown1,
- DWORD dwUnknown2,
- DWORD dwUnknown3,
- DWORD dwUnknown4);
+ HANDLE NewProcessId,
+ HANDLE SourceThreadId,
+ DWORD dwUnknown,
+ ULONG CreateFlags);
VOID
NTAPI
_In_ HCURSOR hCursor,
_In_ PUNICODE_STRING pustrModule,
_In_ PUNICODE_STRING puSrcName,
- _In_ PCURSORDATA pCursorData);
+ _In_ const CURSORDATA* pCursorData);
typedef struct _tagFINDEXISTINGCURICONPARAM
{
DWORD Unknown4,
DWORD Unknown5);
-HWND
-NTAPI
-NtUserWindowFromPhysicalPoint(
- POINT Point);
-
HWND
NTAPI
NtUserWindowFromPoint(
* ReactOS-specific NtUser calls and their related structures, both which shouldn't exist.
*/
+#define NOPARAM_ROUTINE_ISCONSOLEMODE 0xffff0001
#define NOPARAM_ROUTINE_GETMESSAGEEXTRAINFO 0xffff0005
#define ONEPARAM_ROUTINE_CSRSS_GUICHECK 0xffff0008
#define ONEPARAM_ROUTINE_SWITCHCARETSHOWING 0xfffe0008
#define ONEPARAM_ROUTINE_ENABLEPROCWNDGHSTING 0xfffe000d
#define ONEPARAM_ROUTINE_GETDESKTOPMAPPING 0xfffe000e
#define TWOPARAM_ROUTINE_SETMENUBARHEIGHT 0xfffd0050
+#define TWOPARAM_ROUTINE_EXITREACTOS 0xfffd0051
#define TWOPARAM_ROUTINE_SETGUITHRDHANDLE 0xfffd0052
+#define HWNDLOCK_ROUTINE_SETFOREGROUNDWINDOWMOUSE 0xfffd0053
#define MSQ_STATE_CAPTURE 0x1
#define MSQ_STATE_ACTIVE 0x2
#define MSQ_STATE_FOCUS 0x3
#define MSQ_STATE_MENUOWNER 0x4
#define MSQ_STATE_MOVESIZE 0x5
#define MSQ_STATE_CARET 0x6
-#define TWOPARAM_ROUTINE_SETCARETPOS 0xfffd0060
#define TWOPARAM_ROUTINE_ROS_UPDATEUISTATE 0x1004
#define HWNDPARAM_ROUTINE_ROS_NOTIFYWINEVENT 0x1005
-DWORD
-NTAPI
-NtUserBuildMenuItemList(
- HMENU hMenu,
- PVOID Buffer,
- ULONG nBufSize,
- DWORD Reserved);
-
-UINT
-NTAPI
-NtUserGetMenuDefaultItem(
- HMENU hMenu,
- UINT fByPos,
- UINT gmdiFlags);
-
BOOL
NTAPI
NtUserGetMonitorInfo(
DWORD dwContextHelpID;
ULONG_PTR dwMenuData;
/* ----------- Extra ----------- */
+ ULONG fFlags; /* Menu flags (MF_POPUP, MF_SYSMENU) */
+ UINT iItem; /* Currently focused item */
+ UINT cItems; /* Number of items in the menu */
+ WORD cxMenu; /* Width of the whole menu */
+ WORD cyMenu; /* Height of the whole menu */
+ ULONG cxTextAlign;
+ PWND spwndNotify; /* window receiving the messages for ownerdraw */
+ INT iTop;
+ INT iMaxTop;
+ DWORD dwArrowsOn:2;
+
HMENU Self; /* Handle of this menu */
- WORD Flags; /* Menu flags (MF_POPUP, MF_SYSMENU) */
- UINT FocusedItem; /* Currently focused item */
- UINT MenuItemCount; /* Number of items in the menu */
HWND Wnd; /* Window containing the menu */
- WORD Width; /* Width of the whole menu */
- WORD Height; /* Height of the whole menu */
- HWND WndOwner; /* window receiving the messages for ownerdraw */
- BOOL TimeToHide; /* Request hiding when receiving a second click in the top-level menu item */
- SIZE maxBmpSize; /* Maximum size of the bitmap items in MIIM_BITMAP state */
+ BOOL TimeToHide; /* Request hiding when receiving a second click in the top-level menu item */
} ROSMENUINFO, *PROSMENUINFO;
-BOOL
-NTAPI
-NtUserMenuInfo(
- HMENU hmenu,
- PROSMENUINFO lpmi,
- BOOL fsog
-);
-
typedef struct tagROSMENUITEMINFO
{
/* ----------- MENUITEMINFOW ----------- */
RECT Rect; /* Item area (relative to menu window) */
UINT dxTab; /* X position of text after Tab */
LPWSTR lpstr; /* Copy of the text pointer in MenuItem->Text */
+ SIZE maxBmpSize; /* Maximum size of the bitmap items in MIIM_BITMAP state */
} ROSMENUITEMINFO, *PROSMENUITEMINFO;
-BOOL
-NTAPI
-NtUserMenuItemInfo(
- HMENU hMenu,
- UINT uItem,
- BOOL fByPosition,
- PROSMENUITEMINFO lpmii,
- BOOL fsog
-);
-
HMONITOR
NTAPI
NtUserMonitorFromPoint(