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.

158 lines
5.5 KiB

  1. /////////////////////////////////////////////////////////////////////////////////////////
  2. //
  3. // Copyright (c) 1998 Active Voice Corporation. All Rights Reserved.
  4. //
  5. // Active Agent(r) and Unified Communications(tm) are trademarks of Active Voice Corporation.
  6. //
  7. // Other brand and product names used herein are trademarks of their respective owners.
  8. //
  9. // The entire program and user interface including the structure, sequence, selection,
  10. // and arrangement of the dialog, the exclusively "yes" and "no" choices represented
  11. // by "1" and "2," and each dialog message are protected by copyrights registered in
  12. // the United States and by international treaties.
  13. //
  14. // Protected by one or more of the following United States patents: 5,070,526, 5,488,650,
  15. // 5,434,906, 5,581,604, 5,533,102, 5,568,540, 5,625,676, 5,651,054.
  16. //
  17. // Active Voice Corporation
  18. // Seattle, Washington
  19. // USA
  20. //
  21. /////////////////////////////////////////////////////////////////////////////////////////
  22. ////
  23. // gfx.h - interface for graphics functions in gfx.c
  24. ////
  25. #ifndef __GFX_H__
  26. #define __GFX_H__
  27. #include "winlocal.h"
  28. #define GFX_VERSION 0x00000100
  29. ////
  30. // bitmap routines
  31. ////
  32. // option flags for GfxBitmapBackfill <wFlags> param
  33. //
  34. #define BF_EXTFLOODFILL 0x0001
  35. #define BF_GETSETPIXEL 0x0002
  36. // option flags for GfxBitmapScroll <dwFlags> param
  37. //
  38. #define BS_ROTATE 0x00000001
  39. #ifdef __cplusplus
  40. extern "C" {
  41. #endif
  42. // GfxBitmapBackfill - replace bitmap's white backg with curr backg color
  43. // <hBitmap> (i/o) bitmap handle
  44. // <crBkColor> (i) current background color
  45. // <wFlags> (i) option flags
  46. // 0 use default method
  47. // BF_EXTFLOODFILL use ExtFloodFill function
  48. // BF_GETSETPIXEL use GetPixel/SetPixel functions
  49. // NOTE: rarely, ExtFloodFill will GP the display device driver
  50. // return 0 if success
  51. //
  52. int DLLEXPORT WINAPI GfxBitmapBackfill(HBITMAP hBitmap, COLORREF crBkColor, WORD wFlags);
  53. // GfxBitmapDisplay - display specified bitmap
  54. // <hdc> (i) device context for destination window
  55. // <hBitmap> (i) bitmap handle for source bitmap
  56. // <x> (i) x coordinate for destination window
  57. // <y> (i) y coordinate for destination window
  58. // <fInvert> (i) display bitmap inverted
  59. // return 0 if success
  60. //
  61. int DLLEXPORT WINAPI GfxBitmapDisplay(HDC hdc, HBITMAP hBitmap, int x, int y, BOOL fInvert);
  62. // GfxBitmapDrawTransparent - draw specified bitmap
  63. // <hdc> (i) device context for destination window
  64. // <hBitmap> (i) bitmap handle for source bitmap
  65. // <x> (i) x coordinate for destination window
  66. // <y> (i) y coordinate for destination window
  67. // <crTransparent> (i) transparent color
  68. // <dwFlags> (i) control flags
  69. // 0 reserved; must be zero
  70. // return 0 if success
  71. //
  72. int DLLEXPORT WINAPI GfxBitmapDrawTransparent(HDC hdc, HBITMAP hBitmap, int x, int y, COLORREF crTransparent, DWORD dwFlags);
  73. // GfxBitmapScroll - scroll specified bitmap
  74. // <hdc> (i) device context for destination window
  75. // <hBitmap> (i) bitmap handle for source bitmap
  76. // <dx> (i) amt of horizontal scroll (cx < 0 scrolls left)
  77. // <dy> (i) amt of vertical scroll (cx < 0 scrolls up)
  78. // <dwFlags> (i) control flags
  79. // BS_ROTATE rotate bitmap
  80. // return 0 if success
  81. //
  82. int DLLEXPORT WINAPI GfxBitmapScroll(HDC hdc, HBITMAP hBitmap, int dx, int dy, DWORD dwFlags);
  83. // GfxLoadBitmapEx - load specified bitmap resource, get palette
  84. // <hInstance> (i) handle of module to load resource from
  85. // NULL load pre-defined Windows bitmap
  86. // <lpszBitmap> (i) name of bitmap resource
  87. // or MAKEINTRESOURCE(idBitmap)
  88. // or <OBM_xxx> if hInstance is NULL
  89. // <lphPalette> (o) palette is returned here
  90. // NULL do not return palette
  91. // return bitmap handle if success, otherwise NULL
  92. // NOTE: see documentation for LoadBitmap function
  93. // NOTE: call DeleteObject() to free returned bitmap and palette handles
  94. //
  95. HBITMAP DLLEXPORT WINAPI GfxLoadBitmapEx(HINSTANCE hInstance,
  96. LPCTSTR lpszBitmap, HPALETTE FAR *lphPalette);
  97. // GfxCreateDIBPalette - create palette
  98. // <lpbmi> (i) ptr to BITMAPINFO struct, describes DIB
  99. // <lpnColors> (o) number of colors is returned here
  100. // return new palette handle if success, otherwise NULL
  101. //
  102. HPALETTE DLLEXPORT WINAPI CreateDIBPalette (LPBITMAPINFO lpbmi, LPINT lpnColors);
  103. ////
  104. // text routines
  105. ////
  106. // GfxTextExtentTruncate - truncate string if too long
  107. // <lpsz> (i/o) string to truncate
  108. // <hdc> (i) current device context
  109. // <cxMax> (i) maximum string width in logical units
  110. // return new length of string (0 if error)
  111. //
  112. int DLLEXPORT WINAPI GfxTextExtentTruncate(LPTSTR lpsz, HDC hdc, int cxMax);
  113. ////
  114. // cursor routines
  115. ////
  116. // GfxShowHourglass - show the hourglass cursor
  117. // <hwndCapture> (i) window to capture mouse input during hourglass
  118. // return old cursor (NULL if error or none)
  119. //
  120. HCURSOR DLLEXPORT WINAPI GfxShowHourglass(HWND hwnd);
  121. // GfxHideHourglass - hide the hourglass cursor
  122. // <hCursorRestore> (i) cursor handle returned from GfxShowHourglass
  123. // NULL replace cursor with IDC_ARROW
  124. // return 0 if success
  125. //
  126. int DLLEXPORT WINAPI GfxHideHourglass(HCURSOR hCursorRestore);
  127. // GfxDeviceIsMono - determine if device context is monochrome
  128. // <hdc> (i) device context
  129. // NULL use screen device context
  130. // return TRUE if monochrome, FALSE if color
  131. //
  132. BOOL DLLEXPORT WINAPI GfxDeviceIsMono(HDC hdc);
  133. #ifdef __cplusplus
  134. }
  135. #endif
  136. #endif // __GFX_H__