Author: gadamopoulos
Date: Sun Sep 18 13:12:44 2011
New Revision: 53735
URL:
http://svn.reactos.org/svn/reactos?rev=53735&view=rev
Log:
[headers]
- Begin merging from themes branch
Added:
trunk/reactos/include/reactos/uxundoc.h (with props)
Modified:
trunk/reactos/dll/win32/user32/misc/usrapihk.c
trunk/reactos/include/reactos/undocuser.h
trunk/reactos/include/reactos/win32k/callback.h
Modified: trunk/reactos/dll/win32/user32/misc/usrapihk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/misc/usra…
==============================================================================
--- trunk/reactos/dll/win32/user32/misc/usrapihk.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/user32/misc/usrapihk.c [iso-8859-1] Sun Sep 18 13:12:44 2011
@@ -260,7 +260,7 @@
RtlEnterCriticalSection(&gcsUserApiHook);
- if (!pfn(uahLoadInit,(ULONG_PTR)&uah) || // Swap data, User32 to and Uxtheme
from!
+ if (!pfn(uahLoadInit,&uah) || // Swap data, User32 to and Uxtheme from!
uah.ForceResetUserApiHook != (FARPROC)ForceResetUserApiHook ||
uah.size <= 0 )
{
Modified: trunk/reactos/include/reactos/undocuser.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/undocuser.…
==============================================================================
--- trunk/reactos/include/reactos/undocuser.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/undocuser.h [iso-8859-1] Sun Sep 18 13:12:44 2011
@@ -24,27 +24,30 @@
#define WS_EX_SETANSICREATOR 0x80000000 // For WNDS_ANSICREATOR
/* Non SDK Window Message types. */
-#define WM_SETVISIBLE 0x00000009
-#define WM_ALTTABACTIVE 0x00000029
-#define WM_ISACTIVEICON 0x00000035
-#define WM_QUERYPARKICON 0x00000036
-#define WM_CLIENTSHUTDOWN 0x0000003B
-#define WM_COPYGLOBALDATA 0x00000049
-#define WM_LOGONNOTIFY 0x0000004c
-#define WM_KEYF1 0x0000004d
-#define WM_SYSTIMER 0x00000118
-#define WM_LBTRACKPOINT 0x00000131
-#define LB_CARETON 0x000001a3
-#define LB_CARETOFF 0x000001a4
-#define WM_DROPOBJECT 0x0000022A
-#define WM_QUERYDROPOBJECT 0x0000022B
-#define WM_BEGINDRAG 0x0000022C
-#define WM_DRAGLOOP 0x0000022D
-#define WM_DRAGSELECT 0x0000022E
-#define WM_DRAGMOVE 0x0000022F
-#define WM_POPUPSYSTEMMENU 0x00000313
-#define WM_CBT 0x000003FF // ReactOS only.
-#define WM_MAXIMUM 0x0001FFFF
+#define WM_SETVISIBLE 0x00000009
+#define WM_ALTTABACTIVE 0x00000029
+#define WM_ISACTIVEICON 0x00000035
+#define WM_QUERYPARKICON 0x00000036
+#define WM_CLIENTSHUTDOWN 0x0000003B
+#define WM_COPYGLOBALDATA 0x00000049
+#define WM_LOGONNOTIFY 0x0000004C
+#define WM_KEYF1 0x0000004D
+#define WM_NCUAHDRAWCAPTION 0x000000AE
+#define WM_NCUAHDRAWFRAME 0x000000AF
+#define WM_SYSTIMER 0x00000118
+#define WM_LBTRACKPOINT 0x00000131
+#define LB_CARETON 0x000001a3
+#define LB_CARETOFF 0x000001a4
+#define WM_DROPOBJECT 0x0000022A
+#define WM_QUERYDROPOBJECT 0x0000022B
+#define WM_BEGINDRAG 0x0000022C
+#define WM_DRAGLOOP 0x0000022D
+#define WM_DRAGSELECT 0x0000022E
+#define WM_DRAGMOVE 0x0000022F
+#define WM_POPUPSYSTEMMENU 0x00000313
+#define WM_UAHINIT 0x0000031b
+#define WM_CBT 0x000003FF // ReactOS only.
+#define WM_MAXIMUM 0x0001FFFF
/* Non SDK DCE types.*/
#define DCX_USESTYLE 0x00010000
@@ -120,6 +123,55 @@
// User api hook
//
+typedef LRESULT(CALLBACK *WNDPROC_OWP)(HWND,UINT,WPARAM,LPARAM,ULONG_PTR,PDWORD);
+typedef int (WINAPI *SETWINDOWRGN)(HWND hWnd, HRGN hRgn, BOOL bRedraw);
+
+typedef struct _UAHOWP
+{
+ BYTE* MsgBitArray;
+ DWORD Size;
+} UAHOWP, *PUAHOWP;
+
+#define UAH_HOOK_MESSAGE(uahowp, msg) uahowp.MsgBitArray[msg/8] |= (1 << (msg %
8));
+#define UAH_IS_MESSAGE_HOOKED(uahowp, msg) (uahowp.MsgBitArray[msg/8] & (1 <<
(msg % 8)))
+#define UAHOWP_MAX_SIZE WM_USER/8
+
+typedef struct tagUSERAPIHOOK
+{
+ DWORD size;
+ WNDPROC DefWindowProcA;
+ WNDPROC DefWindowProcW;
+ UAHOWP DefWndProcArray;
+ FARPROC GetScrollInfo;
+ FARPROC SetScrollInfo;
+ FARPROC EnableScrollBar;
+ FARPROC AdjustWindowRectEx;
+ SETWINDOWRGN SetWindowRgn;
+ WNDPROC_OWP PreWndProc;
+ WNDPROC_OWP PostWndProc;
+ UAHOWP WndProcArray;
+ WNDPROC_OWP PreDefDlgProc;
+ WNDPROC_OWP PostDefDlgProc;
+ UAHOWP DlgProcArray;
+ FARPROC GetSystemMetrics;
+ FARPROC SystemParametersInfoA;
+ FARPROC SystemParametersInfoW;
+ FARPROC ForceResetUserApiHook;
+ FARPROC DrawFrameControl;
+ FARPROC DrawCaption;
+ FARPROC MDIRedrawFrame;
+ FARPROC GetRealWindowOwner;
+} USERAPIHOOK, *PUSERAPIHOOK;
+
+typedef enum _UAPIHK
+{
+ uahLoadInit,
+ uahStop,
+ uahShutdown
+} UAPIHK, *PUAPIHK;
+
+typedef BOOL(CALLBACK *USERAPIHOOKPROC)(UAPIHK State, PUSERAPIHOOK puah);
+
typedef struct _USERAPIHOOKINFO
{
DWORD m_size;
@@ -129,51 +181,12 @@
LPCWSTR m_funname2;
} USERAPIHOOKINFO,*PUSERAPIHOOKINFO;
-typedef enum _UAPIHK
-{
- uahLoadInit,
- uahStop,
- uahShutdown
-} UAPIHK, *PUAPIHK;
+#if (WINVER == _WIN32_WINNT_WINXP)
+BOOL WINAPI RegisterUserApiHook(HINSTANCE hInstance, USERAPIHOOKPROC CallbackFunc);
+#elif (WINVER == _WIN32_WINNT_WS03)
+BOOL WINAPI RegisterUserApiHook(PUSERAPIHOOKINFO puah);
+#endif
-typedef DWORD (CALLBACK * USERAPIHOOKPROC)(UAPIHK State, ULONG_PTR Info);
-
-typedef LRESULT(CALLBACK *WNDPROC_OWP)(HWND,UINT,WPARAM,LPARAM,ULONG_PTR,PDWORD);
-
-typedef struct _UAHOWP
-{
- BYTE* MsgBitArray;
- DWORD Size;
-} UAHOWP, *PUAHOWP;
-
-typedef struct tagUSERAPIHOOK
-{
- DWORD size;
- WNDPROC DefWindowProcA;
- WNDPROC DefWindowProcW;
- UAHOWP DefWndProcArray;
- FARPROC GetScrollInfo;
- FARPROC SetScrollInfo;
- FARPROC EnableScrollBar;
- FARPROC AdjustWindowRectEx;
- FARPROC SetWindowRgn;
- WNDPROC_OWP PreWndProc;
- WNDPROC_OWP PostWndProc;
- UAHOWP WndProcArray;
- WNDPROC_OWP PreDefDlgProc;
- WNDPROC_OWP PostDefDlgProc;
- UAHOWP DlgProcArray;
- FARPROC GetSystemMetrics;
- FARPROC SystemParametersInfoA;
- FARPROC SystemParametersInfoW;
- FARPROC ForceResetUserApiHook;
- FARPROC DrawFrameControl;
- FARPROC DrawCaption;
- FARPROC MDIRedrawFrame;
- FARPROC GetRealWindowOwner;
-} USERAPIHOOK, *PUSERAPIHOOK;
-
-BOOL WINAPI RegisterUserApiHook(PUSERAPIHOOKINFO puah);
BOOL WINAPI UnregisterUserApiHook(VOID);
#endif
Added: trunk/reactos/include/reactos/uxundoc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/uxundoc.h?…
==============================================================================
--- trunk/reactos/include/reactos/uxundoc.h (added)
+++ trunk/reactos/include/reactos/uxundoc.h [iso-8859-1] Sun Sep 18 13:12:44 2011
@@ -1,0 +1,74 @@
+#pragma once
+
+typedef HANDLE HTHEMEFILE;
+
+/**********************************************************************
+ * ENUMTHEMEPROC
+ *
+ * Callback function for EnumThemes.
+ *
+ * RETURNS
+ * TRUE to continue enumeration, FALSE to stop
+ *
+ * PARAMS
+ * lpReserved Always 0
+ * pszThemeFileName Full path to theme msstyles file
+ * pszThemeName Display name for theme
+ * pszToolTip Tooltip name for theme
+ * lpReserved2 Always 0
+ * lpData Value passed through lpData from EnumThemes
+ */
+typedef BOOL (CALLBACK *ENUMTHEMEPROC)(LPVOID lpReserved, LPCWSTR pszThemeFileName,
+ LPCWSTR pszThemeName, LPCWSTR pszToolTip, LPVOID
lpReserved2,
+ LPVOID lpData);
+
+/**********************************************************************
+ * PARSETHEMEINIFILEPROC
+ *
+ * Callback function for ParseThemeIniFile.
+ *
+ * RETURNS
+ * TRUE to continue enumeration, FALSE to stop
+ *
+ * PARAMS
+ * dwType Entry type
+ * pszParam1 Use defined by entry type
+ * pszParam2 Use defined by entry type
+ * pszParam3 Use defined by entry type
+ * dwParam Use defined by entry type
+ * lpData Value passed through lpData from ParseThemeIniFile
+ *
+ * NOTES
+ * I don't know what the valid entry types are
+ */
+typedef BOOL (CALLBACK* PARSETHEMEINIFILEPROC)(DWORD dwType, LPWSTR pszParam1,
+ LPWSTR pszParam2, LPWSTR pszParam3,
+ DWORD dwParam, LPVOID lpData);
+
+/* Structure filled in by EnumThemeColors() and EnumeThemeSizes() with the
+ * various strings for a theme color or size. */
+typedef struct tagTHEMENAMES
+{
+ WCHAR szName[MAX_PATH+1];
+ WCHAR szDisplayName[MAX_PATH+1];
+ WCHAR szTooltip[MAX_PATH+1];
+} THEMENAMES, *PTHEMENAMES;
+
+/* Declarations for undocumented functions for use internally */
+DWORD WINAPI QueryThemeServices(void);
+HRESULT WINAPI OpenThemeFile(LPCWSTR pszThemeFileName, LPCWSTR pszColorName,
+ LPCWSTR pszSizeName, HTHEMEFILE *hThemeFile,
+ DWORD unknown);
+HRESULT WINAPI CloseThemeFile(HTHEMEFILE hThemeFile);
+HRESULT WINAPI ApplyTheme(HTHEMEFILE hThemeFile, char *unknown, HWND hWnd);
+HRESULT WINAPI GetThemeDefaults(LPCWSTR pszThemeFileName, LPWSTR pszColorName,
+ DWORD dwColorNameLen, LPWSTR pszSizeName,
+ DWORD dwSizeNameLen);
+HRESULT WINAPI EnumThemes(LPCWSTR pszThemePath, ENUMTHEMEPROC callback,
+ LPVOID lpData);
+HRESULT WINAPI EnumThemeColors(LPWSTR pszThemeFileName, LPWSTR pszSizeName,
+ DWORD dwColorNum, PTHEMENAMES pszColorNames);
+HRESULT WINAPI EnumThemeSizes(LPWSTR pszThemeFileName, LPWSTR pszColorName,
+ DWORD dwSizeNum, PTHEMENAMES pszColorNames);
+HRESULT WINAPI ParseThemeIniFile(LPCWSTR pszIniFileName, LPWSTR pszUnknown,
+ PARSETHEMEINIFILEPROC callback, LPVOID lpData);
Propchange: trunk/reactos/include/reactos/uxundoc.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: trunk/reactos/include/reactos/win32k/callback.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/cal…
==============================================================================
--- trunk/reactos/include/reactos/win32k/callback.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/win32k/callback.h [iso-8859-1] Sun Sep 18 13:12:44 2011
@@ -9,7 +9,8 @@
#define USER32_CALLBACK_EVENTPROC (5)
#define USER32_CALLBACK_LOADMENU (6)
#define USER32_CALLBACK_CLIENTTHREADSTARTUP (7)
-#define USER32_CALLBACK_MAXIMUM (7)
+#define USER32_CALLBACK_CLIENTLOADLIBRARY (8)
+#define USER32_CALLBACK_MAXIMUM (8)
typedef struct _WINDOWPROC_CALLBACK_ARGUMENTS
{
@@ -76,6 +77,14 @@
WCHAR MenuName[1];
} LOADMENU_CALLBACK_ARGUMENTS, *PLOADMENU_CALLBACK_ARGUMENTS;
+typedef struct _CLIENT_LOAD_LIBRARY_ARGUMENTS
+{
+ UNICODE_STRING strLibraryName;
+ UNICODE_STRING strInitFuncName;
+ BOOL Unload;
+ BOOL ApiHook;
+} CLIENT_LOAD_LIBRARY_ARGUMENTS, *PCLIENT_LOAD_LIBRARY_ARGUMENTS;
+
NTSTATUS WINAPI
User32CallWindowProcFromKernel(PVOID Arguments, ULONG ArgumentLength);
NTSTATUS WINAPI
@@ -92,5 +101,6 @@
User32CallLoadMenuFromKernel(PVOID Arguments, ULONG ArgumentLength);
NTSTATUS WINAPI
User32CallClientThreadSetupFromKernel(PVOID Arguments, ULONG ArgumentLength);
-
+NTSTATUS WINAPI
+User32CallClientLoadLibraryFromKernel(PVOID Arguments, ULONG ArgumentLength);
#endif /* __INCLUDE_USER32_CALLBACK_H */