Leaked source code of windows server 2003
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.

263 lines
9.1 KiB

  1. //
  2. // APITHK.H
  3. //
  4. #ifndef _APITHK_H_
  5. #define _APITHK_H_
  6. #include "uxtheme.h"
  7. #ifdef __cplusplus
  8. extern "C" {
  9. #endif
  10. #define PrivateSPI_GETSELECTIONFADE 0x1014
  11. #define PrivateWS_EX_LAYERED 0x00080000
  12. #define PrivateWM_GETOBJECT 0x003D
  13. #define PrivateTPM_HORPOSANIMATION 0x0400L
  14. #define PrivateTPM_HORNEGANIMATION 0x0800L
  15. #define PrivateTPM_VERPOSANIMATION 0x1000L
  16. #define PrivateTPM_VERNEGANIMATION 0x2000L
  17. #define PrivateTPM_NOANIMATION 0x4000L
  18. #define PrivateWM_CHANGEUISTATE 0x0127
  19. #define PrivateWM_UPDATEUISTATE 0x0128
  20. #define PrivateWM_QUERYUISTATE 0x0129
  21. #define PrivateUIS_SET 1
  22. #define PrivateUIS_CLEAR 2
  23. #define PrivateUIS_INITIALIZE 3
  24. #define PrivateUISF_HIDEFOCUS 0x1
  25. #define PrivateUISF_HIDEACCEL 0x2
  26. #define PrivateSPI_GETKEYBOARDCUES 0x100A
  27. #define PrivateWS_EX_LAYERED 0x00080000
  28. #define PrivateSPI_GETCLEARTYPE 116
  29. #define PrivateLWA_COLORKEY 0x00000001
  30. #define PrivateLWA_ALPHA 0x00000002
  31. #define PrivateSPI_GETFLATMENU 0x1022
  32. #define PrivateSPI_SETFLATMENU 0x1023
  33. #define PrivateCOLOR_MENUHILIGHT 29
  34. #define PrivateCOLOR_MENUBAR 30
  35. #define PrivateCS_DROPSHADOW 0x00020000
  36. #define PrivateSPI_SETDROPSHADOW 0x1025
  37. #define PrivateTBSTYLE_EX_DOUBLEBUFFER 0x00000080
  38. #define PrivateRBN_AUTOBREAK (RBN_FIRST - 22)
  39. #define PrivateRBAB_AUTOSIZE 0x0001
  40. #define PrivateRBAB_ADDBAND 0x0002
  41. #define PrivateRBSTR_CHANGERECT 0x0001
  42. #define PrivateILC_PERITEMMIRROR 0x00008000
  43. #define KEYBOARDCUES
  44. #if (WINVER >= 0x0500)
  45. // for files in nt5api and w5api dirs, use the definition in sdk include.
  46. // And make sure our private define is in sync with winuser.h.
  47. #if SPI_GETSELECTIONFADE != PrivateSPI_GETSELECTIONFADE
  48. #error inconsistant SPI_GETSELECTIONFADE in winuser.h
  49. #endif
  50. #if WS_EX_LAYERED != PrivateWS_EX_LAYERED
  51. #error inconsistant WS_EX_LAYERED in winuser.h
  52. #endif
  53. #if WM_GETOBJECT != PrivateWM_GETOBJECT
  54. #error inconsistant WM_GETOBJECT in winuser.h
  55. #endif
  56. #if TPM_HORPOSANIMATION != PrivateTPM_HORPOSANIMATION
  57. #error inconsistant TPM_HORPOSANIMATION in winuser.h
  58. #endif
  59. #if TPM_HORNEGANIMATION != PrivateTPM_HORNEGANIMATION
  60. #error inconsistant TPM_HORNEGANIMATION in winuser.h
  61. #endif
  62. #if TPM_VERPOSANIMATION != PrivateTPM_VERPOSANIMATION
  63. #error inconsistant TPM_VERPOSANIMATION in winuser.h
  64. #endif
  65. #if TPM_VERNEGANIMATION != PrivateTPM_VERNEGANIMATION
  66. #error inconsistant WS_EX_LAYERED in winuser.h
  67. #endif
  68. #if TPM_NOANIMATION != PrivateTPM_NOANIMATION
  69. #error inconsistant TPM_NOANIMATION in winuser.h
  70. #endif
  71. // We are checking this in at the same time that user is. This is to prevent
  72. // sync problems.
  73. #ifdef SPI_GETCLEARTYPE
  74. #if SPI_GETCLEARTYPE != PrivateSPI_GETCLEARTYPE
  75. #error inconsistant SPI_GETCLEARTYPE in winuser.h
  76. #endif
  77. #else
  78. #define SPI_GETCLEARTYPE PrivateSPI_GETCLEARTYPE
  79. #endif
  80. #else
  81. #define WS_EX_LAYERED PrivateWS_EX_LAYERED
  82. #define SPI_GETSELECTIONFADE PrivateSPI_GETSELECTIONFADE
  83. #define WM_GETOBJECT PrivateWM_GETOBJECT
  84. #define TPM_HORPOSANIMATION PrivateTPM_HORPOSANIMATION
  85. #define TPM_HORNEGANIMATION PrivateTPM_HORNEGANIMATION
  86. #define TPM_VERPOSANIMATION PrivateTPM_VERPOSANIMATION
  87. #define TPM_VERNEGANIMATION PrivateTPM_VERNEGANIMATION
  88. #define TPM_NOANIMATION PrivateTPM_NOANIMATION
  89. #define SPI_GETCLEARTYPE PrivateSPI_GETCLEARTYPE
  90. #define LWA_COLORKEY PrivateLWA_COLORKEY
  91. #define LWA_ALPHA PrivateLWA_ALPHA
  92. #ifdef KEYBOARDCUES
  93. #define WM_CHANGEUISTATE PrivateWM_CHANGEUISTATE
  94. #define WM_UPDATEUISTATE PrivateWM_UPDATEUISTATE
  95. #define WM_QUERYUISTATE PrivateWM_QUERYUISTATE
  96. #define UIS_SET PrivateUIS_SET
  97. #define UIS_CLEAR PrivateUIS_CLEAR
  98. #define UIS_INITIALIZE PrivateUIS_INITIALIZE
  99. #define UISF_HIDEFOCUS PrivateUISF_HIDEFOCUS
  100. #define UISF_HIDEACCEL PrivateUISF_HIDEACCEL
  101. #define SPI_GETKEYBOARDCUES PrivateSPI_GETKEYBOARDCUES
  102. #endif //KEYBOARDCUES
  103. #define SPI_GETFLATMENU PrivateSPI_GETFLATMENU
  104. #define SPI_SETFLATMENU PrivateSPI_SETFLATMENU
  105. #define COLOR_MENUHILIGHT PrivateCOLOR_MENUHILIGHT
  106. #define COLOR_MENUBAR PrivateCOLOR_MENUBAR
  107. #define CS_DROPSHADOW PrivateCS_DROPSHADOW
  108. #define SPI_SETDROPSHADOW PrivateSPI_SETDROPSHADOW
  109. #define TBSTYLE_EX_DOUBLEBUFFER PrivateTBSTYLE_EX_DOUBLEBUFFER
  110. #define RBN_AUTOBREAK PrivateRBN_AUTOBREAK
  111. #define RBAB_AUTOSIZE PrivateRBAB_AUTOSIZE
  112. #define RBAB_ADDBAND PrivateRBAB_ADDBAND
  113. #define RBSTR_CHANGERECT PrivateRBSTR_CHANGERECT
  114. #if 0
  115. typedef struct _MARGINS
  116. {
  117. int cxLeftWidth; // width of left border that retains its size
  118. int cxRightWidth; // width of right border that retains its size
  119. int cyTopHeight; // height of top border that retains its size
  120. int cyBottomHeight; // height of bottom border that retains its size
  121. } MARGINS, *PMARGINS;
  122. typedef HANDLE HTHEME; // handle to a section of theme data for class
  123. STDAPI_(HTHEME) OpenThemeData(HWND hwnd, LPCWSTR pszClassList);
  124. STDAPI SetWindowTheme(HWND hwnd, LPCWSTR pszSubAppName,
  125. LPCWSTR pszSubIdList);
  126. STDAPI GetThemeTextExtent(HTHEME hTheme, HDC hdc,
  127. int iPartId, int iStateId, LPCWSTR pszText, int iCharCount,
  128. DWORD dwTextFlags, OPTIONAL const RECT *pBoundingRect,
  129. OUT RECT *pExtentRect);
  130. STDAPI DrawThemeBackground(HTHEME hTheme, HDC hdc,
  131. int iPartId, int iStateId, const RECT *pRect, OPTIONAL const RECT *pClipRect);
  132. STDAPI DrawThemeText(HTHEME hTheme, HDC hdc, int iPartId,
  133. int iStateId, LPCWSTR pszText, int iCharCount, DWORD dwTextFlags,
  134. DWORD dwTextFlags2, const RECT *pRect);
  135. STDAPI CloseThemeData(HTHEME hTheme);
  136. STDAPI_(BOOL) IsThemeActive();
  137. STDAPI GetThemeMargins(HTHEME hTheme, int iPartId,
  138. int iStateId, int iPropId, OUT MARGINS *pMargins);
  139. #endif
  140. #endif // WINVER >= 0x0500
  141. STDAPI_(HCURSOR) LoadHandCursor(DWORD dwRes);
  142. STDAPI_(LRESULT) ACCESSIBLE_LresultFromObject(
  143. IN REFIID riid,
  144. IN WPARAM wParam,
  145. OUT IUnknown* punk);
  146. STDAPI ACCESSIBLE_CreateStdAccessibleObject(
  147. IN HWND hwnd,
  148. IN LONG idObject,
  149. IN REFIID riid,
  150. OUT void** ppvObj);
  151. STDAPI_(void) NT5_NotifyWinEvent(
  152. IN DWORD event,
  153. IN HWND hwnd,
  154. IN LONG idObject,
  155. IN LONG idChild);
  156. #ifdef NotifyWinEvent
  157. #undef NotifyWinEvent
  158. #endif
  159. #ifdef LresultFromObject
  160. #undef LresultFromObject
  161. #endif
  162. #ifdef CreateStdAccessibleObject
  163. #undef CreateStdAccessibleObject
  164. #endif
  165. #ifdef SHPathPrepareForWrite
  166. #undef SHPathPrepareForWrite
  167. #endif
  168. #define AllowSetForegroundWindow NT5_AllowSetForegroundWindow
  169. STDAPI_(BOOL) NT5_AllowSetForegroundWindow( DWORD dwProcessId );
  170. STDAPI_(BOOL) NT5_SetLayeredWindowAttributes(HWND hwnd, COLORREF crKey, BYTE bAlpha, DWORD dwFlags);
  171. STDAPI_(HRESULT) NT5_SHPathPrepareForWrite(HWND hwnd, IUnknown *punkModless, LPCWSTR pwzPath, DWORD dwFlags);
  172. void Comctl32_SetWindowTheme(HWND hwnd, LPWSTR psz);
  173. void Comctl32_GetBandMargins(HWND hwnd, MARGINS* mBorders);
  174. void Comctl32_FixAutoBreak(LPNMHDR pnm);
  175. void Comctl32_SetDPIScale(HWND hwnd);
  176. #define SetLayeredWindowAttributes NT5_SetLayeredWindowAttributes
  177. #define NotifyWinEvent NT5_NotifyWinEvent
  178. #define LresultFromObject ACCESSIBLE_LresultFromObject
  179. #define CreateStdAccessibleObject ACCESSIBLE_CreateStdAccessibleObject
  180. #define SHPathPrepareForWrite NT5_SHPathPrepareForWrite
  181. STDAPI_(void) AnimateSetMenuPos(HWND hwnd, RECT* prc, UINT uFlags, UINT uSide, BOOL fNoAnimate);
  182. STDAPI_(void) MyLockSetForegroundWindow(BOOL fLock);
  183. STDAPI_(BOOL) BlendLayeredWindow(HWND hwnd, HDC hdcDest, POINT* ppt, SIZE* psize, HDC hdc, POINT* pptSrc, BYTE bBlendConst);
  184. STDAPI_(UINT) MyExtractIconsW(LPCWSTR wszFileName, int nIconIndex, int cxIcon, int cyIcon, HICON *phicon, UINT *piconid, UINT nIcons, UINT flags);
  185. // terminal server session notification:
  186. #include "wtsapi32.h"
  187. BOOL WINAPI DL_WTSRegisterSessionNotification(HWND hWnd, DWORD dwFlags);
  188. BOOL WINAPI DL_WTSUnRegisterSessionNotification(HWND hWnd);
  189. // current browseui build settings skip definition of this message in winuser.h, need to define "manually"
  190. #ifndef WM_WTSSESSION_CHANGE
  191. #define WM_WTSSESSION_CHANGE 0x02B1
  192. /*
  193. * codes passed in WPARAM for WM_WTSSESSION_CHANGE
  194. */
  195. #define WTS_CONSOLE_CONNECT 0x1
  196. #define WTS_CONSOLE_DISCONNECT 0x2
  197. #define WTS_REMOTE_CONNECT 0x3
  198. #define WTS_REMOTE_DISCONNECT 0x4
  199. #define WTS_SESSION_LOGON 0x5
  200. #define WTS_SESSION_LOGOFF 0x6
  201. #define WTS_SESSION_LOCK 0x7
  202. #define WTS_SESSION_UNLOCK 0x8
  203. #endif
  204. #define WTSRegisterSessionNotification DL_WTSRegisterSessionNotification
  205. #define WTSUnRegisterSessionNotification DL_WTSUnRegisterSessionNotification
  206. #ifdef __cplusplus
  207. }
  208. #endif
  209. #endif // _APITHK_H_