diff --git a/reactos/lib/uxtheme/.cvsignore b/reactos/lib/uxtheme/.cvsignore deleted file mode 100644 index 4d216868aec..00000000000 --- a/reactos/lib/uxtheme/.cvsignore +++ /dev/null @@ -1,14 +0,0 @@ -*.coff -*.dll -*.d -*.a -*.o -*.sym -*.map -*.tmp -*.~* -*.il? -*.res -*.tds -*.lib -*.xml diff --git a/reactos/lib/uxtheme/include/nostyle/button.h b/reactos/lib/uxtheme/include/nostyle/button.h deleted file mode 100644 index 01bc619d292..00000000000 --- a/reactos/lib/uxtheme/include/nostyle/button.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef UXTHEME_BUTTON_H__ -#define UXTHEME_BUTTON_H__ - -#include "uxthemedll.h" - -extern const UXTHEME_VTABLE Button_Vt; - - - -#endif - -/* EOF */ diff --git a/reactos/lib/uxtheme/makefile b/reactos/lib/uxtheme/makefile deleted file mode 100644 index 38c88faaa03..00000000000 --- a/reactos/lib/uxtheme/makefile +++ /dev/null @@ -1,31 +0,0 @@ -# $Id: makefile,v 1.3 2003/12/17 01:39:21 hyperion Exp $ - -PATH_TO_TOP = ../.. - -TARGET_DEFONLY = yes - -TARGET_TYPE = dynlink - -TARGET_NAME = uxtheme - -TARGET_SDKLIBS = kernel32.a user32.a gdi32.a - -TARGET_CFLAGS = -Wall -Werror -D_DISABLE_TIDENTS -D__USE_W32API -I./include - -TARGET_LFLAGS = -nostartfiles -Wl,--enable-stdcall-fixup - -TARGET_BASE = 0x5B180000 - -TARGET_OBJECTS = \ - uxthemedll.o \ - nostyle/button.o - -DEP_OBJECTS = $(TARGET_OBJECTS) - -include $(PATH_TO_TOP)/rules.mak - -include $(TOOLS_PATH)/helper.mk - -include $(TOOLS_PATH)/depend.mk - -# EOF diff --git a/reactos/lib/uxtheme/nostyle/.cvsignore b/reactos/lib/uxtheme/nostyle/.cvsignore deleted file mode 100644 index 962f3c27c2d..00000000000 --- a/reactos/lib/uxtheme/nostyle/.cvsignore +++ /dev/null @@ -1,6 +0,0 @@ -*.d -*.a -*.o -*.sym -*.obj -*.~* diff --git a/reactos/lib/uxtheme/nostyle/button.c b/reactos/lib/uxtheme/nostyle/button.c deleted file mode 100644 index 78205c02737..00000000000 --- a/reactos/lib/uxtheme/nostyle/button.c +++ /dev/null @@ -1,572 +0,0 @@ -#include "uxthemedll.h" -#include "nostyle/button.h" - -/* Functions */ -STDAPI Button_DrawBackground -( - IN OUT struct UXTHEME_DATA_ * pData, - IN HDC hdc, - IN int iPartId, - IN int iStateId, - IN const RECT * pRect, - IN const RECT * pClipRect -); - -STDAPI Button_DrawText -( - IN OUT struct UXTHEME_DATA_ * pData, - IN HDC hdc, - IN int iPartId, - IN int iStateId, - IN LPCWSTR pszText, - IN int iCharCount, - IN DWORD dwTextFlags, - IN DWORD dwTextFlags2, - IN const RECT * pRect -); - -STDAPI Button_GetBackgroundContentRect -( - IN OUT struct UXTHEME_DATA_ * pData, - IN HDC hdc, - IN int iPartId, - IN int iStateId, - IN const RECT * pBoundingRect, - OUT RECT * pContentRect -); - -STDAPI_(BOOL) Button_IsPartDefined -( - IN OUT struct UXTHEME_DATA_ * pData, - IN int iPartId, - IN int iStateId -); - -const UXTHEME_VTABLE Button_Vt = -{ - Button_DrawBackground, - Button_DrawText, - Button_GetBackgroundContentRect -}; - -/* - * - * DrawThemeBackground - * - */ - -/* BP_PUSHBUTTON */ -static const UINT Button_PushButton_State[] = -{ - DFCS_BUTTONPUSH, /* */ - DFCS_BUTTONPUSH, /* PBS_NORMAL */ - DFCS_BUTTONPUSH | DFCS_HOT, /* PBS_HOT */ - DFCS_BUTTONPUSH | DFCS_PUSHED, /* PBS_PRESSED */ - DFCS_BUTTONPUSH | DFCS_INACTIVE /* PBS_DISABLED */ - /* PBS_DEFAULTED */ -}; - -/* BP_RADIOBUTTON */ -static const UINT Button_RadioButton_State[] = -{ - DFCS_BUTTONRADIO, /* */ - DFCS_BUTTONRADIO, /* RBS_UNCHECKEDNORMAL */ - DFCS_BUTTONRADIO | DFCS_HOT, /* RBS_UNCHECKEDHOT */ - DFCS_BUTTONRADIO | DFCS_PUSHED, /* RBS_UNCHECKEDPRESSED */ - DFCS_BUTTONRADIO | DFCS_INACTIVE, /* RBS_UNCHECKEDDISABLED */ - DFCS_BUTTONRADIO | DFCS_CHECKED, /* RBS_CHECKEDNORMAL */ - DFCS_BUTTONRADIO | DFCS_CHECKED | DFCS_HOT, /* RBS_CHECKEDHOT */ - DFCS_BUTTONRADIO | DFCS_CHECKED | DFCS_PUSHED, /* RBS_CHECKEDPRESSED */ - DFCS_BUTTONRADIO | DFCS_CHECKED | DFCS_INACTIVE /* RBS_CHECKEDDISABLED */ -}; - -/* BP_CHECKBOX */ -static const UINT Button_CheckBox_State[] = -{ - DFCS_BUTTONCHECK, /* */ - DFCS_BUTTONCHECK, /* CBS_UNCHECKEDNORMAL */ - DFCS_BUTTONCHECK | DFCS_HOT, /* CBS_UNCHECKEDHOT */ - DFCS_BUTTONCHECK | DFCS_PUSHED, /* CBS_UNCHECKEDPRESSED */ - DFCS_BUTTONCHECK | DFCS_INACTIVE, /* CBS_UNCHECKEDDISABLED */ - DFCS_BUTTONCHECK | DFCS_CHECKED, /* CBS_CHECKEDNORMAL */ - DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_HOT, /* CBS_CHECKEDHOT */ - DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_PUSHED, /* CBS_CHECKEDPRESSED */ - DFCS_BUTTONCHECK | DFCS_CHECKED | DFCS_INACTIVE, /* CBS_CHECKEDDISABLED */ - DFCS_BUTTON3STATE | DFCS_CHECKED, /* CBS_MIXEDNORMAL */ - DFCS_BUTTON3STATE | DFCS_CHECKED | DFCS_HOT, /* CBS_MIXEDHOT */ - DFCS_BUTTON3STATE | DFCS_CHECKED | DFCS_PUSHED, /* CBS_MIXEDPRESSED */ - DFCS_BUTTON3STATE | DFCS_CHECKED | DFCS_INACTIVE /* CBS_MIXEDDISABLED */ -}; - -static UINT const * Button_Part_State[] = -{ - NULL, - Button_PushButton_State, - Button_RadioButton_State, - Button_CheckBox_State -}; - -STDAPI Button_DrawBackgroundSpecial -( - struct UXTHEME_DATA_ * pData, - HDC hdc, - int iPartId, - int iStateId, - const RECT * pRect -) -{ - HRESULT hres = S_FALSE; - - if(iPartId == BP_GROUPBOX) - { - if(!DrawEdge(hdc, (LPRECT)pRect, EDGE_ETCHED, BF_RECT)) - hres = HRESULT_FROM_WIN32(GetLastError()); - - hres = S_OK; - } - else if(iPartId == BP_PUSHBUTTON && iStateId == PBS_DEFAULTED) - { - RECT rcSave = *pRect; - - for(;;) - { - if(!FillRect(hdc, &rcSave, (HBRUSH)(COLOR_WINDOWFRAME + 1))) break; - if(!InflateRect(&rcSave, -1, -1)) break; - if(!DrawFrameControl(hdc, &rcSave, DFC_BUTTON, DFCS_BUTTONPUSH)) break; - hres = S_OK; - break; - } - - if(hres != S_OK) hres = HRESULT_FROM_WIN32(GetLastError()); - } - - return hres; -} - -STDAPI Button_DrawBackground -( - struct UXTHEME_DATA_ * pData, - HDC hdc, - int iPartId, - int iStateId, - const RECT * pRect, - const RECT * pClipRect -) -{ - UINT uState = 0; - HRGN hrgnSave; - HRESULT hres = S_OK; - - for(;;) - { - if(!Button_IsPartDefined(pData, iPartId, iStateId)) - { - hres = HRESULT_FROM_WIN32(ERROR_NOT_FOUND); - break; - } - - uState = Button_Part_State[iPartId][iStateId]; - - if(pClipRect && FAILED(hres = UxTheme_ClipDc(hdc, pClipRect, &hrgnSave))) - break; - - hres = Button_DrawBackgroundSpecial(pData, hdc, iPartId, iStateId, pRect); - - if(hres != S_FALSE) break; - - hres = S_OK; - - if(!DrawFrameControl(hdc, (LPRECT)pRect, DFC_BUTTON, uState)) - hres = HRESULT_FROM_WIN32(GetLastError()); - - if(pClipRect) UxTheme_UnclipDc(hdc, hrgnSave); - - break; - } - - return hres; -} - -/* - * - * DrawThemeText - * - */ -STDAPI_(BOOL) Button_TextGrayed -( - IN OUT struct UXTHEME_DATA_ * pData, - IN HDC hdc, - IN int iPartId, - IN int iStateId, - IN DWORD dwTextFlags2 -) -{ - if((dwTextFlags2 & DTT_GRAYED) == DTT_GRAYED) return TRUE; - - switch(iPartId) - { - case BP_PUSHBUTTON: - switch(iStateId) - { - case PBS_DISABLED: - return TRUE; - } - - break; - - case BP_RADIOBUTTON: - switch(iStateId) - { - case RBS_UNCHECKEDDISABLED: - case RBS_CHECKEDDISABLED: - return TRUE; - } - - break; - - case BP_CHECKBOX: - switch(iStateId) - { - case CBS_UNCHECKEDDISABLED: - case CBS_CHECKEDDISABLED: - case CBS_MIXEDDISABLED: - return TRUE; - } - - break; - - case BP_GROUPBOX: - switch(iStateId) - { - case GBS_DISABLED: - return TRUE; - } - - break; - - case BP_USERBUTTON: - case 0: - default: - break; - } - - return FALSE; -} - -struct Button_DrawTextString -{ - LPCWSTR pszText; - int iCharCount; -}; - -BOOL CALLBACK Button_DrawTextStateProc -( - HDC hdc, - LPARAM lData, - WPARAM wData, - int cx, - int cy -) -{ - RECT rc; - - rc.left = 0; - rc.top = 0; - rc.right = cx; - rc.bottom = cy; - - return DrawTextW - ( - hdc, - ((struct Button_DrawTextString *)lData)->pszText, - ((struct Button_DrawTextString *)lData)->iCharCount, - &rc, - (UINT)wData - ); -} - -STDAPI Button_DrawText -( - IN OUT struct UXTHEME_DATA_ * pData, - IN HDC hdc, - IN int iPartId, - IN int iStateId, - IN LPCWSTR pszText, - IN int iCharCount, - IN DWORD dwTextFlags, - IN DWORD dwTextFlags2, - IN const RECT * pRect -) -{ - BOOL bRet; - int nBkMode; - COLORREF clrOld; - struct Button_DrawTextString dtsString; - DWORD dwDSFlags = DST_COMPLEX; - HRESULT hres = S_OK; - - for(;;) - { - /* check if the part is supported */ - if(!Button_IsPartDefined(pData, iPartId, iStateId)) - { - hres = HRESULT_FROM_WIN32(ERROR_NOT_FOUND); - break; - } - - nBkMode = SetBkMode(hdc, TRANSPARENT); - clrOld = SetTextColor(hdc, GetSysColor(COLOR_BTNTEXT)); - - if(Button_TextGrayed(pData, hdc, iPartId, iStateId, dwTextFlags2)) - dwDSFlags |= DSS_DISABLED; - - dtsString.pszText = pszText; - dtsString.iCharCount = iCharCount; - - bRet = DrawStateW - ( - hdc, - NULL, - Button_DrawTextStateProc, - (LPARAM)&dtsString, - (WPARAM)dwTextFlags, - pRect->left, - pRect->top, - pRect->right - pRect->left, - pRect->bottom - pRect->top, - dwDSFlags - ); - - if(!bRet) hres = HRESULT_FROM_WIN32(GetLastError()); - - SetTextColor(hdc, clrOld); - SetBkMode(hdc, nBkMode); - - break; - } - - return hres; -} - -/* - * - * GetThemeBackgroundContentRect - * - */ -STDAPI Button_GetBackgroundContentRectSpecial -( - IN OUT struct UXTHEME_DATA_ * pData, - IN HDC hdc, - IN int iPartId, - IN int iStateId, - IN const RECT * pBoundingRect, - OUT RECT * pContentRect -) -{ - HRESULT hres = S_FALSE; - - if(iPartId == BP_GROUPBOX) - { - RECT rc = *pBoundingRect; - - if(!DrawEdge(hdc, &rc, EDGE_ETCHED, BF_RECT | BF_ADJUST)) - hres = HRESULT_FROM_WIN32(GetLastError()); - - *pContentRect = rc; - hres = S_OK; - } - else if(iPartId == BP_PUSHBUTTON && iStateId == PBS_DEFAULTED) - { - RECT rc = *pBoundingRect; - - InflateRect(&rc, -1, -1); - - if(!DrawFrameControl(hdc, &rc, DFC_BUTTON, DFCS_BUTTONPUSH | DFCS_ADJUSTRECT)) - hres = HRESULT_FROM_WIN32(GetLastError()); - else - { - *pContentRect = rc; - hres = S_OK; - } - } - - return hres; -} - -STDAPI Button_GetBackgroundContentRect -( - IN OUT struct UXTHEME_DATA_ * pData, - IN HDC hdc, - IN int iPartId, - IN int iStateId, - IN const RECT * pBoundingRect, - OUT RECT * pContentRect -) -{ - RECT rc; - HDC hdcCompat = NULL; - BOOL bRet; - HRESULT hres = S_OK; - - for(;;) - { - if(!Button_IsPartDefined(pData, iPartId, iStateId)) - { - hres = HRESULT_FROM_WIN32(ERROR_NOT_FOUND); - break; - } - - hdcCompat = CreateCompatibleDC(hdc); - - if(hdcCompat == NULL) - { - hres = HRESULT_FROM_WIN32(GetLastError()); - break; - } - - hres = Button_GetBackgroundContentRectSpecial - ( - pData, - hdcCompat, - iPartId, - iStateId, - pBoundingRect, - pContentRect - ); - - if(hres != S_FALSE) break; - - hres = S_OK; - rc = *pBoundingRect; - - bRet = DrawFrameControl - ( - hdcCompat, - &rc, - DFC_BUTTON, - Button_Part_State[iPartId][iStateId] | DFCS_ADJUSTRECT - ); - - if(!bRet) - { - hres = HRESULT_FROM_WIN32(GetLastError()); - break; - } - - *pContentRect = rc; - - break; - } - - DeleteDC(hdcCompat); - - return hres; -} - -/* - * - * IsThemePartDefined - * - */ -STDAPI_(BOOL) Button_IsPartDefined -( - struct UXTHEME_DATA_ * pData, - int iPartId, - int iStateId -) -{ - switch(iPartId) - { - case BP_PUSHBUTTON: - switch(iStateId) - { - case 0: - case PBS_NORMAL: - case PBS_HOT: - case PBS_PRESSED: - case PBS_DISABLED: - case PBS_DEFAULTED: - break; - - default: - return FALSE; - } - - break; - - case BP_RADIOBUTTON: - switch(iStateId) - { - case 0: - case RBS_UNCHECKEDNORMAL: - case RBS_UNCHECKEDHOT: - case RBS_UNCHECKEDPRESSED: - case RBS_UNCHECKEDDISABLED: - case RBS_CHECKEDNORMAL: - case RBS_CHECKEDHOT: - case RBS_CHECKEDPRESSED: - case RBS_CHECKEDDISABLED: - break; - - default: - return FALSE; - } - - break; - - case BP_CHECKBOX: - switch(iStateId) - { - case 0: - case CBS_UNCHECKEDNORMAL: - case CBS_UNCHECKEDHOT: - case CBS_UNCHECKEDPRESSED: - case CBS_UNCHECKEDDISABLED: - case CBS_CHECKEDNORMAL: - case CBS_CHECKEDHOT: - case CBS_CHECKEDPRESSED: - case CBS_CHECKEDDISABLED: - case CBS_MIXEDNORMAL: - case CBS_MIXEDHOT: - case CBS_MIXEDPRESSED: - case CBS_MIXEDDISABLED: - break; - - default: - return FALSE; - } - - break; - - case BP_GROUPBOX: - switch(iStateId) - { - case 0: - case GBS_DISABLED: - case GBS_NORMAL: - break; - - default: - return FALSE; - } - - break; - - case BP_USERBUTTON: - case 0: - default: - return FALSE; - } - - return TRUE; -} - -/* Initialization */ -#if 0 -STDAPI Button_Initialize(void) -{ -} -#endif - -/* EOF */ - diff --git a/reactos/lib/uxtheme/uxtheme.bpr b/reactos/lib/uxtheme/uxtheme.bpr deleted file mode 100644 index bee5c2fa03a..00000000000 --- a/reactos/lib/uxtheme/uxtheme.bpr +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -[Version Info] -IncludeVerInfo=0 -AutoIncBuild=0 -MajorVer=1 -MinorVer=0 -Release=0 -Build=0 -Debug=0 -PreRelease=0 -Special=0 -Private=0 -DLL=0 -Locale=1040 -CodePage=1252 - -[Version Info Keys] -CompanyName= -FileDescription= -FileVersion=1.0.0.0 -InternalName= -LegalCopyright= -LegalTrademarks= -OriginalFilename= -ProductName= -ProductVersion=1.0.0.0 -Comments= - -[Debugging] -DebugSourceDirs=$(BCB)\source\vcl - -[Parameters] -RunParams= -Launcher= -UseLauncher=0 -DebugCWD= -HostApplication=D:\misc\cvsroot\reactos\reactos\lib\uxtheme\XPThemeExplorer6.exe -RemoteHost= -RemotePath= -RemoteLauncher= -RemoteCWD= -RemoteDebug=0 - -[Compiler] -ShowInfoMsgs=0 -LinkDebugVcl=0 -LinkCGLIB=0 - -[CORBA] -AddServerUnit=1 -AddClientUnit=1 -PrecompiledHeaders=1 - -[Language] -ActiveLang= -ProjectLang= -RootDir= - -[Linker] -LibPrefix= -LibSuffix= -LibVersion= - - \ No newline at end of file diff --git a/reactos/lib/uxtheme/uxtheme.def b/reactos/lib/uxtheme/uxtheme.def deleted file mode 100644 index d1a172bb6b8..00000000000 --- a/reactos/lib/uxtheme/uxtheme.def +++ /dev/null @@ -1,97 +0,0 @@ -LIBRARY UXTHEME.DLL - -EXPORTS -; @0 -; @1 -; @2 -; @3 -; @4 -CloseThemeData @5 -DrawThemeBackground @6 -; @7 -; @8 -; @9 -; @10 -; @11 -;DrawThemeEdge @12 -; @13 -; @14 -; @15 -; @16 -; @17 -; @18 -; @19 -; @20 -; @21 -; @22 -; @23 -; @24 -; @25 -; @26 -; @27 -; @28 -; @29 -; @30 -; @31 -; @32 -; @33 -; @34 -; @35 -; @36 -;DrawThemeIcon @37 -DrawThemeParentBackground @38 -DrawThemeText @39 -;EnableThemeDialogTexture @40 -;EnableTheming @41 -;GetCurrentThemeName @42 -; @43 -; @44 -; @45 -; @46 -; @47 -; @48 -;GetThemeAppProperties @49 -GetThemeBackgroundContentRect @50 -;GetThemeBackgroundExtent @51 -;GetThemeBackgroundRegion @52 -;GetThemeBool @53 -;GetThemeColor @54 -;GetThemeDocumentationProperty @55 -;GetThemeEnumValue @56 -;GetThemeFilename @57 -;GetThemeFont @58 -;GetThemeInt @59 -; @60 -; @61 -; @62 -; @63 -;GetThemeIntList @64 -;GetThemeMargins @65 -;GetThemeMetric @66 -;GetThemePartSize @67 -;GetThemePosition @68 -;GetThemePropertyOrigin @69 -;GetThemeRect @70 -;GetThemeString @71 -;GetThemeSysBool @72 -;GetThemeSysColor @73 -;GetThemeSysColorBrush @74 -;GetThemeSysFont @75 -;GetThemeSysInt @76 -;GetThemeSysSize @77 -;GetThemeSysString @78 -;GetThemeTextExtent @79 -;GetThemeTextMetrics @80 -;GetWindowTheme @81 -;HitTestThemeBackground @82 -IsAppThemed @83 -;IsThemeActive @84 -IsThemeBackgroundPartiallyTransparent @85 -;IsThemeDialogTextureEnabled @86 -;IsThemePartDefined @87 -OpenThemeData @88 -;SetThemeAppProperties @89 -;SetWindowTheme @90 - -; EOF - diff --git a/reactos/lib/uxtheme/uxtheme.rc b/reactos/lib/uxtheme/uxtheme.rc deleted file mode 100644 index cfe2bbfbc89..00000000000 --- a/reactos/lib/uxtheme/uxtheme.rc +++ /dev/null @@ -1,51 +0,0 @@ -#include -#include - -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US - -VS_VERSION_INFO VERSIONINFO - FILEVERSION \ - RES_UINT_FV_MAJOR, \ - RES_UINT_FV_MINOR, \ - RES_UINT_FV_REVISION, \ - RES_UINT_FV_BUILD - - PRODUCTVERSION \ - RES_UINT_PV_MAJOR, \ - RES_UINT_PV_MINOR, \ - RES_UINT_PV_REVISION, \ - RES_UINT_PV_BUILD - - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x40004L - FILETYPE 0x2L - FILESUBTYPE 0x0L - -BEGIN - BLOCK "StringFileInfo" - { - BLOCK "040904b0" - { - VALUE "CompanyName", RES_STR_COMPANY_NAME - VALUE "FileDescription", "ReactOS UxTheme\0" - VALUE "FileVersion", RES_STR_FILE_VERSION - VALUE "InternalName", "uxtheme\0" - VALUE "LegalCopyright", RES_STR_LEGAL_COPYRIGHT - VALUE "OriginalFilename", "uxtheme.dll\0" - VALUE "ProductName", RES_STR_PRODUCT_NAME - VALUE "ProductVersion", RES_STR_PRODUCT_VERSION - } - } - - BLOCK "VarFileInfo" - { - VALUE "Translation", 0x409, 1200 - } -END - -/* EOF */ diff --git a/reactos/lib/uxtheme/uxthemedll.c b/reactos/lib/uxtheme/uxthemedll.c deleted file mode 100644 index 9f74a792b6c..00000000000 --- a/reactos/lib/uxtheme/uxthemedll.c +++ /dev/null @@ -1,263 +0,0 @@ -#include "uxthemedll.h" -#include "nostyle/button.h" - -#include - -#define HTHEME_TO_UXTHEME_(H__) ((PUXTHEME_DATA)(H__)) - -STDAPI UxTheme_ClipDc(HDC hdc, const RECT * pClipRect, HRGN * phrgnSave) -{ - *phrgnSave = CreateRectRgn(0, 0, 0, 0); - - switch(GetClipRgn(hdc, *phrgnSave)) - { - /* no user-defined clipping region */ - case 0: - { - HRGN hrgnClip; - - /* no region to restore */ - DeleteObject(*phrgnSave); - *phrgnSave = NULL; - - /* create the clipping rectangle */ - if((hrgnClip = CreateRectRgnIndirect(pClipRect)) != NULL) - { - /* select the clipping rectangle */ - if(SelectClipRgn(hdc, hrgnClip) != ERROR) - { - /* success */ - DeleteObject(hrgnClip); - return S_OK; - } - - /* failure */ - DeleteObject(hrgnClip); - } - - break; - } - - /* user-defined clipping region */ - case 1: - { - HRGN hrgnClip; - - /* create the clipping rectangle */ - if((hrgnClip = CreateRectRgnIndirect(pClipRect)) != NULL) - { - /* select the clipping rectangle */ - if(ExtSelectClipRgn(hdc, hrgnClip, RGN_AND) != ERROR) - { - /* success */ - DeleteObject(hrgnClip); - return S_OK; - } - - /* failure */ - DeleteObject(hrgnClip); - } - - break; - } - - /* error */ - case -1: - { - /* no region to restore */ - DeleteObject(*phrgnSave); - *phrgnSave = NULL; - - break; - } - } - - /* failure */ - return HRESULT_FROM_WIN32(GetLastError()); -} - -STDAPI UxTheme_UnclipDc(HDC hdc, HRGN hrgnSave) -{ - HRESULT hres; - - if(hrgnSave == NULL) return S_FALSE; - - if(SelectClipRgn(hdc, hrgnSave) != ERROR) hres = S_OK; - else hres = HRESULT_FROM_WIN32(GetLastError()); - - DeleteObject(hrgnSave); - return hres; -} - -THEMEAPI DrawThemeBackground -( - HTHEME hTheme, - HDC hdc, - int iPartId, - int iStateId, - const RECT * pRect, - const RECT * pClipRect -) -{ - PUXTHEME_DATA pUxTheme = HTHEME_TO_UXTHEME_(hTheme); - - return pUxTheme->pvt->p_DrawBackground - ( - pUxTheme, - hdc, - iPartId, - iStateId, - pRect, - pClipRect - ); -} - -THEMEAPI DrawThemeEdge -( - HTHEME hTheme, - HDC hdc, - int iPartId, - int iStateId, - const RECT * pDestRect, - UINT uEdge, - UINT uFlags, - RECT * pContentRect -) -{ - return E_FAIL; -} - -THEMEAPI DrawThemeIcon -( - HTHEME hTheme, - HDC hdc, - int iPartId, - int iStateId, - const RECT * pRect, - HIMAGELIST himl, - int iImageIndex -) -{ - return E_FAIL; -} - -THEMEAPI DrawThemeParentBackground -( - HWND hwnd, - HDC hdc, - RECT * prc -) -{ - return E_FAIL; -} - -THEMEAPI DrawThemeText -( - IN HTHEME hTheme, - IN HDC hdc, - IN int iPartId, - IN int iStateId, - IN LPCWSTR pszText, - IN int iCharCount, - IN DWORD dwTextFlags, - IN DWORD dwTextFlags2, - IN const RECT * pRect -) -{ - PUXTHEME_DATA pUxTheme = HTHEME_TO_UXTHEME_(hTheme); - - return pUxTheme->pvt->p_DrawText - ( - pUxTheme, - hdc, - iPartId, - iStateId, - pszText, - iCharCount, - dwTextFlags, - dwTextFlags2, - pRect - ); -} - -THEMEAPI GetThemeBackgroundContentRect -( - IN HTHEME hTheme, - IN HDC hdc, - IN int iPartId, - IN int iStateId, - IN const RECT * pBoundingRect, - OUT RECT * pContentRect -) -{ - PUXTHEME_DATA pUxTheme = HTHEME_TO_UXTHEME_(hTheme); - - return pUxTheme->pvt->p_GetBackgroundContentRect - ( - pUxTheme, - hdc, - iPartId, - iStateId, - pBoundingRect, - pContentRect - ); -} - -THEMEAPI_(BOOL) IsThemeBackgroundPartiallyTransparent -( - HTHEME hTheme, - int iPartId, - int iStateId -) -{ - return FALSE; -} - -THEMEAPI_(BOOL) IsAppThemed(void) -{ - return TRUE; -} - -THEMEAPI_(HTHEME) OpenThemeData -( - HWND hwnd, - LPCWSTR pszClassList -) -{ - PUXTHEME_DATA pUxTheme; - PCUXTHEME_VTABLE pvt; - - /* FIXME: support class lists */ - if(_wcsicmp(pszClassList, L"Button") == 0) pvt = &Button_Vt; - else return NULL; - - pUxTheme = (PUXTHEME_DATA)malloc(sizeof(*pUxTheme)); - - if(pUxTheme == NULL) return NULL; - - pUxTheme->pvt = pvt; - - return (HTHEME)pUxTheme; -} - -THEMEAPI CloseThemeData -( - HTHEME hTheme -) -{ - return E_FAIL; -} - -BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fwdreason, LPVOID lpvReserved) -{ - (void)lpvReserved; - - if(fwdreason == DLL_PROCESS_ATTACH) - DisableThreadLibraryCalls(hinstDLL); - - return TRUE; -} - -/* EOF */ - - diff --git a/reactos/lib/uxtheme/uxthemedll.h b/reactos/lib/uxtheme/uxthemedll.h deleted file mode 100644 index a78f6670011..00000000000 --- a/reactos/lib/uxtheme/uxthemedll.h +++ /dev/null @@ -1,73 +0,0 @@ -#ifndef UXTHEMEDLL_H_INCLUDED__ -#define UXTHEMEDLL_H_INCLUDED__ - -#include - -#define _UXTHEME_ -#include -#include - -#ifdef __cplusplus -extern "C" -{ -#endif - -struct UXTHEME_DATA_; -struct UXTHEME_VTABLE_; - -struct UXTHEME_VTABLE_ -{ - HRESULT (STDAPICALLTYPE * p_DrawBackground) - ( - IN OUT struct UXTHEME_DATA_ * pData, - IN HDC hdc, - IN int iPartId, - IN int iStateId, - IN const RECT * pRect, - IN const RECT * pClipRect - ); - - HRESULT (STDAPICALLTYPE * p_DrawText) - ( - IN OUT struct UXTHEME_DATA_ * pData, - IN HDC hdc, - IN int iPartId, - IN int iStateId, - IN LPCWSTR pszText, - IN int iCharCount, - IN DWORD dwTextFlags, - IN DWORD dwTextFlags2, - IN const RECT * pRect - ); - - HRESULT (STDAPICALLTYPE * p_GetBackgroundContentRect) - ( - IN OUT struct UXTHEME_DATA_ * pData, - IN HDC hdc, - IN int iPartId, - IN int iStateId, - IN const RECT * pBoundingRect, - OUT RECT * pContentRect - ); -}; - -typedef struct UXTHEME_VTABLE_ UXTHEME_VTABLE, * PUXTHEME_VTABLE; -typedef const struct UXTHEME_VTABLE_ * PCUXTHEME_VTABLE; - -typedef struct UXTHEME_DATA_ -{ - PCUXTHEME_VTABLE pvt; - PVOID pData; -} -UXTHEME_DATA, * PUXTHEME_DATA; - -STDAPI UxTheme_ClipDc(HDC hdc, const RECT * pClipRect, HRGN * phrgnSave); -STDAPI UxTheme_UnclipDc(HDC hdc, HRGN hrgnSave); - -#ifdef __cplusplus -} -#endif - -#endif - -/* EOF */