ImDib.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. /*
  2. * The Python Imaging Library
  3. * $Id$
  4. *
  5. * Windows DIB specifics
  6. *
  7. * Copyright (c) Secret Labs AB 1997-98.
  8. * Copyright (c) Fredrik Lundh 1996.
  9. *
  10. * See the README file for information on usage and redistribution.
  11. */
  12. #ifdef _WIN32
  13. #include "ImPlatform.h"
  14. #if defined(__cplusplus)
  15. extern "C" {
  16. #endif
  17. struct ImagingDIBInstance {
  18. /* Windows interface */
  19. HDC dc;
  20. HBITMAP bitmap;
  21. HGDIOBJ old_bitmap;
  22. BITMAPINFO *info;
  23. UINT8 *bits;
  24. HPALETTE palette;
  25. /* Used by cut and paste */
  26. char mode[4];
  27. int xsize, ysize;
  28. int pixelsize;
  29. int linesize;
  30. ImagingShuffler pack;
  31. ImagingShuffler unpack;
  32. };
  33. typedef struct ImagingDIBInstance *ImagingDIB;
  34. extern char *
  35. ImagingGetModeDIB(int size_out[2]);
  36. extern ImagingDIB
  37. ImagingNewDIB(const char *mode, int xsize, int ysize);
  38. extern void
  39. ImagingDeleteDIB(ImagingDIB im);
  40. extern void
  41. ImagingDrawDIB(ImagingDIB dib, void *dc, int dst[4], int src[4]);
  42. extern void
  43. ImagingExposeDIB(ImagingDIB dib, void *dc);
  44. extern int
  45. ImagingQueryPaletteDIB(ImagingDIB dib, void *dc);
  46. extern void
  47. ImagingPasteDIB(ImagingDIB dib, Imaging im, int xy[4]);
  48. #if defined(__cplusplus)
  49. }
  50. #endif
  51. #endif