Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

537 lines
31 KiB

/**************************************************************************\
FILE: Theme.idl
DATE: BryanSt (3/31/2000)
DESCRIPTION:
Theme API (Object Model).
Copyright (c) Microsoft Corporation. All rights reserved.
\**************************************************************************/
cpp_quote("#ifndef _THEMEIDL_IDL_H_")
cpp_quote("#define _THEMEIDL_IDL_H_")
midl_pragma warning( disable: 2400 )
//--------------------------------------------------------------------------
//
//--------------------------------------------------------------------------
import "oaidl.idl";
import "ocidl.idl";
import "objidl.idl";
import "dimm.idl"; // They go thru all the pain of definiting LOGFONTW in an IDL acceptable way. (wingdi.h won't work here)
#include <olectl.h>
//--------------------------------------------------------------------------
// Includes
//--------------------------------------------------------------------------
#include "ThemeID.h"
//--------------------------------------------------------------------------
// Dependencies
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Interfaces
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Script Interfaces
//--------------------------------------------------------------------------
//--------------------------------------------------------------------------
// Themes Type Library
//--------------------------------------------------------------------------
[
uuid(40643250-8D23-47fb-895C-EAF48E2C8892), // LIBID_Theme
helpstring("Microsoft Theme API Type Library"),
lcid(0x0000),
version(1.0)
]
library Theme
{
//----------------------------------------------------------------------
// Standard Type Library Stuff
//----------------------------------------------------------------------
importlib("stdole2.tlb");
interface ITheme;
interface IThemeScheme;
interface IThemeStyle;
interface IThemeSize;
cpp_quote("#ifndef __LPTHEMEMANAGER_DEFINED")
cpp_quote("#define __LPTHEMEMANAGER_DEFINED")
cpp_quote("//===================================================================")
cpp_quote("//DESCRIPTION:")
cpp_quote("// This object will allow users to view what 'Visual Style' or")
cpp_quote("//'Color Scheme' or 'Appearance Scheme' is set. This will appear")
cpp_quote("//in the Display Control Panel under the Theme or Appearance tab.")
cpp_quote("//")
cpp_quote("//DEFINITIONS:")
cpp_quote("// Theme: This is a .theme plus! pack file. The display control")
cpp_quote("// panel can change these on the Themes tab.")
cpp_quote("// Scheme: This is a visual style (.mstheme file) or it can indicate")
cpp_quote("// that no visual style is selected.")
cpp_quote("// Style: If Scheme is a .mstheme file, then this is the color section in that file.")
cpp_quote("// Otherwise, this is the 'Appearance Scheme' which was available")
cpp_quote("// in previous versions of Windows.")
cpp_quote("// Size: This is the size of the Style, normally 'Normal', 'Large', or 'Extra Large'.")
cpp_quote("//")
cpp_quote("//METHODS:")
cpp_quote("// get_SelectedTheme: This method will return the currently selected .theme file.")
cpp_quote("// put_SelectedTheme: This method will set the currently selected .theme file.")
cpp_quote("// The change will not take effect until ApplyNow() is called.")
cpp_quote("// get_SelectedScheme: This method will return the currently selected .mstheme file.")
cpp_quote("// put_SelectedScheme: This method will set the currently selected .mstheme file.")
cpp_quote("// The change will not take effect until ApplyNow() is called.")
cpp_quote("// get_length: Returns the number of installed .theme files.")
cpp_quote("// get_item: Returns an installed Theme object. The lookup can happen by index")
cpp_quote("// or filename.")
cpp_quote("// get_schemeLength: Returns the number of installed .mstheme files.")
cpp_quote("// get_schemeItem: Returns an installed .mstheme object. The lookup can happen by index")
cpp_quote("// or filename. The zero (0) index or empty VT_BSTR value points to the")
cpp_quote("// 'No .mstheme' object which matches the 'Windows Classic' look with no .mstheme.")
cpp_quote("// ApplyNow: Apply the changes made to put_SelectedTheme() or put_SelectedScheme().")
cpp_quote("// This includes persisting the change and broadcasting the change to running applications.")
cpp_quote("//===================================================================")
[
object,
oleautomation,
dual,
nonextensible,
helpstring("Theme Manager Interface"),
uuid(04D5D56C-EEAF-4419-B786-300284D6BB5F), // IID_IThemeManager
]
interface IThemeManager : IDispatch
{
//------------------------------------------------------------------
// Pointer to an interface of this type
//------------------------------------------------------------------
typedef [unique] IThemeManager *LPTHEMEMANAGER; // For C callers
cpp_quote("// These are the names of the Special Themes for GetSpecialTheme()/SetSpecialTheme()")
cpp_quote("#define SZ_STDEFAULTTHEME L\"DefaultTheme\" // This is what the installer determines is most appropriate for the user.")
cpp_quote("// These are the names of the Special Scheme for GetSpecialScheme()/SetSpecialScheme()")
cpp_quote("#define SZ_SSDEFAULVISUALSTYLEON L\"DefaultVisualStyleOn\" // This is what the installer determines is most appropriate for the user with visual styles on.")
cpp_quote("#define SZ_SSDEFAULVISUALSTYLEOFF L\"DefaultVisualStyleOff\" // This is what the installer determines is most appropriate for the user with visual styles off.")
cpp_quote("// These are the names of the properties for GetSelectedSchemeProperty()")
cpp_quote("#define SZ_CSP_PATH L\"Path\" // This is the directory containing the currently selected .mstheme file.")
cpp_quote("#define SZ_CSP_FILE L\"File\" // This is the path including the filename to the currently selected .mstheme file.")
cpp_quote("#define SZ_CSP_DISPLAYNAME L\"DisplayName\" // This is the display name of the currently selected scheme.")
cpp_quote("#define SZ_CSP_CANONICALNAME L\"Name\" // This is the canonical name of the currently selected scheme.")
cpp_quote("#define SZ_CSP_COLOR L\"Color\" // This is the color name of the currently selected scheme.")
cpp_quote("#define SZ_CSP_SIZE L\"Size\" // This is the canonical size name of the currently selected scheme.")
//------------------------------------------------------------------
// Properties
//------------------------------------------------------------------
[id(DISPIDTHTM_LENGTH), propget, SZ_HELPTHTM_GETLENGTH, displaybind, bindable] HRESULT length([retval, out] long * pnLength);
[id(DISPIDTHTM_ITEM), propget, SZ_HELPTHTM_GETITEM, displaybind, bindable] HRESULT item([in] VARIANT varIndex, [retval, out] ITheme ** ppTheme);
[id(DISPIDTHTM_SCHEMELENGTH), propget, SZ_HELPTHTM_GETSCHEMELENGTH, displaybind, bindable] HRESULT schemeLength([retval, out] long * pnLength);
[id(DISPIDTHTM_SCHEMEITEM), propget, SZ_HELPTHTM_GETSCHEMEITEM, displaybind, bindable] HRESULT schemeItem([in] VARIANT varIndex, [retval, out] IThemeScheme ** ppThemeScheme);
[id(DISPIDTHTM_WEBVIEWCSS), propget, SZ_HELPTHTM_WEBVIEWCSS, displaybind, bindable] HRESULT WebviewCSS([retval, out] BSTR * pbstrPath);
[id(DISPIDTHTM_CURRENTTHEME), propget, SZ_HELPTHTM_GETCURRENTTHEME, displaybind, bindable] HRESULT SelectedTheme([retval, out] ITheme ** ppTheme);
[id(DISPIDTHTM_CURRENTTHEME), propput, SZ_HELPTHTM_PUTCURRENTTHEME, displaybind, bindable] HRESULT SelectedTheme([in] ITheme * pTheme);
[id(DISPIDTHTM_SELECTEDSCHEME), propget, SZ_HELPTHTM_GETSELECTEDSCHEME, displaybind, bindable] HRESULT SelectedScheme([retval, out] IThemeScheme ** ppThemeScheme);
[id(DISPIDTHTM_SELECTEDSCHEME), propput, SZ_HELPTHTM_PUTSELECTEDSCHEME, displaybind, bindable] HRESULT SelectedScheme([in] IThemeScheme * pThemeScheme);
//------------------------------------------------------------------
// Methods
//------------------------------------------------------------------
[id(DISPIDTHTM_GETSPECIALTHEME), SZ_HELPTHTM_GETSPECIALTHEME, displaybind] HRESULT GetSpecialTheme([in] BSTR bstrName, [retval, out] ITheme ** ppTheme);
[id(DISPIDTHTM_SETSPECIALTHEME), SZ_HELPTHTM_SETSPECIALTHEME, displaybind] HRESULT SetSpecialTheme([in] BSTR bstrName, [in] ITheme * pTheme);
[id(DISPIDTHTM_GETSPECIALSCHEME), SZ_HELPTHTM_GETSPECIALSCHEME, displaybind] HRESULT GetSpecialScheme([in] BSTR bstrName, [out] IThemeScheme ** ppThemeScheme, [out] IThemeStyle ** ppThemeStyle, [retval, out] IThemeSize ** ppThemeSize);
[id(DISPIDTHTM_SETSPECIALSCHEME), SZ_HELPTHTM_SETSPECIALSCHEME, displaybind] HRESULT SetSpecialScheme([in] BSTR bstrName, [in] IThemeScheme * pThemeScheme, [in] IThemeStyle * pThemeStyle, [in] IThemeSize * pThemeSize);
[id(DISPIDTHTM_GETSELSCHPROPERTY), SZ_HELPTHTM_GETSELSCHPROPERTY, displaybind] HRESULT GetSelectedSchemeProperty([in] BSTR bstrName, [retval, out] BSTR * pbstrValue);
[id(DISPIDTHTM_APPLYNOW), SZ_HELPTHTM_APPLYNOW, displaybind] HRESULT ApplyNow(void);
}
cpp_quote("#endif // __LPTHEMEMANAGER_DEFINED")
//----------------------------------------------------------------------
// AutoDiscover Accounts Class
//----------------------------------------------------------------------
[
uuid(2E17C0EF-2851-459b-A3C8-27A41D4BC9F7), // CLSID_ThemeManager
helpstring("Theme Manager Class"),
]
coclass ThemeManager
{
[default] interface IThemeManager;
};
cpp_quote("#ifndef __LPTHEME_DEFINED")
cpp_quote("#define __LPTHEME_DEFINED")
cpp_quote("//===================================================================")
cpp_quote("//DESCRIPTION:")
cpp_quote("//GetIcon: The first parameter will specify the icon to fetch. The format")
cpp_quote("// will be: <RegKey>:<IconType> An example for the recycle bin is:")
cpp_quote("// CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon::empty")
cpp_quote("// The value returned with be the path to the icon file, a comma, and")
cpp_quote("// the icon resource index. For example: C:\windows\file.dll,12")
cpp_quote("//")
cpp_quote("//METHODS:")
cpp_quote("//DisplayName: The display name maybe point to a resource in order to be MUI")
cpp_quote("// compatible. For example, '@themeui.dll,-172'.")
cpp_quote("//Background: This is the path to the background wallpaper.")
cpp_quote("//BackgroundTile: This will indicate if the wallpaper should be tiled, stretched, or centered.")
cpp_quote("//ScreenSaver: The path to the screen saver.")
cpp_quote("//VisualStyle: The path to the .mstheme visual style file.")
cpp_quote("//VisualStyleColor: The color to choose in the .mstheme file.")
cpp_quote("//VisualStyleSize: The size to choose in the .mstheme file.")
cpp_quote("//get_GetPath: The path to the theme (.theme file).")
cpp_quote("//SetIcon: The path and resource index of the icon. The")
cpp_quote("// following example will be for the Recycle Bin in the empty state:")
cpp_quote("// bstrIconName = CLSID\\{645FF040-5081-101B-9F08-00AA002F954E}\\DefaultIcon:empty")
cpp_quote("// bstrIconPath = C:\winnt\SYSTEM32\shell32.dll,31")
cpp_quote("//")
cpp_quote("//===================================================================")
[
object,
oleautomation,
dual,
nonextensible,
helpstring("Theme Interface"),
uuid(A41C22EB-0F93-40ae-B7CE-37A4C4C81B01), // IID_ITheme
]
interface ITheme : IDispatch
{
//------------------------------------------------------------------
// Pointer to an interface of this type
//------------------------------------------------------------------
typedef [unique] ITheme *LPTHEME; // For C callers
cpp_quote("// ITheme::get_BackgroundTile() Tiles")
typedef enum
{
BKDGT_CENTER = 0, // Center the image on the screen
BKDGT_TILE, // Tile the image on the screen
BKDGT_STRECH // Stretch the image to fit on the screen
} enumBkgdTile;
//------------------------------------------------------------------
// Properties
//------------------------------------------------------------------
// General Properties
[id(DISPIDTHTH_DISPLAYNAME), propget, SZ_HELPTHTH_GETDISPLAYNAME, displaybind, bindable] HRESULT DisplayName([retval, out] BSTR * pbstrDisplayName); // Appears in "Look & Feel"
[id(DISPIDTHTH_DISPLAYNAME), propput, SZ_HELPTHTH_PUTDISPLAYNAME, displaybind, bindable] HRESULT DisplayName([in] BSTR bstrDisplayName);
// Plus! Uber Theme Properties
[id(DISPIDTHTH_BKGD), propget, SZ_HELPTHTH_GETBKGD, displaybind, bindable] HRESULT Background([retval, out] BSTR * pbstrPath);
[id(DISPIDTHTH_BKGD), propput, SZ_HELPTHTH_PUTBKGD, displaybind, bindable] HRESULT Background([in] BSTR bstrPath);
[id(DISPIDTHTH_BKGDTILE), propget, SZ_HELPTHTH_GETBKGDTILE, displaybind, bindable] HRESULT BackgroundTile([retval, out] enumBkgdTile * pnTile);
[id(DISPIDTHTH_BKGDTILE), propput, SZ_HELPTHTH_PUTBKGDTILE, displaybind, bindable] HRESULT BackgroundTile([in] enumBkgdTile nTile);
[id(DISPIDTHTH_SCRNSAVER), propget, SZ_HELPTHTH_GETSCRNSAVER, displaybind, bindable] HRESULT ScreenSaver([retval, out] BSTR * pbstrPath);
[id(DISPIDTHTH_SCRNSAVER), propput, SZ_HELPTHTH_PUTSCRNSAVER, displaybind, bindable] HRESULT ScreenSaver([in] BSTR bstrPath);
[id(DISPIDTHTH_VS), propget, SZ_HELPTHTH_GETVS, displaybind, bindable] HRESULT VisualStyle([retval, out] BSTR * pbstrPath);
[id(DISPIDTHTH_VS), propput, SZ_HELPTHTH_PUTVS, displaybind, bindable] HRESULT VisualStyle([in] BSTR bstrPath);
[id(DISPIDTHTH_VSCOLOR), propget, SZ_HELPTHTH_GETVSCOLOR, displaybind, bindable] HRESULT VisualStyleColor([retval, out] BSTR * pbstrPath);
[id(DISPIDTHTH_VSCOLOR), propput, SZ_HELPTHTH_PUTVSCOLOR, displaybind, bindable] HRESULT VisualStyleColor([in] BSTR bstrPath);
[id(DISPIDTHTH_VSSIZE), propget, SZ_HELPTHTH_GETVSSIZE, displaybind, bindable] HRESULT VisualStyleSize([retval, out] BSTR * pbstrPath);
[id(DISPIDTHTH_VSSIZE), propput, SZ_HELPTHTH_PUTVSSIZE, displaybind, bindable] HRESULT VisualStyleSize([in] BSTR bstrPath);
//------------------------------------------------------------------
// Methods
//------------------------------------------------------------------
[id(DISPIDTHTH_GETPATH), SZ_HELPTHTH_GETPATH, displaybind] HRESULT GetPath([in] VARIANT_BOOL fExpand, [retval, out] BSTR * pbstrPath);
[id(DISPIDTHTH_SETPATH), SZ_HELPTHTH_PUTPATH, displaybind] HRESULT SetPath([in] BSTR bstrPath);
[id(DISPIDTHTH_GETCURSOR), SZ_HELPTHTH_GETCURSOR, displaybind] HRESULT GetCursor([in] BSTR bstrCursor, [retval, out] BSTR * pbstrPath);
[id(DISPIDTHTH_SETCURSOR), SZ_HELPTHTH_PUTCURSOR, displaybind] HRESULT SetCursor([in] BSTR bstrCursor, [in] BSTR bstrPath);
[id(DISPIDTHTH_GETSOUND), SZ_HELPTHTH_GETSOUND, displaybind] HRESULT GetSound([in] BSTR bstrSoundName, [retval, out] BSTR * pbstrPath);
[id(DISPIDTHTH_SETSOUND), SZ_HELPTHTH_PUTSOUND, displaybind] HRESULT SetSound([in] BSTR bstrSoundName, [in] BSTR bstrPath);
[id(DISPIDTHTH_GETICON), SZ_HELPTHTH_GETICON, displaybind] HRESULT GetIcon([in] BSTR bstrIconName, [retval, out] BSTR * pbstrIconPath);
[id(DISPIDTHTH_SETICON), SZ_HELPTHTH_PUTICON, displaybind] HRESULT SetIcon([in] BSTR bstrIconName, [in] BSTR bstrIconPath);
}
cpp_quote("#endif // __LPTHEME_DEFINED")
//----------------------------------------------------------------------
// Theme Class
//----------------------------------------------------------------------
[
uuid(F60691B4-3BD8-4f42-B2FD-20853C433A74), // CLSID_Theme
helpstring("Theme Class"),
]
coclass Theme
{
[default] interface ITheme;
};
cpp_quote("#ifndef __LPTHEMESCHEME_DEFINED")
cpp_quote("#define __LPTHEMESCHEME_DEFINED")
cpp_quote("//===================================================================")
cpp_quote("//DESCRIPTION:")
cpp_quote("//===================================================================")
[
object,
oleautomation,
dual,
nonextensible,
helpstring("Theme Scheme Interface"),
uuid(AA49D906-65B2-42d6-A26A-2EE03C83F839), // IID_IThemeScheme
]
interface IThemeScheme : IDispatch
{
//------------------------------------------------------------------
// Pointer to an interface of this type
//------------------------------------------------------------------
typedef [unique] IThemeScheme *LPTHEMESCHEME; // For C callers
//------------------------------------------------------------------
// Properties
//------------------------------------------------------------------
// General Properties
[id(DISPIDTHTS_SCHDISPNAME), propget, SZ_HELPTHTS_GETSCHDISPNAME, displaybind, bindable] HRESULT DisplayName([retval, out] BSTR * pbstrDisplayName);
[id(DISPIDTHTS_SCHDISPNAME), propput, SZ_HELPTHTS_PUTSCHDISPNAME, displaybind, bindable] HRESULT DisplayName([in] BSTR bstrDisplayName);
[id(DISPIDTHTS_SCHEMEPATH), propget, SZ_HELPTHTS_GETSCHEMEPATH, displaybind, bindable] HRESULT Path([retval, out] BSTR * pbstrPath);
[id(DISPIDTHTS_SCHEMEPATH), propput, SZ_HELPTHTS_PUTSCHEMEPATH, displaybind, bindable] HRESULT Path([in] BSTR bstrPath);
// Style Collection
[id(DISPIDTHTS_LENGTH), propget, SZ_HELPTHTS_GETLENGTH, displaybind, bindable] HRESULT length([retval, out] long * pnLength);
[id(DISPIDTHTS_ITEM), propget, SZ_HELPTHTS_GETITEM, displaybind, bindable] HRESULT item([in] VARIANT varIndex, [retval, out] IThemeStyle ** ppThemeStyle);
[id(DISPIDTHTS_SELECTEDSTYLE), propget, SZ_HELPTHTS_GETSELECTEDSTYLE, displaybind, bindable] HRESULT SelectedStyle([retval, out] IThemeStyle ** ppThemeStyle);
[id(DISPIDTHTS_SELECTEDSTYLE), propput, SZ_HELPTHTS_PUTSELECTEDSTYLE, displaybind, bindable] HRESULT SelectedStyle([in] IThemeStyle * pThemeStyle);
//------------------------------------------------------------------
// Methods
//------------------------------------------------------------------
[id(DISPIDTHTS_ADDSTYLE), SZ_HELPTHTS_ADDSTYLE, displaybind] HRESULT AddStyle([retval, out] IThemeStyle ** ppThemeStyle);
}
cpp_quote("#endif // __LPTHEMESCHEME_DEFINED")
//----------------------------------------------------------------------
// ThemeScheme Accounts Class
//----------------------------------------------------------------------
[
uuid(1C995F92-244F-48ac-9784-4AF9586EBBBA), // CLSID_ThemeScheme
helpstring("ThemeScheme Class"),
]
coclass ThemeScheme
{
[default] interface IThemeScheme;
};
cpp_quote("#ifndef __LPTHEMESTYLE_DEFINED")
cpp_quote("#define __LPTHEMESTYLE_DEFINED")
cpp_quote("//===================================================================")
cpp_quote("//DESCRIPTION:")
cpp_quote("//===================================================================")
[
object,
oleautomation,
dual,
nonextensible,
helpstring("Theme Style Interface"),
uuid(3672E804-D69D-43d8-AF58-F320B8D9AF32), // IID_IThemeStyle
]
interface IThemeStyle : IDispatch
{
//------------------------------------------------------------------
// Pointer to an interface of this type
//------------------------------------------------------------------
typedef [unique] IThemeStyle *LPTHEMESTYLE; // For C callers
//------------------------------------------------------------------
// Properties
//------------------------------------------------------------------
// General Properties
[id(DISPIDTHSY_DISPNAME), propget, SZ_HELPTHSY_GETDISPNAME, displaybind, bindable] HRESULT DisplayName([retval, out] BSTR * pbstrDisplayName);
[id(DISPIDTHSY_DISPNAME), propput, SZ_HELPTHSY_PUTDISPNAME, displaybind, bindable] HRESULT DisplayName([in] BSTR bstrDisplayName);
[id(DISPIDTHSY_NAME), propget, SZ_HELPTHSY_GETNAME, displaybind, bindable] HRESULT Name([retval, out] BSTR * pbstrName);
[id(DISPIDTHSY_NAME), propput, SZ_HELPTHSY_PUTNAME, displaybind, bindable] HRESULT Name([in] BSTR bstrName);
[id(DISPIDTHSY_LENGTH), propget, SZ_HELPTHSY_GETLENGTH, displaybind, bindable] HRESULT length([retval, out] long * pnLength);
[id(DISPIDTHSY_ITEM), propget, SZ_HELPTHSY_GETITEM, displaybind, bindable] HRESULT item([in] VARIANT varIndex, [retval, out] IThemeSize ** ppThemeSize);
[id(DISPIDTHSY_SELECTEDSIZE), propget, SZ_HELPTHSY_GETSELECTEDSIZE, displaybind, bindable] HRESULT SelectedSize([retval, out] IThemeSize ** ppThemeSize);
[id(DISPIDTHSY_SELECTEDSIZE), propput, SZ_HELPTHSY_PUTSELECTEDSIZE, displaybind, bindable] HRESULT SelectedSize([in] IThemeSize * pThemeSize);
//------------------------------------------------------------------
// Methods
//------------------------------------------------------------------
[id(DISPIDTHSY_ADDSIZE), SZ_HELPTHSY_ADDSIZE, displaybind] HRESULT AddSize([retval, out] IThemeSize ** ppThemeSize);
}
cpp_quote("#endif // __LPTHEMESTYLE_DEFINED")
//----------------------------------------------------------------------
// ThemeStyle Accounts Class
//----------------------------------------------------------------------
[
uuid(AFCEFAC8-8097-4ee5-82DF-121202D95342), // CLSID_ThemeStyle
helpstring("ThemeStyle Class"),
]
coclass ThemeStyle
{
[default] interface IThemeStyle;
};
cpp_quote("#ifndef __LPTHEMESIZES_DEFINED")
cpp_quote("#define __LPTHEMESIZES_DEFINED")
cpp_quote("//===================================================================")
cpp_quote("//DESCRIPTION:")
cpp_quote("//===================================================================")
[
object,
oleautomation,
dual,
nonextensible,
helpstring("Theme Size Interface"),
uuid(72DD2E7F-21E5-46dc-8847-CDDCF58B6725), // IID_IThemeSize
]
interface IThemeSize : IDispatch
{
//------------------------------------------------------------------
// Pointer to an interface of this type
//------------------------------------------------------------------
typedef [unique] IThemeSize *LPTHEMESIZES; // For C callers
cpp_quote("// IThemeSize::SystemMetricFont() Fonts")
typedef enum
{
SMF_CAPTIONFONT = 0, // NONCLIENTMETRICSW.lfCaptionFont
SMF_SMCAPTIONFONT, // NONCLIENTMETRICSW.lfSmCaptionFont
SMF_MENUFONT, // NONCLIENTMETRICSW.lfMenuFont
SMF_ICONTITLEFONT, // For SPI_GETICONTITLELOGFONT
SMF_STATUSFONT, // NONCLIENTMETRICSW.lfStatusFont
SMF_MESSAGEFONT, // NONCLIENTMETRICSW.lfMessageFont
} enumSystemMetricFont;
cpp_quote("// IThemeSize::SystemMetricSize() Sizes")
typedef enum
{
SMS_BORDERWIDTH = 0, // NONCLIENTMETRICSW.iBorderWidth
SMS_SCROLLWIDTH, // NONCLIENTMETRICSW.iScrollWidth
SMS_SCROLLHEIGHT, // NONCLIENTMETRICSW.iScrollHeight
SMS_CAPTIONWIDTH, // NONCLIENTMETRICSW.iCaptionWidth
SMS_CAPTIONHEIGHT, // NONCLIENTMETRICSW.iCaptionHeight
SMS_SMCAPTIONWIDTH, // NONCLIENTMETRICSW.iSmCaptionWidth
SMS_SMCAPTIONHEIGHT, // NONCLIENTMETRICSW.iSmCaptionHeight
SMS_MENUWIDTH, // NONCLIENTMETRICSW.iMenuWidth
SMS_MENUHEIGHT // NONCLIENTMETRICSW.iMenuHeight
} enumSystemMetricSize;
cpp_quote("// IThemeSize::get_/put_ContrastLevel() Contrast Levels")
typedef enum
{
// Media types
CONTRAST_NORMAL = 0x00000000, // Normal Contrast.
CONTRAST_HIGHBLACK = 0x00000001, // High Contrast. Use black or dark colors for backgrounds.
CONTRAST_HIGHWHITE = 0x00000002, // High Contrast. Use white or light colors for backgrounds.
} enumThemeContrastLevels;
//------------------------------------------------------------------
// Properties
//------------------------------------------------------------------
// General Properties
[id(DISPIDTHSZ_DISPNAME), propget, SZ_HELPTHSZ_GETDISPNAME, displaybind, bindable] HRESULT DisplayName([retval, out] BSTR * pbstrDisplayName);
[id(DISPIDTHSZ_DISPNAME), propput, SZ_HELPTHSZ_PUTDISPNAME, displaybind, bindable] HRESULT DisplayName([in] BSTR bstrDisplayName);
[id(DISPIDTHSZ_NAME), propget, SZ_HELPTHSZ_GETNAME, displaybind, bindable] HRESULT Name([retval, out] BSTR * pbstrName);
[id(DISPIDTHSZ_NAME), propput, SZ_HELPTHSZ_PUTNAME, displaybind, bindable] HRESULT Name([in] BSTR bstrName);
[id(DISPIDTHSZ_SYSMETCOLOR), propget, SZ_HELPTHSZ_GETSYSMETCOLOR, displaybind, bindable] HRESULT SystemMetricColor([in] int nSysColorIndex, [retval, out] COLORREF * pColorRef);
[id(DISPIDTHSZ_SYSMETCOLOR), propput, SZ_HELPTHSZ_PUTSYSMETCOLOR, displaybind, bindable] HRESULT SystemMetricColor([in] int nSysColorIndex, [in] COLORREF ColorRef);
[id(DISPIDTHSZ_SYSMETSIZE), propget, SZ_HELPTHSZ_GETSYSMETSIZE, displaybind, bindable] HRESULT SystemMetricSize([in] enumSystemMetricSize nSystemMetricIndex, [retval, out] int * pnSize);
[id(DISPIDTHSZ_SYSMETSIZE), propput, SZ_HELPTHSZ_PUTSYSMETSIZE, displaybind, bindable] HRESULT SystemMetricSize([in] enumSystemMetricSize nSystemMetricIndex, [in] int nSize);
[id(DISPIDTHSZ_WEBVIEWCSS), propget, SZ_HELPTHSZ_WEBVIEWCSS, displaybind, bindable] HRESULT WebviewCSS([retval, out] BSTR * pbstrPath);
[id(DISPIDTHSZ_CONTRASTLVL), propget, SZ_HELPTHSZ_GETCONTRASTLVL, displaybind, bindable] HRESULT ContrastLevel([retval, out] enumThemeContrastLevels * pContrastLevel);
[id(DISPIDTHSZ_CONTRASTLVL), propput, SZ_HELPTHSZ_PUTCONTRASTLVL, displaybind, bindable] HRESULT ContrastLevel([in] enumThemeContrastLevels ContrastLevel);
//------------------------------------------------------------------
// Methods
//------------------------------------------------------------------
[id(DISPIDTHSZ_GETSYSMETFONT), SZ_HELPTHSZ_GETSYSMETFONT, displaybind] HRESULT GetSystemMetricFont([in] enumSystemMetricFont nFontIndex, [in] LOGFONTW * pLogFontW);
[id(DISPIDTHSZ_PUTSYSMETFONT), SZ_HELPTHSZ_PUTSYSMETFONT, displaybind] HRESULT PutSystemMetricFont([in] enumSystemMetricFont nFontIndex, [in] LOGFONTW * pLogFontW);
}
cpp_quote("#endif // __LPTHEMESIZES_DEFINED")
//----------------------------------------------------------------------
// ThemeSize Accounts Class
//----------------------------------------------------------------------
[
uuid(05AF76AC-4245-468f-AE35-6D233436937A), // CLSID_ThemeSize
helpstring("ThemeSize Class"),
]
coclass ThemeSize
{
[default] interface IThemeSize;
};
cpp_quote("#ifndef __LPTHEMEPREVIEW_DEFINED")
cpp_quote("#define __LPTHEMEPREVIEW_DEFINED")
cpp_quote("//===================================================================")
cpp_quote("//DESCRIPTION:")
cpp_quote("//===================================================================")
[
object,
oleautomation,
dual,
nonextensible,
helpstring("Theme Preview Interface"),
uuid(b63705f2-b2a2-401e-a20d-643e6b554a1d), // IID_IThemePreview
]
interface IThemePreview : IUnknown
{
//------------------------------------------------------------------
// Pointer to an interface of this type
//------------------------------------------------------------------
typedef [unique] IThemePreview *LPTHEMEPREVIEW; // For C callers
cpp_quote("// IThemePreview::CreatePreview() dwFlags")
typedef enum
{
// Media types
TMPREV_NONE = 0x00000000,
TMPREV_SHOWMONITOR = 0x00000001,
TMPREV_SHOWBKGND = 0x00000002,
TMPREV_SHOWVS = 0x00000004,
TMPREV_SHOWICONS = 0x00000008
} enumThemePreviewFlags;
//------------------------------------------------------------------
// Properties
//------------------------------------------------------------------
// General Properties
//------------------------------------------------------------------
// Methods
//------------------------------------------------------------------
[id(DISPIDTHPV_UPDATE), SZ_HELPTHPV_UPDATE, displaybind] HRESULT UpdatePreview([in] IPropertyBag * pPropertyBag);
[id(DISPIDTHPV_CREATEPREVIEW), SZ_HELPTHPV_CREATEPREVIEW, displaybind] HRESULT CreatePreview([in] HWND hwndParent, [in] DWORD dwFlags, [in] DWORD dwStyle, [in] DWORD dwExStyle, [in] int x, [in] int y, [in] int nWidth, [in] int nHeight, [in] IPropertyBag * pPropertyBag, [in] DWORD dwCtrlID);
}
cpp_quote("#endif // __LPTHEMEPREVIEW_DEFINED")
//----------------------------------------------------------------------
// ThemePreview Accounts Class
//----------------------------------------------------------------------
[
uuid(B7BBD408-F09C-4aa8-B65E-A00B8FE0F0B9), // CLSID_ThemePreview
helpstring("ThemePreview Class"),
]
coclass ThemePreview
{
[default] interface IThemePreview;
};
} // Themes Type Library
cpp_quote("#endif // _THEMEIDL_IDL_H_")