remove xcb support in ecore_x and evas engines as per mailing list
[platform/upstream/efl.git] / src / modules / evas / 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 # include <X11/Xresource.h> // xres - dpi
12
13 #include "../software_generic/Evas_Engine_Software_Generic.h"
14
15 extern int _evas_engine_soft_x11_log_dom;
16
17 # ifdef ERR
18 #  undef ERR
19 # endif
20 # define ERR(...) EINA_LOG_DOM_ERR(_evas_engine_soft_x11_log_dom, __VA_ARGS__)
21
22 # ifdef DBG
23 #  undef DBG
24 # endif
25 # define DBG(...) EINA_LOG_DOM_DBG(_evas_engine_soft_x11_log_dom, __VA_ARGS__)
26
27 # ifdef INF
28 #  undef INF
29 # endif
30 # define INF(...) EINA_LOG_DOM_INFO(_evas_engine_soft_x11_log_dom, __VA_ARGS__)
31
32 # ifdef WRN
33 #  undef WRN
34 # endif
35 # define WRN(...) EINA_LOG_DOM_WARN(_evas_engine_soft_x11_log_dom, __VA_ARGS__)
36
37 # ifdef CRI
38 #  undef CRI
39 # endif
40 # define CRI(...) \
41    EINA_LOG_DOM_CRIT(_evas_engine_soft_x11_log_dom, __VA_ARGS__)
42
43 struct _Outbuf
44 {
45    Outbuf_Depth depth;
46    int w, h;
47    int rot;
48    int onebuf;
49
50    struct 
51      {
52         Convert_Pal *pal;
53         union 
54           {
55              struct 
56                {
57                   Display *disp;
58                   Window win;
59                   Pixmap mask;
60                   Visual *vis;
61                   Colormap cmap;
62                   int depth, imdepth, shm;
63                   GC gc, gcm;
64                   unsigned char swap : 1;
65                   unsigned char bit_swap : 1;
66                } xlib;
67           } x11;
68         struct 
69           {
70              DATA32 r, g, b;
71           } mask;
72
73         /* 1 big buffer for updates - flush on idle_flush */
74         RGBA_Image *onebuf;
75         Eina_Array  onebuf_regions;
76         
77         void *swapper;
78
79         /* a list of pending regions to write to the target */
80         Eina_List *pending_writes;
81
82         /* a list of previous frame pending regions to write to the target */
83         Eina_List *prev_pending_writes;
84         Eina_Spinlock lock;
85
86         unsigned char mask_dither : 1;
87         unsigned char destination_alpha : 1;
88         unsigned char debug : 1;
89         unsigned char synced : 1;
90      } priv;
91    struct
92      {
93         void (*cb)(Evas *e, int x, int y, int w, int h, const void *pixels);
94         Evas *evas;
95      } region_push_hook;
96 };
97
98 void evas_software_xlib_x_init(void);
99
100 void evas_software_x11_region_push_hook_call(Outbuf *buf, int x, int y, void *out_buf, Eina_Spinlock *lock);
101
102 #endif