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.

110 lines
2.2 KiB

  1. /// lpk_usrc.c - 'c' language interface to USER
  2. //
  3. //
  4. // Copyright(c) 1997 - 1999. Microsoft Corporation.
  5. //
  6. //
  7. /*
  8. * Core NT headers
  9. */
  10. #include <nt.h>
  11. #include <ntrtl.h>
  12. #include <nturtl.h>
  13. #include <ntcsrdll.h>
  14. #include <ntcsrsrv.h>
  15. #define NONTOSPINTERLOCK
  16. #include <ntosp.h>
  17. /*
  18. * Standard C runtime headers
  19. */
  20. #include <limits.h>
  21. #include <memory.h>
  22. #include <stddef.h>
  23. #include <stdio.h>
  24. #include <stdlib.h>
  25. /*
  26. * NtUser Client specific headers
  27. */
  28. #include "usercli.h"
  29. #include <ntsdexts.h>
  30. #include <windowsx.h>
  31. #include <newres.h>
  32. #include <asdf.h>
  33. /*
  34. * Complex script language pack
  35. */
  36. #include "lpk.h"
  37. #ifdef LPKBREAKAWORD
  38. // Remove this after checking in the change in user.h (wchao :- 5-27-99)
  39. #ifndef DT_BREAKAWORD
  40. #define DT_BREAKAWORD 5
  41. #endif
  42. #endif
  43. int WINAPI LpkDrawTextEx(
  44. HDC hdc,
  45. int xLeft,
  46. int yTop,
  47. PCWSTR pcwString,
  48. int cchCount,
  49. BOOL fDraw,
  50. DWORD dwFormat,
  51. LPDRAWTEXTDATA pDrawInfo,
  52. UINT uAction,
  53. int iCharSet) {
  54. switch (uAction) {
  55. case DT_GETNEXTWORD:
  56. return LpkGetNextWord(hdc, pcwString, cchCount, iCharSet);
  57. #ifdef LPKBREAKAWORD
  58. case DT_BREAKAWORD:
  59. return LpkBreakAWord(hdc, pcwString, cchCount, pDrawInfo->cxMaxWidth);
  60. #endif
  61. case DT_CHARSETDRAW:
  62. default: // Default equivalent to DT_CHARSETDRAW to duplicate NT4 behaviour
  63. return LpkCharsetDraw(
  64. hdc,
  65. xLeft,
  66. pDrawInfo->cxOverhang,
  67. pDrawInfo->rcFormat.left, // Tab origin
  68. pDrawInfo->cxTabLength,
  69. yTop,
  70. pcwString,
  71. cchCount,
  72. fDraw,
  73. dwFormat,
  74. iCharSet);
  75. }
  76. }
  77. void LpkPSMTextOut(
  78. HDC hdc,
  79. int xLeft,
  80. int yTop,
  81. const WCHAR *pwcInChars,
  82. int nCount,
  83. DWORD dwFlags)
  84. {
  85. LpkInternalPSMTextOut(hdc, xLeft, yTop, pwcInChars, nCount, dwFlags);
  86. UNREFERENCED_PARAMETER(dwFlags);
  87. }