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.

133 lines
3.7 KiB

  1. // THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
  2. // ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
  3. // THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
  4. // PARTICULAR PURPOSE.
  5. //
  6. // Copyright 1997-2003 Microsoft Corporation. All Rights Reserved.
  7. //
  8. // FILE: TTYUI.H
  9. //
  10. //
  11. // PURPOSE: Define common data types, and external function prototypes
  12. // for TTYUI user mode Module.
  13. //
  14. // PLATFORMS:
  15. // Windows 2000, Windows XP, Windows Server 2003
  16. //
  17. //
  18. #ifndef _TTYUI_H
  19. #define _TTYUI_H
  20. ////////////////////////////////////////////////////////
  21. // TTY UI Defines
  22. ////////////////////////////////////////////////////////
  23. // fMode values.
  24. #define OEMDM_SIZE 1
  25. #define OEMDM_DEFAULT 2
  26. #define OEMDM_CONVERT 3
  27. #define OEMDM_VALIDATE 4
  28. // tty Signature and version.
  29. #define OEM_SIGNATURE 'TTY0'
  30. #define TESTSTRING "This is the TTY driver"
  31. #define PROP_TITLE L"TTY UI Page"
  32. #define DLLTEXT(s) __TEXT("TTYUI: ") __TEXT(s)
  33. #define OEM_VERSION 0x92823141L
  34. // OEM UI Misc defines.
  35. #define OEM_ITEMS 5
  36. #define ERRORTEXT(s) __TEXT("ERROR ") DLLTEXT(s)
  37. #define PATH_SEPARATOR '\\'
  38. #define MAX_INT_FIELD_WIDTH 4
  39. #define MAX_CMD_LEN 100
  40. #define RADIX 10
  41. #define TTYSTRUCT_VER 8
  42. #define FIRSTSTRINGID IDS_STRING1
  43. #define LASTSTRINGID IDS_STRING14
  44. #define TTY_CB_BEGINJOB 1
  45. #define TTY_CB_ENDJOB 2
  46. #define TTY_CB_PAPERSELECT 3
  47. #define TTY_CB_FEEDSELECT 4
  48. #define TTY_CB_BOLD_ON 7
  49. #define TTY_CB_BOLD_OFF 8
  50. #define TTY_CB_UNDERLINE_ON 9
  51. #define TTY_CB_UNDERLINE_OFF 10
  52. ////////////////////////////////////////////////////////
  53. // tty UI Type Defines
  54. ////////////////////////////////////////////////////////
  55. typedef struct tag_DMEXTRAHDR {
  56. DWORD dwSize;
  57. DWORD dwSignature;
  58. DWORD dwVersion;
  59. } DMEXTRAHDR, *PDMEXTRAHDR;
  60. typedef struct tag_OEMUI_EXTRADATA {
  61. DMEXTRAHDR dmExtraHdr;
  62. BYTE cbTestString[sizeof(TESTSTRING)];
  63. } OEMUI_EXTRADATA, *POEMUI_EXTRADATA;
  64. typedef struct
  65. {
  66. BYTE strCmd[MAX_CMD_LEN] ;
  67. DWORD dwLen ;
  68. } CMDSTR, *PCMDSTR ;
  69. // this structure used as static storage inside dialog proc.
  70. // update #define TTYSTRUCT_VER 8 defined above.
  71. // when changing this struct.
  72. typedef struct
  73. {
  74. DWORD dwVersion ; // holds version of REGSTRUCT.
  75. INT iCodePage ; // negative for built in GTT, the CP value otherwise
  76. BOOL bIsMM ; // set true if units are tenths of mm, else 1/100 of inch.
  77. RECT rcMargin ; // user defined unprintable margins in above units.
  78. CMDSTR BeginJob, EndJob, PaperSelect, FeedSelect,
  79. Sel_10_cpi, Sel_12_cpi, Sel_17_cpi,
  80. Bold_ON, Bold_OFF, Underline_ON, Underline_OFF;
  81. DWORD dwGlyphBufSiz, // size of aubGlyphBuf
  82. dwSpoolBufSiz; // size of aubSpoolBuf
  83. PBYTE aubGlyphBuf, aubSpoolBuf ; // used by OutputCharStr method
  84. } REGSTRUCT, *PREGSTRUCT ;
  85. typedef struct
  86. {
  87. // per invocation globals
  88. HANDLE hPrinter ; // so we can access registry within DialogProc.
  89. HANDLE hOEMHeap ;
  90. PWSTR pwHelpFile ; // fully qualified path to helpfile.
  91. DWORD dwUseCount ; // usage count
  92. REGSTRUCT regStruct ; // stuff that goes into registry
  93. } GLOBALSTRUCT , *PGLOBALSTRUCT ;
  94. ////////////////////////////////////////////////////////
  95. // TTY UI Prototypes
  96. ////////////////////////////////////////////////////////
  97. #endif