summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configure.ac6
-rw-r--r--src/bin/Makefile.am4
-rw-r--r--src/bin/engine_software_16_x11.c219
-rw-r--r--src/bin/engine_software_16_x11.h8
-rw-r--r--src/bin/main.c5
-rw-r--r--src/bin/main.h5
6 files changed, 5 insertions, 242 deletions
diff --git a/configure.ac b/configure.ac
index 54c56a6..49c7928 100644
--- a/configure.ac
+++ b/configure.ac
@@ -89,9 +89,6 @@ EXPEDITE_CHECK_ENGINE([directfb], [DirectFB], "yes")
89EXPEDITE_CHECK_ENGINE([opengl-cocoa], [OpenGL Cocoa], "yes", [gl_cocoa_libs="-framework Cocoa"]) 89EXPEDITE_CHECK_ENGINE([opengl-cocoa], [OpenGL Cocoa], "yes", [gl_cocoa_libs="-framework Cocoa"])
90AC_SUBST(gl_cocoa_libs) 90AC_SUBST(gl_cocoa_libs)
91 91
92# Software 16bit X11
93EXPEDITE_CHECK_ENGINE([software-16-x11], [Software 16 bits X11], "yes")
94
95# 16bit WinCE 92# 16bit WinCE
96EXPEDITE_CHECK_ENGINE([software-16-wince], [Software 16 bits WinCE], "yes", [wince_16_libs="-laygshell"]) 93EXPEDITE_CHECK_ENGINE([software-16-wince], [Software 16 bits WinCE], "yes", [wince_16_libs="-laygshell"])
97AC_SUBST(wince_16_libs) 94AC_SUBST(wince_16_libs)
@@ -138,7 +135,7 @@ PKG_CHECK_MODULES([EVAS], evas >= 1.6.99 eet >= 1.6.99)
138 135
139# Xlib 136# Xlib
140 137
141if test "x$have_software_xlib" = "xyes" -o "x$have_software_16_x11" = "xyes" -o "x$have_xrender_x11" = "xyes" -o "x$have_opengl_x11" = "xyes"; then 138if test "x$have_software_xlib" = "xyes" -o "x$have_xrender_x11" = "xyes" -o "x$have_opengl_x11" = "xyes"; then
142 AC_PATH_XTRA 139 AC_PATH_XTRA
143 AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h], 140 AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h],
144 [have_xlib="yes"], 141 [have_xlib="yes"],
@@ -269,7 +266,6 @@ echo " Open GL Cocoa................: ${have_opengl_cocoa}"
269echo " FB...........................: ${have_fb}" 266echo " FB...........................: ${have_fb}"
270echo " DirectFB.....................: ${have_directfb}" 267echo " DirectFB.....................: ${have_directfb}"
271echo " PSL1GHT......................: ${have_psl1ght}" 268echo " PSL1GHT......................: ${have_psl1ght}"
272echo " Software X11 16 bits.........: ${have_software_16_x11}"
273echo " Software WinCE 16 bits.......: ${have_software_16_wince}" 269echo " Software WinCE 16 bits.......: ${have_software_16_wince}"
274echo 270echo
275echo " Installation:" 271echo " Installation:"
diff --git a/src/bin/Makefile.am b/src/bin/Makefile.am
index fa7901a..72911c0 100644
--- a/src/bin/Makefile.am
+++ b/src/bin/Makefile.am
@@ -217,9 +217,9 @@ expedite_SOURCES += \
217engine_gl_cocoa.m engine_gl_cocoa.h 217engine_gl_cocoa.m engine_gl_cocoa.h
218endif 218endif
219 219
220if BUILD_SOFTWARE_16_X11 220if BUILD_SOFTWARE_16_WINCE
221expedite_SOURCES += \ 221expedite_SOURCES += \
222engine_software_16_x11.c engine_software_16_x11.h 222engine_software_16_wince.c engine_software_16_wince.h engine_software_16_wince.rc
223endif 223endif
224 224
225if BUILD_SOFTWARE_16_WINCE 225if BUILD_SOFTWARE_16_WINCE
diff --git a/src/bin/engine_software_16_x11.c b/src/bin/engine_software_16_x11.c
deleted file mode 100644
index df2fa14..0000000
--- a/src/bin/engine_software_16_x11.c
+++ /dev/null
@@ -1,219 +0,0 @@
1#include "main.h"
2
3#include <X11/Xlib.h>
4#include <X11/Xutil.h>
5#include <X11/Xatom.h>
6#include <Evas_Engine_Software_16_X11.h>
7
8static Display *disp = NULL;
9static Window win = 0;
10static int first_expose = 0;
11
12Eina_Bool
13engine_software_16_x11_args(const char *engine, int width, int height)
14{
15 XSetWindowAttributes attr;
16 XClassHint chint;
17 XSizeHints szhints;
18 Evas_Engine_Info_Software_16_X11 *einfo;
19 int i;
20
21 disp = XOpenDisplay(NULL);
22 if (!disp) return EINA_FALSE;
23
24 evas_output_method_set(evas, evas_render_method_lookup("software_16_x11"));
25 einfo = (Evas_Engine_Info_Software_16_X11 *)evas_engine_info_get(evas);
26 if (!einfo)
27 {
28 printf("Evas does not support the Software 16bit X11 Engine\n");
29 goto close_display;
30 }
31
32 einfo->info.display = disp;
33 attr.backing_store = NotUseful;
34 attr.colormap = DefaultColormap(disp, DefaultScreen(disp));
35 attr.border_pixel = 0;
36 attr.background_pixmap = None;
37 attr.event_mask =
38 ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
39 StructureNotifyMask | EnterWindowMask | LeaveWindowMask |
40 KeyPressMask | KeyReleaseMask;
41 attr.bit_gravity = ForgetGravity;
42 win = XCreateWindow(disp, DefaultRootWindow(disp),
43 0, 0, width, height, 0,
44 DefaultDepth(disp, DefaultScreen(disp)), InputOutput,
45 DefaultVisual(disp, DefaultScreen(disp)),
46 CWBackingStore | CWColormap |
47 CWBackPixmap | CWBorderPixel |
48 CWBitGravity | CWEventMask,
49 &attr);
50 if (!win)
51 goto close_display;
52
53 einfo->info.drawable = win;
54 if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
55 {
56 printf("Evas can not setup the informations of the Software 16bit X11 Engine\n");
57 goto destroy_window;
58 }
59
60 if (fullscreen)
61 {
62 Atom prop = XInternAtom(disp, "_NET_WM_STATE", False);
63 Atom state = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
64 unsigned long data = state;
65 XChangeProperty(disp, win, prop, XA_ATOM, 32, PropModeReplace,
66 (unsigned char*) &data, 1);
67 }
68
69 XStoreName(disp, win, "Expedite - Evas Test Suite");
70 chint.res_name = "expedite";
71 chint.res_class = "Expedite";
72 XSetClassHint(disp, win, &chint);
73 szhints.flags = PMinSize | PMaxSize | PSize | USSize;
74 szhints.min_width = szhints.max_width = width;
75 szhints.min_height = szhints.max_height = height;
76 XSetWMNormalHints(disp, win, &szhints);
77 XMapWindow(disp, win);
78 XSync(disp, False);
79 while (!first_expose)
80 engine_software_16_x11_loop();
81 return EINA_TRUE;
82
83 destroy_window:
84 XDestroyWindow(disp, win);
85 close_display:
86 XCloseDisplay(disp);
87
88 return EINA_FALSE;
89}
90
91void
92engine_software_16_x11_loop(void)
93{
94 XEvent ev;
95 KeySym ks;
96 char *kstr;
97
98 again:
99 if (!XCheckMaskEvent(disp,
100 ExposureMask |
101 StructureNotifyMask |
102 KeyPressMask |
103 KeyReleaseMask |
104 ButtonPressMask |
105 ButtonReleaseMask |
106 PointerMotionMask |
107 EnterWindowMask |
108 LeaveWindowMask, &ev))
109 return;
110 switch (ev.type)
111 {
112 case ButtonPress:
113 evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL);
114 evas_event_feed_mouse_down(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL);
115 break;
116 case ButtonRelease:
117 evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL);
118 evas_event_feed_mouse_up(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL);
119 break;
120 case MotionNotify:
121 evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
122 break;
123 case Expose:
124 first_expose = 1;
125 evas_damage_rectangle_add(evas,
126 ev.xexpose.x,
127 ev.xexpose.y,
128 ev.xexpose.width,
129 ev.xexpose.height);
130 break;
131 case ConfigureNotify:
132 evas_output_viewport_set(evas, 0, 0,
133 ev.xconfigure.width,
134 ev.xconfigure.height);
135 evas_output_size_set(evas,
136 ev.xconfigure.width,
137 ev.xconfigure.height);
138 win_w = ev.xconfigure.width;
139 win_h = ev.xconfigure.height;
140 break;
141 case EnterNotify:
142 evas_event_feed_mouse_in(evas, 0, NULL);
143 break;
144 case LeaveNotify:
145 evas_event_feed_mouse_out(evas, 0, NULL);
146 break;
147 case KeyPress:
148 ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0);
149 kstr = XKeysymToString(ks);
150 if (kstr)
151 {
152 if ((!strcmp(kstr, "Shift_L")) ||
153 (!strcmp(kstr, "Shift_R")))
154 evas_key_modifier_on(evas, "Shift");
155 if ((!strcmp(kstr, "Control_L")) ||
156 (!strcmp(kstr, "Control_R")))
157 evas_key_modifier_on(evas, "Control");
158 if ((!strcmp(kstr, "Alt_L")) ||
159 (!strcmp(kstr, "Alt_R")))
160 evas_key_modifier_on(evas, "Alt");
161 if ((!strcmp(kstr, "Super_L")) ||
162 (!strcmp(kstr, "Super_R")))
163 evas_key_modifier_on(evas, "Super");
164 if (!strcmp(kstr, "Caps_Lock"))
165 {
166 if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock"))
167 evas_key_lock_off(evas, "Caps_Lock");
168 else
169 evas_key_lock_on(evas, "Caps_Lock");
170 }
171 if (!strcmp(kstr, "Num_Lock"))
172 {
173 if (evas_key_lock_is_set(evas_key_lock_get(evas), "Num_Lock"))
174 evas_key_lock_off(evas, "Num_Lock");
175 else
176 evas_key_lock_on(evas, "Num_Lock");
177 }
178 if (!strcmp(kstr, "Scroll_Lock"))
179 {
180 if (evas_key_lock_is_set(evas_key_lock_get(evas), "Scroll_Lock"))
181 evas_key_lock_off(evas, "Scroll_Lock");
182 else
183 evas_key_lock_on(evas, "Scroll_Lock");
184 }
185 if (kstr) evas_event_feed_key_down(evas, kstr, kstr, NULL, NULL, 0, NULL);
186 }
187 break;
188 case KeyRelease:
189 ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0);
190 kstr = XKeysymToString(ks);
191 if (kstr)
192 {
193 if ((!strcmp(kstr, "Shift_L")) ||
194 (!strcmp(kstr, "Shift_R")))
195 evas_key_modifier_off(evas, "Shift");
196 if ((!strcmp(kstr, "Control_L")) ||
197 (!strcmp(kstr, "Control_R")))
198 evas_key_modifier_off(evas, "Control");
199 if ((!strcmp(kstr, "Alt_L")) ||
200 (!strcmp(kstr, "Alt_R")))
201 evas_key_modifier_off(evas, "Alt");
202 if ((!strcmp(kstr, "Super_L")) ||
203 (!strcmp(kstr, "Super_R")))
204 evas_key_modifier_off(evas, "Super");
205 evas_event_feed_key_up(evas, kstr, kstr, NULL, NULL, 0, NULL);
206 }
207 break;
208 default:
209 break;
210 }
211 goto again;
212}
213
214void
215engine_software_16_x11_shutdown(void)
216{
217 XDestroyWindow(disp, win);
218 XCloseDisplay(disp);
219}
diff --git a/src/bin/engine_software_16_x11.h b/src/bin/engine_software_16_x11.h
deleted file mode 100644
index ae83725..0000000
--- a/src/bin/engine_software_16_x11.h
+++ /dev/null
@@ -1,8 +0,0 @@
1#ifndef ENGINE_SOFTWARE_16_X11_H
2#define ENGINE_SOFTWARE_16_X11_H
3
4Eina_Bool engine_software_16_x11_args(const char *engine, int width, int height);
5void engine_software_16_x11_loop(void);
6void engine_software_16_x11_shutdown(void);
7
8#endif
diff --git a/src/bin/main.c b/src/bin/main.c
index 7f01a04..0b1c91b 100644
--- a/src/bin/main.c
+++ b/src/bin/main.c
@@ -1176,9 +1176,6 @@ static const Expedite_Engine engines[] = {
1176#if HAVE_EVAS_PSL1GHT 1176#if HAVE_EVAS_PSL1GHT
1177 { "psl1ght", engine_psl1ght_args, engine_psl1ght_loop, engine_psl1ght_shutdown }, 1177 { "psl1ght", engine_psl1ght_args, engine_psl1ght_loop, engine_psl1ght_shutdown },
1178#endif 1178#endif
1179#if HAVE_EVAS_SOFTWARE_16_X11
1180 { "x11-16",engine_software_16_x11_args, engine_software_16_x11_loop, engine_software_16_x11_shutdown },
1181#endif
1182#if HAVE_EVAS_SOFTWARE_16_DDRAW 1179#if HAVE_EVAS_SOFTWARE_16_DDRAW
1183 { "ddraw-16",engine_software_16_ddraw_args, engine_software_16_ddraw_loop, engine_software_16_ddraw_shutdown }, 1180 { "ddraw-16",engine_software_16_ddraw_args, engine_software_16_ddraw_loop, engine_software_16_ddraw_shutdown },
1184#endif 1181#endif
@@ -1360,7 +1357,7 @@ _engine_args(int argc, char **argv)
1360int 1357int
1361main(int argc, char **argv) 1358main(int argc, char **argv)
1362{ 1359{
1363#if defined (HAVE_EVAS_SOFTWARE_XLIB) || defined (HAVE_EVAS_XRENDER_X11) ||defined (HAVE_EVAS_OPENGL_X11) || defined (HAVE_EVAS_SOFTWARE_16_X11) 1360#if defined (HAVE_EVAS_SOFTWARE_XLIB) || defined (HAVE_EVAS_XRENDER_X11) ||defined (HAVE_EVAS_OPENGL_X11)
1364 XInitThreads(); 1361 XInitThreads();
1365#endif 1362#endif
1366 1363
diff --git a/src/bin/main.h b/src/bin/main.h
index f7d3cc3..8b3a13b 100644
--- a/src/bin/main.h
+++ b/src/bin/main.h
@@ -12,7 +12,7 @@
12#include <math.h> 12#include <math.h>
13#include <time.h> 13#include <time.h>
14 14
15#if defined (HAVE_EVAS_SOFTWARE_XLIB) || defined (HAVE_EVAS_XRENDER_X11) ||defined (HAVE_EVAS_OPENGL_X11) || defined (HAVE_EVAS_SOFTWARE_16_X11) 15#if defined (HAVE_EVAS_SOFTWARE_XLIB) || defined (HAVE_EVAS_XRENDER_X11) ||defined (HAVE_EVAS_OPENGL_X11)
16#include <X11/Xlib.h> 16#include <X11/Xlib.h>
17#endif 17#endif
18 18
@@ -71,9 +71,6 @@
71#if HAVE_EVAS_PSL1GHT 71#if HAVE_EVAS_PSL1GHT
72#include "engine_psl1ght.h" 72#include "engine_psl1ght.h"
73#endif 73#endif
74#if HAVE_EVAS_SOFTWARE_16_X11
75#include "engine_software_16_x11.h"
76#endif
77#if HAVE_EVAS_SOFTWARE_16_DDRAW 74#if HAVE_EVAS_SOFTWARE_16_DDRAW
78#include "engine_software_16_ddraw.h" 75#include "engine_software_16_ddraw.h"
79#endif 76#endif