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.

285 lines
8.1 KiB

  1. ////////////////////////////////////////////////////////////////
  2. // Copyright (c) 1999-2001 Microsoft Corporation
  3. // All rights reserved.
  4. //
  5. //Module Name:
  6. //
  7. // oem.h
  8. //
  9. //Abstract:
  10. //
  11. // This file contains definitions and declarations of GPD resource ID.
  12. //
  13. //Environment:
  14. //
  15. // Windows NT 5.0
  16. //
  17. ///////////////////////////////////////////////////////////////
  18. #ifndef _INCLUDE_OEM_H_
  19. #define _INCLUDE_OEM_H_
  20. #ifndef WIN32
  21. #define WIN32
  22. #endif
  23. //#ifndef RIP_ENABLED
  24. //#define RIP_ENABLED
  25. //#endif
  26. //#ifndef FASTRASTER_ENABLED
  27. //#define FASTRASTER_ENABLED
  28. //#endif
  29. #include "comnfile.h"
  30. #ifdef __cplusplus
  31. extern "C" {
  32. #endif
  33. //
  34. //User Mode specific includes
  35. //
  36. #ifndef KERNEL_MODE
  37. #include <commctrl.h>
  38. #endif // !KERNEL_MODE
  39. #ifdef __cplusplus
  40. } // extern "C"
  41. #endif
  42. #include "oemdev.h"
  43. #ifndef KERNEL_MODE
  44. // start of ui additions
  45. #define FLAG_OPTITEM 0x80000000
  46. #define FLAG_PROPSHEET 0x40000000
  47. #define PT_LOAD 1
  48. #define PT_SELECT 2
  49. #define PT_SETDEVMODE 3
  50. #define GM_LOAD 21
  51. #define GM_SELECT 22
  52. #define GM_SETDEVMODE 23
  53. #define OEM_DOCPROP_PAGES 2 // Number of PropPages to add to the Document Defaults PropSheet.
  54. #define OEM_PRNPROP_PAGES 1 // Number of PropPages to add to the Printer Properties PropSheet.
  55. #define OPTITEM_COUNT 1 // Number of Items to add to the Tree View in the Device Settings
  56. // PropPage of the Pinter Properties PropSheet.
  57. #define MAX_STRING_LENGTH 64
  58. // Helper Macros------------------------------------------------------------------------------------------
  59. #define LOADSTR( id, strBuffer ) LoadString( pOemUIParam->hModule, id, strBuffer, sizeof(tmp))
  60. #define ADDSTR( id, strBuffer ) SendDlgItemMessage( hDlg, id, CB_ADDSTRING, (WPARAM)0, (LPARAM)strBuffer )
  61. #define SETITEM( id, item ) SendDlgItemMessage( hDlg, id , CB_SETITEMDATA, (WPARAM)cbIndex, (LPARAM)item )
  62. #define DUPLEXED( dmDuplex ) (dmDuplex == DMDUP_HORIZONTAL) || \
  63. (dmDuplex == DMDUP_VERTICAL)
  64. #define ISVALID_PAPERTYPE( type ) (type == TRANSPARENCY) || \
  65. (type == LABELS) || \
  66. (type == CARDSTOCK)
  67. // end Helper Macros--------------------------------------------------------------------------------------
  68. // Needs to be added to the string table
  69. #define HPCLJ4500_DEFAULTS L"HP Color LaserJet 4500 Document Defaults"
  70. typedef struct _TABEXTRADATA
  71. {
  72. OEMCOLOROPTIONS COptions;
  73. } TABEXTRADATA, *PTABEXTRADATA;
  74. //
  75. // MANUALINFO structure
  76. //
  77. // Used during the manipulation of the Manual Settings Dialog Box.
  78. //
  79. typedef struct _MANUALINFO
  80. {
  81. HANDLE hModule;
  82. PTABEXTRADATA pTabControl1;
  83. PTABEXTRADATA pTabControl2;
  84. PTABEXTRADATA pTabControl3;
  85. BOOL defaults;
  86. LPWSTR lpwstrHelpFile;
  87. HANDLE hPrinter;
  88. HANDLE hOEMHeap;
  89. } MANUALINFO, *PMANUALINFO;
  90. //
  91. // OEMSTATEINFO structure
  92. //
  93. // Each OEM added property page allocates memory for this structure.
  94. // Its purpose is to hold Private Devmode information temporarily until
  95. // the user clicks OK, APPLY or changes from one property sheet to another.
  96. // If any of these 3 events occur, the OEMSTATEINFO structure is written
  97. // to the Private Devmode. If in the event the user clicks the CANCEL
  98. // button, the OESTATEINFO is discarded.
  99. //
  100. typedef struct _OEMSTATEINFO
  101. {
  102. POEMDEVMODE pOEMPrivateDMState;
  103. POEMUIPSPARAM pOemUIParam;
  104. BOOL defaults;
  105. } OEMSTATEINFO, *POEMSTATEINFO;
  106. typedef struct _OEMPS_USERDATA {
  107. PFNCOMPROPSHEET pfnComPropSheet;
  108. HANDLE hComPropSheet;
  109. HANDLE hOemPage[2];
  110. DWORD dwMode;
  111. LPWSTR lpwstrHelpFile;
  112. } OEMPS_USERDATA, *POEMPS_USERDATA;
  113. #define IDD_OPTIONS_PROPERTYPAGE 101
  114. #define IDB_COLORSMART 102
  115. #define IDI_COLOR_SETUP 103
  116. #define IDD_COLORSETUP_PROPERTYPAGE 104
  117. #define IDS_UNSPECIFIED_TYPE 105
  118. #define IDS_PLAIN_TYPE 106
  119. #define IDS_PREPRINTED_TYPE 107
  120. #define IDS_LETTERHEAD_TYPE 108
  121. #define IDS_TRANSPARENCY_TYPE 109
  122. #define IDS_GLOSS_TYPE 110
  123. #define IDS_PREPUNCHED_TYPE 111
  124. #define IDS_LABELS_TYPE 112
  125. #define IDS_BOND_TYPE 113
  126. #define IDS_RECYCLED_TYPE 114
  127. #define IDS_COLOR_TYPE 115
  128. #define IDS_HEAVY_TYPE 116
  129. #define IDS_CARDSTOCK_TYPE 117
  130. #define IDS_COLORTREATMENT 118
  131. #define IDS_DOCPROP_OPTITEM 119
  132. #define IDS_PRNPROP_OPTITEM 120
  133. #define IDD_DEVICE_PROPPAGE 121
  134. #define IDS_HPGL2_MODE 122
  135. #define IDS_RASTER_MODE 123
  136. #define IDD_MANUAL_DIALOG 124
  137. #define IDS_TEXT 125
  138. #define IDS_GRAPHICS 126
  139. #define IDS_PHOTOS 127
  140. #define IDS_TRAY1 128
  141. #define IDS_TRAY2 129
  142. #define IDS_TRAY3 130
  143. #define IDS_INSTALLED 131
  144. #define IDS_NOTINSTALLED 132
  145. #define IDS_OPTIONAL_TRAY3 133
  146. #define IDS_OPTIONAL_DUPLEXER 134
  147. #define IDS_600DPI 135
  148. #define IDS_RET_DISPLAY 136
  149. #define IDS_RET_ON 137
  150. #define IDS_RET_OFF 138
  151. #define IDS_PRINTER_DEFAULT 139
  152. #define IDS_AUTO_SOURCE 140
  153. #define IDS_GMODE 141
  154. #define IDS_GFINISH 142
  155. #define IDS_PFONTS 143
  156. #define IDS_CSMART 144
  157. #define IDS_CTREATMENT 145
  158. #define IDS_MANUAL 146
  159. #define IDS_FRASTER 147
  160. #define IDS_FONTSMART 148
  161. #define IDS_FONTSMART_ERROR 149
  162. #define IDS_ERROR 150
  163. #define IDS_300DPI 151
  164. #define IDD_ABOUT_DIALOG 153
  165. #define IDB_HPLOGO 154
  166. #define IDS_NORMAL_QUALITY 155
  167. #define IDS_ECONOMODE_QAULITY 156
  168. #define IDS_PRESENTATION_QUALITY 157
  169. #define IDS_RIP_MODE 158
  170. #define IDS_OEMMETAFILE_SPOOLING 159
  171. #define IDS_ENABLE 160
  172. #define IDS_DISABLE 161
  173. #define IDS_FRONT_FEED 162
  174. #define IDS_REAR_FEED 163
  175. #define IDS_CUSTOM 164
  176. //
  177. // Help IDs
  178. //
  179. #define IDH_UNIDRV_COLOR_SETUP 12001
  180. #define IDC_GRAPHICS_COMBO 1006
  181. #define IDC_TRUETYPE_CHECK 1007
  182. #define IDC_METAFILE_CHECK 1008
  183. #define IDC_PRINTERFONT_CHECK 1009
  184. #define IDC_GLOSS_CHECK 1010
  185. #define IDC_FONTSMART_BUTTON 1011
  186. #define IDC_DEFAULTS_BUTTON 1012
  187. #define IDC_PAPERTYPE_COMBO 1013
  188. #define IDC_PAPERTYPE_STATIC 1014
  189. #define IDC_GRAPHICS_STATIC 1015
  190. #define IDC_CTREATMENT_GROUPBOX 1016
  191. #define IDC_COLORSMART_RADIO 1017
  192. #define IDC_COLORSMART_LOGO 1018
  193. #define IDC_MANUAL_RADIO 1019
  194. #define IDC_DEFAULTS2_BUTTON 1020
  195. #define IDC_OPTIONS_BUTTON2 1022
  196. #define IDC_DEVICE_TREEVIEW 1023
  197. #define IDC_DEVICE_GROUPBOX 1024
  198. #define IDC_TAB_CONTROL 1025
  199. #define IDC_CCONTROL_GROUPBOX 1026
  200. #define IDC_HALFTONE_GROUPBOX 1027
  201. #define IDC_VIVID_RADIO 1028
  202. #define IDC_SCRNMATCH_RADIO 1029
  203. #define IDC_DETAIL_RADIO 1030
  204. #define IDC_SMOOTH_RADIO 1031
  205. #define IDC_DEFAULTS3_BUTTON 1032
  206. #define IDC_CANCEL 1033
  207. #define IDC_FASTRASTER_CHECK 1034
  208. #define ID_CONTEXT_HELP 1035
  209. #define IDC_ABOUT_BUTTON 1036
  210. #define IDC_HPLOGO 1037
  211. #define IDC_HP_STATIC 1038
  212. #define IDC_COPYRIGHT_STATIC 1039
  213. #define IDC_VERSION_STATIC 1040
  214. #define IDC_PRODUCT_STATIC 1041
  215. #define IDC_COMPANY_STATIC 1042
  216. #define IDC_PRODUCTVERSION_STATIC 1043
  217. #define IDC_NOADJUST_RADIO 1044
  218. #define IDC_BASIC_RADIO 1045
  219. #define IDC_OS_VERSION_STATIC 1046
  220. #define IDC_OSVERSION_STATIC 1047
  221. #define REGVAL_OEM_OPTITEM TEXT("OEMTestOptItem")
  222. #define REGVAL_OEM_PROPSHEET TEXT("OEMTestPropSheet")
  223. // end of UI additions
  224. //
  225. // Tree view item level
  226. //
  227. #define TVITEM_LEVEL1 1
  228. #define TVITEM_LEVEL2 2
  229. //
  230. // UserData value
  231. //
  232. #define UNKNOWN_ITEM 0
  233. #define PS_INJECTION 1
  234. #endif // !KERNEL_MODE
  235. // Macros used by various modules
  236. #ifdef KERNEL_MODE
  237. #define VALID_PDEVOBJ(pdevobj) \
  238. ((pdevobj) && (pdevobj)->dwSize >= sizeof(DEVOBJ) && \
  239. (pdevobj)->hEngine && (pdevobj)->hPrinter && \
  240. (pdevobj)->pPublicDM && (pdevobj)->pDrvProcs )
  241. #define ASSERT_VALID_PDEVOBJ(pdevobj) ASSERT(VALID_PDEVOBJ(pdevobj))
  242. #endif // KERNEL_MODE
  243. #endif // _INCLUDE_OEM_H_