mask is a pixmap, not a drawable
[framework/uifw/evas.git] / src / modules / engines / software_x11 / evas_engine.h
1 #ifndef EVAS_ENGINE_H
2 #define EVAS_ENGINE_H
3
4 #include <sys/ipc.h>
5 #include <sys/shm.h>
6
7 #include <X11/Xlib.h>
8 #include <X11/Xutil.h>
9 #include <X11/Xatom.h>
10 #include <X11/extensions/XShm.h>
11
12 #ifdef BUILD_ENGINE_SOFTWARE_XCB
13 # include <xcb/xcb.h>
14 # include <xcb/xcb_image.h>
15 #endif
16
17
18 typedef enum   _Outbuf_Depth    Outbuf_Depth;
19
20 enum _Outbuf_Depth
21 {
22    OUTBUF_DEPTH_NONE,
23    OUTBUF_DEPTH_INHERIT,
24    OUTBUF_DEPTH_RGB_16BPP_565_565_DITHERED,
25    OUTBUF_DEPTH_RGB_16BPP_555_555_DITHERED,
26    OUTBUF_DEPTH_RGB_16BPP_444_444_DITHERED,
27    OUTBUF_DEPTH_RGB_16BPP_565_444_DITHERED,
28    OUTBUF_DEPTH_RGB_32BPP_888_8888,
29    OUTBUF_DEPTH_LAST
30 };
31
32 typedef struct _Outbuf          Outbuf;
33
34 struct _Outbuf
35 {
36    Outbuf_Depth    depth;
37    int             w, h;
38    int             rot;
39    int             onebuf;
40
41    struct {
42       Convert_Pal *pal;
43       union {
44          struct {
45             Display          *disp;
46             Window            win;
47             Pixmap            mask;
48             Visual           *vis;
49             Colormap          cmap;
50             int               depth;
51             int               shm;
52             GC                gc;
53             GC                gcm;
54             unsigned char     swap     : 1;
55             unsigned char     bit_swap : 1;
56          } xlib;
57 #ifdef BUILD_ENGINE_SOFTWARE_XCB
58          struct {
59             xcb_connection_t *conn;
60             xcb_screen_t     *screen;
61             xcb_drawable_t    win;
62             xcb_pixmap_t      mask;
63             xcb_visualtype_t *vis;
64             xcb_colormap_t    cmap;
65             int               depth;
66             int               shm;
67             xcb_gcontext_t    gc;
68             xcb_gcontext_t    gcm;
69             unsigned char     swap     : 1;
70             unsigned char     bit_swap : 1;
71          } xcb;
72 #endif
73       } x11;
74       struct {
75          DATA32    r, g, b;
76       } mask;
77
78       /* 1 big buffer for updates - flush on idle_flush */
79       RGBA_Image  *onebuf;
80       Eina_List   *onebuf_regions;
81
82       /* a list of pending regions to write to the target */
83       Eina_List   *pending_writes;
84       /* a list of previous frame pending regions to write to the target */
85       Eina_List   *prev_pending_writes;
86
87       unsigned char mask_dither : 1;
88       unsigned char destination_alpha : 1;
89       unsigned char debug : 1;
90       unsigned char synced : 1;
91    } priv;
92 };
93
94
95 void evas_software_xlib_x_init (void);
96 void evas_software_xcb_x_init  (void);
97
98
99 #endif