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.

322 lines
7.3 KiB

  1. // --------------------------------------------------------------------------
  2. // Module Name: LPCThemes.h
  3. //
  4. // Copyright (c) Microsoft Corporation. All rights reserved.
  5. //
  6. // This file contains structs for PORT_MESSAGE appends which are specific to
  7. // the theme services API.
  8. //
  9. // History: 2000-10-10 vtan created
  10. // 2000-11-11 vtan collapse to single instance
  11. // --------------------------------------------------------------------------
  12. #ifndef _LPCThemes_
  13. #define _LPCThemes_
  14. #include <LPCGeneric.h>
  15. static const WCHAR THEMES_PORT_NAME[] = L"\\ThemeApiPort";
  16. static const WCHAR THEMES_CONNECTION_REQUEST[] = L"ThemeApiConnectionRequest";
  17. static const WCHAR THEMES_START_EVENT_NAME[] = L"ThemesStartEvent";
  18. enum
  19. {
  20. API_THEMES_THEMEHOOKSON = 1,
  21. API_THEMES_THEMEHOOKSOFF,
  22. API_THEMES_GETSTATUSFLAGS,
  23. API_THEMES_GETCURRENTCHANGENUMBER,
  24. API_THEMES_GETNEWCHANGENUMBER,
  25. API_THEMES_SETGLOBALTHEME,
  26. API_THEMES_GETGLOBALTHEME,
  27. API_THEMES_CHECKTHEMESIGNATURE,
  28. API_THEMES_LOADTHEME,
  29. API_THEMES_MARKSECTION,
  30. API_THEMES_USERLOGON = 1001,
  31. API_THEMES_USERLOGOFF,
  32. API_THEMES_SESSIONCREATE,
  33. API_THEMES_SESSIONDESTROY,
  34. API_THEMES_PING
  35. };
  36. typedef struct
  37. {
  38. } API_THEMES_THEMEHOOKSON_IN;
  39. typedef struct
  40. {
  41. HRESULT hr;
  42. } API_THEMES_THEMEHOOKSON_OUT;
  43. typedef struct
  44. {
  45. } API_THEMES_THEMEHOOKSOFF_IN;
  46. typedef struct
  47. {
  48. HRESULT hr;
  49. } API_THEMES_THEMEHOOKSOFF_OUT;
  50. typedef struct
  51. {
  52. } API_THEMES_GETSTATUSFLAGS_IN;
  53. typedef struct
  54. {
  55. DWORD dwFlags;
  56. } API_THEMES_GETSTATUSFLAGS_OUT;
  57. typedef struct
  58. {
  59. } API_THEMES_GETCURRENTCHANGENUMBER_IN;
  60. typedef struct
  61. {
  62. int iChangeNumber;
  63. } API_THEMES_GETCURRENTCHANGENUMBER_OUT;
  64. typedef struct
  65. {
  66. } API_THEMES_GETNEWCHANGENUMBER_IN;
  67. typedef struct
  68. {
  69. int iChangeNumber;
  70. } API_THEMES_GETNEWCHANGENUMBER_OUT;
  71. typedef struct
  72. {
  73. HANDLE hSection;
  74. } API_THEMES_SETGLOBALTHEME_IN;
  75. typedef struct
  76. {
  77. HANDLE hSection;
  78. DWORD dwAdd;
  79. DWORD dwRemove;
  80. } API_THEMES_MARKSECTION_IN;
  81. typedef struct
  82. {
  83. } API_THEMES_MARKSECTION_OUT;
  84. typedef struct
  85. {
  86. HRESULT hr;
  87. } API_THEMES_SETGLOBALTHEME_OUT;
  88. typedef struct
  89. {
  90. } API_THEMES_GETGLOBALTHEME_IN;
  91. typedef struct
  92. {
  93. HRESULT hr;
  94. HANDLE hSection;
  95. } API_THEMES_GETGLOBALTHEME_OUT;
  96. typedef struct
  97. {
  98. const WCHAR *pszName;
  99. int cchName;
  100. } API_THEMES_CHECKTHEMESIGNATURE_IN;
  101. typedef struct
  102. {
  103. HRESULT hr;
  104. } API_THEMES_CHECKTHEMESIGNATURE_OUT;
  105. typedef struct
  106. {
  107. const WCHAR *pszName;
  108. int cchName;
  109. const WCHAR *pszColor;
  110. int cchColor;
  111. const WCHAR *pszSize;
  112. int cchSize;
  113. HANDLE hSection;
  114. } API_THEMES_LOADTHEME_IN;
  115. typedef struct
  116. {
  117. HRESULT hr;
  118. HANDLE hSection;
  119. } API_THEMES_LOADTHEME_OUT;
  120. typedef struct
  121. {
  122. } API_THEMES_GETLASTERRORCONTEXT_IN;
  123. typedef struct
  124. {
  125. } API_THEMES_GETLASTERRORCONTEXT_OUT;
  126. typedef struct
  127. {
  128. } API_THEMES_GETERRORCONTEXTSECTION_IN;
  129. typedef struct
  130. {
  131. HANDLE hSection;
  132. } API_THEMES_GETERRORCONTEXTSECTION_OUT;
  133. typedef struct
  134. {
  135. HANDLE hToken;
  136. } API_THEMES_USERLOGON_IN;
  137. typedef struct
  138. {
  139. } API_THEMES_USERLOGON_OUT;
  140. typedef struct
  141. {
  142. } API_THEMES_USERLOGOFF_IN;
  143. typedef struct
  144. {
  145. } API_THEMES_USERLOGOFF_OUT;
  146. typedef struct
  147. {
  148. void *pfnRegister;
  149. void *pfnUnregister;
  150. void *pfnClearStockObjects;
  151. DWORD dwStackSizeReserve;
  152. DWORD dwStackSizeCommit;
  153. } API_THEMES_SESSIONCREATE_IN;
  154. typedef struct
  155. {
  156. } API_THEMES_SESSIONCREATE_OUT;
  157. typedef struct
  158. {
  159. } API_THEMES_SESSIONDESTROY_IN;
  160. typedef struct
  161. {
  162. } API_THEMES_SESSIONDESTROY_OUT;
  163. typedef struct
  164. {
  165. } API_THEMES_PING_IN;
  166. typedef struct
  167. {
  168. } API_THEMES_PING_OUT;
  169. typedef union
  170. {
  171. union
  172. {
  173. API_THEMES_THEMEHOOKSON_IN in;
  174. API_THEMES_THEMEHOOKSON_OUT out;
  175. } apiThemeHooksOn;
  176. union
  177. {
  178. API_THEMES_THEMEHOOKSOFF_IN in;
  179. API_THEMES_THEMEHOOKSOFF_OUT out;
  180. } apiThemeHooksOff;
  181. union
  182. {
  183. API_THEMES_GETSTATUSFLAGS_IN in;
  184. API_THEMES_GETSTATUSFLAGS_OUT out;
  185. } apiGetStatusFlags;
  186. union
  187. {
  188. API_THEMES_GETCURRENTCHANGENUMBER_IN in;
  189. API_THEMES_GETCURRENTCHANGENUMBER_OUT out;
  190. } apiGetCurrentChangeNumber;
  191. union
  192. {
  193. API_THEMES_GETNEWCHANGENUMBER_IN in;
  194. API_THEMES_GETNEWCHANGENUMBER_OUT out;
  195. } apiGetNewChangeNumber;
  196. union
  197. {
  198. API_THEMES_SETGLOBALTHEME_IN in;
  199. API_THEMES_SETGLOBALTHEME_OUT out;
  200. } apiSetGlobalTheme;
  201. union
  202. {
  203. API_THEMES_MARKSECTION_IN in;
  204. API_THEMES_MARKSECTION_OUT out;
  205. } apiMarkSection;
  206. union
  207. {
  208. API_THEMES_GETGLOBALTHEME_IN in;
  209. API_THEMES_GETGLOBALTHEME_OUT out;
  210. } apiGetGlobalTheme;
  211. union
  212. {
  213. API_THEMES_CHECKTHEMESIGNATURE_IN in;
  214. API_THEMES_CHECKTHEMESIGNATURE_OUT out;
  215. } apiCheckThemeSignature;
  216. union
  217. {
  218. API_THEMES_LOADTHEME_IN in;
  219. API_THEMES_LOADTHEME_OUT out;
  220. } apiLoadTheme;
  221. union
  222. {
  223. API_THEMES_USERLOGON_IN in;
  224. API_THEMES_USERLOGON_OUT out;
  225. } apiUserLogon;
  226. union
  227. {
  228. API_THEMES_USERLOGOFF_IN in;
  229. API_THEMES_USERLOGOFF_OUT out;
  230. } apiUserLogoff;
  231. union
  232. {
  233. API_THEMES_SESSIONCREATE_IN in;
  234. API_THEMES_SESSIONCREATE_OUT out;
  235. } apiSessionCreate;
  236. union
  237. {
  238. API_THEMES_SESSIONDESTROY_IN in;
  239. API_THEMES_SESSIONDESTROY_OUT out;
  240. } apiSessionDestroy;
  241. union
  242. {
  243. API_THEMES_PING_IN in;
  244. API_THEMES_PING_OUT out;
  245. } apiPing;
  246. } API_THEMES_SPECIFIC;
  247. typedef struct
  248. {
  249. API_GENERIC apiGeneric;
  250. API_THEMES_SPECIFIC apiSpecific;
  251. } API_THEMES, *PAPI_THEMES;
  252. typedef struct
  253. {
  254. PORT_MESSAGE portMessage;
  255. API_THEMES apiThemes;
  256. } THEMESAPI_PORT_MESSAGE, *PTHEMESAPI_PORT_MESSAGE;
  257. EXTERN_C DWORD WINAPI ThemeWaitForServiceReady (DWORD dwTimeout);
  258. EXTERN_C BOOL WINAPI ThemeWatchForStart (void);
  259. EXTERN_C BOOL WINAPI ThemeUserLogon (HANDLE hToken);
  260. EXTERN_C BOOL WINAPI ThemeUserLogoff (void);
  261. EXTERN_C BOOL WINAPI ThemeUserTSReconnect (void);
  262. EXTERN_C BOOL WINAPI ThemeUserStartShell (void);
  263. typedef DWORD (WINAPI * PFNTHEMEWAITFORSERVICEREADY) (DWORD dwTimeout);
  264. typedef BOOL (WINAPI * PFNTHEMEWATCHFORSTART) (void);
  265. typedef HANDLE (WINAPI * PFNTHEMEUSERLOGON) (HANDLE hToken);
  266. typedef HANDLE (WINAPI * PFNTHEMEUSERLOGOFF) (void);
  267. typedef HANDLE (WINAPI * PFNTHEMEUSERTSRECONNECT) (void);
  268. typedef HANDLE (WINAPI * PFNTHEMEUSERSTARTSHELL) (void);
  269. #define ORDINAL_THEMEWAITFORSERVICEREADY 1
  270. #define ORDINAL_THEMEWATCHFORSTART 2
  271. #define ORDINAL_THEMEUSERLOGON 3
  272. #define ORDINAL_THEMEUSERLOGFF 4
  273. #define ORDINAL_THEMEUSERTSRECONNECT 5
  274. #define ORDINAL_THEMEUSERSTARTSHELL 6
  275. #endif /* _LPCThemes_ */