ImDib.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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* ImagingGetModeDIB(int size_out[2]);
  35. extern ImagingDIB ImagingNewDIB(const char *mode, int xsize, int ysize);
  36. extern void ImagingDeleteDIB(ImagingDIB im);
  37. extern void ImagingDrawDIB(ImagingDIB dib, void *dc, int dst[4], int src[4]);
  38. extern void ImagingExposeDIB(ImagingDIB dib, void *dc);
  39. extern int ImagingQueryPaletteDIB(ImagingDIB dib, void *dc);
  40. extern void ImagingPasteDIB(ImagingDIB dib, Imaging im, int xy[4]);
  41. #if defined(__cplusplus)
  42. }
  43. #endif
  44. #endif