forked from enlightenment/expedite
Expedite: Remove software_16_X11 code
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com> SVN revision: 78402
This commit is contained in:
parent
0ff46d0f59
commit
8ac751d68e
|
@ -89,9 +89,6 @@ EXPEDITE_CHECK_ENGINE([directfb], [DirectFB], "yes")
|
|||
EXPEDITE_CHECK_ENGINE([opengl-cocoa], [OpenGL Cocoa], "yes", [gl_cocoa_libs="-framework Cocoa"])
|
||||
AC_SUBST(gl_cocoa_libs)
|
||||
|
||||
# Software 16bit X11
|
||||
EXPEDITE_CHECK_ENGINE([software-16-x11], [Software 16 bits X11], "yes")
|
||||
|
||||
# 16bit WinCE
|
||||
EXPEDITE_CHECK_ENGINE([software-16-wince], [Software 16 bits WinCE], "yes", [wince_16_libs="-laygshell"])
|
||||
AC_SUBST(wince_16_libs)
|
||||
|
@ -138,7 +135,7 @@ PKG_CHECK_MODULES([EVAS], evas >= 1.6.99 eet >= 1.6.99)
|
|||
|
||||
# Xlib
|
||||
|
||||
if 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
|
||||
if test "x$have_software_xlib" = "xyes" -o "x$have_xrender_x11" = "xyes" -o "x$have_opengl_x11" = "xyes"; then
|
||||
AC_PATH_XTRA
|
||||
AC_CHECK_HEADERS([X11/Xlib.h X11/Xutil.h],
|
||||
[have_xlib="yes"],
|
||||
|
@ -269,7 +266,6 @@ echo " Open GL Cocoa................: ${have_opengl_cocoa}"
|
|||
echo " FB...........................: ${have_fb}"
|
||||
echo " DirectFB.....................: ${have_directfb}"
|
||||
echo " PSL1GHT......................: ${have_psl1ght}"
|
||||
echo " Software X11 16 bits.........: ${have_software_16_x11}"
|
||||
echo " Software WinCE 16 bits.......: ${have_software_16_wince}"
|
||||
echo
|
||||
echo " Installation:"
|
||||
|
|
|
@ -217,9 +217,9 @@ expedite_SOURCES += \
|
|||
engine_gl_cocoa.m engine_gl_cocoa.h
|
||||
endif
|
||||
|
||||
if BUILD_SOFTWARE_16_X11
|
||||
if BUILD_SOFTWARE_16_WINCE
|
||||
expedite_SOURCES += \
|
||||
engine_software_16_x11.c engine_software_16_x11.h
|
||||
engine_software_16_wince.c engine_software_16_wince.h engine_software_16_wince.rc
|
||||
endif
|
||||
|
||||
if BUILD_SOFTWARE_16_WINCE
|
||||
|
|
|
@ -1,219 +0,0 @@
|
|||
#include "main.h"
|
||||
|
||||
#include <X11/Xlib.h>
|
||||
#include <X11/Xutil.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include <Evas_Engine_Software_16_X11.h>
|
||||
|
||||
static Display *disp = NULL;
|
||||
static Window win = 0;
|
||||
static int first_expose = 0;
|
||||
|
||||
Eina_Bool
|
||||
engine_software_16_x11_args(const char *engine, int width, int height)
|
||||
{
|
||||
XSetWindowAttributes attr;
|
||||
XClassHint chint;
|
||||
XSizeHints szhints;
|
||||
Evas_Engine_Info_Software_16_X11 *einfo;
|
||||
int i;
|
||||
|
||||
disp = XOpenDisplay(NULL);
|
||||
if (!disp) return EINA_FALSE;
|
||||
|
||||
evas_output_method_set(evas, evas_render_method_lookup("software_16_x11"));
|
||||
einfo = (Evas_Engine_Info_Software_16_X11 *)evas_engine_info_get(evas);
|
||||
if (!einfo)
|
||||
{
|
||||
printf("Evas does not support the Software 16bit X11 Engine\n");
|
||||
goto close_display;
|
||||
}
|
||||
|
||||
einfo->info.display = disp;
|
||||
attr.backing_store = NotUseful;
|
||||
attr.colormap = DefaultColormap(disp, DefaultScreen(disp));
|
||||
attr.border_pixel = 0;
|
||||
attr.background_pixmap = None;
|
||||
attr.event_mask =
|
||||
ExposureMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask |
|
||||
StructureNotifyMask | EnterWindowMask | LeaveWindowMask |
|
||||
KeyPressMask | KeyReleaseMask;
|
||||
attr.bit_gravity = ForgetGravity;
|
||||
win = XCreateWindow(disp, DefaultRootWindow(disp),
|
||||
0, 0, width, height, 0,
|
||||
DefaultDepth(disp, DefaultScreen(disp)), InputOutput,
|
||||
DefaultVisual(disp, DefaultScreen(disp)),
|
||||
CWBackingStore | CWColormap |
|
||||
CWBackPixmap | CWBorderPixel |
|
||||
CWBitGravity | CWEventMask,
|
||||
&attr);
|
||||
if (!win)
|
||||
goto close_display;
|
||||
|
||||
einfo->info.drawable = win;
|
||||
if (!evas_engine_info_set(evas, (Evas_Engine_Info *) einfo))
|
||||
{
|
||||
printf("Evas can not setup the informations of the Software 16bit X11 Engine\n");
|
||||
goto destroy_window;
|
||||
}
|
||||
|
||||
if (fullscreen)
|
||||
{
|
||||
Atom prop = XInternAtom(disp, "_NET_WM_STATE", False);
|
||||
Atom state = XInternAtom(disp, "_NET_WM_STATE_FULLSCREEN", False);
|
||||
unsigned long data = state;
|
||||
XChangeProperty(disp, win, prop, XA_ATOM, 32, PropModeReplace,
|
||||
(unsigned char*) &data, 1);
|
||||
}
|
||||
|
||||
XStoreName(disp, win, "Expedite - Evas Test Suite");
|
||||
chint.res_name = "expedite";
|
||||
chint.res_class = "Expedite";
|
||||
XSetClassHint(disp, win, &chint);
|
||||
szhints.flags = PMinSize | PMaxSize | PSize | USSize;
|
||||
szhints.min_width = szhints.max_width = width;
|
||||
szhints.min_height = szhints.max_height = height;
|
||||
XSetWMNormalHints(disp, win, &szhints);
|
||||
XMapWindow(disp, win);
|
||||
XSync(disp, False);
|
||||
while (!first_expose)
|
||||
engine_software_16_x11_loop();
|
||||
return EINA_TRUE;
|
||||
|
||||
destroy_window:
|
||||
XDestroyWindow(disp, win);
|
||||
close_display:
|
||||
XCloseDisplay(disp);
|
||||
|
||||
return EINA_FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
engine_software_16_x11_loop(void)
|
||||
{
|
||||
XEvent ev;
|
||||
KeySym ks;
|
||||
char *kstr;
|
||||
|
||||
again:
|
||||
if (!XCheckMaskEvent(disp,
|
||||
ExposureMask |
|
||||
StructureNotifyMask |
|
||||
KeyPressMask |
|
||||
KeyReleaseMask |
|
||||
ButtonPressMask |
|
||||
ButtonReleaseMask |
|
||||
PointerMotionMask |
|
||||
EnterWindowMask |
|
||||
LeaveWindowMask, &ev))
|
||||
return;
|
||||
switch (ev.type)
|
||||
{
|
||||
case ButtonPress:
|
||||
evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL);
|
||||
evas_event_feed_mouse_down(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL);
|
||||
break;
|
||||
case ButtonRelease:
|
||||
evas_event_feed_mouse_move(evas, ev.xbutton.x, ev.xbutton.y, 0, NULL);
|
||||
evas_event_feed_mouse_up(evas, ev.xbutton.button, EVAS_BUTTON_NONE, 0, NULL);
|
||||
break;
|
||||
case MotionNotify:
|
||||
evas_event_feed_mouse_move(evas, ev.xmotion.x, ev.xmotion.y, 0, NULL);
|
||||
break;
|
||||
case Expose:
|
||||
first_expose = 1;
|
||||
evas_damage_rectangle_add(evas,
|
||||
ev.xexpose.x,
|
||||
ev.xexpose.y,
|
||||
ev.xexpose.width,
|
||||
ev.xexpose.height);
|
||||
break;
|
||||
case ConfigureNotify:
|
||||
evas_output_viewport_set(evas, 0, 0,
|
||||
ev.xconfigure.width,
|
||||
ev.xconfigure.height);
|
||||
evas_output_size_set(evas,
|
||||
ev.xconfigure.width,
|
||||
ev.xconfigure.height);
|
||||
win_w = ev.xconfigure.width;
|
||||
win_h = ev.xconfigure.height;
|
||||
break;
|
||||
case EnterNotify:
|
||||
evas_event_feed_mouse_in(evas, 0, NULL);
|
||||
break;
|
||||
case LeaveNotify:
|
||||
evas_event_feed_mouse_out(evas, 0, NULL);
|
||||
break;
|
||||
case KeyPress:
|
||||
ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0);
|
||||
kstr = XKeysymToString(ks);
|
||||
if (kstr)
|
||||
{
|
||||
if ((!strcmp(kstr, "Shift_L")) ||
|
||||
(!strcmp(kstr, "Shift_R")))
|
||||
evas_key_modifier_on(evas, "Shift");
|
||||
if ((!strcmp(kstr, "Control_L")) ||
|
||||
(!strcmp(kstr, "Control_R")))
|
||||
evas_key_modifier_on(evas, "Control");
|
||||
if ((!strcmp(kstr, "Alt_L")) ||
|
||||
(!strcmp(kstr, "Alt_R")))
|
||||
evas_key_modifier_on(evas, "Alt");
|
||||
if ((!strcmp(kstr, "Super_L")) ||
|
||||
(!strcmp(kstr, "Super_R")))
|
||||
evas_key_modifier_on(evas, "Super");
|
||||
if (!strcmp(kstr, "Caps_Lock"))
|
||||
{
|
||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Caps_Lock"))
|
||||
evas_key_lock_off(evas, "Caps_Lock");
|
||||
else
|
||||
evas_key_lock_on(evas, "Caps_Lock");
|
||||
}
|
||||
if (!strcmp(kstr, "Num_Lock"))
|
||||
{
|
||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Num_Lock"))
|
||||
evas_key_lock_off(evas, "Num_Lock");
|
||||
else
|
||||
evas_key_lock_on(evas, "Num_Lock");
|
||||
}
|
||||
if (!strcmp(kstr, "Scroll_Lock"))
|
||||
{
|
||||
if (evas_key_lock_is_set(evas_key_lock_get(evas), "Scroll_Lock"))
|
||||
evas_key_lock_off(evas, "Scroll_Lock");
|
||||
else
|
||||
evas_key_lock_on(evas, "Scroll_Lock");
|
||||
}
|
||||
if (kstr) evas_event_feed_key_down(evas, kstr, kstr, NULL, NULL, 0, NULL);
|
||||
}
|
||||
break;
|
||||
case KeyRelease:
|
||||
ks = XKeycodeToKeysym(ev.xkey.display, ev.xkey.keycode, 0);
|
||||
kstr = XKeysymToString(ks);
|
||||
if (kstr)
|
||||
{
|
||||
if ((!strcmp(kstr, "Shift_L")) ||
|
||||
(!strcmp(kstr, "Shift_R")))
|
||||
evas_key_modifier_off(evas, "Shift");
|
||||
if ((!strcmp(kstr, "Control_L")) ||
|
||||
(!strcmp(kstr, "Control_R")))
|
||||
evas_key_modifier_off(evas, "Control");
|
||||
if ((!strcmp(kstr, "Alt_L")) ||
|
||||
(!strcmp(kstr, "Alt_R")))
|
||||
evas_key_modifier_off(evas, "Alt");
|
||||
if ((!strcmp(kstr, "Super_L")) ||
|
||||
(!strcmp(kstr, "Super_R")))
|
||||
evas_key_modifier_off(evas, "Super");
|
||||
evas_event_feed_key_up(evas, kstr, kstr, NULL, NULL, 0, NULL);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
goto again;
|
||||
}
|
||||
|
||||
void
|
||||
engine_software_16_x11_shutdown(void)
|
||||
{
|
||||
XDestroyWindow(disp, win);
|
||||
XCloseDisplay(disp);
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
#ifndef ENGINE_SOFTWARE_16_X11_H
|
||||
#define ENGINE_SOFTWARE_16_X11_H
|
||||
|
||||
Eina_Bool engine_software_16_x11_args(const char *engine, int width, int height);
|
||||
void engine_software_16_x11_loop(void);
|
||||
void engine_software_16_x11_shutdown(void);
|
||||
|
||||
#endif
|
|
@ -1176,9 +1176,6 @@ static const Expedite_Engine engines[] = {
|
|||
#if HAVE_EVAS_PSL1GHT
|
||||
{ "psl1ght", engine_psl1ght_args, engine_psl1ght_loop, engine_psl1ght_shutdown },
|
||||
#endif
|
||||
#if HAVE_EVAS_SOFTWARE_16_X11
|
||||
{ "x11-16",engine_software_16_x11_args, engine_software_16_x11_loop, engine_software_16_x11_shutdown },
|
||||
#endif
|
||||
#if HAVE_EVAS_SOFTWARE_16_DDRAW
|
||||
{ "ddraw-16",engine_software_16_ddraw_args, engine_software_16_ddraw_loop, engine_software_16_ddraw_shutdown },
|
||||
#endif
|
||||
|
@ -1360,7 +1357,7 @@ _engine_args(int argc, char **argv)
|
|||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
#if defined (HAVE_EVAS_SOFTWARE_XLIB) || defined (HAVE_EVAS_XRENDER_X11) ||defined (HAVE_EVAS_OPENGL_X11) || defined (HAVE_EVAS_SOFTWARE_16_X11)
|
||||
#if defined (HAVE_EVAS_SOFTWARE_XLIB) || defined (HAVE_EVAS_XRENDER_X11) ||defined (HAVE_EVAS_OPENGL_X11)
|
||||
XInitThreads();
|
||||
#endif
|
||||
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
#include <math.h>
|
||||
#include <time.h>
|
||||
|
||||
#if defined (HAVE_EVAS_SOFTWARE_XLIB) || defined (HAVE_EVAS_XRENDER_X11) ||defined (HAVE_EVAS_OPENGL_X11) || defined (HAVE_EVAS_SOFTWARE_16_X11)
|
||||
#if defined (HAVE_EVAS_SOFTWARE_XLIB) || defined (HAVE_EVAS_XRENDER_X11) ||defined (HAVE_EVAS_OPENGL_X11)
|
||||
#include <X11/Xlib.h>
|
||||
#endif
|
||||
|
||||
|
@ -71,9 +71,6 @@
|
|||
#if HAVE_EVAS_PSL1GHT
|
||||
#include "engine_psl1ght.h"
|
||||
#endif
|
||||
#if HAVE_EVAS_SOFTWARE_16_X11
|
||||
#include "engine_software_16_x11.h"
|
||||
#endif
|
||||
#if HAVE_EVAS_SOFTWARE_16_DDRAW
|
||||
#include "engine_software_16_ddraw.h"
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue