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.

168 lines
5.4 KiB

  1. /*++ BUILD Version: 0001 // Increment this if a change has global effects
  2. /****************************** Module Header ******************************\
  3. * Module Name: userrtl.h
  4. *
  5. * Copyright (c) 1985 - 1999, Microsoft Corporation
  6. *
  7. * Typedefs, defines, and prototypes that are used by the User
  8. * RTL library.
  9. *
  10. * History:
  11. * 04-27-91 DarrinM Created from PROTO.H, MACRO.H and STRTABLE.H
  12. \***************************************************************************/
  13. #ifndef _USERRTL_
  14. #define _USERRTL_
  15. /*
  16. * Typedefs copied from winbase.h to avoid using nturtl.h
  17. */
  18. typedef struct _SECURITY_ATTRIBUTES *LPSECURITY_ATTRIBUTES;
  19. #define MAKEINTATOM(i) (LPTSTR)((ULONG_PTR)((WORD)(i)))
  20. #ifdef _USERK_
  21. #undef _USERK_
  22. #include "..\kernel\precomp.h"
  23. #define _USERK_
  24. #else
  25. #include "..\client\precomp.h"
  26. #endif
  27. #include <w32p.h>
  28. #include "ntuser.h"
  29. /*
  30. * REBASE macros take kernel desktop addresses and convert them into
  31. * user addresses.
  32. *
  33. * REBASEALWAYS converts a kernel address contained in an object
  34. * REBASEPWND casts REBASEALWAYS to a PWND
  35. * REBASE only converts if the address is in kernel space. Also works for NULL
  36. * REBASEPTR converts a random kernel address
  37. */
  38. #ifdef _USERK_
  39. #define REBASEALWAYS(p, elem) ((p)->elem)
  40. #define REBASEPTR(obj, p) (p)
  41. #define REBASE(p, elem) ((p)->elem)
  42. #define REBASEPWND(p, elem) ((p)->elem)
  43. #endif // _USERK_
  44. // jcjc extern SHAREDINFO gSharedInfo;
  45. // jcjc extern HFONT ghFontSys;
  46. PVOID UserRtlAllocMem(
  47. ULONG uBytes);
  48. VOID UserRtlFreeMem(
  49. PVOID pMem);
  50. #ifdef FE_SB // Prototype for FarEast Line break & NLS conversion.
  51. #ifdef _USERK_
  52. #define USERGETCODEPAGE(hdc) (GreGetCharSet(hdc) & 0x0000FFFF)
  53. #else
  54. #define USERGETCODEPAGE(hdc) (GdiGetCodePage(hdc))
  55. #endif // _USERK_
  56. BOOL UserIsFullWidth(
  57. DWORD dwCodePage,
  58. WCHAR wChar);
  59. BOOL UserIsFELineBreak(
  60. DWORD dwCodePage,
  61. WCHAR wChar);
  62. #endif // FE_SB
  63. /***************************************************************************\
  64. *
  65. * Function prototypes for client/server-specific routines
  66. * called from rtl routines.
  67. *
  68. \***************************************************************************/
  69. #ifdef _USERK_
  70. BOOL _TextOutW(
  71. HDC hdc,
  72. int x,
  73. int y,
  74. LPCWSTR lp,
  75. UINT cc);
  76. UINT APIENTRY GreSetTextAlign(HDC, UINT);
  77. UINT APIENTRY GreGetTextAlign(HDC);
  78. #define UserCreateFontIndirectW GreCreateFontIndirectW
  79. #define UserCreateRectRgn GreCreateRectRgn
  80. #define UserDeleteObject GreDeleteObject
  81. #define UserExtSelectClipRgn GreExtSelectClipRgn
  82. #define UserExtTextOutW GreExtTextOutW
  83. #define UserGetCharDimensionsW GetCharDimensions
  84. #define UserGetClipRgn(hdc, hrgnClip) \
  85. GreGetRandomRgn(hdc, hrgnClip, 1)
  86. #define UserGetHFONT GreGetHFONT
  87. #define UserGetMapMode GreGetMapMode
  88. #define UserGetTextColor GreGetTextColor
  89. #define UserGetTextExtentPointW(hdc, pstr, i, psize) \
  90. GreGetTextExtentW(hdc, (LPWSTR)pstr, i, psize, GGTE_WIN3_EXTENT)
  91. #define UserGetTextMetricsW _GetTextMetricsW
  92. #define UserGetViewportExtEx GreGetViewportExt
  93. #define UserGetWindowExtEx GreGetWindowExt
  94. #define UserIntersectClipRect GreIntersectClipRect
  95. #define UserPatBlt GrePatBlt
  96. #define UserPolyPatBlt GrePolyPatBlt
  97. #define UserSelectBrush GreSelectBrush
  98. #define UserSelectFont GreSelectFont
  99. #define UserSetBkColor GreSetBkColor
  100. #define UserSetBkMode GreSetBkMode
  101. #define UserSetTextColor GreSetTextColor
  102. #define UserTextOutW _TextOutW
  103. #define UserGetTextCharsetInfo GreGetTextCharsetInfo
  104. #define UserGetTextAlign GreGetTextAlign
  105. #define UserSetTextAlign GreSetTextAlign
  106. #define UserLpkDrawTextEx xxxClientLpkDrawTextEx
  107. #define UserGetLayout GreGetLayout
  108. #define UserSetGraphicsMode GreSetGraphicsMode
  109. #else
  110. #define UserCreateFontIndirectW CreateFontIndirectW
  111. #define UserCreateRectRgn CreateRectRgn
  112. #define UserDeleteObject DeleteObject
  113. #define UserExtSelectClipRgn ExtSelectClipRgn
  114. #define UserExtTextOutW ExtTextOutW
  115. #define UserGetCharDimensionsW GdiGetCharDimensions
  116. #define UserGetClipRgn GetClipRgn
  117. #define UserGetHFONT GetHFONT
  118. #define UserGetMapMode GetMapMode
  119. #define UserGetTextColor GetTextColor
  120. #define UserGetTextExtentPointW GetTextExtentPointW
  121. #define UserGetTextMetricsW GetTextMetricsW
  122. #define UserGetViewportExtEx GetViewportExtEx
  123. #define UserGetWindowExtEx GetWindowExtEx
  124. #define UserIntersectClipRect IntersectClipRect
  125. #define UserPatBlt PatBlt
  126. #define UserPolyPatBlt PolyPatBlt
  127. #define UserSelectBrush SelectObject
  128. #define UserSelectFont SelectObject
  129. #define UserSetBkColor SetBkColor
  130. #define UserSetBkMode SetBkMode
  131. #define UserSetTextColor SetTextColor
  132. #define UserTextOutW TextOutW
  133. #define UserGetTextCharsetInfo GetTextCharsetInfo
  134. #define UserGetTextAlign GetTextAlign
  135. #define UserSetTextAlign SetTextAlign
  136. #define UserLpkDrawTextEx fpLpkDrawTextEx
  137. #define UserGetLayout GetLayout
  138. #define UserSetGraphicsMode SetGraphicsMode
  139. #endif // _USERK_
  140. #endif // !_USERRTL_