add GDI evas engine support

SVN revision: 40311
This commit is contained in:
Vincent Torri 2009-04-23 03:24:16 +00:00
parent 7f98415206
commit 38fe5f2884
8 changed files with 256 additions and 323 deletions

View File

@ -107,6 +107,7 @@ want_ecore_evas_opengl_x11="no"
want_ecore_evas_software_16_x11="no"
want_ecore_evas_software_xcb="no"
want_ecore_evas_xrender_xcb="no"
want_ecore_evas_software_gdi="no"
want_ecore_evas_software_ddraw="no"
want_ecore_evas_direct3d="no"
want_ecore_evas_opengl_glew="no"
@ -126,6 +127,7 @@ case "$host_os" in
want_curl="yes"
want_ecore_imf="yes"
want_ecore_win32="yes"
want_ecore_evas_software_gdi="yes"
want_ecore_evas_software_ddraw="yes"
want_ecore_evas_direct3d="yes"
want_ecore_evas_opengl_glew="yes"
@ -957,6 +959,11 @@ fi
# ecore_evas_win32
ECORE_EVAS_CHECK_MODULE([software-gdi],
[${want_ecore_evas_software_gdi}],
[Software GDI],
[${have_ecore_win32}])
ECORE_EVAS_CHECK_MODULE([software-ddraw],
[${want_ecore_evas_software_ddraw}],
[Software DirectDraw],
@ -977,7 +984,8 @@ ECORE_EVAS_CHECK_MODULE([software-16-ddraw],
[16 bpp Software DirectDraw],
[${have_ecore_win32}])
if test "x${have_ecore_evas_software_ddraw}" = "xyes" -o \
if test "x${have_ecore_evas_software_gdi}" = "xyes" -o \
"x${have_ecore_evas_software_ddraw}" = "xyes" -o \
"x${have_ecore_evas_direct3d}" = "xyes" -o \
"x${have_ecore_evas_opengl_glew}" = "xyes" -o \
"x${have_ecore_evas_software_16_ddraw}" = "xyes" ; then
@ -1199,6 +1207,7 @@ if test "x${have_ecore_evas}" = "xyes" ; then
echo " OpenGL X11.................: $have_ecore_evas_opengl_x11"
echo " Software XCB...............: $have_ecore_evas_software_xcb"
echo " XRender XCB................: $have_ecore_evas_xrender_xcb"
echo " Software GDI...............: $have_ecore_evas_software_gdi"
echo " Software DirectDraw........: $have_ecore_evas_software_ddraw"
echo " Direct3D...................: $have_ecore_evas_direct3d"
echo " OpenGL Glew................: $have_ecore_evas_opengl_glew"

View File

@ -76,6 +76,7 @@ typedef enum _Ecore_Evas_Engine_Type
ECORE_EVAS_ENGINE_OPENGL_X11,
ECORE_EVAS_ENGINE_SOFTWARE_XCB,
ECORE_EVAS_ENGINE_XRENDER_XCB,
ECORE_EVAS_ENGINE_SOFTWARE_GDI,
ECORE_EVAS_ENGINE_SOFTWARE_DDRAW,
ECORE_EVAS_ENGINE_DIRECT3D,
ECORE_EVAS_ENGINE_OPENGL_GLEW,
@ -114,7 +115,7 @@ typedef struct _Ecore_DirectFB_Window Ecore_DirectFB_Window;
#endif
#ifndef __ECORE_WIN32_H__
typedef void Ecore_Win32_Window;
typedef struct _Ecore_Win32_Window Ecore_Win32_Window;
#endif
#ifndef __ECORE_WINCE_H__
@ -175,6 +176,12 @@ EAPI const void *ecore_evas_buffer_pixels_get(Ecore_Evas *ee);
EAPI Evas_Object *ecore_evas_object_image_new(Ecore_Evas *ee_target);
EAPI Ecore_Evas *ecore_evas_software_gdi_new(Ecore_Win32_Window *parent,
int x,
int y,
int width,
int height);
EAPI Ecore_Evas *ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
int x,
int y,

View File

@ -75,7 +75,8 @@ $(ECORE_QUARTZ_INC) \
$(ECORE_WINCE_INC) \
@EVAS_CFLAGS@ \
@XCB_CFLAGS@ \
@EINA_CFLAGS@
@EINA_CFLAGS@ \
@EVIL_CFLAGS@
AM_CFLAGS = @WIN32_CFLAGS@
@ -106,9 +107,10 @@ $(ECORE_SDL_LIB) \
$(ECORE_SDL_LIBADD) \
$(ECORE_QUARTZ_LIB) \
$(ECORE_WINCE_LIB) \
$(top_builddir)/src/lib/ecore/libecore.la \
$(top_builddir)/src/lib/ecore_input/libecore_input.la \
@EVAS_LIBS@
$(top_builddir)/src/lib/ecore/libecore.la \
@EVAS_LIBS@ \
@EVIL_LIBS@
libecore_evas_la_LDFLAGS = @quartz_ldflags@ -no-undefined @lt_enable_auto_import@ -version-info @version_info@ @ecore_evas_release_info@

View File

@ -67,6 +67,12 @@ ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine)
return 1;
#else
return 0;
#endif
case ECORE_EVAS_ENGINE_SOFTWARE_GDI:
#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
return 1;
#else
return 0;
#endif
case ECORE_EVAS_ENGINE_SOFTWARE_DDRAW:
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
@ -415,6 +421,14 @@ _ecore_evas_constructor_fb(int x __UNUSED__, int y __UNUSED__, int w, int h, con
}
#endif
#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
static Ecore_Evas *
_ecore_evas_constructor_software_gdi(int x, int y, int w, int h, const char *extra_options)
{
return ecore_evas_software_gdi_new(NULL, x, y, w, h);
}
#endif
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
static Ecore_Evas *
_ecore_evas_constructor_software_ddraw(int x, int y, int w, int h, const char *extra_options)
@ -510,6 +524,9 @@ static const struct ecore_evas_engine _engines[] = {
#endif
/* windows */
#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
{"software_gdi", _ecore_evas_constructor_software_gdi},
#endif
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
{"software_ddraw", _ecore_evas_constructor_software_ddraw},
#endif

View File

@ -73,6 +73,9 @@
#ifdef BUILD_ECORE_EVAS_WIN32
# include "Ecore_Win32.h"
# ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
# include <Evas_Engine_Software_Gdi.h>
# endif
# ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
# include <Evas_Engine_Software_DDraw.h>
# endif

View File

@ -857,6 +857,39 @@ static const Ecore_Evas_Engine_Func _ecore_win32_engine_func =
/* API */
#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
static int
_ecore_evas_engine_software_gdi_init(Ecore_Evas *ee)
{
Evas_Engine_Info_Software_Gdi *einfo;
const char *driver;
int rmethod;
driver = "software_gdi";
rmethod = evas_render_method_lookup(driver);
if (!rmethod)
return 0;
ee->driver = driver;
evas_output_method_set(ee->evas, rmethod);
einfo = (Evas_Engine_Info_Software_Gdi *)evas_engine_info_get(ee->evas);
if (einfo)
{
/* FIXME: REDRAW_DEBUG missing for now */
einfo->info.window = ((struct _Ecore_Win32_Window *)ee->prop.window)->window;
einfo->info.mask = NULL;
einfo->info.depth = ecore_win32_screen_depth_get();
einfo->info.rotation = 0;
einfo->info.fullscreen = 0;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
}
return 1;
}
#endif /* BUILD_ECORE_EVAS_SOFTWARE_GDI */
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
static int
_ecore_evas_engine_software_ddraw_init(Ecore_Evas *ee)
@ -1052,6 +1085,37 @@ _ecore_evas_win32_new_internal(int (*_ecore_evas_engine_init)(Ecore_Evas *ee),
#endif /* BUILD_ECORE_EVAS_WIN32 */
#ifdef BUILD_ECORE_EVAS_SOFTWARE_GDI
EAPI Ecore_Evas *
ecore_evas_software_gdi_new(Ecore_Win32_Window *parent,
int x,
int y,
int width,
int height)
{
return _ecore_evas_win32_new_internal(_ecore_evas_engine_software_gdi_init,
parent,
x,
y,
width,
height);
}
#else
EAPI Ecore_Evas *
ecore_evas_software_gdi_new(Ecore_Win32_Window *parent __UNUSED__,
int x __UNUSED__,
int y __UNUSED__,
int width __UNUSED__,
int height __UNUSED__)
{
return NULL;
}
#endif /* ! BUILD_ECORE_EVAS_SOFTWARE_GDI */
#ifdef BUILD_ECORE_EVAS_SOFTWARE_DDRAW
EAPI Ecore_Evas *

View File

@ -23,7 +23,7 @@
#ifdef BUILD_ECORE_EVAS_SOFTWARE_16_WINCE
#define ECORE_EVAS_EVENT_COUNT 12
#define ECORE_EVAS_EVENT_COUNT 7
static int _ecore_evas_init_count = 0;
static int _ecore_evas_fps_debug = 0;
@ -33,16 +33,6 @@ static Ecore_Idle_Enterer *ecore_evas_idle_enterer = NULL;
static Ecore_Evas *ecore_evases = NULL;
static Eina_Hash *ecore_evases_hash = NULL;
static int _ecore_evas_wince_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *event);
static int _ecore_evas_wince_event_key_up(void *data __UNUSED__, int type __UNUSED__, void *event);
static int _ecore_evas_wince_event_mouse_button_down(void *data __UNUSED__, int type __UNUSED__, void *event);
static int _ecore_evas_wince_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED__, void *event);
static int _ecore_evas_wince_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event);
static int _ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event);
static int _ecore_evas_wince_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, void *event);
@ -139,21 +129,16 @@ _ecore_evas_wince_init(void)
ecore_evas_idle_enterer = ecore_idle_enterer_add(_ecore_evas_wince_idle_enter, NULL);
ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_WINCE_EVENT_KEY_DOWN, _ecore_evas_wince_event_key_down, NULL);
ecore_evas_event_handlers[1] = ecore_event_handler_add(ECORE_WINCE_EVENT_KEY_UP, _ecore_evas_wince_event_key_up, NULL);
ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_BUTTON_DOWN, _ecore_evas_wince_event_mouse_button_down, NULL);
ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_BUTTON_UP, _ecore_evas_wince_event_mouse_button_up, NULL);
ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_MOVE, _ecore_evas_wince_event_mouse_move, NULL);
ecore_evas_event_handlers[5] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_IN, _ecore_evas_wince_event_mouse_in, NULL);
ecore_evas_event_handlers[6] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_OUT, _ecore_evas_wince_event_mouse_out, NULL);
ecore_evas_event_handlers[7] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DAMAGE, _ecore_evas_wince_event_window_damage, NULL);
ecore_evas_event_handlers[8] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DESTROY, _ecore_evas_wince_event_window_destroy, NULL);
ecore_evas_event_handlers[9] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_SHOW, _ecore_evas_wince_event_window_show, NULL);
ecore_evas_event_handlers[10] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_HIDE, _ecore_evas_wince_event_window_hide, NULL);
ecore_evas_event_handlers[11] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST, _ecore_evas_wince_event_window_delete_request, NULL);
ecore_evas_event_handlers[0] = ecore_event_handler_add(ECORE_WINCE_EVENT_MOUSE_OUT, _ecore_evas_wince_event_mouse_out, NULL);
ecore_evas_event_handlers[2] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DAMAGE, _ecore_evas_wince_event_window_damage, NULL);
ecore_evas_event_handlers[3] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DESTROY, _ecore_evas_wince_event_window_destroy, NULL);
ecore_evas_event_handlers[4] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_SHOW, _ecore_evas_wince_event_window_show, NULL);
ecore_evas_event_handlers[5] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_HIDE, _ecore_evas_wince_event_window_hide, NULL);
ecore_evas_event_handlers[6] = ecore_event_handler_add(ECORE_WINCE_EVENT_WINDOW_DELETE_REQUEST, _ecore_evas_wince_event_window_delete_request, NULL);
if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_init();
ecore_event_evas_init();
return _ecore_evas_init_count;
}
@ -171,6 +156,7 @@ _ecore_evas_wince_shutdown(void)
ecore_idle_enterer_del(ecore_evas_idle_enterer);
ecore_evas_idle_enterer = NULL;
if (_ecore_evas_fps_debug) _ecore_evas_fps_debug_shutdown();
ecore_event_evas_shutdown();
}
if (_ecore_evas_init_count < 0) _ecore_evas_init_count = 0;
@ -178,140 +164,6 @@ _ecore_evas_wince_shutdown(void)
return _ecore_evas_init_count;
}
static char *
_ecore_evas_wince_winid_str_get(Ecore_WinCE_Window *window)
{
static char id[9];
const char *vals = "qWeRtYuIoP5-$&<~";
unsigned int val;
val = (unsigned int)window;
id[0] = vals[(val >> 28) & 0xf];
id[1] = vals[(val >> 24) & 0xf];
id[2] = vals[(val >> 20) & 0xf];
id[3] = vals[(val >> 16) & 0xf];
id[4] = vals[(val >> 12) & 0xf];
id[5] = vals[(val >> 8) & 0xf];
id[6] = vals[(val >> 4) & 0xf];
id[7] = vals[(val ) & 0xf];
id[8] = 0;
return id;
}
static Ecore_Evas *
_ecore_evas_wince_match(Ecore_WinCE_Window *window)
{
Ecore_Evas *ee;
ee = eina_hash_find(ecore_evases_hash, _ecore_evas_wince_winid_str_get(window));
return ee;
}
static int
_ecore_evas_wince_event_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_WinCE_Event_Key_Down *e;
e = event;
EINA_ERROR_PINFO("key down (%f %s %s %s)\n", e->time, e->keyname, e->keysymbol, e->keycompose);
ee = _ecore_evas_wince_match(e->window);
if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
/* FIXME to do */
/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
evas_event_feed_key_down(ee->evas, e->keyname, e->keysymbol, e->keycompose, NULL, e->time, NULL);
return 1;
}
static int
_ecore_evas_wince_event_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_WinCE_Event_Key_Up *e;
e = event;
EINA_ERROR_PINFO("key up (%f %s %s %s)\n", e->time, e->keyname, e->keysymbol, e->keycompose);
ee = _ecore_evas_wince_match(e->window);
if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
/* FIXME to do */
/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
evas_event_feed_key_up(ee->evas, e->keyname, e->keysymbol, e->keycompose, NULL, e->time, NULL);
return 1;
}
static int
_ecore_evas_wince_event_mouse_button_down(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_WinCE_Event_Mouse_Button_Down *e;
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
e = event;
EINA_ERROR_PINFO("mouse button down (%f %dx%d)\n", e->time, e->x, e->y);
ee = _ecore_evas_wince_match(e->window);
if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
if (e->window != ee->engine.wince.window) return 1;
/* FIXME to do */
/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
evas_event_feed_mouse_down(ee->evas, e->button, flags, e->time, NULL);
return 1;
}
static int
_ecore_evas_wince_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_WinCE_Event_Mouse_Button_Up *e;
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
e = event;
EINA_ERROR_PINFO("mouse button up (%f %dx%d)\n", e->time, e->x, e->y);
ee = _ecore_evas_wince_match(e->window);
if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
if (e->window != ee->engine.wince.window) return 1;
/* FIXME to do */
/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
if (e->double_click) flags |= EVAS_BUTTON_DOUBLE_CLICK;
if (e->triple_click) flags |= EVAS_BUTTON_TRIPLE_CLICK;
evas_event_feed_mouse_up(ee->evas, e->button, flags, e->time, NULL);
return 1;
}
static int
_ecore_evas_wince_event_mouse_move(void *data __UNUSED__, int type __UNUSED__, void *event)
{
Ecore_Evas *ee;
Ecore_WinCE_Event_Mouse_Move *e;
EINA_ERROR_PINFO("mouse move\n");
e = event;
ee = _ecore_evas_wince_match(e->window);
if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
if (e->window != ee->engine.wince.window) return 1;
/* FIXME to do */
/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
_ecore_evas_mouse_move_process(ee, e->x, e->y, e->time);
return 1;
}
static int
_ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, void *event)
{
@ -321,9 +173,9 @@ _ecore_evas_wince_event_mouse_in(void *data __UNUSED__, int type __UNUSED__, voi
EINA_ERROR_PINFO("mouse in\n");
e = event;
ee = _ecore_evas_wince_match(e->window);
ee = ecore_event_window_match(e->window);
if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
if (e->window != ee->engine.wince.window) return 1;
if (e->window != ee->prop.window) return 1;
if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee);
/* FIXME to do */
@ -343,9 +195,9 @@ _ecore_evas_wince_event_mouse_out(void *data __UNUSED__, int type __UNUSED__, vo
EINA_ERROR_PINFO("mouse out\n");
e = event;
ee = _ecore_evas_wince_match(e->window);
ee = ecore_event_window_match(e->window);
if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
if (e->window != ee->engine.wince.window) return 1;
if (e->window != ee->prop.window) return 1;
/* FIXME to do */
/* _ecore_evas_x_modifier_locks_update(ee, e->modifiers); */
@ -367,9 +219,9 @@ _ecore_evas_wince_event_window_damage(void *data __UNUSED__, int type __UNUSED__
EINA_ERROR_PINFO("window damage\n");
e = event;
ee = _ecore_evas_wince_match(e->window);
ee = ecore_event_window_match(e->window);
if (!ee) return 1; /* pass on event */
if (e->window != ee->engine.wince.window) return 1;
if (e->window != ee->prop.window) return 1;
if (ee->prop.avoid_damage)
{
@ -415,9 +267,9 @@ _ecore_evas_wince_event_window_destroy(void *data __UNUSED__, int type __UNUSED_
EINA_ERROR_PINFO("window destroy\n");
e = event;
ee = _ecore_evas_wince_match(e->window);
ee = ecore_event_window_match(e->window);
if (!ee) return 1; /* pass on event */
if (e->window != ee->engine.wince.window) return 1;
if (e->window != ee->prop.window) return 1;
if (ee->func.fn_destroy) ee->func.fn_destroy(ee);
ecore_evas_free(ee);
@ -433,9 +285,9 @@ _ecore_evas_wince_event_window_show(void *data __UNUSED__, int type __UNUSED__,
EINA_ERROR_PINFO("window show\n");
e = event;
ee = _ecore_evas_wince_match(e->window);
ee = ecore_event_window_match(e->window);
if (!ee) return 1; /* pass on event */
if (e->window != ee->engine.wince.window) return 1;
if (e->window != ee->prop.window) return 1;
if (ee->visible) return 0; /* dont pass it on */
ee->visible = 1;
if (ee->func.fn_show) ee->func.fn_show(ee);
@ -452,9 +304,9 @@ _ecore_evas_wince_event_window_hide(void *data __UNUSED__, int type __UNUSED__,
EINA_ERROR_PINFO("window hide\n");
e = event;
ee = _ecore_evas_wince_match(e->window);
ee = ecore_event_window_match(e->window);
if (!ee) return 1; /* pass on event */
if (e->window != ee->engine.wince.window) return 1;
if (e->window != ee->prop.window) return 1;
if (!ee->visible) return 0; /* dont pass it on */
ee->visible = 0;
if (ee->func.fn_hide) ee->func.fn_hide(ee);
@ -471,9 +323,9 @@ _ecore_evas_wince_event_window_delete_request(void *data __UNUSED__, int type __
EINA_ERROR_PINFO("window delete request\n");
e = event;
ee = _ecore_evas_wince_match(e->window);
ee = ecore_event_window_match(e->window);
if (!ee) return 1; /* pass on event */
if (e->window != ee->engine.wince.window) return 1;
if (e->window != ee->prop.window) return 1;
if (ee->func.fn_delete_request) ee->func.fn_delete_request(ee);
return 1;
@ -487,8 +339,8 @@ _ecore_evas_wince_free(Ecore_Evas *ee)
{
EINA_ERROR_PINFO("ecore evas free\n");
ecore_wince_window_free(ee->engine.wince.window);
eina_hash_del(ecore_evases_hash, _ecore_evas_wince_winid_str_get(ee->engine.wince.window), ee);
ecore_wince_window_free(ee->prop.window);
ecore_event_window_unregister(ee->prop.window);
ecore_evases = _ecore_list2_remove(ecore_evases, ee);
_ecore_evas_wince_shutdown();
ecore_wince_shutdown();
@ -510,7 +362,7 @@ _ecore_evas_wince_move(Ecore_Evas *ee, int x, int y)
{
ee->x = x;
ee->y = y;
ecore_wince_window_move(ee->engine.wince.window, x, y);
ecore_wince_window_move(ee->prop.window, x, y);
if (ee->func.fn_move) ee->func.fn_move(ee);
}
}
@ -524,7 +376,7 @@ _ecore_evas_wince_resize(Ecore_Evas *ee, int width, int height)
{
ee->w = width;
ee->h = height;
ecore_wince_window_resize(ee->engine.wince.window, width, height);
ecore_wince_window_resize(ee->prop.window, width, height);
if ((ee->rotation == 90) || (ee->rotation == 270))
{
evas_output_size_set(ee->evas, ee->h, ee->w);
@ -558,7 +410,7 @@ _ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
ee->y = y;
ee->w = width;
ee->h = height;
ecore_wince_window_move_resize(ee->engine.wince.window, x, y, width, height);
ecore_wince_window_move_resize(ee->prop.window, x, y, width, height);
if ((ee->rotation == 90) || (ee->rotation == 270))
{
evas_output_size_set(ee->evas, ee->h, ee->w);
@ -603,7 +455,7 @@ _ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
/* evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo); */
/* if (!ee->prop.fullscreen) */
/* { */
/* ecore_wince_window_resize(ee->engine.wince.window, ee->h, ee->w); */
/* ecore_wince_window_resize(ee->prop.window, ee->h, ee->w); */
/* ee->expecting_resize.w = ee->h; */
/* ee->expecting_resize.h = ee->w; */
/* } */
@ -611,8 +463,8 @@ _ecore_evas_wince_move_resize(Ecore_Evas *ee, int x, int y, int width, int heigh
/* { */
/* int w, h; */
/* ecore_wince_window_size_get(ee->engine.wince.window, &w, &h); */
/* ecore_wince_window_resize(ee->engine.wince.window, h, w); */
/* ecore_wince_window_size_get(ee->prop.window, &w, &h); */
/* ecore_wince_window_resize(ee->prop.window, h, w); */
/* if ((rotation == 0) || (rotation == 180)) */
/* { */
/* evas_output_size_set(ee->evas, ee->w, ee->h); */
@ -661,9 +513,9 @@ _ecore_evas_wince_show(Ecore_Evas *ee)
ee->should_be_visible = 1;
if (ee->prop.avoid_damage)
_ecore_evas_wince_render(ee);
ecore_wince_window_show(ee->engine.wince.window);
ecore_wince_window_show(ee->prop.window);
/* if (ee->prop.fullscreen) */
/* ecore_wince_window_focus(ee->engine.wince.window); */
/* ecore_wince_window_focus(ee->prop.window); */
}
static void
@ -671,7 +523,7 @@ _ecore_evas_wince_hide(Ecore_Evas *ee)
{
EINA_ERROR_PINFO("ecore evas hide\n");
ecore_wince_window_hide(ee->engine.wince.window);
ecore_wince_window_hide(ee->prop.window);
ee->should_be_visible = 0;
}
@ -679,18 +531,18 @@ _ecore_evas_wince_hide(Ecore_Evas *ee)
/* _ecore_evas_wince_raise(Ecore_Evas *ee) */
/* { */
/* if (!ee->prop.fullscreen) */
/* ecore_wince_window_raise(ee->engine.wince.window); */
/* ecore_wince_window_raise(ee->prop.window); */
/* else */
/* ecore_wince_window_raise(ee->engine.wince.window); */
/* ecore_wince_window_raise(ee->prop.window); */
/* } */
/* static void */
/* _ecore_evas_wince_lower(Ecore_Evas *ee) */
/* { */
/* if (!ee->prop.fullscreen) */
/* ecore_wince_window_lower(ee->engine.wince.window); */
/* ecore_wince_window_lower(ee->prop.window); */
/* else */
/* ecore_wince_window_lower(ee->engine.wince.window); */
/* ecore_wince_window_lower(ee->prop.window); */
/* } */
static void
@ -701,7 +553,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
if (ee->prop.title) free(ee->prop.title);
ee->prop.title = NULL;
if (title) ee->prop.title = strdup(title);
ecore_wince_window_title_set(ee->engine.wince.window, ee->prop.title);
ecore_wince_window_title_set(ee->prop.window, ee->prop.title);
}
/* static void */
@ -712,7 +564,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
/* if ((ee->prop.min.w == width) && (ee->prop.min.h == height)) return; */
/* ee->prop.min.w = width; */
/* ee->prop.min.h = height; */
/* ecore_wince_window_size_min_set(ee->engine.wince.window, width, height); */
/* ecore_wince_window_size_min_set(ee->prop.window, width, height); */
/* } */
/* static void */
@ -723,7 +575,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
/* if ((ee->prop.max.w == width) && (ee->prop.max.h == height)) return; */
/* ee->prop.max.w = width; */
/* ee->prop.max.h = height; */
/* ecore_wince_window_size_max_set(ee->engine.wince.window, width, height); */
/* ecore_wince_window_size_max_set(ee->prop.window, width, height); */
/* } */
/* static void */
@ -734,7 +586,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
/* if ((ee->prop.base.w == width) && (ee->prop.base.h == height)) return; */
/* ee->prop.base.w = width; */
/* ee->prop.base.h = height; */
/* ecore_wince_window_size_base_set(ee->engine.wince.window, width, height); */
/* ecore_wince_window_size_base_set(ee->prop.window, width, height); */
/* } */
/* static void */
@ -745,7 +597,7 @@ _ecore_evas_wince_title_set(Ecore_Evas *ee, const char *title)
/* if ((ee->prop.step.w == width) && (ee->prop.step.h == height)) return; */
/* ee->prop.step.w = width; */
/* ee->prop.step.h = height; */
/* ecore_wince_window_size_step_set(ee->engine.wince.window, width, height); */
/* ecore_wince_window_size_step_set(ee->prop.window, width, height); */
/* } */
static void
@ -762,7 +614,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
ee->prop.cursor.layer = 0;
ee->prop.cursor.hot.x = 0;
ee->prop.cursor.hot.y = 0;
ecore_wince_window_cursor_show(ee->engine.wince.window, 1);
ecore_wince_window_cursor_show(ee->prop.window, 1);
return;
}
@ -771,7 +623,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
ee->prop.cursor.hot.x = hot_x;
ee->prop.cursor.hot.y = hot_y;
ecore_wince_window_cursor_show(ee->engine.wince.window, 0);
ecore_wince_window_cursor_show(ee->prop.window, 0);
evas_pointer_output_xy_get(ee->evas, &x, &y);
evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer);
@ -787,7 +639,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
/* static void */
/* _ecore_evas_wince_focus_set(Ecore_Evas *ee, int on __UNUSED__) */
/* { */
/* ecore_wince_window_focus_set(ee->engine.wince.window); */
/* ecore_wince_window_focus_set(ee->prop.window); */
/* } */
/* static void */
@ -796,7 +648,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
/* /\* if (((ee->prop.borderless) && (on)) || *\/ */
/* /\* ((!ee->prop.borderless) && (!on))) return; *\/ */
/* ee->prop.iconified = on; */
/* ecore_wince_window_iconified_set(ee->engine.wince.window, ee->prop.iconified); */
/* ecore_wince_window_iconified_set(ee->prop.window, ee->prop.iconified); */
/* } */
/* static void */
@ -805,7 +657,7 @@ _ecore_evas_wince_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int ho
/* if (((ee->prop.borderless) && (on)) || */
/* ((!ee->prop.borderless) && (!on))) return; */
/* ee->prop.borderless = on; */
/* ecore_wince_window_borderless_set(ee->engine.wince.window, ee->prop.borderless); */
/* ecore_wince_window_borderless_set(ee->prop.window, ee->prop.borderless); */
/* } */
static void
@ -823,12 +675,12 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
ee->engine.wince.state.fullscreen = on;
ee->prop.fullscreen = on;
window = (struct _Ecore_WinCE_Window *)ee->engine.wince.window;
window = (struct _Ecore_WinCE_Window *)ee->prop.window;
if (on != 0)
{
/* ecore_win32_window_shape_set(ee->engine.win32.window, 0, 0, NULL); */
ecore_wince_window_fullscreen_set(ee->engine.wince.window, on);
ecore_wince_window_fullscreen_set(ee->prop.window, on);
ee->w = GetSystemMetrics(SM_CXSCREEN);
ee->h = GetSystemMetrics(SM_CYSCREEN);
evas_output_size_set(ee->evas, ee->w, ee->h);
@ -839,8 +691,8 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
int w;
int h;
ecore_wince_window_fullscreen_set(ee->engine.wince.window, on);
ecore_wince_window_size_get(ee->engine.wince.window, &w, &h);
ecore_wince_window_fullscreen_set(ee->prop.window, on);
ecore_wince_window_size_get(ee->prop.window, &w, &h);
ee->w = w;
ee->h = h;
evas_output_size_set(ee->evas, ee->w, ee->h);
@ -860,14 +712,6 @@ _ecore_evas_wince_fullscreen_set(Ecore_Evas *ee, int on)
}
}
static void *
_ecore_evas_wince_window_get(const Ecore_Evas *ee)
{
EINA_ERROR_PINFO("ecore evas window get\n");
return ee->engine.wince.window;
}
static const Ecore_Evas_Engine_Func _ecore_wince_engine_func =
{
_ecore_evas_wince_free,
@ -914,8 +758,7 @@ static const Ecore_Evas_Engine_Func _ecore_wince_engine_func =
NULL, /* _ecore_evas_x_withdrawn_set */
NULL, /* _ecore_evas_x_sticky_set */
NULL, /* _ecore_evas_x_ignore_events_set */
NULL, /* _ecore_evas_x_alpha_set */
_ecore_evas_wince_window_get
NULL /* _ecore_evas_x_alpha_set */
};
/* API */
@ -974,8 +817,8 @@ ecore_evas_software_wince_new_internal(int backend,
ee->prop.sticky = 0;
/* FIXME: sticky to add */
ee->engine.wince.window = ecore_wince_window_new(parent, x, y, width, height);
if (!ee->engine.wince.window)
ee->prop.window = ecore_wince_window_new(parent, x, y, width, height);
if (!ee->prop.window)
{
_ecore_evas_wince_shutdown();
free(ee);
@ -983,7 +826,7 @@ ecore_evas_software_wince_new_internal(int backend,
return NULL;
}
ecore_wince_window_fullscreen_set(ee->engine.wince.window, fullscreen);
ecore_wince_window_fullscreen_set(ee->prop.window, fullscreen);
/* init evas here */
ee->evas = evas_new();
@ -996,7 +839,7 @@ ecore_evas_software_wince_new_internal(int backend,
if (einfo)
{
/* FIXME: REDRAW_DEBUG missing for now */
einfo->info.window = ((struct _Ecore_WinCE_Window *)ee->engine.wince.window)->window;
einfo->info.window = ((struct _Ecore_WinCE_Window *)ee->prop.window)->window;
einfo->info.width = width;
einfo->info.height = height;
einfo->info.backend = backend;
@ -1004,25 +847,13 @@ ecore_evas_software_wince_new_internal(int backend,
einfo->info.fullscreen = fullscreen;
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
ecore_wince_window_backend_set(ee->engine.wince.window, backend);
ecore_wince_window_suspend_set(ee->engine.wince.window, einfo->func.suspend);
ecore_wince_window_resume_set(ee->engine.wince.window, einfo->func.resume);
ecore_wince_window_backend_set(ee->prop.window, backend);
ecore_wince_window_suspend_set(ee->prop.window, einfo->func.suspend);
ecore_wince_window_resume_set(ee->prop.window, einfo->func.resume);
}
evas_key_modifier_add(ee->evas, "Shift");
evas_key_modifier_add(ee->evas, "Control");
evas_key_modifier_add(ee->evas, "Alt");
evas_key_modifier_add(ee->evas, "Meta");
evas_key_modifier_add(ee->evas, "Hyper");
evas_key_modifier_add(ee->evas, "Super");
evas_key_lock_add(ee->evas, "Caps_Lock");
evas_key_lock_add(ee->evas, "Num_Lock");
evas_key_lock_add(ee->evas, "Scroll_Lock");
ecore_evases = _ecore_list2_prepend(ecore_evases, ee);
if (!ecore_evases_hash)
ecore_evases_hash = eina_hash_string_superfast_new(NULL);
eina_hash_add(ecore_evases_hash, _ecore_evas_wince_winid_str_get(ee->engine.wince.window), ee);
ecore_event_window_register(ee->prop.window, ee, ee->evas, _ecore_evas_mouse_move_process);
return ee;
}
@ -1099,7 +930,7 @@ ecore_evas_software_wince_gdi_new(Ecore_WinCE_Window *parent,
EAPI Ecore_WinCE_Window *
ecore_evas_software_wince_window_get(const Ecore_Evas *ee)
{
return (Ecore_WinCE_Window *) _ecore_evas_wince_window_get(ee);
return (Ecore_WinCE_Window *) ecore_evas_window_get(ee);
}
#else

View File

@ -38,7 +38,7 @@ extern "C" {
#endif
typedef void Ecore_Win32_Window;
typedef struct _Ecore_Win32_Window Ecore_Win32_Window;
typedef void Ecore_Win32_Cursor;
/* Window state */