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.

99 lines
3.1 KiB

  1. // Copyright (c) Microsoft Corp. 1993-94
  2. /*==============================================================================
  3. This header file defines the viewer rendering support API.
  4. 17-Oct-93 RajeevD Created.
  5. 25-Oct-93 RajeevD Updated to support random access to bands.
  6. ==============================================================================*/
  7. #ifndef _INC_VIEWREND
  8. #define _INC_VIEWREND
  9. #include <ifaxos.h>
  10. #ifdef IFBGPROC
  11. #ifndef _BITMAP_
  12. #define _BITMAP_
  13. // Win 3.1 Bitmap
  14. typedef struct
  15. {
  16. int bmType;
  17. int bmWidth;
  18. int bmHeight;
  19. int bmWidthBytes;
  20. BYTE bmPlanes;
  21. BYTE bmBitsPixel;
  22. void FAR* bmBits;
  23. }
  24. BITMAP, FAR *LPBITMAP;
  25. #endif // _BITMAP_
  26. #endif // IFBGPROC
  27. #ifdef __cplusplus
  28. extern "C" {
  29. #endif
  30. typedef struct
  31. {
  32. WORD cPage; // number of pages
  33. WORD xRes; // horizontal resolution [dpi]
  34. WORD yRes; // vertical resolution [dpi]
  35. WORD yMax; // maximum page height [pixels]
  36. }
  37. VIEWINFO, FAR* LPVIEWINFO;
  38. /*==============================================================================
  39. This initialization procedure creates a context for use in all subsequent calls.
  40. Upon call, the lpwBandSize parameter point to the preferred output band buffer
  41. size. Upon return, it may be filled with a larger value if required.
  42. ==============================================================================*/
  43. LPVOID // returns context (NULL on failure)
  44. WINAPI
  45. ViewerOpen
  46. (
  47. LPVOID lpFile, // IFAX key or Win3.1 path or OLE2 IStream
  48. DWORD nType, // data type: HRAW_DATA or LRAW_DATA
  49. LPWORD lpwResoln, // output pointer to x, y dpi array
  50. LPWORD lpwBandSize, // input/output pointer to output band size
  51. LPVIEWINFO lpViewInfo // output pointer to VIEWINFO struct
  52. );
  53. /*==============================================================================
  54. This procedure sets the current page. The first page has index 0.
  55. ==============================================================================*/
  56. BOOL // returns success/failure
  57. WINAPI
  58. ViewerSetPage
  59. (
  60. LPVOID lpContext, // context pointer
  61. UINT iPage // page index
  62. );
  63. /*==============================================================================
  64. This procedure may be called repeatedly to fetch successive bands of a page.
  65. Upon call, lpbmBand->bmBits must point to an output band buffer. Upon return,
  66. the remaining fields of lpbmBand will be filled. The lpbmBand->bmHeight will
  67. be set to 0 to indicate end of page.
  68. ==============================================================================*/
  69. BOOL // returns success/failure
  70. WINAPI
  71. ViewerGetBand
  72. (
  73. LPVOID lpContext, // context pointer
  74. LPBITMAP lpbmBand
  75. );
  76. /*==============================================================================
  77. This termination call releases the context.
  78. ==============================================================================*/
  79. BOOL WINAPI ViewerClose
  80. (
  81. LPVOID lpContext
  82. );
  83. #ifdef __cplusplus
  84. } // extern "C"
  85. #endif
  86. #endif // _INC_VIEWREND