[Win32k|User32]
[reactos.git] / reactos / include / reactos / win32k / ntuser.h
index 21616a3..207df62 100644 (file)
@@ -6,6 +6,21 @@ typedef struct _THREADINFO *PTHREADINFO;
 struct _DESKTOP;
 struct _WND;
 
+typedef enum _USERTHREADINFOCLASS
+{
+    UserThreadShutdownInformation,
+    UserThreadFlags,
+    UserThreadTaskName,
+    UserThreadWOWInformation,
+    UserThreadHungStatus,
+    UserThreadInitiateShutdown,
+    UserThreadEndShutdown,
+    UserThreadUseActiveDesktop,
+    UserThreadUseDesktop,
+    UserThreadRestoreDesktop,
+    UserThreadCsrApiPort,
+} USERTHREADINFOCLASS;
+
 typedef struct _LARGE_UNICODE_STRING
 {
   ULONG Length;
@@ -206,6 +221,69 @@ C_ASSERT(sizeof(CLIENTINFO) == FIELD_OFFSET(TEB, glDispatchTable) - FIELD_OFFSET
 
 #define GetWin32ClientInfo() ((PCLIENTINFO)(NtCurrentTeb()->Win32ClientInfo))
 
+/* Menu Item fType. */
+#define MFT_RTOL 0x6000
+
+typedef struct tagITEM
+{
+    UINT fType;
+    UINT fState;
+    UINT wID;
+    struct tagMENU* spSubMenu; /* Pop-up menu. */
+    HANDLE hbmpChecked;
+    HANDLE hbmpUnchecked;
+    USHORT* lpstr; /* Item text pointer. */
+    ULONG cch;
+    DWORD_PTR dwItemData;
+    ULONG xItem;   /* Item position. left */
+    ULONG yItem;   /*     "          top */
+    ULONG cxItem;  /* Item Size Width */
+    ULONG cyItem;  /*     "     Height */
+    ULONG dxTab;   /* X position of text after Tab */
+    ULONG ulX;     /* underline.. start position */
+    ULONG ulWidth; /* underline.. width */
+    HBITMAP hbmp;  /* bitmap */
+    INT cxBmp;     /* Width Maximum size of the bitmap items in MIIM_BITMAP state */
+    INT cyBmp;     /* Height " */
+} ITEM, *PITEM;
+
+typedef struct tagMENULIST
+{
+   struct tagMENULIST* pNext;
+   struct tagMENU*     pMenu;
+} MENULIST, *PMENULIST;
+
+/* Menu fFlags, upper byte is MNS_X style flags. */
+#define MNF_POPUP       0x0001
+#define MNF_UNDERLINE   0x0004
+#define MNF_INACTIVE    0x0010
+#define MNF_RTOL        0x0020
+#define MNF_DESKTOPMN   0x0040
+#define MNF_SYSDESKMN   0x0080
+#define MNF_SYSSUBMENU  0x0100
+
+typedef struct tagMENU
+{
+    PROCDESKHEAD head;
+    ULONG fFlags;             /* [Style flags | Menu flags] */
+    INT iItem;                /* nPos of selected item, if -1 not selected. */
+    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 */
+    ULONG cyMenu;             /* Height of the whole menu */
+    ULONG cxTextAlign;        /* Offset of text when items have both bitmaps and text */
+    struct _WND *spwndNotify; /* window receiving the messages for ownerdraw */
+    PITEM rgItems;            /* Array of menu items */
+    struct tagMENULIST* pParentMenus; /* If this is SubMenu, list of parents. */
+    DWORD dwContextHelpId;
+    ULONG cyMax;              /* max height of the whole menu, 0 is screen height */
+    DWORD_PTR dwMenuData;     /* application defined value */
+    HBRUSH hbrBack;           /* brush for menu background */
+    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. */
+} MENU, *PMENU;
+
 typedef struct _REGISTER_SYSCLASS
 {
     /* This is a reactos specific class used to initialize the
@@ -775,6 +853,8 @@ typedef struct _USERCONNECT
 //
 #define DCX_USESTYLE     0x00010000
 #define DCX_KEEPCLIPRGN  0x00040000
+#define DCX_KEEPLAYOUT   0x40000000
+#define DCX_PROCESSOWNED 0x80000000
 
 //
 // Non SDK Queue message types.
@@ -1546,6 +1626,15 @@ NtUserDrawCaptionTemp(
   const PUNICODE_STRING str,
   UINT uFlags);
 
+// Used with NtUserDrawIconEx, last parameter.
+typedef struct _DRAWICONEXDATA
+{
+  HBITMAP hbmMask;
+  HBITMAP hbmColor;
+  int cx;
+  int cy;
+} DRAWICONEXDATA, *PDRAWICONEXDATA;
+
 BOOL
 NTAPI
 NtUserDrawIconEx(
@@ -1558,8 +1647,8 @@ NtUserDrawIconEx(
   UINT istepIfAniCur,
   HBRUSH hbrFlickerFreeDraw,
   UINT diFlags,
-  DWORD Unknown0,
-  DWORD Unknown1);
+  BOOL bMetaHDC,
+  PVOID pDIXData);
 
 DWORD
 NTAPI
@@ -2607,13 +2696,14 @@ NtUserSetInformationProcess(
     DWORD dwUnknown3,
     DWORD dwUnknown4);
 
-DWORD
+NTSTATUS
 NTAPI
 NtUserSetInformationThread(
-    DWORD dwUnknown1,
-    DWORD dwUnknown2,
-    DWORD dwUnknown3,
-    DWORD dwUnknown4);
+    IN HANDLE ThreadHandle,
+    IN USERTHREADINFOCLASS ThreadInformationClass,
+    IN PVOID ThreadInformation,
+    IN ULONG ThreadInformationLength
+);
 
 DWORD
 NTAPI
@@ -3189,8 +3279,8 @@ typedef struct tagROSMENUITEMINFO
     HBITMAP hbmpItem;
     /* ----------- Extra ----------- */
     RECT Rect;      /* Item area (relative to menu window) */
-    UINT XTab;      /* X position of text after Tab */
-    LPWSTR Text;    /* Copy of the text pointer in MenuItem->Text */
+    UINT dxTab;      /* X position of text after Tab */
+    LPWSTR lpstr;    /* Copy of the text pointer in MenuItem->Text */
 } ROSMENUITEMINFO, *PROSMENUITEMINFO;
 
 BOOL