mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
A dummy uxtheme doesn't belong to ReactOS - it should be an external project. UxTheme says bye bye and good luck everyone
svn path=/trunk/; revision=8989
This commit is contained in:
parent
5424a51107
commit
39b17f5963
10 changed files with 0 additions and 1243 deletions
|
@ -1,14 +0,0 @@
|
|||
*.coff
|
||||
*.dll
|
||||
*.d
|
||||
*.a
|
||||
*.o
|
||||
*.sym
|
||||
*.map
|
||||
*.tmp
|
||||
*.~*
|
||||
*.il?
|
||||
*.res
|
||||
*.tds
|
||||
*.lib
|
||||
*.xml
|
|
@ -1,12 +0,0 @@
|
|||
#ifndef UXTHEME_BUTTON_H__
|
||||
#define UXTHEME_BUTTON_H__
|
||||
|
||||
#include "uxthemedll.h"
|
||||
|
||||
extern const UXTHEME_VTABLE Button_Vt;
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
/* EOF */
|
|
@ -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
|
|
@ -1,6 +0,0 @@
|
|||
*.d
|
||||
*.a
|
||||
*.o
|
||||
*.sym
|
||||
*.obj
|
||||
*.~*
|
|
@ -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, /* <root> */
|
||||
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, /* <root> */
|
||||
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, /* <root> */
|
||||
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 */
|
||||
|
|
@ -1,124 +0,0 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?>
|
||||
<!-- C++Builder XML Project -->
|
||||
<PROJECT>
|
||||
<MACROS>
|
||||
<VERSION value="BCB.06.00"/>
|
||||
<PROJECT value="uxtheme.dll"/>
|
||||
<OBJFILES value="uxthemedll.obj nostyle\button.obj"/>
|
||||
<RESFILES value="uxtheme.res"/>
|
||||
<IDLFILES value=""/>
|
||||
<IDLGENFILES value=""/>
|
||||
<DEFFILE value="uxtheme.def"/>
|
||||
<RESDEPEN value="$(RESFILES)"/>
|
||||
<LIBFILES value=""/>
|
||||
<LIBRARIES value=""/>
|
||||
<SPARELIBS value="rtl.lib"/>
|
||||
<PACKAGES value="vcl.bpi rtl.bpi dbrtl.bpi adortl.bpi vcldb.bpi vclx.bpi bdertl.bpi
|
||||
ibxpress.bpi cds.bpi dsnap.bpi bdecds.bpi qrpt.bpi teeui.bpi teedb.bpi
|
||||
tee.bpi vcldbx.bpi dss.bpi teeqr.bpi visualclx.bpi visualdbclx.bpi
|
||||
dsnapcrba.bpi dsnapcon.bpi bcbsmp.bpi dbexpress.bpi dbxcds.bpi indy.bpi"/>
|
||||
<PATHCPP value=".;nostyle"/>
|
||||
<PATHPAS value=".;"/>
|
||||
<PATHRC value=".;"/>
|
||||
<PATHASM value=".;"/>
|
||||
<DEBUGLIBPATH value="$(BCB)\lib\debug"/>
|
||||
<RELEASELIBPATH value="$(BCB)\lib\release"/>
|
||||
<LINKER value="ilink32"/>
|
||||
<USERDEFINES value="_DEBUG;"/>
|
||||
<SYSDEFINES value="NO_STRICT;_NO_VCL;USEPACKAGES"/>
|
||||
<MAINSOURCE value="uxthemedll.c"/>
|
||||
<INCLUDEPATH value="nostyle;.\include;$(BCB)\include;$(BCB)\include\vcl;..\..\include"/>
|
||||
<LIBPATH value="nostyle;$(BCB)\Projects\Lib;uxtheme;$(BCB)\lib\obj;$(BCB)\lib"/>
|
||||
<WARNINGS value="-w-par"/>
|
||||
<OTHERFILES value=""/>
|
||||
</MACROS>
|
||||
<OPTIONS>
|
||||
<IDLCFLAGS value="-src_suffix cpp -D_DEBUG -Inostyle -I.\include -I$(BCB)\include
|
||||
-I$(BCB)\include\vcl -I..\..\include -boa"/>
|
||||
<CFLAG1 value="-WD -Od -H=$(BCB)\lib\vcl60.csm -Hc -Vx -Ve -X- -r- -a8 -b- -k -y -v -vi-
|
||||
-tWD -tWM -c"/>
|
||||
<PFLAGS value="-$YD -$W -$O- -$A8 -v -JPHNE -M"/>
|
||||
<RFLAGS value=""/>
|
||||
<AFLAGS value="/mx /w2 /zd"/>
|
||||
<LFLAGS value="-D"" -aa -Tpd -x -Gi -v"/>
|
||||
<OTHERFILES value=""/>
|
||||
</OPTIONS>
|
||||
<LINKER>
|
||||
<ALLOBJ value="c0d32.obj $(PACKAGES) $(OBJFILES)"/>
|
||||
<ALLRES value="$(RESFILES)"/>
|
||||
<ALLLIB value="$(LIBFILES) $(LIBRARIES) import32.lib cw32mt.lib"/>
|
||||
<OTHERFILES value=""/>
|
||||
</LINKER>
|
||||
<FILELIST>
|
||||
<FILE FILENAME="uxthemedll.c" FORMNAME="" UNITNAME="uxthemedll" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||
<FILE FILENAME="nostyle\button.c" FORMNAME="" UNITNAME="button" CONTAINERID="CCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||
<FILE FILENAME="uxtheme.rc" FORMNAME="" UNITNAME="uxtheme.rc" CONTAINERID="RCCompiler" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||
<FILE FILENAME="uxtheme.def" FORMNAME="" UNITNAME="uxtheme.def" CONTAINERID="DefTool" DESIGNCLASS="" LOCALCOMMAND=""/>
|
||||
</FILELIST>
|
||||
<BUILDTOOLS>
|
||||
</BUILDTOOLS>
|
||||
|
||||
<IDEOPTIONS>
|
||||
[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=
|
||||
</IDEOPTIONS>
|
||||
</PROJECT>
|
|
@ -1,97 +0,0 @@
|
|||
LIBRARY UXTHEME.DLL
|
||||
|
||||
EXPORTS
|
||||
; <unknown> @0
|
||||
; <unknown> @1
|
||||
; <unknown> @2
|
||||
; <unknown> @3
|
||||
; <unknown> @4
|
||||
CloseThemeData @5
|
||||
DrawThemeBackground @6
|
||||
; <unknown> @7
|
||||
; <unknown> @8
|
||||
; <unknown> @9
|
||||
; <unknown> @10
|
||||
; <unknown> @11
|
||||
;DrawThemeEdge @12
|
||||
; <unknown> @13
|
||||
; <unknown> @14
|
||||
; <unknown> @15
|
||||
; <unknown> @16
|
||||
; <unknown> @17
|
||||
; <unknown> @18
|
||||
; <unknown> @19
|
||||
; <unknown> @20
|
||||
; <unknown> @21
|
||||
; <unknown> @22
|
||||
; <unknown> @23
|
||||
; <unknown> @24
|
||||
; <unknown> @25
|
||||
; <unknown> @26
|
||||
; <unknown> @27
|
||||
; <unknown> @28
|
||||
; <unknown> @29
|
||||
; <unknown> @30
|
||||
; <unknown> @31
|
||||
; <unknown> @32
|
||||
; <unknown> @33
|
||||
; <unknown> @34
|
||||
; <unknown> @35
|
||||
; <unknown> @36
|
||||
;DrawThemeIcon @37
|
||||
DrawThemeParentBackground @38
|
||||
DrawThemeText @39
|
||||
;EnableThemeDialogTexture @40
|
||||
;EnableTheming @41
|
||||
;GetCurrentThemeName @42
|
||||
; <unknown> @43
|
||||
; <unknown> @44
|
||||
; <unknown> @45
|
||||
; <unknown> @46
|
||||
; <unknown> @47
|
||||
; <unknown> @48
|
||||
;GetThemeAppProperties @49
|
||||
GetThemeBackgroundContentRect @50
|
||||
;GetThemeBackgroundExtent @51
|
||||
;GetThemeBackgroundRegion @52
|
||||
;GetThemeBool @53
|
||||
;GetThemeColor @54
|
||||
;GetThemeDocumentationProperty @55
|
||||
;GetThemeEnumValue @56
|
||||
;GetThemeFilename @57
|
||||
;GetThemeFont @58
|
||||
;GetThemeInt @59
|
||||
; <unknown> @60
|
||||
; <unknown> @61
|
||||
; <unknown> @62
|
||||
; <unknown> @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
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
#include <windows.h>
|
||||
#include <reactos/resource.h>
|
||||
|
||||
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 */
|
|
@ -1,263 +0,0 @@
|
|||
#include "uxthemedll.h"
|
||||
#include "nostyle/button.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#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 */
|
||||
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
#ifndef UXTHEMEDLL_H_INCLUDED__
|
||||
#define UXTHEMEDLL_H_INCLUDED__
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#define _UXTHEME_
|
||||
#include <uxtheme.h>
|
||||
#include <tmschema.h>
|
||||
|
||||
#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 */
|
Loading…
Reference in a new issue