| uxtheme.h (6.1.7600.16385-Windows_7.0) | | uxtheme.h (6.3.9600.17415-Windows_8.1) |
| | |
| skipping to change at line 12 | | skipping to change at line 12 |
| // | | // |
| // uxtheme.h - theming API header file. | | // uxtheme.h - theming API header file. |
| // | | // |
| // Copyright (c) Microsoft Corporation. All rights reserved. | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| // | | // |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| | |
| #ifndef _UXTHEME_H_ | | #ifndef _UXTHEME_H_ |
| #define _UXTHEME_H_ | | #define _UXTHEME_H_ |
| | |
|
| | #include <winapifamily.h> |
| | |
| | #pragma region Desktop Family |
| | #if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) |
| | |
| #include <commctrl.h> | | #include <commctrl.h> |
| #include <SpecStrings.h> | | #include <SpecStrings.h> |
| | |
| #ifndef THEMEAPI | | #ifndef THEMEAPI |
| #if !defined(_UXTHEME_) | | #if !defined(_UXTHEME_) |
| #define THEMEAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE | | #define THEMEAPI EXTERN_C DECLSPEC_IMPORT HRESULT STDAPICALLTYPE |
| #define THEMEAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE | | #define THEMEAPI_(type) EXTERN_C DECLSPEC_IMPORT type STDAPICALLTYPE |
| #else | | #else |
| #define THEMEAPI STDAPI | | #define THEMEAPI STDAPI |
| #define THEMEAPI_(type) STDAPI_(type) | | #define THEMEAPI_(type) STDAPI_(type) |
| #endif /* _UXTHEME_ */ | | #endif /* _UXTHEME_ */ |
| #endif /* THEMEAPI */ | | #endif /* THEMEAPI */ |
| | |
| typedef HANDLE HTHEME; // handle to a section of theme data for class | | typedef HANDLE HTHEME; // handle to a section of theme data for class |
| | |
|
| #if (_WIN32_WINNT >= 0x0600) | | #if (NTDDI_VERSION >= NTDDI_VISTA) |
| #define MAX_THEMECOLOR 64 | | #define MAX_THEMECOLOR 64 |
| #define MAX_THEMESIZE 64 | | #define MAX_THEMESIZE 64 |
| #endif | | #endif |
| | |
| #if (NTDDI_VERSION>= NTDDI_WIN7) | | #if (NTDDI_VERSION>= NTDDI_WIN7) |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // BeginPanningFeedback - Visual feedback init function related to pan gesture | | // BeginPanningFeedback - Visual feedback init function related to pan gesture |
| // - internally called by DefaultGestureHandler | | // - internally called by DefaultGestureHandler |
| // - called by application | | // - called by application |
| // | | // |
| // HWND hwnd - The handle to the Target window that will receive feedback | | // HWND hwnd - The handle to the Target window that will receive feedback |
| // | | // |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| BOOL WINAPI | | BOOL WINAPI |
| BeginPanningFeedback( | | BeginPanningFeedback( |
|
| __in HWND hwnd); | | _In_ HWND hwnd); |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // UpdatePanningFeedback : Visual feedback function related to pan gesture | | // UpdatePanningFeedback : Visual feedback function related to pan gesture |
| // Can Be called only after a BeginPanningFeedback call | | // Can Be called only after a BeginPanningFeedback call |
| // - internally called by DefaultGestureHandler | | // - internally called by DefaultGestureHandler |
| // - called by application | | // - called by application |
| // | | // |
| // HWND hwnd - The handle to the Target window that will receive
feedback | | // HWND hwnd - The handle to the Target window that will receive
feedback |
| // For the method to succeed this must be the same h
wnd as provided in | | // For the method to succeed this must be the same h
wnd as provided in |
| // BeginPanningFeedback | | // BeginPanningFeedback |
| // | | // |
| | |
| skipping to change at line 74 | | skipping to change at line 79 |
| // GF_INERTIA FLAG set | | // GF_INERTIA FLAG set |
| // | | // |
| // Incremental calls to UpdatePanningFeedback should make sure they always pas
s | | // Incremental calls to UpdatePanningFeedback should make sure they always pas
s |
| // the sum of the increments and not just the increment themselves | | // the sum of the increments and not just the increment themselves |
| // Eg : If the initial displacement is 10 pixels and the next displacement 10
pixels | | // Eg : If the initial displacement is 10 pixels and the next displacement 10
pixels |
| // the second call would be with the parameter as 20 pixels as opposed to
10 | | // the second call would be with the parameter as 20 pixels as opposed to
10 |
| // Eg : UpdatePanningFeedback(hwnd, 10, 10, TRUE) | | // Eg : UpdatePanningFeedback(hwnd, 10, 10, TRUE) |
| // | | // |
| BOOL WINAPI | | BOOL WINAPI |
| UpdatePanningFeedback( | | UpdatePanningFeedback( |
|
| __in HWND hwnd, | | _In_ HWND hwnd, |
| __in LONG lTotalOverpanOffsetX, | | _In_ LONG lTotalOverpanOffsetX, |
| __in LONG lTotalOverpanOffsetY, | | _In_ LONG lTotalOverpanOffsetY, |
| __in BOOL fInInertia); | | _In_ BOOL fInInertia); |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // | | // |
| // EndPanningFeedback :Visual feedback reset function related to pan gesture | | // EndPanningFeedback :Visual feedback reset function related to pan gesture |
| // - internally called by DefaultGestureHandler | | // - internally called by DefaultGestureHandler |
| // - called by application | | // - called by application |
| // Terminates any existing animation that was in process or set up by BeginPan
ningFeedback and UpdatePanningFeedback | | // Terminates any existing animation that was in process or set up by BeginPan
ningFeedback and UpdatePanningFeedback |
| // The EndPanningFeedBack needs to be called Prior to calling any BeginPanning
FeedBack if we have already | | // The EndPanningFeedBack needs to be called Prior to calling any BeginPanning
FeedBack if we have already |
| // called a BeginPanningFeedBack followed by one/ more UpdatePanningFeedback c
alls | | // called a BeginPanningFeedBack followed by one/ more UpdatePanningFeedback c
alls |
| // | | // |
| // HWND hwnd - The handle to the Target window that will receive feedba
ck | | // HWND hwnd - The handle to the Target window that will receive feedba
ck |
| // | | // |
| // BOOL fAnimateBack - Flag to indicate whether you wish the displaced window t
o move back | | // BOOL fAnimateBack - Flag to indicate whether you wish the displaced window t
o move back |
| // to the original position via animation or a direct jump. | | // to the original position via animation or a direct jump. |
| // Either ways the method will try to restore the moved win
dow. | | // Either ways the method will try to restore the moved win
dow. |
| // The latter case exists for compatibility with legacy app
s. | | // The latter case exists for compatibility with legacy app
s. |
| // | | // |
| BOOL WINAPI | | BOOL WINAPI |
| EndPanningFeedback( | | EndPanningFeedback( |
|
| __in HWND hwnd, | | _In_ HWND hwnd, |
| __in BOOL fAnimateBack); | | _In_ BOOL fAnimateBack); |
| #endif | | #endif |
| | |
|
| | #if (NTDDI_VERSION >= NTDDI_WIN8) |
| | |
| | //--------------------------------------------------------------------------- |
| | // Theme animation properties |
| | typedef enum TA_PROPERTY |
| | { |
| | TAP_FLAGS, |
| | TAP_TRANSFORMCOUNT, |
| | TAP_STAGGERDELAY, |
| | TAP_STAGGERDELAYCAP, |
| | TAP_STAGGERDELAYFACTOR, |
| | TAP_ZORDER, |
| | } TA_PROPERTY; |
| | |
| | //--------------------------------------------------------------------------- |
| | // when dwProperty is TAP_FLAGS, GetThemeAnimationProperty returns |
| | // a combination of the following values |
| | typedef enum TA_PROPERTY_FLAG |
| | { |
| | TAPF_NONE = 0x0, |
| | TAPF_HASSTAGGER = 0x1, |
| | TAPF_ISRTLAWARE = 0x2, |
| | TAPF_ALLOWCOLLECTION = 0x4, |
| | TAPF_HASBACKGROUND = 0x8, |
| | TAPF_HASPERSPECTIVE = 0x10, |
| | } TA_PROPERTY_FLAG; |
| | |
| | DEFINE_ENUM_FLAG_OPERATORS(TA_PROPERTY_FLAG); |
| | |
| | //--------------------------------------------------------------------------- |
| | // GetThemeAnimationProperty() - Retrieve a theme animation property based |
| | // on the storybard id and the target id. |
| | // |
| | // Storyboard id and target id is defined in vsan |
| | imation.h |
| | // |
| | // Available properties are defined above, |
| | // with prefix TAP_. |
| | // |
| | // hTheme - Theme data handle (from OpenThemeData API) |
| | // |
| | // iStoryboardId - Animation storyboard identifier |
| | // |
| | // iTargetId - Target surface identifier |
| | // |
| | // eProperty - Property associated with the animation storybo |
| | ard and target |
| | // |
| | // pvProperty - Buffer to receive returned property value |
| | // |
| | // cbSize - Byte size of a buffer pointed by pvProperty |
| | // |
| | // pcbSizeOut - pointer to a DWORD buffer to receive the retur |
| | ned |
| | // byte size |
| | // |
| | THEMEAPI GetThemeAnimationProperty( |
| | _In_ HTHEME hTheme, |
| | _In_ int iStoryboardId, |
| | _In_ int iTargetId, |
| | _In_ TA_PROPERTY eProperty, |
| | _Out_writes_bytes_to_opt_(cbSize, *pcbSizeOut) VOID *pvProperty, |
| | _In_ DWORD cbSize, |
| | _Out_ DWORD *pcbSizeOut); |
| | |
| | //--------------------------------------------------------------------------- |
| | // Theme animation transform types |
| | typedef enum TA_TRANSFORM_TYPE |
| | { |
| | TATT_TRANSLATE_2D, |
| | TATT_SCALE_2D, |
| | TATT_OPACITY, |
| | TATT_CLIP, |
| | } TA_TRANSFORM_TYPE; |
| | |
| | //--------------------------------------------------------------------------- |
| | // Theme animation transform flags |
| | typedef enum TA_TRANSFORM_FLAG |
| | { |
| | TATF_NONE = 0x0, |
| | TATF_TARGETVALUES_USER = 0x1, |
| | TATF_HASINITIALVALUES = 0x2, |
| | TATF_HASORIGINVALUES = 0x4, |
| | } TA_TRANSFORM_FLAG; |
| | |
| | DEFINE_ENUM_FLAG_OPERATORS(TA_TRANSFORM_FLAG); |
| | |
| | #include <pshpack8.h> |
| | typedef struct TA_TRANSFORM |
| | { |
| | TA_TRANSFORM_TYPE eTransformType; |
| | DWORD dwTimingFunctionId; |
| | DWORD dwStartTime; // in milliseconds |
| | DWORD dwDurationTime; |
| | TA_TRANSFORM_FLAG eFlags; |
| | } TA_TRANSFORM, *PTA_TRANSFORM; |
| | |
| | typedef struct TA_TRANSFORM_2D |
| | { |
| | TA_TRANSFORM header; |
| | float rX; |
| | float rY; |
| | float rInitialX; |
| | float rInitialY; |
| | float rOriginX; |
| | float rOriginY; |
| | } TA_TRANSFORM_2D, *PTA_TRANSFORM_2D; |
| | |
| | typedef struct TA_TRANSFORM_OPACITY |
| | { |
| | TA_TRANSFORM header; |
| | float rOpacity; |
| | float rInitialOpacity; |
| | } TA_TRANSFORM_OPACITY, *PTA_TRANSFORM_OPACITY; |
| | |
| | typedef struct TA_TRANSFORM_CLIP |
| | { |
| | TA_TRANSFORM header; |
| | float rLeft; |
| | float rTop; |
| | float rRight; |
| | float rBottom; |
| | float rInitialLeft; |
| | float rInitialTop; |
| | float rInitialRight; |
| | float rInitialBottom; |
| | } TA_TRANSFORM_CLIP, *PTA_TRANSFORM_CLIP; |
| | #include <poppack.h> |
| | |
| | //--------------------------------------------------------------------------- |
| | // GetThemeAnimationTransform() - Retrieve an animation transform operation |
| | // based on storyboard id, target id and tran |
| | sform |
| | // index |
| | // |
| | // Transform index is in the range of (0, dwT |
| | ransformCount - 1). |
| | // dwTransformCount can be retrieved by calli |
| | ng |
| | // GetThemeAnimationProperty with TAP_TRANSFO |
| | RMCOUNT |
| | // |
| | // hTheme - Opened theme handle |
| | // |
| | // iStoryboardId - A predefined storyboard identifier |
| | // |
| | // iTargetId - A predefined target identifier |
| | // |
| | // dwTransformIndex - Zero-based index of a transform operation |
| | // |
| | // pTransform - Pointer buffer to receive a transform stru |
| | cture |
| | // |
| | // pcbSizeOut - pointer to a DWORD buffer to receive retur |
| | ned |
| | // byte-size of transform operation struct |
| | // |
| | THEMEAPI GetThemeAnimationTransform( |
| | _In_ HTHEME hTheme, |
| | _In_ int iStoryboardId, |
| | _In_ int iTargetId, |
| | _In_ DWORD dwTransformIndex, |
| | _Out_writes_bytes_to_opt_(cbSize, *pcbSizeOut) TA_TRANSFORM *pTransform, |
| | _In_ DWORD cbSize, |
| | _Out_ DWORD *pcbSizeOut); |
| | |
| | //--------------------------------------------------------------------------- |
| | // Timing function type |
| | typedef enum TA_TIMINGFUNCTION_TYPE |
| | { |
| | TTFT_UNDEFINED, |
| | TTFT_CUBIC_BEZIER, |
| | } TA_TIMINGFUNCTION_TYPE; |
| | |
| | #include <pshpack8.h> |
| | typedef struct TA_TIMINGFUNCTION |
| | { |
| | TA_TIMINGFUNCTION_TYPE eTimingFunctionType; |
| | } TA_TIMINGFUNCTION, *PTA_TIMINGFUNCTION; |
| | |
| | typedef struct TA_CUBIC_BEZIER |
| | { |
| | TA_TIMINGFUNCTION header; |
| | float rX0; |
| | float rY0; |
| | float rX1; |
| | float rY1; |
| | } TA_CUBIC_BEZIER, *PTA_CUBIC_BEZIER; |
| | #include <poppack.h> |
| | |
| | //--------------------------------------------------------------------------- |
| | // GetThemeTimingFunction - Retrieve a predefined timing function base |
| | d on |
| | // a timing function identifier |
| | // |
| | // hTheme - Opened theme handle |
| | // |
| | // iTimingFunctionId - Timing function identifier |
| | // |
| | // ppThemeTimingFunction - Buffer to receive a pre-defined timing fun |
| | ction pointer |
| | // |
| | // pcbSizeOut - pointer to a DWORD buffer to receive byte- |
| | size of |
| | // the timing function struct |
| | // |
| | THEMEAPI GetThemeTimingFunction( |
| | _In_ HTHEME hTheme, |
| | _In_ int iTimingFunctionId, |
| | _Out_writes_bytes_to_opt_(cbSize, *pcbSizeOut) TA_TIMINGFUNCTION *pTimingFun |
| | ction, |
| | _In_ DWORD cbSize, |
| | _Out_ DWORD *pcbSizeOut); |
| | |
| | #endif /* NTDDI_WIN8 */ |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // NOTE: PartId's and StateId's used in the theme API are defined in the | | // NOTE: PartId's and StateId's used in the theme API are defined in the |
| // hdr file <vssym32.h> using the TM_PART and TM_STATE macros. For | | // hdr file <vssym32.h> using the TM_PART and TM_STATE macros. For |
| // example, "TM_PART(BP, PUSHBUTTON)" defines the PartId "BP_PUSHBUTTON". | | // example, "TM_PART(BP, PUSHBUTTON)" defines the PartId "BP_PUSHBUTTON". |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // OpenThemeData() - Open the theme data for the specified HWND and | | // OpenThemeData() - Open the theme data for the specified HWND and |
| // semi-colon separated list of class names. | | // semi-colon separated list of class names. |
| // | | // |
| // OpenThemeData() will try each class name, one at | | // OpenThemeData() will try each class name, one at |
| | |
| skipping to change at line 243 | | skipping to change at line 451 |
| // pRect - defines the size/location of the part | | // pRect - defines the size/location of the part |
| // pClipRect - optional clipping rect (don't draw outside it) | | // pClipRect - optional clipping rect (don't draw outside it) |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| THEMEAPI | | THEMEAPI |
| DrawThemeBackground( | | DrawThemeBackground( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| LPCRECT pRect, | | LPCRECT pRect, |
|
| __in_opt LPCRECT pClipRect | | _In_opt_ LPCRECT pClipRect |
| ); | | ); |
| | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| //---- bits used in dwFlags of DTBGOPTS ---- | | //---- bits used in dwFlags of DTBGOPTS ---- |
| #define DTBG_CLIPRECT 0x00000001 // rcClip has been specified | | #define DTBG_CLIPRECT 0x00000001 // rcClip has been specified |
| #define DTBG_DRAWSOLID 0x00000002 // DEPRECATED: draw transparent/alph
a images as solid | | #define DTBG_DRAWSOLID 0x00000002 // DEPRECATED: draw transparent/alph
a images as solid |
| #define DTBG_OMITBORDER 0x00000004 // don't draw border of part | | #define DTBG_OMITBORDER 0x00000004 // don't draw border of part |
| #define DTBG_OMITCONTENT 0x00000008 // don't draw content area of part | | #define DTBG_OMITCONTENT 0x00000008 // don't draw content area of part |
| #define DTBG_COMPUTINGREGION 0x00000010 // TRUE if calling to compute region | | #define DTBG_COMPUTINGREGION 0x00000010 // TRUE if calling to compute region |
| #define DTBG_MIRRORDC 0x00000020 // assume the hdc is mirrorred and | | #define DTBG_MIRRORDC 0x00000020 // assume the hdc is mirrorred and |
| | |
| skipping to change at line 295 | | skipping to change at line 503 |
| // pRect - defines the size/location of the part | | // pRect - defines the size/location of the part |
| // pOptions - ptr to optional params | | // pOptions - ptr to optional params |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| THEMEAPI | | THEMEAPI |
| DrawThemeBackgroundEx( | | DrawThemeBackgroundEx( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| LPCRECT pRect, | | LPCRECT pRect, |
|
| __in_opt const DTBGOPTS *pOptions | | _In_opt_ const DTBGOPTS *pOptions |
| ); | | ); |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| //----- DrawThemeText() flags ---- | | //----- DrawThemeText() flags ---- |
| #define DTT_GRAYED 0x00000001 // draw a grayed-out string
(this is deprecated) | | #define DTT_GRAYED 0x00000001 // draw a grayed-out string
(this is deprecated) |
| #define DTT_FLAGS2VALIDBITS (DTT_GRAYED) | | #define DTT_FLAGS2VALIDBITS (DTT_GRAYED) |
| | |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| // DrawThemeText() - draws the text using the theme-specified | | // DrawThemeText() - draws the text using the theme-specified |
| // color and font for the "iPartId" and | | // color and font for the "iPartId" and |
| | |
| skipping to change at line 324 | | skipping to change at line 532 |
| // dwTextFlags - same as DrawText() "uFormat" param | | // dwTextFlags - same as DrawText() "uFormat" param |
| // dwTextFlags2 - additional drawing options | | // dwTextFlags2 - additional drawing options |
| // pRect - defines the size/location of the part | | // pRect - defines the size/location of the part |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| DrawThemeText( | | DrawThemeText( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
|
| __in_ecount(cchText) LPCWSTR pszText, | | _In_reads_(cchText) LPCWSTR pszText, |
| int cchText, | | int cchText, |
| DWORD dwTextFlags, | | DWORD dwTextFlags, |
| DWORD dwTextFlags2, | | DWORD dwTextFlags2, |
| LPCRECT pRect | | LPCRECT pRect |
| ); | | ); |
| | |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| // GetThemeBackgroundContentRect() | | // GetThemeBackgroundContentRect() |
| // - gets the size of the content for the theme-defined | | // - gets the size of the content for the theme-defined |
| // background. This is usually the area inside | | // background. This is usually the area inside |
| | |
| skipping to change at line 351 | | skipping to change at line 559 |
| // pBoundingRect - the outer RECT of the part being drawn | | // pBoundingRect - the outer RECT of the part being drawn |
| // pContentRect - RECT to receive the content area | | // pContentRect - RECT to receive the content area |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeBackgroundContentRect( | | GetThemeBackgroundContentRect( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| LPCRECT pBoundingRect, | | LPCRECT pBoundingRect, |
|
| __out LPRECT pContentRect | | _Out_ LPRECT pContentRect |
| ); | | ); |
| | |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| // GetThemeBackgroundExtent() - calculates the size/location of the theme- | | // GetThemeBackgroundExtent() - calculates the size/location of the theme- |
| // specified background based on the | | // specified background based on the |
| // "pContentRect". | | // "pContentRect". |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // hdc - (optional) device content to be used for drawing | | // hdc - (optional) device content to be used for drawing |
| // iPartId - part number to draw | | // iPartId - part number to draw |
| | |
| skipping to change at line 373 | | skipping to change at line 581 |
| // pContentRect - RECT that defines the content area | | // pContentRect - RECT that defines the content area |
| // pBoundingRect - RECT to receive the overall size/location of part | | // pBoundingRect - RECT to receive the overall size/location of part |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeBackgroundExtent( | | GetThemeBackgroundExtent( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| LPCRECT pContentRect, | | LPCRECT pContentRect, |
|
| __out LPRECT pExtentRect | | _Out_ LPRECT pExtentRect |
| ); | | ); |
| | |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| // GetThemeBackgroundRegion() | | // GetThemeBackgroundRegion() |
| // - computes the region for a regular or partially | | // - computes the region for a regular or partially |
| // transparent theme-specified background that is | | // transparent theme-specified background that is |
| // bound by the specified "pRect". | | // bound by the specified "pRect". |
| // If the rectangle is empty, sets the HRGN to NULL | | // If the rectangle is empty, sets the HRGN to NULL |
| // and return S_FALSE. | | // and return S_FALSE. |
| // | | // |
| | |
| skipping to change at line 398 | | skipping to change at line 606 |
| // pRect - the RECT used to draw the part | | // pRect - the RECT used to draw the part |
| // pRegion - receives handle to calculated region | | // pRegion - receives handle to calculated region |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeBackgroundRegion( | | GetThemeBackgroundRegion( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| LPCRECT pRect, | | LPCRECT pRect, |
|
| __out HRGN *pRegion | | _Out_ HRGN *pRegion |
| ); | | ); |
| | |
| enum THEMESIZE | | enum THEMESIZE |
| { | | { |
| TS_MIN, // minimum size | | TS_MIN, // minimum size |
| TS_TRUE, // size without stretching | | TS_TRUE, // size without stretching |
| TS_DRAW // size that theme mgr will use to draw part | | TS_DRAW // size that theme mgr will use to draw part |
| }; | | }; |
| | |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| | |
| skipping to change at line 422 | | skipping to change at line 630 |
| // hdc - HDC to select font into & measure against | | // hdc - HDC to select font into & measure against |
| // iPartId - part number to retrieve size for | | // iPartId - part number to retrieve size for |
| // iStateId - state number (of the part) | | // iStateId - state number (of the part) |
| // prc - (optional) rect for part drawing destination | | // prc - (optional) rect for part drawing destination |
| // eSize - the type of size to be retreived | | // eSize - the type of size to be retreived |
| // psz - receives the specified size of the part | | // psz - receives the specified size of the part |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemePartSize( | | GetThemePartSize( |
| HTHEME hTheme, | | HTHEME hTheme, |
|
| __in_opt HDC hdc, | | _In_opt_ HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
|
| __in_opt LPCRECT prc, | | _In_opt_ LPCRECT prc, |
| enum THEMESIZE eSize, | | enum THEMESIZE eSize, |
|
| __out SIZE *psz | | _Out_ SIZE *psz |
| ); | | ); |
| | |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| // GetThemeTextExtent() - calculates the size/location of the specified | | // GetThemeTextExtent() - calculates the size/location of the specified |
| // text when rendered in the Theme Font. | | // text when rendered in the Theme Font. |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // hdc - HDC to select font & measure into | | // hdc - HDC to select font & measure into |
| // iPartId - part number to draw | | // iPartId - part number to draw |
| // iStateId - state number (of the part) | | // iStateId - state number (of the part) |
| | |
| skipping to change at line 450 | | skipping to change at line 658 |
| // dwTextFlags - same as DrawText() "uFormat" param | | // dwTextFlags - same as DrawText() "uFormat" param |
| // pszBoundingRect - optional: to control layout of text | | // pszBoundingRect - optional: to control layout of text |
| // pszExtentRect - receives the RECT for text size/location | | // pszExtentRect - receives the RECT for text size/location |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeTextExtent( | | GetThemeTextExtent( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
|
| __in_ecount(cchCharCount) LPCWSTR pszText, | | _In_reads_(cchCharCount) LPCWSTR pszText, |
| int cchCharCount, | | int cchCharCount, |
| DWORD dwTextFlags, | | DWORD dwTextFlags, |
|
| __in_opt LPCRECT pBoundingRect, | | _In_opt_ LPCRECT pBoundingRect, |
| __out LPRECT pExtentRect | | _Out_ LPRECT pExtentRect |
| ); | | ); |
| | |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| // GetThemeTextMetrics() | | // GetThemeTextMetrics() |
| // - returns info about the theme-specified font | | // - returns info about the theme-specified font |
| // for the part/state passed in. | | // for the part/state passed in. |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // hdc - optional: HDC for screen context | | // hdc - optional: HDC for screen context |
| // iPartId - part number to draw | | // iPartId - part number to draw |
| // iStateId - state number (of the part) | | // iStateId - state number (of the part) |
| // ptm - receives the font info | | // ptm - receives the font info |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeTextMetrics( | | GetThemeTextMetrics( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
|
| __out TEXTMETRICW *ptm | | _Out_ TEXTMETRICW *ptm |
| ); | | ); |
| | |
| //------------------------------------------------------------------------- | | //------------------------------------------------------------------------- |
| //----- HitTestThemeBackground, HitTestThemeBackgroundRegion flags ---- | | //----- HitTestThemeBackground, HitTestThemeBackgroundRegion flags ---- |
| | |
| // Theme background segment hit test flag (default). possible return values are
: | | // Theme background segment hit test flag (default). possible return values are
: |
| // HTCLIENT: hit test succeeded in the middle background segment | | // HTCLIENT: hit test succeeded in the middle background segment |
| // HTTOP, HTLEFT, HTTOPLEFT, etc: // hit test succeeded in the the respective
theme background segment. | | // HTTOP, HTLEFT, HTTOPLEFT, etc: // hit test succeeded in the the respective
theme background segment. |
| #define HTTB_BACKGROUNDSEG 0x00000000 | | #define HTTB_BACKGROUNDSEG 0x00000000 |
| // Fixed border hit test option. possible return values are: | | // Fixed border hit test option. possible return values are: |
| | |
| skipping to change at line 545 | | skipping to change at line 753 |
| THEMEAPI | | THEMEAPI |
| HitTestThemeBackground( | | HitTestThemeBackground( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| DWORD dwOptions, | | DWORD dwOptions, |
| LPCRECT pRect, | | LPCRECT pRect, |
| HRGN hrgn, | | HRGN hrgn, |
| POINT ptTest, | | POINT ptTest, |
|
| __out WORD *pwHitTestCode | | _Out_ WORD *pwHitTestCode |
| ); | | ); |
| | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| // DrawThemeEdge() - Similar to the DrawEdge() API, but uses part colors | | // DrawThemeEdge() - Similar to the DrawEdge() API, but uses part colors |
| // and is high-DPI aware | | // and is high-DPI aware |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // hdc - HDC to draw into | | // hdc - HDC to draw into |
| // iPartId - part number to draw | | // iPartId - part number to draw |
| // iStateId - state number of part | | // iStateId - state number of part |
| // pDestRect - the RECT used to draw the line(s) | | // pDestRect - the RECT used to draw the line(s) |
| | |
| skipping to change at line 569 | | skipping to change at line 777 |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| THEMEAPI | | THEMEAPI |
| DrawThemeEdge( | | DrawThemeEdge( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| LPCRECT pDestRect, | | LPCRECT pDestRect, |
| UINT uEdge, | | UINT uEdge, |
| UINT uFlags, | | UINT uFlags, |
|
| __out_opt LPRECT pContentRect | | _Out_opt_ LPRECT pContentRect |
| ); | | ); |
| | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| // DrawThemeIcon() - draws an image within an imagelist based on | | // DrawThemeIcon() - draws an image within an imagelist based on |
| // a (possible) theme-defined effect. | | // a (possible) theme-defined effect. |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // hdc - HDC to draw into | | // hdc - HDC to draw into |
| // iPartId - part number to draw | | // iPartId - part number to draw |
| // iStateId - state number of part | | // iStateId - state number of part |
| | |
| skipping to change at line 659 | | skipping to change at line 867 |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // pColor - receives the value of the property | | // pColor - receives the value of the property |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeColor( | | GetThemeColor( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out COLORREF *pColor | | _Out_ COLORREF *pColor |
| ); | | ); |
| | |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| // GetThemeMetric() - Get the value for the specified metric/size | | // GetThemeMetric() - Get the value for the specified metric/size |
| // property | | // property |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // hdc - (optional) hdc to be drawn into (DPI scaling) | | // hdc - (optional) hdc to be drawn into (DPI scaling) |
| // iPartId - part number | | // iPartId - part number |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // piVal - receives the value of the property | | // piVal - receives the value of the property |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeMetric( | | GetThemeMetric( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out int *piVal | | _Out_ int *piVal |
| ); | | ); |
| | |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| // GetThemeString() - Get the value for the specified string property | | // GetThemeString() - Get the value for the specified string property |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // iPartId - part number | | // iPartId - part number |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // pszBuff - receives the string property value | | // pszBuff - receives the string property value |
| // cchMaxBuffChars - max. number of chars allowed in pszBuff | | // cchMaxBuffChars - max. number of chars allowed in pszBuff |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeString( | | GetThemeString( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out_ecount(cchMaxBuffChars) LPWSTR pszBuff, | | _Out_writes_(cchMaxBuffChars) LPWSTR pszBuff, |
| int cchMaxBuffChars | | int cchMaxBuffChars |
| ); | | ); |
| | |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| // GetThemeBool() - Get the value for the specified BOOL property | | // GetThemeBool() - Get the value for the specified BOOL property |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // iPartId - part number | | // iPartId - part number |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // pfVal - receives the value of the property | | // pfVal - receives the value of the property |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeBool( | | GetThemeBool( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out BOOL *pfVal | | _Out_ BOOL *pfVal |
| ); | | ); |
| | |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| // GetThemeInt() - Get the value for the specified int property | | // GetThemeInt() - Get the value for the specified int property |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // iPartId - part number | | // iPartId - part number |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // piVal - receives the value of the property | | // piVal - receives the value of the property |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeInt( | | GetThemeInt( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out int *piVal | | _Out_ int *piVal |
| ); | | ); |
| | |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| // GetThemeEnumValue() - Get the value for the specified ENUM property | | // GetThemeEnumValue() - Get the value for the specified ENUM property |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // iPartId - part number | | // iPartId - part number |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // piVal - receives the value of the enum (cast to int*) | | // piVal - receives the value of the enum (cast to int*) |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeEnumValue( | | GetThemeEnumValue( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out int *piVal | | _Out_ int *piVal |
| ); | | ); |
| | |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| // GetThemePosition() - Get the value for the specified position | | // GetThemePosition() - Get the value for the specified position |
| // property | | // property |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // iPartId - part number | | // iPartId - part number |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // pPoint - receives the value of the position property | | // pPoint - receives the value of the position property |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemePosition( | | GetThemePosition( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out POINT *pPoint | | _Out_ POINT *pPoint |
| ); | | ); |
| | |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| // GetThemeFont() - Get the value for the specified font property | | // GetThemeFont() - Get the value for the specified font property |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // hdc - (optional) hdc to be drawn to (DPI scaling) | | // hdc - (optional) hdc to be drawn to (DPI scaling) |
| // iPartId - part number | | // iPartId - part number |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // pFont - receives the value of the LOGFONT property | | // pFont - receives the value of the LOGFONT property |
| // (scaled for the current logical screen dpi) | | // (scaled for the current logical screen dpi) |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeFont( | | GetThemeFont( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out LOGFONTW *pFont | | _Out_ LOGFONTW *pFont |
| ); | | ); |
| | |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| // GetThemeRect() - Get the value for the specified RECT property | | // GetThemeRect() - Get the value for the specified RECT property |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // iPartId - part number | | // iPartId - part number |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // pRect - receives the value of the RECT property | | // pRect - receives the value of the RECT property |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeRect( | | GetThemeRect( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out LPRECT pRect | | _Out_ LPRECT pRect |
| ); | | ); |
| | |
| typedef struct _MARGINS | | typedef struct _MARGINS |
| { | | { |
| int cxLeftWidth; // width of left border that retains its size | | int cxLeftWidth; // width of left border that retains its size |
| int cxRightWidth; // width of right border that retains its size | | int cxRightWidth; // width of right border that retains its size |
| int cyTopHeight; // height of top border that retains its size | | int cyTopHeight; // height of top border that retains its size |
| int cyBottomHeight; // height of bottom border that retains its size | | int cyBottomHeight; // height of bottom border that retains its size |
| } MARGINS, *PMARGINS; | | } MARGINS, *PMARGINS; |
| | |
| | |
| skipping to change at line 837 | | skipping to change at line 1045 |
| // hdc - (optional) hdc to be used for drawing | | // hdc - (optional) hdc to be used for drawing |
| // iPartId - part number | | // iPartId - part number |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // prc - RECT for area to be drawn into | | // prc - RECT for area to be drawn into |
| // pMargins - receives the value of the MARGINS property | | // pMargins - receives the value of the MARGINS property |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeMargins( | | GetThemeMargins( |
| HTHEME hTheme, | | HTHEME hTheme, |
|
| __in_opt HDC hdc, | | _In_opt_ HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __in_opt LPCRECT prc, | | _In_opt_ LPCRECT prc, |
| __out MARGINS *pMargins | | _Out_ MARGINS *pMargins |
| ); | | ); |
| | |
|
| #if (_WIN32_WINNT >= 0x0600) | | #if (NTDDI_VERSION >= NTDDI_VISTA) |
| #define MAX_INTLIST_COUNT 402 | | #define MAX_INTLIST_COUNT 402 |
| #else | | #else |
| #define MAX_INTLIST_COUNT 10 | | #define MAX_INTLIST_COUNT 10 |
| #endif | | #endif |
| | |
| typedef struct _INTLIST | | typedef struct _INTLIST |
| { | | { |
| int iValueCount; // number of values in iValues | | int iValueCount; // number of values in iValues |
| int iValues[MAX_INTLIST_COUNT]; | | int iValues[MAX_INTLIST_COUNT]; |
| } INTLIST, *PINTLIST; | | } INTLIST, *PINTLIST; |
| | |
| skipping to change at line 872 | | skipping to change at line 1080 |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // pIntList - receives the value of the INTLIST property | | // pIntList - receives the value of the INTLIST property |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeIntList( | | GetThemeIntList( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out INTLIST *pIntList | | _Out_ INTLIST *pIntList |
| ); | | ); |
| | |
| enum PROPERTYORIGIN | | enum PROPERTYORIGIN |
| { | | { |
| PO_STATE, // property was found in the state section | | PO_STATE, // property was found in the state section |
| PO_PART, // property was found in the part section | | PO_PART, // property was found in the part section |
| PO_CLASS, // property was found in the class section | | PO_CLASS, // property was found in the class section |
| PO_GLOBAL, // property was found in [globals] section | | PO_GLOBAL, // property was found in [globals] section |
| PO_NOTFOUND // property was not found | | PO_NOTFOUND // property was not found |
| }; | | }; |
| | |
| skipping to change at line 902 | | skipping to change at line 1110 |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to search for | | // iPropId - the property number to search for |
| // pOrigin - receives the value of the property origin | | // pOrigin - receives the value of the property origin |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemePropertyOrigin( | | GetThemePropertyOrigin( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out enum PROPERTYORIGIN *pOrigin | | _Out_ enum PROPERTYORIGIN *pOrigin |
| ); | | ); |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // SetWindowTheme() | | // SetWindowTheme() |
| // - redirects an existing Window to use a different | | // - redirects an existing Window to use a different |
| // section of the current theme information than its | | // section of the current theme information than its |
| // class normally asks for. | | // class normally asks for. |
| // | | // |
| // hwnd - the handle of the window (cannot be NULL) | | // hwnd - the handle of the window (cannot be NULL) |
| // | | // |
| | |
| skipping to change at line 956 | | skipping to change at line 1164 |
| // iPropId - the property number to search for | | // iPropId - the property number to search for |
| // pszThemeFileName - output buffer to receive the filename | | // pszThemeFileName - output buffer to receive the filename |
| // cchMaxBuffChars - the size of the return buffer, in chars | | // cchMaxBuffChars - the size of the return buffer, in chars |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeFilename( | | GetThemeFilename( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out_ecount(cchMaxBuffChars) LPWSTR pszThemeFileName, | | _Out_writes_(cchMaxBuffChars) LPWSTR pszThemeFileName, |
| int cchMaxBuffChars | | int cchMaxBuffChars |
| ); | | ); |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // GetThemeSysColor() - Get the value of the specified System color. | | // GetThemeSysColor() - Get the value of the specified System color. |
| // | | // |
| // hTheme - the theme data handle. if non-NULL, will return | | // hTheme - the theme data handle. if non-NULL, will return |
| // color from [SysMetrics] section of theme. | | // color from [SysMetrics] section of theme. |
| // if NULL, will return the global system color. | | // if NULL, will return the global system color. |
| // | | // |
| | |
| skipping to change at line 1056 | | skipping to change at line 1264 |
| // iFontId - the TMT_XXX font number (first font | | // iFontId - the TMT_XXX font number (first font |
| // is TMT_CAPTIONFONT) | | // is TMT_CAPTIONFONT) |
| // | | // |
| // plf - ptr to LOGFONT to receive the font value. | | // plf - ptr to LOGFONT to receive the font value. |
| // (scaled for the current logical screen dpi) | | // (scaled for the current logical screen dpi) |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeSysFont( | | GetThemeSysFont( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iFontId, | | int iFontId, |
|
| __out LOGFONTW *plf | | _Out_ LOGFONTW *plf |
| ); | | ); |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // GetThemeSysString() - Get the value of specified System string metric. | | // GetThemeSysString() - Get the value of specified System string metric. |
| // | | // |
| // hTheme - the theme data handle (required) | | // hTheme - the theme data handle (required) |
| // | | // |
| // iStringId - must be one of the following values: | | // iStringId - must be one of the following values: |
| // | | // |
| // TMT_CSSNAME | | // TMT_CSSNAME |
| // TMT_XMLNAME | | // TMT_XMLNAME |
| // | | // |
| // pszStringBuff - the buffer to receive the string value | | // pszStringBuff - the buffer to receive the string value |
| // | | // |
| // cchMaxStringChars - max. number of chars that pszStringBuff can hold | | // cchMaxStringChars - max. number of chars that pszStringBuff can hold |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeSysString( | | GetThemeSysString( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iStringId, | | int iStringId, |
|
| __out_ecount(cchMaxStringChars) LPWSTR pszStringBuff, | | _Out_writes_(cchMaxStringChars) LPWSTR pszStringBuff, |
| int cchMaxStringChars | | int cchMaxStringChars |
| ); | | ); |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // GetThemeSysInt() - Get the value of specified System int. | | // GetThemeSysInt() - Get the value of specified System int. |
| // | | // |
| // hTheme - the theme data handle (required) | | // hTheme - the theme data handle (required) |
| // | | // |
| // iIntId - must be one of the following values: | | // iIntId - must be one of the following values: |
| // | | // |
| // TMT_DPIX | | // TMT_DPIX |
| // TMT_DPIY | | // TMT_DPIY |
| // TMT_MINCOLORDEPTH | | // TMT_MINCOLORDEPTH |
| // | | // |
| // piValue - ptr to int to receive value | | // piValue - ptr to int to receive value |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeSysInt( | | GetThemeSysInt( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iIntId, | | int iIntId, |
|
| __out int *piValue | | _Out_ int *piValue |
| ); | | ); |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // IsThemeActive() - can be used to test if a system theme is active | | // IsThemeActive() - can be used to test if a system theme is active |
| // for the current user session. | | // for the current user session. |
| // | | // |
| // use the API "IsAppThemed()" to test if a theme is | | // use the API "IsAppThemed()" to test if a theme is |
| // active for the calling process. | | // active for the calling process. |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| THEMEAPI_(BOOL) | | THEMEAPI_(BOOL) |
| | |
| skipping to change at line 1141 | | skipping to change at line 1349 |
| HWND hwnd | | HWND hwnd |
| ); | | ); |
| | |
| #define ETDT_DISABLE 0x00000001 | | #define ETDT_DISABLE 0x00000001 |
| #define ETDT_ENABLE 0x00000002 | | #define ETDT_ENABLE 0x00000002 |
| #define ETDT_USETABTEXTURE 0x00000004 | | #define ETDT_USETABTEXTURE 0x00000004 |
| | |
| #define ETDT_ENABLETAB (ETDT_ENABLE | \ | | #define ETDT_ENABLETAB (ETDT_ENABLE | \ |
| ETDT_USETABTEXTURE) | | ETDT_USETABTEXTURE) |
| | |
|
| #if (_WIN32_WINNT >= 0x0600) | | #if (NTDDI_VERSION >= NTDDI_VISTA) |
| #define ETDT_USEAEROWIZARDTABTEXTURE 0x00000008 | | #define ETDT_USEAEROWIZARDTABTEXTURE 0x00000008 |
| | |
| #define ETDT_ENABLEAEROWIZARDTAB (ETDT_ENABLE | \ | | #define ETDT_ENABLEAEROWIZARDTAB (ETDT_ENABLE | \ |
| ETDT_USEAEROWIZARDTABTEXTURE) | | ETDT_USEAEROWIZARDTABTEXTURE) |
| | |
| #define ETDT_VALIDBITS (ETDT_DISABLE | \ | | #define ETDT_VALIDBITS (ETDT_DISABLE | \ |
| ETDT_ENABLE | \ | | ETDT_ENABLE | \ |
| ETDT_USETABTEXTURE | \ | | ETDT_USETABTEXTURE | \ |
| ETDT_USEAEROWIZARDTABTEXTURE) | | ETDT_USEAEROWIZARDTABTEXTURE) |
| #endif | | #endif |
| | |
| skipping to change at line 1170 | | skipping to change at line 1378 |
| // background texturing. | | // background texturing. |
| // | | // |
| // hdlg - the window handle of the target dialog | | // hdlg - the window handle of the target dialog |
| // dwFlags - ETDT_ENABLE to enable the theme-defined dialog background
texturing, | | // dwFlags - ETDT_ENABLE to enable the theme-defined dialog background
texturing, |
| // ETDT_DISABLE to disable background texturing, | | // ETDT_DISABLE to disable background texturing, |
| // ETDT_ENABLETAB to enable the theme-defined background | | // ETDT_ENABLETAB to enable the theme-defined background |
| // texturing using the Tab texture | | // texturing using the Tab texture |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| EnableThemeDialogTexture( | | EnableThemeDialogTexture( |
|
| __in HWND hwnd, | | _In_ HWND hwnd, |
| __in DWORD dwFlags | | _In_ DWORD dwFlags |
| ); | | ); |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // IsThemeDialogTextureEnabled() | | // IsThemeDialogTextureEnabled() |
| // | | // |
| // - Reports whether the dialog supports background texturing. | | // - Reports whether the dialog supports background texturing. |
| // | | // |
| // hdlg - the window handle of the target dialog | | // hdlg - the window handle of the target dialog |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| THEMEAPI_(BOOL) | | THEMEAPI_(BOOL) |
| IsThemeDialogTextureEnabled( | | IsThemeDialogTextureEnabled( |
|
| __in HWND hwnd | | _In_ HWND hwnd |
| ); | | ); |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| //---- flags to control theming within an app ---- | | //---- flags to control theming within an app ---- |
| | |
| #define STAP_ALLOW_NONCLIENT (1UL << 0) | | #define STAP_ALLOW_NONCLIENT (1UL << 0) |
| #define STAP_ALLOW_CONTROLS (1UL << 1) | | #define STAP_ALLOW_CONTROLS (1UL << 1) |
| #define STAP_ALLOW_WEBCONTENT (1UL << 2) | | #define STAP_ALLOW_WEBCONTENT (1UL << 2) |
| #define STAP_VALIDBITS (STAP_ALLOW_NONCLIENT | \ | | #define STAP_VALIDBITS (STAP_ALLOW_NONCLIENT | \ |
| STAP_ALLOW_CONTROLS | \ | | STAP_ALLOW_CONTROLS | \ |
| | |
| skipping to change at line 1234 | | skipping to change at line 1442 |
| // | | // |
| // pszColorBuff - (optional) receives the canonical color scheme name | | // pszColorBuff - (optional) receives the canonical color scheme name |
| // (not the display name) | | // (not the display name) |
| // cchMaxColorChars - max chars allowed in pszColorBuff | | // cchMaxColorChars - max chars allowed in pszColorBuff |
| // | | // |
| // pszSizeBuff - (optional) receives the canonical size name | | // pszSizeBuff - (optional) receives the canonical size name |
| // (not the display name) | | // (not the display name) |
| // cchMaxSizeChars - max chars allowed in pszSizeBuff | | // cchMaxSizeChars - max chars allowed in pszSizeBuff |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| THEMEAPI GetCurrentThemeName( | | THEMEAPI GetCurrentThemeName( |
|
| __out_ecount(cchMaxNameChars) LPWSTR pszThemeFileName, | | _Out_writes_(cchMaxNameChars) LPWSTR pszThemeFileName, |
| int cchMaxNameChars, | | int cchMaxNameChars, |
|
| __out_ecount_opt(cchMaxColorChars) LPWSTR pszColorBuff, | | _Out_writes_opt_(cchMaxColorChars) LPWSTR pszColorBuff, |
| int cchMaxColorChars, | | int cchMaxColorChars, |
|
| __out_ecount_opt(cchMaxSizeChars) LPWSTR pszSizeBuff, | | _Out_writes_opt_(cchMaxSizeChars) LPWSTR pszSizeBuff, |
| int cchMaxSizeChars | | int cchMaxSizeChars |
| ); | | ); |
| | |
| #define SZ_THDOCPROP_DISPLAYNAME L"DisplayName" | | #define SZ_THDOCPROP_DISPLAYNAME L"DisplayName" |
| #define SZ_THDOCPROP_CANONICALNAME L"ThemeName" | | #define SZ_THDOCPROP_CANONICALNAME L"ThemeName" |
| #define SZ_THDOCPROP_TOOLTIP L"ToolTip" | | #define SZ_THDOCPROP_TOOLTIP L"ToolTip" |
| #define SZ_THDOCPROP_AUTHOR L"author" | | #define SZ_THDOCPROP_AUTHOR L"author" |
| | |
| THEMEAPI | | THEMEAPI |
| GetThemeDocumentationProperty( | | GetThemeDocumentationProperty( |
| LPCWSTR pszThemeName, | | LPCWSTR pszThemeName, |
| LPCWSTR pszPropertyName, | | LPCWSTR pszPropertyName, |
|
| __out_ecount(cchMaxValChars) LPWSTR pszValueBuff, | | _Out_writes_(cchMaxValChars) LPWSTR pszValueBuff, |
| int cchMaxValChars | | int cchMaxValChars |
| ); | | ); |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // Theme API Error Handling | | // Theme API Error Handling |
| // | | // |
| // All functions in the Theme API not returning an HRESULT (THEMEAPI_) | | // All functions in the Theme API not returning an HRESULT (THEMEAPI_) |
| // use the WIN32 function "SetLastError()" to record any call failures. | | // use the WIN32 function "SetLastError()" to record any call failures. |
| // | | // |
| // To retreive the error code of the last failure on the | | // To retreive the error code of the last failure on the |
| | |
| skipping to change at line 1287 | | skipping to change at line 1495 |
| // | | // |
| // hdc - hdc of the child control | | // hdc - hdc of the child control |
| // | | // |
| // prc - (optional) rect that defines the area to be | | // prc - (optional) rect that defines the area to be |
| // drawn (CHILD coordinates) | | // drawn (CHILD coordinates) |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| DrawThemeParentBackground( | | DrawThemeParentBackground( |
| HWND hwnd, | | HWND hwnd, |
| HDC hdc, | | HDC hdc, |
|
| __in_opt const RECT* prc | | _In_opt_ const RECT* prc |
| ); | | ); |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // EnableTheming() - enables or disables themeing for the current user | | // EnableTheming() - enables or disables themeing for the current user |
| // in the current and future sessions. | | // in the current and future sessions. |
| // | | // |
| // fEnable - if FALSE, disable theming & turn themes off. | | // fEnable - if FALSE, disable theming & turn themes off. |
| // - if TRUE, enable themeing and, if user previously | | // - if TRUE, enable themeing and, if user previously |
| // had a theme active, make it active now. | | // had a theme active, make it active now. |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| EnableTheming( | | EnableTheming( |
| BOOL fEnable | | BOOL fEnable |
| ); | | ); |
| | |
| #define GBF_DIRECT 0x00000001 // direct dereferencing. | | #define GBF_DIRECT 0x00000001 // direct dereferencing. |
| #define GBF_COPY 0x00000002 // create a copy of the bitmap | | #define GBF_COPY 0x00000002 // create a copy of the bitmap |
| #define GBF_VALIDBITS (GBF_DIRECT | \ | | #define GBF_VALIDBITS (GBF_DIRECT | \ |
| GBF_COPY) | | GBF_COPY) |
| | |
|
| #if (_WIN32_WINNT >= 0x0600) | | #if (NTDDI_VERSION >= NTDDI_VISTA) |
| | |
| #define DTPB_WINDOWDC 0x00000001 | | #define DTPB_WINDOWDC 0x00000001 |
| #define DTPB_USECTLCOLORSTATIC 0x00000002 | | #define DTPB_USECTLCOLORSTATIC 0x00000002 |
| #define DTPB_USEERASEBKGND 0x00000004 | | #define DTPB_USEERASEBKGND 0x00000004 |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // DrawThemeParentBackgroundEx() | | // DrawThemeParentBackgroundEx() |
| // - used by partially-transparent or alpha-blended | | // - used by partially-transparent or alpha-blended |
| // child controls to draw the part of their parent | | // child controls to draw the part of their parent |
| // that they appear in front of. | | // that they appear in front of. |
| | |
| skipping to change at line 1346 | | skipping to change at line 1554 |
| // prc - (optional) rect that defines the area to be | | // prc - (optional) rect that defines the area to be |
| // drawn (CHILD coordinates) | | // drawn (CHILD coordinates) |
| // | | // |
| // Return value - S_OK if something was painted, S_FALSE if not. | | // Return value - S_OK if something was painted, S_FALSE if not. |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| DrawThemeParentBackgroundEx( | | DrawThemeParentBackgroundEx( |
| HWND hwnd, | | HWND hwnd, |
| HDC hdc, | | HDC hdc, |
| DWORD dwFlags, | | DWORD dwFlags, |
|
| __in_opt const RECT* prc | | _In_opt_ const RECT* prc |
| ); | | ); |
| | |
| enum WINDOWTHEMEATTRIBUTETYPE | | enum WINDOWTHEMEATTRIBUTETYPE |
| { | | { |
| WTA_NONCLIENT = 1 | | WTA_NONCLIENT = 1 |
| }; | | }; |
| | |
| typedef struct _WTA_OPTIONS | | typedef struct _WTA_OPTIONS |
| { | | { |
| DWORD dwFlags; // values for each style option specified in the bit
mask | | DWORD dwFlags; // values for each style option specified in the bit
mask |
| | |
| skipping to change at line 1374 | | skipping to change at line 1582 |
| #define WTNCA_NOMIRRORHELP 0x00000008 // don't mirror the question mar
k, even in RTL layout | | #define WTNCA_NOMIRRORHELP 0x00000008 // don't mirror the question mar
k, even in RTL layout |
| #define WTNCA_VALIDBITS (WTNCA_NODRAWCAPTION | \ | | #define WTNCA_VALIDBITS (WTNCA_NODRAWCAPTION | \ |
| WTNCA_NODRAWICON | \ | | WTNCA_NODRAWICON | \ |
| WTNCA_NOSYSMENU | \ | | WTNCA_NOSYSMENU | \ |
| WTNCA_NOMIRRORHELP) | | WTNCA_NOMIRRORHELP) |
| | |
| THEMEAPI | | THEMEAPI |
| SetWindowThemeAttribute( | | SetWindowThemeAttribute( |
| HWND hwnd, | | HWND hwnd, |
| enum WINDOWTHEMEATTRIBUTETYPE eAttribute, | | enum WINDOWTHEMEATTRIBUTETYPE eAttribute, |
|
| __in_bcount(cbAttribute) PVOID pvAttribute, | | _In_reads_bytes_(cbAttribute) PVOID pvAttribute, |
| DWORD cbAttribute | | DWORD cbAttribute |
| ); | | ); |
| | |
| __inline HRESULT SetWindowThemeNonClientAttributes(HWND hwnd, DWORD dwMask, DWOR
D dwAttributes) | | __inline HRESULT SetWindowThemeNonClientAttributes(HWND hwnd, DWORD dwMask, DWOR
D dwAttributes) |
| { | | { |
| WTA_OPTIONS wta; | | WTA_OPTIONS wta; |
| wta.dwFlags = dwAttributes; | | wta.dwFlags = dwAttributes; |
| wta.dwMask = dwMask; | | wta.dwMask = dwMask; |
| return SetWindowThemeAttribute(hwnd, WTA_NONCLIENT, (void*)&(wta), sizeof(wt
a)); | | return SetWindowThemeAttribute(hwnd, WTA_NONCLIENT, (void*)&(wta), sizeof(wt
a)); |
| } | | } |
| | |
|
| #endif // #if (_WIN32_WINNT >= 0x0600) | | #endif // (NTDDI_VERSION >= NTDDI_VISTA) |
| | |
| //--------------------------------------------------------------------------- | | //--------------------------------------------------------------------------- |
| // | | // |
| // DrawThemeTextEx | | // DrawThemeTextEx |
| // | | // |
| // Note: DrawThemeTextEx only exists on Windows Vista and higher, but the | | // Note: DrawThemeTextEx only exists on Windows Vista and higher, but the |
| // following declarations are provided to enable declaring its prototype when | | // following declarations are provided to enable declaring its prototype when |
| // compiling for all platforms. | | // compiling for all platforms. |
| | |
| // Callback function used by DrawThemeTextEx, instead of DrawText | | // Callback function used by DrawThemeTextEx, instead of DrawText |
| typedef | | typedef |
| int | | int |
| (WINAPI *DTT_CALLBACK_PROC) | | (WINAPI *DTT_CALLBACK_PROC) |
| ( | | ( |
|
| __in HDC hdc, | | _In_ HDC hdc, |
| __inout_ecount(cchText) LPWSTR pszText, | | _Inout_updates_(cchText) LPWSTR pszText, |
| __in int cchText, | | _In_ int cchText, |
| __inout LPRECT prc, | | _Inout_ LPRECT prc, |
| __in UINT dwFlags, | | _In_ UINT dwFlags, |
| __in LPARAM lParam); | | _In_ LPARAM lParam); |
| | |
| //---- bits used in dwFlags of DTTOPTS ---- | | //---- bits used in dwFlags of DTTOPTS ---- |
| #define DTT_TEXTCOLOR (1UL << 0) // crText has been specified | | #define DTT_TEXTCOLOR (1UL << 0) // crText has been specified |
| #define DTT_BORDERCOLOR (1UL << 1) // crBorder has been specified | | #define DTT_BORDERCOLOR (1UL << 1) // crBorder has been specified |
| #define DTT_SHADOWCOLOR (1UL << 2) // crShadow has been specified | | #define DTT_SHADOWCOLOR (1UL << 2) // crShadow has been specified |
| #define DTT_SHADOWTYPE (1UL << 3) // iTextShadowType has been specifie
d | | #define DTT_SHADOWTYPE (1UL << 3) // iTextShadowType has been specifie
d |
| #define DTT_SHADOWOFFSET (1UL << 4) // ptShadowOffset has been specified | | #define DTT_SHADOWOFFSET (1UL << 4) // ptShadowOffset has been specified |
| #define DTT_BORDERSIZE (1UL << 5) // iBorderSize has been specified | | #define DTT_BORDERSIZE (1UL << 5) // iBorderSize has been specified |
| #define DTT_FONTPROP (1UL << 6) // iFontPropId has been specified | | #define DTT_FONTPROP (1UL << 6) // iFontPropId has been specified |
| #define DTT_COLORPROP (1UL << 7) // iColorPropId has been specified | | #define DTT_COLORPROP (1UL << 7) // iColorPropId has been specified |
| | |
| skipping to change at line 1456 | | skipping to change at line 1664 |
| int iBorderSize; // Border radius around text | | int iBorderSize; // Border radius around text |
| int iFontPropId; // Font property to use for the text
instead of TMT_FONT | | int iFontPropId; // Font property to use for the text
instead of TMT_FONT |
| int iColorPropId; // Color property to use for the text
instead of TMT_TEXTCOLOR | | int iColorPropId; // Color property to use for the text
instead of TMT_TEXTCOLOR |
| int iStateId; // Alternate state id | | int iStateId; // Alternate state id |
| BOOL fApplyOverlay; // Overlay text on top of any text ef
fect? | | BOOL fApplyOverlay; // Overlay text on top of any text ef
fect? |
| int iGlowSize; // Glow radious around text | | int iGlowSize; // Glow radious around text |
| DTT_CALLBACK_PROC pfnDrawTextCallback; // Callback for DrawText | | DTT_CALLBACK_PROC pfnDrawTextCallback; // Callback for DrawText |
| LPARAM lParam; // Parameter for callback | | LPARAM lParam; // Parameter for callback |
| } DTTOPTS, *PDTTOPTS; | | } DTTOPTS, *PDTTOPTS; |
| | |
|
| #if (_WIN32_WINNT >= 0x0600) | | #if (NTDDI_VERSION >= NTDDI_VISTA) |
| | |
| THEMEAPI | | THEMEAPI |
| DrawThemeTextEx( | | DrawThemeTextEx( |
| HTHEME hTheme, | | HTHEME hTheme, |
| HDC hdc, | | HDC hdc, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
|
| __in_ecount(cchText) LPCWSTR pszText, | | _In_reads_(cchText) LPCWSTR pszText, |
| int cchText, | | int cchText, |
| DWORD dwTextFlags, | | DWORD dwTextFlags, |
|
| __inout LPRECT pRect, | | _Inout_ LPRECT pRect, |
| __in_opt const DTTOPTS *pOptions | | _In_opt_ const DTTOPTS *pOptions |
| ); | | ); |
| | |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| // GetThemeStream() - Get the value for the specified STREAM property | | // GetThemeStream() - Get the value for the specified STREAM property |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // iPartId - part number | | // iPartId - part number |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // ppvStream - if non-null receives the value of the STREAM property (not
to be freed) | | // ppvStream - if non-null receives the value of the STREAM property (not
to be freed) |
| | |
| skipping to change at line 1491 | | skipping to change at line 1699 |
| // file when iPropId==TMT_DISKSTREAM (use GetCurrentThemeName | | // file when iPropId==TMT_DISKSTREAM (use GetCurrentThemeName |
| // and LoadLibraryEx(LOAD_LIBRARY_AS_DATAFILE) | | // and LoadLibraryEx(LOAD_LIBRARY_AS_DATAFILE) |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeBitmap( | | GetThemeBitmap( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
| ULONG dwFlags, | | ULONG dwFlags, |
|
| __out HBITMAP* phBitmap | | _Out_ HBITMAP* phBitmap |
| ); | | ); |
| | |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| // GetThemeStream() - Get the value for the specified STREAM property | | // GetThemeStream() - Get the value for the specified STREAM property |
| // | | // |
| // hTheme - theme data handle | | // hTheme - theme data handle |
| // iPartId - part number | | // iPartId - part number |
| // iStateId - state number of part | | // iStateId - state number of part |
| // iPropId - the property number to get the value for | | // iPropId - the property number to get the value for |
| // ppvStream - if non-null receives the value of the STREAM property (not
to be freed) | | // ppvStream - if non-null receives the value of the STREAM property (not
to be freed) |
| | |
| skipping to change at line 1513 | | skipping to change at line 1721 |
| // hInst - NULL when iPropId==TMT_STREAM, HINSTANCE of a loaded mssty
les | | // hInst - NULL when iPropId==TMT_STREAM, HINSTANCE of a loaded mssty
les |
| // file when iPropId==TMT_DISKSTREAM (use GetCurrentThemeName | | // file when iPropId==TMT_DISKSTREAM (use GetCurrentThemeName |
| // and LoadLibraryEx(LOAD_LIBRARY_AS_DATAFILE) | | // and LoadLibraryEx(LOAD_LIBRARY_AS_DATAFILE) |
| //----------------------------------------------------------------------- | | //----------------------------------------------------------------------- |
| THEMEAPI | | THEMEAPI |
| GetThemeStream( | | GetThemeStream( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateId, | | int iStateId, |
| int iPropId, | | int iPropId, |
|
| __out VOID **ppvStream, | | _Out_ VOID **ppvStream, |
| __out_opt DWORD *pcbStream, | | _Out_opt_ DWORD *pcbStream, |
| __in_opt HINSTANCE hInst | | _In_opt_ HINSTANCE hInst |
| ); | | ); |
| | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| // BufferedPaintInit() - Initialize the Buffered Paint API. | | // BufferedPaintInit() - Initialize the Buffered Paint API. |
| // Should be called prior to BeginBufferedPaint, | | // Should be called prior to BeginBufferedPaint, |
| // and should have a matching BufferedPaintUnInit. | | // and should have a matching BufferedPaintUnInit. |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| THEMEAPI | | THEMEAPI |
| BufferedPaintInit( | | BufferedPaintInit( |
| VOID | | VOID |
| | |
| skipping to change at line 1593 | | skipping to change at line 1801 |
| | |
| // BP_PAINTPARAMS | | // BP_PAINTPARAMS |
| typedef struct _BP_PAINTPARAMS | | typedef struct _BP_PAINTPARAMS |
| { | | { |
| DWORD cbSize; | | DWORD cbSize; |
| DWORD dwFlags; // BPPF_ flags | | DWORD dwFlags; // BPPF_ flags |
| const RECT * prcExclude; | | const RECT * prcExclude; |
| const BLENDFUNCTION * pBlendFunction; | | const BLENDFUNCTION * pBlendFunction; |
| } BP_PAINTPARAMS, *PBP_PAINTPARAMS; | | } BP_PAINTPARAMS, *PBP_PAINTPARAMS; |
| | |
|
| THEMEAPI_(__success(return != NULL) HPAINTBUFFER) | | THEMEAPI_(_Success_(return != NULL) HPAINTBUFFER) |
| BeginBufferedPaint( | | BeginBufferedPaint( |
| HDC hdcTarget, | | HDC hdcTarget, |
| const RECT* prcTarget, | | const RECT* prcTarget, |
| BP_BUFFERFORMAT dwFormat, | | BP_BUFFERFORMAT dwFormat, |
|
| __in_opt BP_PAINTPARAMS *pPaintParams, | | _In_opt_ BP_PAINTPARAMS *pPaintParams, |
| __out HDC *phdc | | _Out_ HDC *phdc |
| ); | | ); |
| | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| // EndBufferedPaint() - Ends a buffered paint operation. | | // EndBufferedPaint() - Ends a buffered paint operation. |
| // | | // |
| // hBufferedPaint - handle to buffered paint context | | // hBufferedPaint - handle to buffered paint context |
| // fUpdateTarget - update target DC | | // fUpdateTarget - update target DC |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| THEMEAPI | | THEMEAPI |
| EndBufferedPaint( | | EndBufferedPaint( |
| | |
| skipping to change at line 1623 | | skipping to change at line 1831 |
| | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| // GetBufferedPaintTargetRect() - Returns the target rectangle specified during
BeginBufferedPaint | | // GetBufferedPaintTargetRect() - Returns the target rectangle specified during
BeginBufferedPaint |
| // | | // |
| // hBufferedPaint - handle to buffered paint context | | // hBufferedPaint - handle to buffered paint context |
| // prc - pointer to receive target rectangle | | // prc - pointer to receive target rectangle |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| THEMEAPI | | THEMEAPI |
| GetBufferedPaintTargetRect( | | GetBufferedPaintTargetRect( |
| HPAINTBUFFER hBufferedPaint, | | HPAINTBUFFER hBufferedPaint, |
|
| __out RECT *prc | | _Out_ RECT *prc |
| ); | | ); |
| | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| // GetBufferedPaintTargetDC() - Returns the target DC specified during BeginBuf
feredPaint | | // GetBufferedPaintTargetDC() - Returns the target DC specified during BeginBuf
feredPaint |
| // | | // |
| // hBufferedPaint - handle to buffered paint context | | // hBufferedPaint - handle to buffered paint context |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| THEMEAPI_(HDC) | | THEMEAPI_(HDC) |
| GetBufferedPaintTargetDC( | | GetBufferedPaintTargetDC( |
| HPAINTBUFFER hBufferedPaint | | HPAINTBUFFER hBufferedPaint |
| | |
| skipping to change at line 1657 | | skipping to change at line 1865 |
| // GetBufferedPaintBits() - Obtains a pointer to the buffer bitmap, if the buff
er is a DIB | | // GetBufferedPaintBits() - Obtains a pointer to the buffer bitmap, if the buff
er is a DIB |
| // | | // |
| // hBufferedPaint - handle to buffered paint context | | // hBufferedPaint - handle to buffered paint context |
| // ppbBuffer - pointer to receive pointer to buffer bitmap pixels | | // ppbBuffer - pointer to receive pointer to buffer bitmap pixels |
| // pcxRow - pointer to receive width of buffer bitmap, in pixel
s; | | // pcxRow - pointer to receive width of buffer bitmap, in pixel
s; |
| // this value may not necessarily be equal to the buff
er width | | // this value may not necessarily be equal to the buff
er width |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| THEMEAPI | | THEMEAPI |
| GetBufferedPaintBits( | | GetBufferedPaintBits( |
| HPAINTBUFFER hBufferedPaint, | | HPAINTBUFFER hBufferedPaint, |
|
| __out RGBQUAD **ppbBuffer, | | _Out_ RGBQUAD **ppbBuffer, |
| __out int *pcxRow | | _Out_ int *pcxRow |
| ); | | ); |
| | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| // BufferedPaintClear() - Clears given rectangle to ARGB = {0, 0, 0, 0} | | // BufferedPaintClear() - Clears given rectangle to ARGB = {0, 0, 0, 0} |
| // | | // |
| // hBufferedPaint - handle to buffered paint context | | // hBufferedPaint - handle to buffered paint context |
| // prc - rectangle to clear; NULL specifies entire buffer | | // prc - rectangle to clear; NULL specifies entire buffer |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| THEMEAPI | | THEMEAPI |
| BufferedPaintClear( | | BufferedPaintClear( |
| HPAINTBUFFER hBufferedPaint, | | HPAINTBUFFER hBufferedPaint, |
|
| __in_opt const RECT *prc | | _In_opt_ const RECT *prc |
| ); | | ); |
| | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| // BufferedPaintSetAlpha() - Set alpha to given value in given rectangle | | // BufferedPaintSetAlpha() - Set alpha to given value in given rectangle |
| // | | // |
| // hBufferedPaint - handle to buffered paint context | | // hBufferedPaint - handle to buffered paint context |
| // prc - rectangle to set alpha in; NULL specifies entire b
uffer | | // prc - rectangle to set alpha in; NULL specifies entire b
uffer |
| // alpha - alpha value to set in the given rectangle | | // alpha - alpha value to set in the given rectangle |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| THEMEAPI | | THEMEAPI |
| BufferedPaintSetAlpha( | | BufferedPaintSetAlpha( |
| HPAINTBUFFER hBufferedPaint, | | HPAINTBUFFER hBufferedPaint, |
|
| __in_opt const RECT *prc, | | _In_opt_ const RECT *prc, |
| BYTE alpha | | BYTE alpha |
| ); | | ); |
| | |
| // Macro for setting the buffer to opaque (alpha = 255) | | // Macro for setting the buffer to opaque (alpha = 255) |
| #define BufferedPaintMakeOpaque(hBufferedPaint, prc) BufferedPaintSetAlpha(hBuff
eredPaint, prc, 255) | | #define BufferedPaintMakeOpaque(hBufferedPaint, prc) BufferedPaintSetAlpha(hBuff
eredPaint, prc, 255) |
| | |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| // BufferedPaintStopAllAnimations() - Stop all buffer animations for the given
window | | // BufferedPaintStopAllAnimations() - Stop all buffer animations for the given
window |
| // | | // |
| // hwnd - window on which to stop all animations | | // hwnd - window on which to stop all animations |
| | |
| skipping to change at line 1708 | | skipping to change at line 1916 |
| ); | | ); |
| | |
| typedef HANDLE HANIMATIONBUFFER; // handle to a buffered paint animation | | typedef HANDLE HANIMATIONBUFFER; // handle to a buffered paint animation |
| | |
| THEMEAPI_(HANIMATIONBUFFER) | | THEMEAPI_(HANIMATIONBUFFER) |
| BeginBufferedAnimation( | | BeginBufferedAnimation( |
| HWND hwnd, | | HWND hwnd, |
| HDC hdcTarget, | | HDC hdcTarget, |
| const RECT* prcTarget, | | const RECT* prcTarget, |
| BP_BUFFERFORMAT dwFormat, | | BP_BUFFERFORMAT dwFormat, |
|
| __in_opt BP_PAINTPARAMS *pPaintParams, | | _In_opt_ BP_PAINTPARAMS *pPaintParams, |
| __in BP_ANIMATIONPARAMS *pAnimationParams, | | _In_ BP_ANIMATIONPARAMS *pAnimationParams, |
| __out HDC *phdcFrom, | | _Out_ HDC *phdcFrom, |
| __out HDC *phdcTo | | _Out_ HDC *phdcTo |
| ); | | ); |
| | |
| THEMEAPI | | THEMEAPI |
| EndBufferedAnimation( | | EndBufferedAnimation( |
| HANIMATIONBUFFER hbpAnimation, | | HANIMATIONBUFFER hbpAnimation, |
| BOOL fUpdateTarget | | BOOL fUpdateTarget |
| ); | | ); |
| | |
| THEMEAPI_(BOOL) | | THEMEAPI_(BOOL) |
| BufferedPaintRenderAnimation( | | BufferedPaintRenderAnimation( |
| | |
| skipping to change at line 1751 | | skipping to change at line 1959 |
| // iPropId - property id | | // iPropId - property id |
| // pdwDuration - receives the transition duration | | // pdwDuration - receives the transition duration |
| //------------------------------------------------------------------------ | | //------------------------------------------------------------------------ |
| THEMEAPI | | THEMEAPI |
| GetThemeTransitionDuration( | | GetThemeTransitionDuration( |
| HTHEME hTheme, | | HTHEME hTheme, |
| int iPartId, | | int iPartId, |
| int iStateIdFrom, | | int iStateIdFrom, |
| int iStateIdTo, | | int iStateIdTo, |
| int iPropId, | | int iPropId, |
|
| __out DWORD *pdwDuration | | _Out_ DWORD *pdwDuration |
| ); | | ); |
| | |
|
| #endif // #if (_WIN32_WINNT >= 0x0600) | | #endif // (NTDDI_VERSION >= NTDDI_VISTA) |
| | |
| | #endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */ |
| | #pragma endregion |
| | |
| #endif /* _UXTHEME_H_ */ | | #endif /* _UXTHEME_H_ */ |
| | |
| End of changes. 65 change blocks. |
| 83 lines changed or deleted | | 307 lines changed or added |
|