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.

208 lines
7.3 KiB

  1. #if !defined(INC__DUserUtil_h__INCLUDED)
  2. #define INC__DUserUtil_h__INCLUDED
  3. #ifdef __cplusplus
  4. extern "C" {
  5. #endif
  6. #ifdef DUSER_EXPORTS
  7. #define DUSER_API
  8. #else
  9. #define DUSER_API __declspec(dllimport)
  10. #endif
  11. DUSER_API BOOL WINAPI UtilSetBackground(HGADGET hgadChange, HBRUSH hbrBack);
  12. /*
  13. * Utility Functions
  14. */
  15. #define FS_NORMAL 0x00000000
  16. #define FS_BOLD 0x00000001
  17. #define FS_ITALIC 0x00000002
  18. #define FS_UNDERLINE 0x00000004
  19. #define FS_STRIKEOUT 0x00000008
  20. #define FS_COMPATIBLE 0x00000010 // Use non-Gadget mechanism for computing size
  21. DUSER_API HFONT WINAPI UtilBuildFont(LPCWSTR pszName, int idxDeciSize, DWORD nFlags, HDC hdcDevice DEFARG(NULL));
  22. DUSER_API BOOL WINAPI UtilDrawBlendRect(HDC hdcDest, const RECT * prcDest, HBRUSH hbrFill, BYTE bAlpha, int wBrush, int hBrush);
  23. DUSER_API BOOL WINAPI UtilDrawOutlineRect(HDC hdc, const RECT * prcPxl, HPEN hpenDraw, int nThickness DEFARG(1));
  24. DUSER_API COLORREF WINAPI UtilGetColor(HBITMAP hbmp, POINT * pptPxl DEFARG(NULL));
  25. /***************************************************************************\
  26. *
  27. * Color management
  28. *
  29. \***************************************************************************/
  30. #define SC_AliceBlue (0)
  31. #define SC_AntiqueWhite (1)
  32. #define SC_Aqua (2)
  33. #define SC_Aquamarine (3)
  34. #define SC_Azure (4)
  35. #define SC_Beige (5)
  36. #define SC_Bisque (6)
  37. #define SC_Black (7)
  38. #define SC_BlanchedAlmond (8)
  39. #define SC_Blue (9)
  40. #define SC_BlueViolet (10)
  41. #define SC_Brown (11)
  42. #define SC_BurlyWood (12)
  43. #define SC_CadetBlue (13)
  44. #define SC_Chartreuse (14)
  45. #define SC_Chocolate (15)
  46. #define SC_Coral (16)
  47. #define SC_CornflowerBlue (17)
  48. #define SC_Cornsilk (18)
  49. #define SC_Crimson (19)
  50. #define SC_Cyan (20)
  51. #define SC_DarkBlue (21)
  52. #define SC_DarkCyan (22)
  53. #define SC_DarkGoldenrod (23)
  54. #define SC_DarkGray (24)
  55. #define SC_DarkGreen (25)
  56. #define SC_DarkKhaki (26)
  57. #define SC_DarkMagenta (27)
  58. #define SC_DarkOliveGreen (28)
  59. #define SC_DarkOrange (29)
  60. #define SC_DarkOrchid (30)
  61. #define SC_DarkRed (31)
  62. #define SC_DarkSalmon (32)
  63. #define SC_DarkSeaGreen (33)
  64. #define SC_DarkSlateBlue (34)
  65. #define SC_DarkSlateGray (35)
  66. #define SC_DarkTurquoise (36)
  67. #define SC_DarkViolet (37)
  68. #define SC_DeepPink (38)
  69. #define SC_DeepSkyBlue (39)
  70. #define SC_DimGray (40)
  71. #define SC_DodgerBlue (41)
  72. #define SC_FireBrick (42)
  73. #define SC_FloralWhite (43)
  74. #define SC_ForestGreen (44)
  75. #define SC_Fuchsia (45)
  76. #define SC_Gainsboro (46)
  77. #define SC_GhostWhite (47)
  78. #define SC_Gold (48)
  79. #define SC_Goldenrod (49)
  80. #define SC_Gray (50)
  81. #define SC_Green (51)
  82. #define SC_GreenYellow (52)
  83. #define SC_Honeydew (53)
  84. #define SC_HotPink (54)
  85. #define SC_IndianRed (55)
  86. #define SC_Indigo (56)
  87. #define SC_Ivory (57)
  88. #define SC_Khaki (58)
  89. #define SC_Lavender (59)
  90. #define SC_LavenderBlush (60)
  91. #define SC_LawnGreen (61)
  92. #define SC_LemonChiffon (62)
  93. #define SC_LightBlue (63)
  94. #define SC_LightCoral (64)
  95. #define SC_LightCyan (65)
  96. #define SC_LightGoldenrodYellow (66)
  97. #define SC_LightGreen (67)
  98. #define SC_LightGrey (68)
  99. #define SC_LightPink (69)
  100. #define SC_LightSalmon (70)
  101. #define SC_LightSeaGreen (71)
  102. #define SC_LightSkyBlue (72)
  103. #define SC_LightSlateGray (73)
  104. #define SC_LightSteelBlue (74)
  105. #define SC_LightYellow (75)
  106. #define SC_Lime (76)
  107. #define SC_LimeGreen (77)
  108. #define SC_Linen (78)
  109. #define SC_Magenta (79)
  110. #define SC_Maroon (80)
  111. #define SC_MediumAquamarine (81)
  112. #define SC_MediumBlue (82)
  113. #define SC_MediumOrchid (83)
  114. #define SC_MediumPurple (84)
  115. #define SC_MediumSeaGreen (85)
  116. #define SC_MediumSlateBlue (86)
  117. #define SC_MediumSpringGreen (87)
  118. #define SC_MediumTurquoise (88)
  119. #define SC_MediumVioletRed (89)
  120. #define SC_MidnightBlue (90)
  121. #define SC_MintCream (91)
  122. #define SC_MistyRose (92)
  123. #define SC_Moccasin (93)
  124. #define SC_NavajoWhite (94)
  125. #define SC_Navy (95)
  126. #define SC_OldLace (96)
  127. #define SC_Olive (97)
  128. #define SC_OliveDrab (98)
  129. #define SC_Orange (99)
  130. #define SC_OrangeRed (100)
  131. #define SC_Orchid (101)
  132. #define SC_PaleGoldenrod (102)
  133. #define SC_PaleGreen (103)
  134. #define SC_PaleTurquoise (104)
  135. #define SC_PaleVioletRed (105)
  136. #define SC_PapayaWhip (106)
  137. #define SC_PeachPuff (107)
  138. #define SC_Peru (108)
  139. #define SC_Pink (109)
  140. #define SC_Plum (110)
  141. #define SC_PowderBlue (111)
  142. #define SC_Purple (112)
  143. #define SC_Red (113)
  144. #define SC_RosyBrown (114)
  145. #define SC_RoyalBlue (115)
  146. #define SC_SaddleBrown (116)
  147. #define SC_Salmon (117)
  148. #define SC_SandyBrown (118)
  149. #define SC_SeaGreen (119)
  150. #define SC_Seashell (120)
  151. #define SC_Sienna (121)
  152. #define SC_Silver (122)
  153. #define SC_SkyBlue (123)
  154. #define SC_SlateBlue (124)
  155. #define SC_SlateGray (125)
  156. #define SC_Snow (126)
  157. #define SC_SpringGreen (127)
  158. #define SC_SteelBlue (128)
  159. #define SC_Tan (129)
  160. #define SC_Teal (130)
  161. #define SC_Thistle (131)
  162. #define SC_Tomato (132)
  163. #define SC_Turquoise (133)
  164. #define SC_Violet (134)
  165. #define SC_Wheat (135)
  166. #define SC_White (136)
  167. #define SC_WhiteSmoke (137)
  168. #define SC_Yellow (138)
  169. #define SC_YellowGreen (139)
  170. #define SC_MAXCOLORS (139)
  171. DUSER_API COLORREF WINAPI GetStdColorI(UINT c);
  172. DUSER_API HBRUSH WINAPI GetStdColorBrushI(UINT c);
  173. DUSER_API HPEN WINAPI GetStdColorPenI(UINT c);
  174. #ifdef GADGET_ENABLE_GDIPLUS
  175. #ifdef __cplusplus
  176. }; // extern "C"
  177. DUSER_API Gdiplus::Color
  178. WINAPI GetStdColorF(UINT c);
  179. DUSER_API Gdiplus::Brush *
  180. WINAPI GetStdColorBrushF(UINT c);
  181. DUSER_API Gdiplus::Pen *
  182. WINAPI GetStdColorPenF(UINT c);
  183. extern "C" {
  184. #endif
  185. #endif // GADGET_ENABLE_GDIPLUS
  186. DUSER_API LPCWSTR WINAPI GetStdColorName(UINT c);
  187. DUSER_API UINT WINAPI FindStdColor(LPCWSTR pszName);
  188. DUSER_API HPALETTE WINAPI GetStdPalette();
  189. #ifdef __cplusplus
  190. }; // extern "C"
  191. #endif
  192. #endif // INC__DUserUtil_h__INCLUDED