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.

155 lines
4.9 KiB

  1. /****************************************************************************
  2. DCIMAN.H
  3. Copyright (C) 1993-1999 Microsoft Corporation. All Rights Reserved.
  4. DCIMAN 1.0 client interface definitions
  5. ***************************************************************************/
  6. #ifndef _INC_DCIMAN
  7. #define _INC_DCIMAN
  8. #if _MSC_VER > 1000
  9. #pragma once
  10. #endif
  11. #ifdef __cplusplus
  12. #define __inline inline
  13. extern "C" {
  14. #endif
  15. /****************************************************************************
  16. ***************************************************************************/
  17. #include "dciddi.h" // interface to the DCI provider
  18. /****************************************************************************
  19. ***************************************************************************/
  20. DECLARE_HANDLE(HWINWATCH); // context handle for WinWatch instance
  21. /****************************************************************************
  22. ***************************************************************************/
  23. extern HDC WINAPI DCIOpenProvider(void);
  24. extern void WINAPI DCICloseProvider(HDC hdc);
  25. extern int WINAPI DCICreatePrimary(HDC hdc, LPDCISURFACEINFO FAR *lplpSurface);
  26. extern int WINAPI DCICreateOffscreen(HDC hdc, DWORD dwCompression, DWORD dwRedMask,
  27. DWORD dwGreenMask, DWORD dwBlueMask, DWORD dwWidth, DWORD dwHeight,
  28. DWORD dwDCICaps, DWORD dwBitCount, LPDCIOFFSCREEN FAR *lplpSurface);
  29. extern int WINAPI DCICreateOverlay(HDC hdc, LPVOID lpOffscreenSurf,
  30. LPDCIOVERLAY FAR *lplpSurface);
  31. extern int WINAPI DCIEnum(HDC hdc, LPRECT lprDst, LPRECT lprSrc, LPVOID lpFnCallback,
  32. LPVOID lpContext);
  33. extern DCIRVAL WINAPI DCISetSrcDestClip(LPDCIOFFSCREEN pdci, LPRECT srcrc,
  34. LPRECT destrc, LPRGNDATA prd );
  35. extern HWINWATCH WINAPI WinWatchOpen(HWND hwnd);
  36. extern void WINAPI WinWatchClose(HWINWATCH hWW);
  37. // API changed to copy region data instead of return pointer to it
  38. extern UINT WINAPI WinWatchGetClipList(HWINWATCH hWW, LPRECT prc,
  39. UINT size, LPRGNDATA prd);
  40. extern BOOL WINAPI WinWatchDidStatusChange(HWINWATCH hWW);
  41. extern DWORD WINAPI GetWindowRegionData(HWND hwnd, DWORD size, LPRGNDATA prd);
  42. extern DWORD WINAPI GetDCRegionData(HDC hdc, DWORD size, LPRGNDATA prd);
  43. #define WINWATCHNOTIFY_START 0
  44. #define WINWATCHNOTIFY_STOP 1
  45. #define WINWATCHNOTIFY_DESTROY 2
  46. #define WINWATCHNOTIFY_CHANGING 3
  47. #define WINWATCHNOTIFY_CHANGED 4
  48. typedef void (CALLBACK *WINWATCHNOTIFYPROC)(HWINWATCH hww, HWND hwnd, DWORD code, LPARAM lParam);
  49. extern BOOL WINAPI WinWatchNotify(HWINWATCH hWW, WINWATCHNOTIFYPROC NotifyCallback,
  50. LPARAM NotifyParam );
  51. #ifdef WIN32
  52. /****************************************************************************
  53. helper functions to call DCIMAN16.DLL
  54. ***************************************************************************/
  55. extern void WINAPI DCIEndAccess(LPDCISURFACEINFO pdci);
  56. extern DCIRVAL WINAPI DCIBeginAccess(LPDCISURFACEINFO pdci, int x, int y, int dx, int dy);
  57. extern void WINAPI DCIDestroy(LPDCISURFACEINFO pdci);
  58. extern DCIRVAL WINAPI DCIDraw(LPDCIOFFSCREEN pdci);
  59. extern DCIRVAL WINAPI DCISetClipList(LPDCIOFFSCREEN pdci, LPRGNDATA prd);
  60. extern DCIRVAL WINAPI DCISetDestination(LPDCIOFFSCREEN pdci, LPRECT dst, LPRECT src);
  61. #else
  62. extern int WINAPI DCISendCommand(HDC hdc, VOID FAR *pcmd, int nSize, VOID FAR * FAR * lplpOut);
  63. /****************************************************************************
  64. helper macros to call DCI callbacks
  65. ***************************************************************************/
  66. __inline void DCIDestroy(LPDCISURFACEINFO pdci)
  67. {
  68. if( pdci->DestroySurface != NULL ) {
  69. pdci->DestroySurface(pdci);
  70. }
  71. }
  72. __inline void DCIEndAccess(LPDCISURFACEINFO pdci)
  73. {
  74. if( pdci->EndAccess != NULL ) {
  75. pdci->EndAccess(pdci);
  76. }
  77. }
  78. __inline DCIRVAL DCIBeginAccess(LPDCISURFACEINFO pdci, int x, int y, int dx, int dy)
  79. {
  80. RECT rc;
  81. if( pdci->BeginAccess != NULL ) {
  82. rc.left=x;
  83. rc.top=y;
  84. rc.right = rc.left+dx;
  85. rc.bottom = rc.top+dy;
  86. return pdci->BeginAccess(pdci, &rc);
  87. } else {
  88. return DCI_OK;
  89. }
  90. }
  91. __inline DCIRVAL DCIDraw(LPDCIOFFSCREEN pdci)
  92. {
  93. if( pdci->Draw != NULL ) {
  94. return pdci->Draw(pdci);
  95. } else {
  96. return DCI_OK;
  97. }
  98. }
  99. __inline DCIRVAL DCISetClipList(LPDCIOFFSCREEN pdci, LPRGNDATA prd)
  100. {
  101. if( pdci->SetClipList != NULL ) {
  102. return pdci->SetClipList(pdci, prd);
  103. } else {
  104. return DCI_OK;
  105. }
  106. }
  107. __inline DCIRVAL DCISetDestination(LPDCIOFFSCREEN pdci, LPRECT dst, LPRECT src)
  108. {
  109. if( pdci->SetDestination != NULL ) {
  110. return pdci->SetDestination(pdci, dst, src);
  111. } else {
  112. return DCI_OK;
  113. }
  114. }
  115. #endif
  116. /****************************************************************************
  117. ***************************************************************************/
  118. #ifdef __cplusplus
  119. }
  120. #endif
  121. #endif // _INC_DCIMAN