Subversion Repositories Kolibri OS

Rev

Rev 6137 | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. #ifndef __PIXLIB3_H__
  2. #define __PIXLIB3_H__
  3.  
  4. #include <stdint.h>
  5.  
  6. #define HW_BIT_BLIT         (1<<0)      /* BGRX blitter             */
  7. #define HW_TEX_BLIT         (1<<1)      /* stretch blit             */
  8. #define HW_VID_BLIT         (1<<2)      /* planar and packed video  */
  9.  
  10.  
  11. struct bitmap;
  12. struct planar;
  13.  
  14. typedef struct bitmap bitmap_t;
  15. typedef struct planar planar_t;
  16.  
  17. uint32_t pxInit(int hw);
  18. void pxFini();
  19.  
  20. bitmap_t *pxCreateBitmap(uint32_t width, uint32_t height);
  21.  
  22. int pxDestroyBitmap(bitmap_t *bitmap);
  23.  
  24. void *pxLockBitmap(bitmap_t *bitmap, uint32_t *pitch);
  25.  
  26. int pxResizeBitmap(bitmap_t *bitmap, uint32_t width, uint32_t height);
  27.  
  28. int pxBlitBitmap(bitmap_t *bitmap, int dst_x, int dst_y,
  29.                  uint32_t w, uint32_t h, int src_x, int src_y);
  30.  
  31. planar_t* pxCreatePlanar(int name, int format,
  32.                          uint32_t width, uint32_t height,
  33.                          uint32_t offset0, uint32_t pitch0,
  34.                          uint32_t offset1, uint32_t pitch1,
  35.                          uint32_t offset2, uint32_t pitch2);
  36.  
  37. int pxDestroyPlanar(planar_t *planar);
  38.  
  39. int pxBlitPlanar(planar_t *planar, int dst_x, int dst_y,
  40.                  uint32_t w, uint32_t h, int src_x, int src_y);
  41.  
  42. int pxCreateClient(int x, int y, uint32_t width, uint32_t height);
  43.  
  44. int pxResizeClient(int x, int y, uint32_t width, uint32_t height);
  45.  
  46. #endif
  47.  
  48.