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.

139 lines
5.3 KiB

  1. // Copyright (C) Microsoft Corp. 1993
  2. /*==============================================================================
  3. This include file defines the API between the rendserv.dll and renderers.
  4. DATE NAME COMMENTS
  5. 25-Jun-93 RajeevD Created.
  6. ==============================================================================*/
  7. #ifndef _INC_RENDER
  8. #define _INC_RENDER
  9. #include <ifaxos.h>
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. /***********************************************************************
  14. @doc RENDER EXTERNAL
  15. @type LPVOID|LPJOB|The renderer context pointer. This is used by the renderers
  16. for interfacing to the Rendering Server.
  17. *************************************************************************/
  18. typedef LPVOID LPJOB ;
  19. //
  20. // This function takes the job handle and parameters and renders
  21. // data with callbacks to the job
  22. //
  23. // On error returns false and returns error with SetLastError()
  24. //
  25. /***********************************************************************
  26. @doc RENDER EXTERNAL
  27. @api BOOL|RENDERPROC|The main rendering function provided by the renderer.
  28. @parm LPJOB|lpJob|The Rendering Server handle. This is used when the renderer
  29. makes any calls to Rendering Server APIs.
  30. @parm LPVOID|lpParam|The renderer specific parameter. This is completely opaque
  31. to the Rendering Server and is obtained from the topology structure.
  32. @rdesc Returns TRUE on success or FALSE on failure. If there was a failure and FALSE
  33. was return, SetLastError must contain the error information. If a Rendering
  34. Server API failure caused the error, then its error must be return in SetLastError.
  35. *************************************************************************/
  36. typedef BOOL (WINAPI RENDERPROC) (LPJOB lpJob, LPVOID lpParam);
  37. typedef RENDERPROC *LPFN_RENDERPROC ;
  38. /***********************************************************************
  39. @doc RENDER EXTERNAL
  40. @types RENDERINFO|Structure containing general information about a renderer.
  41. @field WORD|cbStruct|The Size of the structure.
  42. @field WORD|cbMinStack|The minimum stack size required by the renderer.
  43. @field LPFM_RENDERPROC|lpfnRenderProc|The main rendering function for the renderer.
  44. @field DWORD|dwFlags|Flags containing renderer information.
  45. @xref <f RENDERGETINFOPROC>
  46. *************************************************************************/
  47. typedef struct {
  48. WORD cbStruct; // set to size of this structure
  49. WORD cbMinStack; // Minimal Stack size
  50. LPFN_RENDERPROC lpfnRenderProc ; // Pointer to Render function
  51. DWORD dwFlags; // fields defined above...
  52. } RENDERINFO, FAR *LPRENDERINFO;
  53. //
  54. // This will be called to get the renderer information
  55. // The Info structure will be passed in the size set and the renderer should
  56. // set the size to be its versions
  57. //
  58. // On error returns false and returns error with SetLastError()
  59. //
  60. /***********************************************************************
  61. @doc RENDER EXTERNAL
  62. @api BOOL|RENDERGETINFOPROC|This function is provided by each renderer. The Rendering
  63. Server will call this function to get the <t RENDERINFO> structure.
  64. @parm LPRENDERINFO|lpInfo|The render info structure used to obtain general renderer
  65. information. This is allocated by the Rendering Server and its size is
  66. stored in the cbStruct field.
  67. @rdesc Returns TRUE on success or FALSE on failure. If the renderer returns TRUE all
  68. known fields should be filled in and cbStruct should be set to indicate which
  69. fields were known by the renderer.
  70. *************************************************************************/
  71. typedef BOOL (WINAPI RENDERGETINFOPROC) (LPRENDERINFO lpInfo) ;
  72. typedef RENDERGETINFOPROC * LPFN_RENDERGETINFOPROC ;
  73. /*==============================================================================
  74. The JOBINFO structure is used to pass per-job parameters to a renderer.
  75. ==============================================================================*/
  76. typedef struct
  77. {
  78. WORD cbStruct; // size of this structure
  79. LPVOID lpSession; // LPSOSSESSION
  80. LPVOID lpMsg ; // LPMESSAGESOS message handle (Src message)
  81. ULONG nAttach ; // The attachment number
  82. }
  83. JOBINFO, FAR * LPJOBINFO;
  84. /*==============================================================================
  85. The following buffer services are provided by rendserv.dll:
  86. RSGetInBuf() gets an input buffer from the input queue.
  87. RSPutOutBuf() puts an output buffer in the output queue.
  88. RSGetFreeBuf() gets an empty buffer from the free pool.
  89. RSPutFreebuf() puts an empty buffer into the free pool.
  90. RSMemAlloc() allocates memory
  91. RSMemFree() frees memory
  92. ==============================================================================*/
  93. LPBUFFER WINAPI RSGetInBuf (LPJOB lpJob);
  94. BOOL WINAPI RSPutOutBuf (LPJOB lpJob, LPBUFFER lpbufOut);
  95. LPBUFFER WINAPI RSGetFreeBuf (LPJOB lpJob, SHORT sBufSize);
  96. void WINAPI RSPutFreeBuf (LPJOB lpJob, LPBUFFER lpbufFree);
  97. LPVOID WINAPI RSMemAlloc (LPJOB lpJob, UINT fuAlloc, LONG lAllocSize,LPWORD lpwActualSize);
  98. BOOL WINAPI RSMemFree (LPJOB lpJob, LPVOID lpvMem);
  99. LPJOBINFO WINAPI RSGetJobInfo (LPJOB lpJob);
  100. BOOL WINAPI RSYield (LPJOB lpJob) ;
  101. #define RSGlobalAlloc(a,b,c,d) RSMemAlloc(a,b,c,d)
  102. #define RSGlobalFree(a,b) RSMemFree(a,b)
  103. #ifdef __cplusplus
  104. } // extern "C"
  105. #endif
  106. #endif // _INC_RENDER