Subversion Repositories Kolibri OS

Rev

Blame | Last modification | View Log | RSS feed

  1. #ifndef __PXDRAW_H__
  2. #define __PXDRAW_H__
  3.  
  4. #include <stdint.h>
  5.  
  6. #if defined __cplusplus
  7. extern "C" {
  8. #endif
  9.  
  10. typedef unsigned int color_t;
  11. typedef struct context ctx_t;
  12.  
  13. typedef struct
  14. {
  15.         int  l;
  16.         int  t;
  17.         int  r;
  18.         int  b;
  19. }rect_t;
  20.  
  21. typedef struct
  22. {
  23.         int num_rects;
  24.         rect_t *rects;
  25.         rect_t extents;
  26. }rgn_t;
  27.  
  28. rgn_t* create_round_rect_rgn(int left, int top, int right, int bottom,
  29.                              int ellipse_width, int ellipse_height);
  30. void   destroy_region(rgn_t *rgn);
  31.  
  32. ctx_t* create_context(int x, int y, int width, int height);
  33. int    resize_context(ctx_t *ctx, int width, int height);
  34. void   clear_context(ctx_t *ctx, color_t color);
  35. void   show_context(ctx_t *ctx);
  36. void   scroll_context(ctx_t *ctx, int dst_y, int  src_y, int rows);
  37.  
  38. int    px_hline(ctx_t*ctx, int x, int y, int width, color_t color);
  39. void   px_vline(ctx_t*ctx, int x, int y, int height, color_t color);
  40. void   px_fill_rect(ctx_t *ctx, const rect_t *src, color_t color);
  41. void   px_draw_glyph(ctx_t *ctx, const void *buffer, int pitch, const rect_t *rc, color_t color);
  42.  
  43. #if defined __cplusplus
  44. }
  45. #endif
  46. #endif /* __PXDRAW_H__ */
  47.