move around - flatter.
[profile/ivi/evas.git] / src / modules / engines / software_qtopia / evas_engine.h
1 #ifndef EVAS_ENGINE_H
2 #define EVAS_ENGINE_H
3
4 typedef struct _Outbuf                Outbuf;
5 typedef struct _QT_Direct             QT_Direct;
6 typedef struct _QT_Direct_Rect        QT_Direct_Rect;
7
8 enum _Outbuf_Depth
9 {
10    OUTBUF_DEPTH_NONE,
11      OUTBUF_DEPTH_INHERIT,
12      OUTBUF_DEPTH_RGB_16BPP_565_565_DITHERED,
13      OUTBUF_DEPTH_RGB_16BPP_555_555_DITHERED,
14      OUTBUF_DEPTH_RGB_16BPP_444_444_DITHERED,
15      OUTBUF_DEPTH_RGB_16BPP_565_444_DITHERED,
16      OUTBUF_DEPTH_RGB_32BPP_888_8888,
17      OUTBUF_DEPTH_LAST
18 };
19
20 typedef enum   _Outbuf_Depth          Outbuf_Depth;
21
22
23 struct _Outbuf
24 {
25    Outbuf_Depth    depth;
26    int             w, h;
27    int             rot;
28
29    struct {
30       void *target;
31
32       struct {
33          DATA32    r, g, b;
34       } mask;
35       RGBA_Image  *back_buf;
36    } priv;
37 };
38
39 struct _QT_Direct_Rect
40 {
41    int x, y, w, h;
42 };
43
44 struct _QT_Direct
45 {
46    /* our target widget */
47    void *target;
48    /* our direct painter object */
49    void *direct;
50    /* The fb */
51    struct
52      {
53         DATA8             *data;
54         int                bpp;
55         int                rotation;
56         int                width;
57         struct {
58            DATA32          r, g, b;
59         } mask;
60      } fb;
61    /* Relative to fb coords */
62    struct {
63       int                 count;
64       QT_Direct_Rect     *r;
65    } rects;
66    /* Relative to fb coords */
67    QT_Direct_Rect         location;
68    QT_Direct_Rect         updated;
69 };
70
71 #ifdef __cplusplus
72 extern "C" {
73 #endif
74
75 /****/
76 void             x_software_qtopia_init                    (void);
77
78 void         evas_qtopia_outbuf_software_qtopia_init                   (void);
79 void         evas_qtopia_outbuf_software_qtopia_free                   (Outbuf *buf);
80
81 Outbuf      *evas_qtopia_outbuf_software_qtopia_setup_q                (int w, int h, int rot, Outbuf_Depth depth, void *target);
82
83 void         evas_qtopia_outbuf_software_qtopia_blit                   (Outbuf *buf, int src_x, int src_y, int w, int h, int dst_x, int dst_y);
84 void         evas_qtopia_outbuf_software_qtopia_update                 (Outbuf *buf, int x, int y, int w, int h);
85 RGBA_Image  *evas_qtopia_outbuf_software_qtopia_new_region_for_update  (Outbuf *buf, int x, int y, int w, int h, int *cx, int *cy, int *cw, int *ch);
86 void         evas_qtopia_outbuf_software_qtopia_free_region_for_update (Outbuf *buf, RGBA_Image *update);
87 void         evas_qtopia_outbuf_software_qtopia_push_updated_region    (Outbuf *buf, RGBA_Image *update, int x, int y, int w, int h);
88 void         evas_qtopia_outbuf_software_qtopia_reconfigure            (Outbuf *buf, int w, int h, int rot, Outbuf_Depth depth);
89 int          evas_qtopia_outbuf_software_qtopia_get_width              (Outbuf *buf);
90 int          evas_qtopia_outbuf_software_qtopia_get_height             (Outbuf *buf);
91 Outbuf_Depth evas_qtopia_outbuf_software_qtopia_get_depth              (Outbuf *buf);
92 int          evas_qtopia_outbuf_software_qtopia_get_rot                (Outbuf *buf);
93 int          evas_qtopia_outbuf_software_qtopia_get_have_backbuf       (Outbuf *buf);
94 void         evas_qtopia_outbuf_software_qtopia_set_have_backbuf       (Outbuf *buf, int have_backbuf);
95
96 QT_Direct   *evas_qt_main_direct_start                     (void *target);
97 void         evas_qt_main_direct_stop                      (QT_Direct *d);
98
99 #ifdef __cplusplus
100 }
101 #endif
102
103 #endif