move around - flatter.
[profile/ivi/evas.git] / src / modules / engines / buffer / evas_engine.h
1 #ifndef EVAS_ENGINE_H
2 #define EVAS_ENGINE_H
3
4 typedef struct _Outbuf                Outbuf;
5
6 typedef enum   _Outbuf_Depth          Outbuf_Depth;
7
8 enum _Outbuf_Depth
9 {
10    OUTBUF_DEPTH_NONE,
11      OUTBUF_DEPTH_ARGB_32BPP_8888_8888,
12      OUTBUF_DEPTH_BGRA_32BPP_8888_8888,
13      OUTBUF_DEPTH_RGB_32BPP_888_8888,
14      OUTBUF_DEPTH_BGR_32BPP_888_8888,
15      OUTBUF_DEPTH_RGB_24BPP_888_888,
16      OUTBUF_DEPTH_BGR_24BPP_888_888,
17      OUTBUF_DEPTH_LAST
18 };
19
20 struct _Outbuf
21 {
22    int                           w, h;
23    Outbuf_Depth                  depth;
24
25    void                         *dest;
26    int                           dest_row_bytes;
27
28    int                           alpha_level;
29    DATA32                        color_key;
30    char                          use_color_key : 1;
31
32    struct {
33       void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes);
34       void   (*free_update_region) (int x, int y, int w, int h, void *data);
35    } func;
36
37    struct {
38       RGBA_Image                *back_buf;
39    } priv;
40 };
41
42 /****/
43
44 void         evas_buffer_outbuf_buf_init                   (void);
45 void         evas_buffer_outbuf_buf_free                   (Outbuf *buf);
46
47 Outbuf      *evas_buffer_outbuf_buf_setup_fb               (int w, int h, Outbuf_Depth depth, void *dest, int dest_row_bytes, int use_color_key, DATA32 color_key, int alpha_level,
48                                                             void * (*new_update_region) (int x, int y, int w, int h, int *row_bytes),
49                                                             void   (*free_update_region) (int x, int y, int w, int h, void *data));
50
51
52 RGBA_Image  *evas_buffer_outbuf_buf_new_region_for_update  (Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
53 void         evas_buffer_outbuf_buf_free_region_for_update (Outbuf *buf, RGBA_Image *update);
54 void         evas_buffer_outbuf_buf_push_updated_region    (Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h);
55
56 #endif
57