Source code of Windows XP (NT5)
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.

281 lines
8.5 KiB

  1. __foldwin32sstuff __foldwin32sstuff;
  2. foldstyleinitialization = true;
  3. enablemapdirect1632 = true;
  4. defaultholdwin16lock = true;
  5. #include "types.thk"
  6. typedef DWORD PFF;
  7. typedef DWORD PFC;
  8. typedef LPSTR PSZ;
  9. typedef LPSTR PCONTEXTINFO;
  10. //FE_MTF support
  11. typedef LPSTR PMTF;
  12. /*
  13. * fd_fnt.c: PFF FDENTRY FdLoadFontFile( PSZ pszFile, ULONG ulLangageID )
  14. * fd_fnt.c: LONG FDENTRY FdUnloadFontFile( PFF pFF )
  15. * fd_fnt.c: LONG FDENTRY FdGetFontData( PFF pFF, ULONG ulTable, ULONG ulStart, P1616 pb1616, ULONG cb )
  16. * fd_fnt.c: LONG FDENTRY FdQueryFontMetrics( PFF pff, ULONG ulOffset, P1616 pfm16, ULONG cMetricLen )
  17. * fd_fnt.c: LONG FDENTRY FdGetGlyphIndexes( PFF pff, ULONG iQuery, P1616 pBuffer16, ULONG cb, P1616 pagi16, ULONG ulgiStart )
  18. * fd_hfc.c: LONG FDENTRY FdEnable( void )
  19. * fd_hfc.c: PFC FDENTRY FdOpenFontContext( PFF pff )
  20. * fd_hfc.c: LONG FDENTRY FdSetFontContext( PFC pfc, PCONTEXTINFO pci )
  21. * fd_hfc.c: LONG FDENTRY FdCloseFontContext( PFC pfc )
  22. * fd_query.c:LONG FDENTRY FdQueryFaceAttr( PFC pfc, ULONG iQuery, P1616 pBuffer16, ULONG cb, P1616 pagi16, ULONG ulgiStart )
  23. * fd_query.c:LONG FDENTRY FdQueryCharAttr( PFC pfc, ULONG dwQuery, P1616 pbmm16, P1616 lpBuffer16, ULONG dwBuffer, ULONG dwGlyph )
  24. * fd_vdmx.c: long FDENTRY Em2FontHeight( PFF pff, short ResX, short ResY, short EM )
  25. */
  26. PFF T2FdLoadFontFile( PSZ pszFile, ULONG ulLangageID, PMTF pMtf) =
  27. PFF FdLoadFontFile( PSZ pszFile, ULONG ulLangageID, PMTF pMtf)
  28. {}
  29. LONG T2FdUnloadFontFile( PFF pFF, UINT fRemoveFile) =
  30. LONG FdUnloadFontFile( PFF pFF, UINT fRemoveFile)
  31. {}
  32. LONG T2FdGetFontData( PFF pFF, ULONG ulTable, ULONG ulStart, PBYTE pb,
  33. ULONG cb) =
  34. LONG FdGetFontData( PFF pFF, ULONG ulTable, ULONG ulStart, PBYTE pb,
  35. ULONG cb)
  36. {}
  37. LONG T2FdQueryFontMetrics( PFF pff, ULONG ulOffset, PBYTE pfm,
  38. ULONG cMetricLen) =
  39. LONG FdQueryFontMetrics( PFF pff, ULONG ulOffset, PBYTE pfm,
  40. ULONG cMetricLen)
  41. {}
  42. LONG T2FdGetGlyphIndexes( PFF pff, LPWORD pBuffer, ULONG cb, LPWORD pagi, ULONG ulgiStart) =
  43. LONG FdGetGlyphIndexes( PFF pff, LPWORD pBuffer, ULONG cb, LPWORD pagi, ULONG ulgiStart)
  44. {}
  45. LONG T2FdEnable() =
  46. LONG FdEnable( )
  47. {}
  48. PFC T2FdOpenFontContext( PFF pff) =
  49. PFC FdOpenFontContext( PFF pff)
  50. {}
  51. LONG T2FdSetFontContext( PFC pfc, PCONTEXTINFO pci) =
  52. LONG FdSetFontContext( PFC pfc, PCONTEXTINFO pci)
  53. {}
  54. LONG T2FdCloseFontContext( PFC pfc) =
  55. LONG FdCloseFontContext( PFC pfc)
  56. {}
  57. LONG T2FdQueryFaceAttr( PFC pfc, ULONG iQuery, PBYTE pBuffer, ULONG cb,
  58. PBYTE pagi, ULONG ulgiStart) =
  59. LONG FdQueryFaceAttr( PFC pfc, ULONG iQuery, PBYTE pBuffer, ULONG cb,
  60. PBYTE pagi, ULONG ulgiStart)
  61. {}
  62. LONG T2FdQueryCharAttr( PFC pfc, ULONG dwQuery, PBYTE pbmm, PBYTE lpBuffer,
  63. ULONG dwBuffer, ULONG dwGlyph) =
  64. LONG FdQueryCharAttr( PFC pfc, ULONG dwQuery, PBYTE pbmm, PBYTE lpBuffer,
  65. ULONG dwBuffer, ULONG dwGlyph)
  66. {}
  67. LONG T2Em2FontHeight( PFF pff, UINT ResX, UINT ResY, UINT EM) =
  68. LONG Em2FontHeight( PFF pff, UINT ResX, UINT ResY, UINT EM)
  69. {}
  70. LONG FracSqrtFar( LONG lFrac ) =
  71. LONG HackFracSqrt( LONG lFrac )
  72. {}
  73. LONG fduFindFontFile( PSZ pszFile, PSZ pszFullPath, DWORD dwFullPath ) =
  74. LONG fduFindFontFile( PSZ pszFile, PSZ pszFullPath, DWORD dwFullPath )
  75. {}
  76. /* 32bit font file interface */
  77. /* Releasing the lock is essential because we are going to */
  78. /* be calling LoadLibrary in kernel32. Scary! */
  79. /* 12/19/94 - mikegi */
  80. LONG Gdi32Font( DWORD dwHandle, DWORD dwFunction, PSZ lpszBuffer ) =
  81. LONG Gdi32Font( DWORD dwHandle, DWORD dwFunction, PSZ lpszBuffer )
  82. {
  83. releasewin16lock = true;
  84. }
  85. /* ---------------------------------------------------------------------- */
  86. /* The following thunks are for allocating 32bit heap memory from GDI16 */
  87. /* ---------------------------------------------------------------------- */
  88. LONG GDI32VirtualAlloc (DWORD dwSize) =
  89. LONG GDI32VirtualAlloc (DWORD dwSize)
  90. {}
  91. BOOL GDI32VirtualFree (DWORD lpAdr, DWORD dwSize) =
  92. BOOL GDI32VirtualFree (DWORD lpAdr, DWORD dwSize)
  93. {}
  94. BOOL GDI32UnmapViewOfFile(DWORD) =
  95. BOOL GDI32UnmapViewOfFile(DWORD)
  96. {}
  97. /* ---------------------------------------------------------------------- */
  98. /* */
  99. /* The Following Thunks Are for the Spooler API's */
  100. /* */
  101. /* ---------------------------------------------------------------------- */
  102. /* Make defines to translate simple ptrs */
  103. typedef BYTE TCHAR;
  104. /* Define structures for compiler so it can repack appropriately */
  105. typedef struct _DOC_INFO_2 { /* dci1 */
  106. LPSTR pDocName;
  107. LPSTR pOutputFile;
  108. LPSTR pDatatype;
  109. DWORD fMode;
  110. DWORD channel;
  111. DWORD JobId;
  112. } DOCINFO;
  113. typedef DOCINFO *LPDOCINFO;
  114. typedef struct _PRINTER_DEFAULTS { /* pd */
  115. LPSTR pDatatype;
  116. LPSTR pDevMode;
  117. DWORD AccessGranted ;
  118. } PRINTER_DEFAULTS;
  119. typedef PRINTER_DEFAULTS *LPPRINTER_DEFAULTS;
  120. BOOL OpenPrinterA(LPSTR lpszPrinter, LPDWORD hPrinter, LPPRINTER_DEFAULTS lppd) =
  121. BOOL OpenPrinterA(LPSTR lpszPrinter, LPDWORD hPrinter, LPPRINTER_DEFAULTS lppd)
  122. {
  123. errorcode = 0;
  124. }
  125. BOOL ThkDeleteJob(DWORD hPrinter, DWORD dwJobId) =
  126. BOOL ThkDeleteJob(DWORD hPrinter, DWORD dwJobId)
  127. {
  128. errorcode = 0;
  129. }
  130. DWORD StartDocPrinterA(DWORD hPrinter, DWORD dwLevel, LPDOCINFO lpbDocInfo) =
  131. DWORD StartDocPrinterA(DWORD hPrinter, DWORD dwLevel, LPDOCINFO lpbDocInfo)
  132. {
  133. errorcode = 0;
  134. }
  135. BOOL StartPagePrinter(DWORD hPrinter) =
  136. BOOL StartPagePrinter(DWORD hPrinter)
  137. {
  138. errorcode = 0;
  139. }
  140. BOOL WritePrinter(DWORD hPrinter, LPVOID pBuf, DWORD cbBuf, LPDWORD lpdwWritten) =
  141. BOOL WritePrinter(DWORD hPrinter, LPVOID pBuf, DWORD cbBuf, LPDWORD lpdwWritten)
  142. {
  143. errorcode = 0;
  144. }
  145. BOOL EndPagePrinter(DWORD hPrinter) =
  146. BOOL EndPagePrinter(DWORD hPrinter)
  147. {
  148. errorcode = 0;
  149. }
  150. BOOL EndDocPrinter(DWORD hPrinter) =
  151. BOOL EndDocPrinter(DWORD hPrinter)
  152. {
  153. errorcode = 0;
  154. }
  155. BOOL ClosePrinter(DWORD hPrinter) =
  156. BOOL ClosePrinter(DWORD hPrinter)
  157. {
  158. errorcode = 0;
  159. }
  160. BOOL AbortPrinter(DWORD hPrinter) =
  161. BOOL AbortPrinter(DWORD hPrinter)
  162. {
  163. errorcode = 0;
  164. }
  165. DWORD PrinterMessageBoxA(DWORD hPrinter, DWORD Error, DWORD hWnd, LPSTR pText,
  166. LPSTR pCaption, DWORD dwType) =
  167. DWORD PrinterMessageBoxA(DWORD hPrinter, DWORD Error, DWORD hWnd, LPSTR pText,
  168. LPSTR pCaption, DWORD dwType)
  169. {
  170. errorcode = 0;
  171. }
  172. DWORD ThkGetPrinterData(LPSTR lpPrinter, LPSTR pValueName, LPDWORD pType, LPBYTE bData, DWORD nSize, LPDWORD pcbNeeded) =
  173. DWORD ThkGetPrinterData(LPSTR lpPrinter, LPSTR pValueName, LPDWORD pType, LPBYTE bData, DWORD nSize, LPDWORD pcbNeeded)
  174. {
  175. errorcode = 0;
  176. }
  177. /* this is added for gdi to launch splexe32.exe */
  178. VOID RunSpoolExe() =
  179. VOID RunSpoolExe()
  180. {
  181. releasewin16lock = true; //This sucker calls WinExec.
  182. errorcode = 0;
  183. }
  184. /* this is added for gdi to clean up spooler ipc data for the process when */
  185. /* it terminates */
  186. DWORD ThkDetachSpooler(DWORD dwID) =
  187. DWORD ThkDetachSpooler(DWORD dwID)
  188. {
  189. errorcode = 0;
  190. }
  191. /* portions of the EMF system need to call PlayEnhMetaFile */
  192. /* The last parameter is an LPRECTL on both sides so no packing needed */
  193. BOOL PlayEnhMetaFile(HDC hdc, HANDLE hemf, LPSTR) =
  194. BOOL PlayEnhMetaFile(HDC hdc, HANDLE hemf, LPSTR)
  195. {
  196. errorcode = 0;
  197. }
  198. BOOL NoLockPlayEnhMetaFile(HDC hdc, HANDLE hemf, LPSTR) =
  199. BOOL NoLockPlayEnhMetaFile(HDC hdc, HANDLE hemf, LPSTR)
  200. {
  201. errorcode = 0;
  202. }
  203. BOOL gdiPlaySpoolStream(LPSTR, LPSTR, LPSTR, ULONG, ULONG, HDC) =
  204. BOOL gdiPlaySpoolStream(LPSTR, LPSTR, LPSTR, ULONG, ULONG, HDC)
  205. {
  206. errorcode = 0;
  207. }
  208. /* ---------------------------------------------------------------------- */
  209. /* */
  210. /* The Following Thunks Are for making Inverse color tables (INVCMAP.C) */
  211. /* */
  212. /* ---------------------------------------------------------------------- */
  213. BOOL MakeITable(LPBYTE, LPDWORD, INT) =
  214. BOOL MakeITable(LPBYTE, LPDWORD, INT)
  215. {
  216. }
  217. /* ---------------------------------------------------------------------- */
  218. /* The following thunks are for converting code page into charset */
  219. /* ---------------------------------------------------------------------- */
  220. WORD TranslateCharsetInfo( LPVOID lpSrc, LPCHARSETINFO lpDst, DWORD dwFlags) =
  221. WORD TranslateCharsetInfo( LPVOID lpSrc, LPCHARSETINFO lpDst, DWORD dwFlags)
  222. {
  223. lpDst = output;
  224. lpSrc = passifhinull;
  225. }