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

  1. /**************************************************************************\
  2. FILE: Theme.idl
  3. DATE: BryanSt (3/31/2000)
  4. DESCRIPTION:
  5. Theme API (Object Model).
  6. Copyright (c) Microsoft Corporation. All rights reserved.
  7. \**************************************************************************/
  8. cpp_quote("#ifndef _THEMEIDL_IDL_H_")
  9. cpp_quote("#define _THEMEIDL_IDL_H_")
  10. midl_pragma warning( disable: 2400 )
  11. //--------------------------------------------------------------------------
  12. //
  13. //--------------------------------------------------------------------------
  14. import "oaidl.idl";
  15. import "ocidl.idl";
  16. import "objidl.idl";
  17. import "dimm.idl"; // They go thru all the pain of definiting LOGFONTW in an IDL acceptable way. (wingdi.h won't work here)
  18. #include <olectl.h>
  19. //--------------------------------------------------------------------------
  20. // Includes
  21. //--------------------------------------------------------------------------
  22. #include "ThemeID.h"
  23. //--------------------------------------------------------------------------
  24. // Dependencies
  25. //--------------------------------------------------------------------------
  26. //--------------------------------------------------------------------------
  27. // Interfaces
  28. //--------------------------------------------------------------------------
  29. //--------------------------------------------------------------------------
  30. // Script Interfaces
  31. //--------------------------------------------------------------------------
  32. //--------------------------------------------------------------------------
  33. // Themes Type Library
  34. //--------------------------------------------------------------------------
  35. [
  36. uuid(40643250-8D23-47fb-895C-EAF48E2C8892), // LIBID_Theme
  37. helpstring("Microsoft Theme API Type Library"),
  38. lcid(0x0000),
  39. version(1.0)
  40. ]
  41. library Theme
  42. {
  43. //----------------------------------------------------------------------
  44. // Standard Type Library Stuff
  45. //----------------------------------------------------------------------
  46. importlib("stdole2.tlb");
  47. interface ITheme;
  48. interface IThemeScheme;
  49. interface IThemeStyle;
  50. interface IThemeSize;
  51. cpp_quote("#ifndef __LPTHEMEMANAGER_DEFINED")
  52. cpp_quote("#define __LPTHEMEMANAGER_DEFINED")
  53. cpp_quote("//===================================================================")
  54. cpp_quote("//DESCRIPTION:")
  55. cpp_quote("// This object will allow users to view what 'Visual Style' or")
  56. cpp_quote("//'Color Scheme' or 'Appearance Scheme' is set. This will appear")
  57. cpp_quote("//in the Display Control Panel under the Theme or Appearance tab.")
  58. cpp_quote("//")
  59. cpp_quote("//DEFINITIONS:")
  60. cpp_quote("// Theme: This is a .theme plus! pack file. The display control")
  61. cpp_quote("// panel can change these on the Themes tab.")
  62. cpp_quote("// Scheme: This is a visual style (.mstheme file) or it can indicate")
  63. cpp_quote("// that no visual style is selected.")
  64. cpp_quote("// Style: If Scheme is a .mstheme file, then this is the color section in that file.")
  65. cpp_quote("// Otherwise, this is the 'Appearance Scheme' which was available")
  66. cpp_quote("// in previous versions of Windows.")
  67. cpp_quote("// Size: This is the size of the Style, normally 'Normal', 'Large', or 'Extra Large'.")
  68. cpp_quote("//")
  69. cpp_quote("//METHODS:")
  70. cpp_quote("// get_SelectedTheme: This method will return the currently selected .theme file.")
  71. cpp_quote("// put_SelectedTheme: This method will set the currently selected .theme file.")
  72. cpp_quote("// The change will not take effect until ApplyNow() is called.")
  73. cpp_quote("// get_SelectedScheme: This method will return the currently selected .mstheme file.")
  74. cpp_quote("// put_SelectedScheme: This method will set the currently selected .mstheme file.")
  75. cpp_quote("// The change will not take effect until ApplyNow() is called.")
  76. cpp_quote("// get_length: Returns the number of installed .theme files.")
  77. cpp_quote("// get_item: Returns an installed Theme object. The lookup can happen by index")
  78. cpp_quote("// or filename.")
  79. cpp_quote("// get_schemeLength: Returns the number of installed .mstheme files.")
  80. cpp_quote("// get_schemeItem: Returns an installed .mstheme object. The lookup can happen by index")
  81. cpp_quote("// or filename. The zero (0) index or empty VT_BSTR value points to the")
  82. cpp_quote("// 'No .mstheme' object which matches the 'Windows Classic' look with no .mstheme.")
  83. cpp_quote("// ApplyNow: Apply the changes made to put_SelectedTheme() or put_SelectedScheme().")
  84. cpp_quote("// This includes persisting the change and broadcasting the change to running applications.")
  85. cpp_quote("//===================================================================")
  86. [
  87. object,
  88. oleautomation,
  89. dual,
  90. nonextensible,
  91. helpstring("Theme Manager Interface"),
  92. uuid(04D5D56C-EEAF-4419-B786-300284D6BB5F), // IID_IThemeManager
  93. ]
  94. interface IThemeManager : IDispatch
  95. {
  96. //------------------------------------------------------------------
  97. // Pointer to an interface of this type
  98. //------------------------------------------------------------------
  99. typedef [unique] IThemeManager *LPTHEMEMANAGER; // For C callers
  100. cpp_quote("// These are the names of the Special Themes for GetSpecialTheme()/SetSpecialTheme()")
  101. cpp_quote("#define SZ_STDEFAULTTHEME L\"DefaultTheme\" // This is what the installer determines is most appropriate for the user.")
  102. cpp_quote("// These are the names of the Special Scheme for GetSpecialScheme()/SetSpecialScheme()")
  103. cpp_quote("#define SZ_SSDEFAULVISUALSTYLEON L\"DefaultVisualStyleOn\" // This is what the installer determines is most appropriate for the user with visual styles on.")
  104. cpp_quote("#define SZ_SSDEFAULVISUALSTYLEOFF L\"DefaultVisualStyleOff\" // This is what the installer determines is most appropriate for the user with visual styles off.")
  105. cpp_quote("// These are the names of the properties for GetSelectedSchemeProperty()")
  106. cpp_quote("#define SZ_CSP_PATH L\"Path\" // This is the directory containing the currently selected .mstheme file.")
  107. cpp_quote("#define SZ_CSP_FILE L\"File\" // This is the path including the filename to the currently selected .mstheme file.")
  108. cpp_quote("#define SZ_CSP_DISPLAYNAME L\"DisplayName\" // This is the display name of the currently selected scheme.")
  109. cpp_quote("#define SZ_CSP_CANONICALNAME L\"Name\" // This is the canonical name of the currently selected scheme.")
  110. cpp_quote("#define SZ_CSP_COLOR L\"Color\" // This is the color name of the currently selected scheme.")
  111. cpp_quote("#define SZ_CSP_SIZE L\"Size\" // This is the canonical size name of the currently selected scheme.")
  112. //------------------------------------------------------------------
  113. // Properties
  114. //------------------------------------------------------------------
  115. [id(DISPIDTHTM_LENGTH), propget, SZ_HELPTHTM_GETLENGTH, displaybind, bindable] HRESULT length([retval, out] long * pnLength);
  116. [id(DISPIDTHTM_ITEM), propget, SZ_HELPTHTM_GETITEM, displaybind, bindable] HRESULT item([in] VARIANT varIndex, [retval, out] ITheme ** ppTheme);
  117. [id(DISPIDTHTM_SCHEMELENGTH), propget, SZ_HELPTHTM_GETSCHEMELENGTH, displaybind, bindable] HRESULT schemeLength([retval, out] long * pnLength);
  118. [id(DISPIDTHTM_SCHEMEITEM), propget, SZ_HELPTHTM_GETSCHEMEITEM, displaybind, bindable] HRESULT schemeItem([in] VARIANT varIndex, [retval, out] IThemeScheme ** ppThemeScheme);
  119. [id(DISPIDTHTM_WEBVIEWCSS), propget, SZ_HELPTHTM_WEBVIEWCSS, displaybind, bindable] HRESULT WebviewCSS([retval, out] BSTR * pbstrPath);
  120. [id(DISPIDTHTM_CURRENTTHEME), propget, SZ_HELPTHTM_GETCURRENTTHEME, displaybind, bindable] HRESULT SelectedTheme([retval, out] ITheme ** ppTheme);
  121. [id(DISPIDTHTM_CURRENTTHEME), propput, SZ_HELPTHTM_PUTCURRENTTHEME, displaybind, bindable] HRESULT SelectedTheme([in] ITheme * pTheme);
  122. [id(DISPIDTHTM_SELECTEDSCHEME), propget, SZ_HELPTHTM_GETSELECTEDSCHEME, displaybind, bindable] HRESULT SelectedScheme([retval, out] IThemeScheme ** ppThemeScheme);
  123. [id(DISPIDTHTM_SELECTEDSCHEME), propput, SZ_HELPTHTM_PUTSELECTEDSCHEME, displaybind, bindable] HRESULT SelectedScheme([in] IThemeScheme * pThemeScheme);
  124. //------------------------------------------------------------------
  125. // Methods
  126. //------------------------------------------------------------------
  127. [id(DISPIDTHTM_GETSPECIALTHEME), SZ_HELPTHTM_GETSPECIALTHEME, displaybind] HRESULT GetSpecialTheme([in] BSTR bstrName, [retval, out] ITheme ** ppTheme);
  128. [id(DISPIDTHTM_SETSPECIALTHEME), SZ_HELPTHTM_SETSPECIALTHEME, displaybind] HRESULT SetSpecialTheme([in] BSTR bstrName, [in] ITheme * pTheme);
  129. [id(DISPIDTHTM_GETSPECIALSCHEME), SZ_HELPTHTM_GETSPECIALSCHEME, displaybind] HRESULT GetSpecialScheme([in] BSTR bstrName, [out] IThemeScheme ** ppThemeScheme, [out] IThemeStyle ** ppThemeStyle, [retval, out] IThemeSize ** ppThemeSize);
  130. [id(DISPIDTHTM_SETSPECIALSCHEME), SZ_HELPTHTM_SETSPECIALSCHEME, displaybind] HRESULT SetSpecialScheme([in] BSTR bstrName, [in] IThemeScheme * pThemeScheme, [in] IThemeStyle * pThemeStyle, [in] IThemeSize * pThemeSize);
  131. [id(DISPIDTHTM_GETSELSCHPROPERTY), SZ_HELPTHTM_GETSELSCHPROPERTY, displaybind] HRESULT GetSelectedSchemeProperty([in] BSTR bstrName, [retval, out] BSTR * pbstrValue);
  132. [id(DISPIDTHTM_APPLYNOW), SZ_HELPTHTM_APPLYNOW, displaybind] HRESULT ApplyNow(void);
  133. }
  134. cpp_quote("#endif // __LPTHEMEMANAGER_DEFINED")
  135. //----------------------------------------------------------------------
  136. // AutoDiscover Accounts Class
  137. //----------------------------------------------------------------------
  138. [
  139. uuid(2E17C0EF-2851-459b-A3C8-27A41D4BC9F7), // CLSID_ThemeManager
  140. helpstring("Theme Manager Class"),
  141. ]
  142. coclass ThemeManager
  143. {
  144. [default] interface IThemeManager;
  145. };
  146. cpp_quote("#ifndef __LPTHEME_DEFINED")
  147. cpp_quote("#define __LPTHEME_DEFINED")
  148. cpp_quote("//===================================================================")
  149. cpp_quote("//DESCRIPTION:")
  150. cpp_quote("//GetIcon: The first parameter will specify the icon to fetch. The format")
  151. cpp_quote("// will be: <RegKey>:<IconType> An example for the recycle bin is:")
  152. cpp_quote("// CLSID\{645FF040-5081-101B-9F08-00AA002F954E}\DefaultIcon::empty")
  153. cpp_quote("// The value returned with be the path to the icon file, a comma, and")
  154. cpp_quote("// the icon resource index. For example: C:\windows\file.dll,12")
  155. cpp_quote("//")
  156. cpp_quote("//METHODS:")
  157. cpp_quote("//DisplayName: The display name maybe point to a resource in order to be MUI")
  158. cpp_quote("// compatible. For example, '@themeui.dll,-172'.")
  159. cpp_quote("//Background: This is the path to the background wallpaper.")
  160. cpp_quote("//BackgroundTile: This will indicate if the wallpaper should be tiled, stretched, or centered.")
  161. cpp_quote("//ScreenSaver: The path to the screen saver.")
  162. cpp_quote("//VisualStyle: The path to the .mstheme visual style file.")
  163. cpp_quote("//VisualStyleColor: The color to choose in the .mstheme file.")
  164. cpp_quote("//VisualStyleSize: The size to choose in the .mstheme file.")
  165. cpp_quote("//get_GetPath: The path to the theme (.theme file).")
  166. cpp_quote("//SetIcon: The path and resource index of the icon. The")
  167. cpp_quote("// following example will be for the Recycle Bin in the empty state:")
  168. cpp_quote("// bstrIconName = CLSID\\{645FF040-5081-101B-9F08-00AA002F954E}\\DefaultIcon:empty")
  169. cpp_quote("// bstrIconPath = C:\winnt\SYSTEM32\shell32.dll,31")
  170. cpp_quote("//")
  171. cpp_quote("//===================================================================")
  172. [
  173. object,
  174. oleautomation,
  175. dual,
  176. nonextensible,
  177. helpstring("Theme Interface"),
  178. uuid(A41C22EB-0F93-40ae-B7CE-37A4C4C81B01), // IID_ITheme
  179. ]
  180. interface ITheme : IDispatch
  181. {
  182. //------------------------------------------------------------------
  183. // Pointer to an interface of this type
  184. //------------------------------------------------------------------
  185. typedef [unique] ITheme *LPTHEME; // For C callers
  186. cpp_quote("// ITheme::get_BackgroundTile() Tiles")
  187. typedef enum
  188. {
  189. BKDGT_CENTER = 0, // Center the image on the screen
  190. BKDGT_TILE, // Tile the image on the screen
  191. BKDGT_STRECH // Stretch the image to fit on the screen
  192. } enumBkgdTile;
  193. //------------------------------------------------------------------
  194. // Properties
  195. //------------------------------------------------------------------
  196. // General Properties
  197. [id(DISPIDTHTH_DISPLAYNAME), propget, SZ_HELPTHTH_GETDISPLAYNAME, displaybind, bindable] HRESULT DisplayName([retval, out] BSTR * pbstrDisplayName); // Appears in "Look & Feel"
  198. [id(DISPIDTHTH_DISPLAYNAME), propput, SZ_HELPTHTH_PUTDISPLAYNAME, displaybind, bindable] HRESULT DisplayName([in] BSTR bstrDisplayName);
  199. // Plus! Uber Theme Properties
  200. [id(DISPIDTHTH_BKGD), propget, SZ_HELPTHTH_GETBKGD, displaybind, bindable] HRESULT Background([retval, out] BSTR * pbstrPath);
  201. [id(DISPIDTHTH_BKGD), propput, SZ_HELPTHTH_PUTBKGD, displaybind, bindable] HRESULT Background([in] BSTR bstrPath);
  202. [id(DISPIDTHTH_BKGDTILE), propget, SZ_HELPTHTH_GETBKGDTILE, displaybind, bindable] HRESULT BackgroundTile([retval, out] enumBkgdTile * pnTile);
  203. [id(DISPIDTHTH_BKGDTILE), propput, SZ_HELPTHTH_PUTBKGDTILE, displaybind, bindable] HRESULT BackgroundTile([in] enumBkgdTile nTile);
  204. [id(DISPIDTHTH_SCRNSAVER), propget, SZ_HELPTHTH_GETSCRNSAVER, displaybind, bindable] HRESULT ScreenSaver([retval, out] BSTR * pbstrPath);
  205. [id(DISPIDTHTH_SCRNSAVER), propput, SZ_HELPTHTH_PUTSCRNSAVER, displaybind, bindable] HRESULT ScreenSaver([in] BSTR bstrPath);
  206. [id(DISPIDTHTH_VS), propget, SZ_HELPTHTH_GETVS, displaybind, bindable] HRESULT VisualStyle([retval, out] BSTR * pbstrPath);
  207. [id(DISPIDTHTH_VS), propput, SZ_HELPTHTH_PUTVS, displaybind, bindable] HRESULT VisualStyle([in] BSTR bstrPath);
  208. [id(DISPIDTHTH_VSCOLOR), propget, SZ_HELPTHTH_GETVSCOLOR, displaybind, bindable] HRESULT VisualStyleColor([retval, out] BSTR * pbstrPath);
  209. [id(DISPIDTHTH_VSCOLOR), propput, SZ_HELPTHTH_PUTVSCOLOR, displaybind, bindable] HRESULT VisualStyleColor([in] BSTR bstrPath);
  210. [id(DISPIDTHTH_VSSIZE), propget, SZ_HELPTHTH_GETVSSIZE, displaybind, bindable] HRESULT VisualStyleSize([retval, out] BSTR * pbstrPath);
  211. [id(DISPIDTHTH_VSSIZE), propput, SZ_HELPTHTH_PUTVSSIZE, displaybind, bindable] HRESULT VisualStyleSize([in] BSTR bstrPath);
  212. //------------------------------------------------------------------
  213. // Methods
  214. //------------------------------------------------------------------
  215. [id(DISPIDTHTH_GETPATH), SZ_HELPTHTH_GETPATH, displaybind] HRESULT GetPath([in] VARIANT_BOOL fExpand, [retval, out] BSTR * pbstrPath);
  216. [id(DISPIDTHTH_SETPATH), SZ_HELPTHTH_PUTPATH, displaybind] HRESULT SetPath([in] BSTR bstrPath);
  217. [id(DISPIDTHTH_GETCURSOR), SZ_HELPTHTH_GETCURSOR, displaybind] HRESULT GetCursor([in] BSTR bstrCursor, [retval, out] BSTR * pbstrPath);
  218. [id(DISPIDTHTH_SETCURSOR), SZ_HELPTHTH_PUTCURSOR, displaybind] HRESULT SetCursor([in] BSTR bstrCursor, [in] BSTR bstrPath);
  219. [id(DISPIDTHTH_GETSOUND), SZ_HELPTHTH_GETSOUND, displaybind] HRESULT GetSound([in] BSTR bstrSoundName, [retval, out] BSTR * pbstrPath);
  220. [id(DISPIDTHTH_SETSOUND), SZ_HELPTHTH_PUTSOUND, displaybind] HRESULT SetSound([in] BSTR bstrSoundName, [in] BSTR bstrPath);
  221. [id(DISPIDTHTH_GETICON), SZ_HELPTHTH_GETICON, displaybind] HRESULT GetIcon([in] BSTR bstrIconName, [retval, out] BSTR * pbstrIconPath);
  222. [id(DISPIDTHTH_SETICON), SZ_HELPTHTH_PUTICON, displaybind] HRESULT SetIcon([in] BSTR bstrIconName, [in] BSTR bstrIconPath);
  223. }
  224. cpp_quote("#endif // __LPTHEME_DEFINED")
  225. //----------------------------------------------------------------------
  226. // Theme Class
  227. //----------------------------------------------------------------------
  228. [
  229. uuid(F60691B4-3BD8-4f42-B2FD-20853C433A74), // CLSID_Theme
  230. helpstring("Theme Class"),
  231. ]
  232. coclass Theme
  233. {
  234. [default] interface ITheme;
  235. };
  236. cpp_quote("#ifndef __LPTHEMESCHEME_DEFINED")
  237. cpp_quote("#define __LPTHEMESCHEME_DEFINED")
  238. cpp_quote("//===================================================================")
  239. cpp_quote("//DESCRIPTION:")
  240. cpp_quote("//===================================================================")
  241. [
  242. object,
  243. oleautomation,
  244. dual,
  245. nonextensible,
  246. helpstring("Theme Scheme Interface"),
  247. uuid(AA49D906-65B2-42d6-A26A-2EE03C83F839), // IID_IThemeScheme
  248. ]
  249. interface IThemeScheme : IDispatch
  250. {
  251. //------------------------------------------------------------------
  252. // Pointer to an interface of this type
  253. //------------------------------------------------------------------
  254. typedef [unique] IThemeScheme *LPTHEMESCHEME; // For C callers
  255. //------------------------------------------------------------------
  256. // Properties
  257. //------------------------------------------------------------------
  258. // General Properties
  259. [id(DISPIDTHTS_SCHDISPNAME), propget, SZ_HELPTHTS_GETSCHDISPNAME, displaybind, bindable] HRESULT DisplayName([retval, out] BSTR * pbstrDisplayName);
  260. [id(DISPIDTHTS_SCHDISPNAME), propput, SZ_HELPTHTS_PUTSCHDISPNAME, displaybind, bindable] HRESULT DisplayName([in] BSTR bstrDisplayName);
  261. [id(DISPIDTHTS_SCHEMEPATH), propget, SZ_HELPTHTS_GETSCHEMEPATH, displaybind, bindable] HRESULT Path([retval, out] BSTR * pbstrPath);
  262. [id(DISPIDTHTS_SCHEMEPATH), propput, SZ_HELPTHTS_PUTSCHEMEPATH, displaybind, bindable] HRESULT Path([in] BSTR bstrPath);
  263. // Style Collection
  264. [id(DISPIDTHTS_LENGTH), propget, SZ_HELPTHTS_GETLENGTH, displaybind, bindable] HRESULT length([retval, out] long * pnLength);
  265. [id(DISPIDTHTS_ITEM), propget, SZ_HELPTHTS_GETITEM, displaybind, bindable] HRESULT item([in] VARIANT varIndex, [retval, out] IThemeStyle ** ppThemeStyle);
  266. [id(DISPIDTHTS_SELECTEDSTYLE), propget, SZ_HELPTHTS_GETSELECTEDSTYLE, displaybind, bindable] HRESULT SelectedStyle([retval, out] IThemeStyle ** ppThemeStyle);
  267. [id(DISPIDTHTS_SELECTEDSTYLE), propput, SZ_HELPTHTS_PUTSELECTEDSTYLE, displaybind, bindable] HRESULT SelectedStyle([in] IThemeStyle * pThemeStyle);
  268. //------------------------------------------------------------------
  269. // Methods
  270. //------------------------------------------------------------------
  271. [id(DISPIDTHTS_ADDSTYLE), SZ_HELPTHTS_ADDSTYLE, displaybind] HRESULT AddStyle([retval, out] IThemeStyle ** ppThemeStyle);
  272. }
  273. cpp_quote("#endif // __LPTHEMESCHEME_DEFINED")
  274. //----------------------------------------------------------------------
  275. // ThemeScheme Accounts Class
  276. //----------------------------------------------------------------------
  277. [
  278. uuid(1C995F92-244F-48ac-9784-4AF9586EBBBA), // CLSID_ThemeScheme
  279. helpstring("ThemeScheme Class"),
  280. ]
  281. coclass ThemeScheme
  282. {
  283. [default] interface IThemeScheme;
  284. };
  285. cpp_quote("#ifndef __LPTHEMESTYLE_DEFINED")
  286. cpp_quote("#define __LPTHEMESTYLE_DEFINED")
  287. cpp_quote("//===================================================================")
  288. cpp_quote("//DESCRIPTION:")
  289. cpp_quote("//===================================================================")
  290. [
  291. object,
  292. oleautomation,
  293. dual,
  294. nonextensible,
  295. helpstring("Theme Style Interface"),
  296. uuid(3672E804-D69D-43d8-AF58-F320B8D9AF32), // IID_IThemeStyle
  297. ]
  298. interface IThemeStyle : IDispatch
  299. {
  300. //------------------------------------------------------------------
  301. // Pointer to an interface of this type
  302. //------------------------------------------------------------------
  303. typedef [unique] IThemeStyle *LPTHEMESTYLE; // For C callers
  304. //------------------------------------------------------------------
  305. // Properties
  306. //------------------------------------------------------------------
  307. // General Properties
  308. [id(DISPIDTHSY_DISPNAME), propget, SZ_HELPTHSY_GETDISPNAME, displaybind, bindable] HRESULT DisplayName([retval, out] BSTR * pbstrDisplayName);
  309. [id(DISPIDTHSY_DISPNAME), propput, SZ_HELPTHSY_PUTDISPNAME, displaybind, bindable] HRESULT DisplayName([in] BSTR bstrDisplayName);
  310. [id(DISPIDTHSY_NAME), propget, SZ_HELPTHSY_GETNAME, displaybind, bindable] HRESULT Name([retval, out] BSTR * pbstrName);
  311. [id(DISPIDTHSY_NAME), propput, SZ_HELPTHSY_PUTNAME, displaybind, bindable] HRESULT Name([in] BSTR bstrName);
  312. [id(DISPIDTHSY_LENGTH), propget, SZ_HELPTHSY_GETLENGTH, displaybind, bindable] HRESULT length([retval, out] long * pnLength);
  313. [id(DISPIDTHSY_ITEM), propget, SZ_HELPTHSY_GETITEM, displaybind, bindable] HRESULT item([in] VARIANT varIndex, [retval, out] IThemeSize ** ppThemeSize);
  314. [id(DISPIDTHSY_SELECTEDSIZE), propget, SZ_HELPTHSY_GETSELECTEDSIZE, displaybind, bindable] HRESULT SelectedSize([retval, out] IThemeSize ** ppThemeSize);
  315. [id(DISPIDTHSY_SELECTEDSIZE), propput, SZ_HELPTHSY_PUTSELECTEDSIZE, displaybind, bindable] HRESULT SelectedSize([in] IThemeSize * pThemeSize);
  316. //------------------------------------------------------------------
  317. // Methods
  318. //------------------------------------------------------------------
  319. [id(DISPIDTHSY_ADDSIZE), SZ_HELPTHSY_ADDSIZE, displaybind] HRESULT AddSize([retval, out] IThemeSize ** ppThemeSize);
  320. }
  321. cpp_quote("#endif // __LPTHEMESTYLE_DEFINED")
  322. //----------------------------------------------------------------------
  323. // ThemeStyle Accounts Class
  324. //----------------------------------------------------------------------
  325. [
  326. uuid(AFCEFAC8-8097-4ee5-82DF-121202D95342), // CLSID_ThemeStyle
  327. helpstring("ThemeStyle Class"),
  328. ]
  329. coclass ThemeStyle
  330. {
  331. [default] interface IThemeStyle;
  332. };
  333. cpp_quote("#ifndef __LPTHEMESIZES_DEFINED")
  334. cpp_quote("#define __LPTHEMESIZES_DEFINED")
  335. cpp_quote("//===================================================================")
  336. cpp_quote("//DESCRIPTION:")
  337. cpp_quote("//===================================================================")
  338. [
  339. object,
  340. oleautomation,
  341. dual,
  342. nonextensible,
  343. helpstring("Theme Size Interface"),
  344. uuid(72DD2E7F-21E5-46dc-8847-CDDCF58B6725), // IID_IThemeSize
  345. ]
  346. interface IThemeSize : IDispatch
  347. {
  348. //------------------------------------------------------------------
  349. // Pointer to an interface of this type
  350. //------------------------------------------------------------------
  351. typedef [unique] IThemeSize *LPTHEMESIZES; // For C callers
  352. cpp_quote("// IThemeSize::SystemMetricFont() Fonts")
  353. typedef enum
  354. {
  355. SMF_CAPTIONFONT = 0, // NONCLIENTMETRICSW.lfCaptionFont
  356. SMF_SMCAPTIONFONT, // NONCLIENTMETRICSW.lfSmCaptionFont
  357. SMF_MENUFONT, // NONCLIENTMETRICSW.lfMenuFont
  358. SMF_ICONTITLEFONT, // For SPI_GETICONTITLELOGFONT
  359. SMF_STATUSFONT, // NONCLIENTMETRICSW.lfStatusFont
  360. SMF_MESSAGEFONT, // NONCLIENTMETRICSW.lfMessageFont
  361. } enumSystemMetricFont;
  362. cpp_quote("// IThemeSize::SystemMetricSize() Sizes")
  363. typedef enum
  364. {
  365. SMS_BORDERWIDTH = 0, // NONCLIENTMETRICSW.iBorderWidth
  366. SMS_SCROLLWIDTH, // NONCLIENTMETRICSW.iScrollWidth
  367. SMS_SCROLLHEIGHT, // NONCLIENTMETRICSW.iScrollHeight
  368. SMS_CAPTIONWIDTH, // NONCLIENTMETRICSW.iCaptionWidth
  369. SMS_CAPTIONHEIGHT, // NONCLIENTMETRICSW.iCaptionHeight
  370. SMS_SMCAPTIONWIDTH, // NONCLIENTMETRICSW.iSmCaptionWidth
  371. SMS_SMCAPTIONHEIGHT, // NONCLIENTMETRICSW.iSmCaptionHeight
  372. SMS_MENUWIDTH, // NONCLIENTMETRICSW.iMenuWidth
  373. SMS_MENUHEIGHT // NONCLIENTMETRICSW.iMenuHeight
  374. } enumSystemMetricSize;
  375. cpp_quote("// IThemeSize::get_/put_ContrastLevel() Contrast Levels")
  376. typedef enum
  377. {
  378. // Media types
  379. CONTRAST_NORMAL = 0x00000000, // Normal Contrast.
  380. CONTRAST_HIGHBLACK = 0x00000001, // High Contrast. Use black or dark colors for backgrounds.
  381. CONTRAST_HIGHWHITE = 0x00000002, // High Contrast. Use white or light colors for backgrounds.
  382. } enumThemeContrastLevels;
  383. //------------------------------------------------------------------
  384. // Properties
  385. //------------------------------------------------------------------
  386. // General Properties
  387. [id(DISPIDTHSZ_DISPNAME), propget, SZ_HELPTHSZ_GETDISPNAME, displaybind, bindable] HRESULT DisplayName([retval, out] BSTR * pbstrDisplayName);
  388. [id(DISPIDTHSZ_DISPNAME), propput, SZ_HELPTHSZ_PUTDISPNAME, displaybind, bindable] HRESULT DisplayName([in] BSTR bstrDisplayName);
  389. [id(DISPIDTHSZ_NAME), propget, SZ_HELPTHSZ_GETNAME, displaybind, bindable] HRESULT Name([retval, out] BSTR * pbstrName);
  390. [id(DISPIDTHSZ_NAME), propput, SZ_HELPTHSZ_PUTNAME, displaybind, bindable] HRESULT Name([in] BSTR bstrName);
  391. [id(DISPIDTHSZ_SYSMETCOLOR), propget, SZ_HELPTHSZ_GETSYSMETCOLOR, displaybind, bindable] HRESULT SystemMetricColor([in] int nSysColorIndex, [retval, out] COLORREF * pColorRef);
  392. [id(DISPIDTHSZ_SYSMETCOLOR), propput, SZ_HELPTHSZ_PUTSYSMETCOLOR, displaybind, bindable] HRESULT SystemMetricColor([in] int nSysColorIndex, [in] COLORREF ColorRef);
  393. [id(DISPIDTHSZ_SYSMETSIZE), propget, SZ_HELPTHSZ_GETSYSMETSIZE, displaybind, bindable] HRESULT SystemMetricSize([in] enumSystemMetricSize nSystemMetricIndex, [retval, out] int * pnSize);
  394. [id(DISPIDTHSZ_SYSMETSIZE), propput, SZ_HELPTHSZ_PUTSYSMETSIZE, displaybind, bindable] HRESULT SystemMetricSize([in] enumSystemMetricSize nSystemMetricIndex, [in] int nSize);
  395. [id(DISPIDTHSZ_WEBVIEWCSS), propget, SZ_HELPTHSZ_WEBVIEWCSS, displaybind, bindable] HRESULT WebviewCSS([retval, out] BSTR * pbstrPath);
  396. [id(DISPIDTHSZ_CONTRASTLVL), propget, SZ_HELPTHSZ_GETCONTRASTLVL, displaybind, bindable] HRESULT ContrastLevel([retval, out] enumThemeContrastLevels * pContrastLevel);
  397. [id(DISPIDTHSZ_CONTRASTLVL), propput, SZ_HELPTHSZ_PUTCONTRASTLVL, displaybind, bindable] HRESULT ContrastLevel([in] enumThemeContrastLevels ContrastLevel);
  398. //------------------------------------------------------------------
  399. // Methods
  400. //------------------------------------------------------------------
  401. [id(DISPIDTHSZ_GETSYSMETFONT), SZ_HELPTHSZ_GETSYSMETFONT, displaybind] HRESULT GetSystemMetricFont([in] enumSystemMetricFont nFontIndex, [in] LOGFONTW * pLogFontW);
  402. [id(DISPIDTHSZ_PUTSYSMETFONT), SZ_HELPTHSZ_PUTSYSMETFONT, displaybind] HRESULT PutSystemMetricFont([in] enumSystemMetricFont nFontIndex, [in] LOGFONTW * pLogFontW);
  403. }
  404. cpp_quote("#endif // __LPTHEMESIZES_DEFINED")
  405. //----------------------------------------------------------------------
  406. // ThemeSize Accounts Class
  407. //----------------------------------------------------------------------
  408. [
  409. uuid(05AF76AC-4245-468f-AE35-6D233436937A), // CLSID_ThemeSize
  410. helpstring("ThemeSize Class"),
  411. ]
  412. coclass ThemeSize
  413. {
  414. [default] interface IThemeSize;
  415. };
  416. cpp_quote("#ifndef __LPTHEMEPREVIEW_DEFINED")
  417. cpp_quote("#define __LPTHEMEPREVIEW_DEFINED")
  418. cpp_quote("//===================================================================")
  419. cpp_quote("//DESCRIPTION:")
  420. cpp_quote("//===================================================================")
  421. [
  422. object,
  423. oleautomation,
  424. dual,
  425. nonextensible,
  426. helpstring("Theme Preview Interface"),
  427. uuid(b63705f2-b2a2-401e-a20d-643e6b554a1d), // IID_IThemePreview
  428. ]
  429. interface IThemePreview : IUnknown
  430. {
  431. //------------------------------------------------------------------
  432. // Pointer to an interface of this type
  433. //------------------------------------------------------------------
  434. typedef [unique] IThemePreview *LPTHEMEPREVIEW; // For C callers
  435. cpp_quote("// IThemePreview::CreatePreview() dwFlags")
  436. typedef enum
  437. {
  438. // Media types
  439. TMPREV_NONE = 0x00000000,
  440. TMPREV_SHOWMONITOR = 0x00000001,
  441. TMPREV_SHOWBKGND = 0x00000002,
  442. TMPREV_SHOWVS = 0x00000004,
  443. TMPREV_SHOWICONS = 0x00000008
  444. } enumThemePreviewFlags;
  445. //------------------------------------------------------------------
  446. // Properties
  447. //------------------------------------------------------------------
  448. // General Properties
  449. //------------------------------------------------------------------
  450. // Methods
  451. //------------------------------------------------------------------
  452. [id(DISPIDTHPV_UPDATE), SZ_HELPTHPV_UPDATE, displaybind] HRESULT UpdatePreview([in] IPropertyBag * pPropertyBag);
  453. [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);
  454. }
  455. cpp_quote("#endif // __LPTHEMEPREVIEW_DEFINED")
  456. //----------------------------------------------------------------------
  457. // ThemePreview Accounts Class
  458. //----------------------------------------------------------------------
  459. [
  460. uuid(B7BBD408-F09C-4aa8-B65E-A00B8FE0F0B9), // CLSID_ThemePreview
  461. helpstring("ThemePreview Class"),
  462. ]
  463. coclass ThemePreview
  464. {
  465. [default] interface IThemePreview;
  466. };
  467. } // Themes Type Library
  468. cpp_quote("#endif // _THEMEIDL_IDL_H_")