forgot to add glew support in configure.in
SVN revision: 32809
This commit is contained in:
parent
4c27e0cd6b
commit
f5cc49bd44
|
@ -490,8 +490,18 @@ PKG_CHECK_EXISTS(evas-direct3d >= 0.9.9.41,
|
||||||
AC_MSG_RESULT($have_direct3d)
|
AC_MSG_RESULT($have_direct3d)
|
||||||
AC_SUBST(direct3d_libs)
|
AC_SUBST(direct3d_libs)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING(for Evas OpenGL Glew engine)
|
||||||
|
PKG_CHECK_EXISTS(evas-opengl-glew >= 0.9.9.41,
|
||||||
|
[ have_opengl_glew="yes"
|
||||||
|
AC_DEFINE(HAVE_OPENGL_GLEW, 1, [Build Ecore_Win32 with OpenGL Glew Code])
|
||||||
|
glew_libs="-lglew32 -lgdi32" ],
|
||||||
|
[ have_opengl_glew="no" ]
|
||||||
|
)
|
||||||
|
AC_MSG_RESULT($have_opengl_glew)
|
||||||
|
AC_SUBST(glew_libs)
|
||||||
|
|
||||||
have_win32="no"
|
have_win32="no"
|
||||||
if test "x${have_ddraw}" = "xyes" -o "x${have_ddraw_16}" = "xyes" -o "x${have_direct3d}" = "xyes"; then
|
if test "x${have_ddraw}" = "xyes" -o "x${have_ddraw_16}" = "xyes" -o "x${have_direct3d}" = "xyes" -o "x${have_opengl_glew}" = "xyes"; then
|
||||||
have_win32="yes"
|
have_win32="yes"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -793,7 +803,7 @@ echo " Ecore_Evas X11 GL Support....: $have_ecore_evas_x11_gl"
|
||||||
echo " Ecore_Evas XRender Support...: $have_ecore_evas_xrender"
|
echo " Ecore_Evas XRender Support...: $have_ecore_evas_xrender"
|
||||||
echo " Ecore_Evas X11 16bpp Support.: $have_ecore_evas_x11_16"
|
echo " Ecore_Evas X11 16bpp Support.: $have_ecore_evas_x11_16"
|
||||||
|
|
||||||
echo " Ecore_Win32..................: $have_ecore_win32 (DirectDraw: ${have_ddraw}) (16bpp DirectDraw: ${have_ddraw_16}) (Direct3D: ${have_direct3d})"
|
echo " Ecore_Win32..................: $have_ecore_win32 (DirectDraw: ${have_ddraw}) (16bpp DirectDraw: ${have_ddraw_16}) (Direct3D: ${have_direct3d}) (OpenGL Glew: ${have_opengl_glew})"
|
||||||
echo " Ecore_DFB....................: $have_ecore_directfb"
|
echo " Ecore_DFB....................: $have_ecore_directfb"
|
||||||
echo " Ecore_Evas DFB Support.......: $have_ecore_evas_dfb"
|
echo " Ecore_Evas DFB Support.......: $have_ecore_evas_dfb"
|
||||||
echo " Ecore_FB.....................: $have_ecore_fb"
|
echo " Ecore_FB.....................: $have_ecore_fb"
|
||||||
|
|
|
@ -455,16 +455,73 @@ _ecore_main_fd_handlers_buf_call(void)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static int
|
||||||
_ecore_main_loop_iterate_internal(int once_only)
|
_ecore_main_win32_message(double timeout)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
MSG msg;
|
MSG msg;
|
||||||
|
|
||||||
|
if (!finite(timeout))
|
||||||
|
timeout = 0.0;
|
||||||
|
|
||||||
|
if (timeout < 0.0)
|
||||||
|
{
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
double start;
|
||||||
|
double t;
|
||||||
|
|
||||||
|
start = ecore_time_get();
|
||||||
|
while ((t = ecore_time_get()) < (start + timeout))
|
||||||
|
{
|
||||||
|
if (PeekMessage(&msg, NULL, 0, 0, PM_NOREMOVE))
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
static int
|
||||||
|
_ecore_main_win32_message_buf_call(void)
|
||||||
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
MSG msg;
|
||||||
|
int ret;
|
||||||
|
|
||||||
|
ret = 0;
|
||||||
|
if (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
|
||||||
|
{
|
||||||
|
if ((msg.message & 0xffff) < 0xC000)
|
||||||
|
{
|
||||||
|
TranslateMessage(&msg);
|
||||||
|
DispatchMessage(&msg);
|
||||||
|
}
|
||||||
|
ret = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
return ret;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif /* _WIN32 */
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_ecore_main_loop_iterate_internal(int once_only)
|
||||||
|
{
|
||||||
double next_time;
|
double next_time;
|
||||||
int have_event = 0;
|
int have_event = 0;
|
||||||
int have_signal;
|
int have_signal;
|
||||||
|
int have_msg = 0;
|
||||||
|
|
||||||
|
/* printf ("_ecore_main_loop_iterate_internal\n"); */
|
||||||
in_main_loop++;
|
in_main_loop++;
|
||||||
/* expire any timers */
|
/* expire any timers */
|
||||||
{
|
{
|
||||||
|
@ -482,11 +539,11 @@ _ecore_main_loop_iterate_internal(int once_only)
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
if (_ecore_event_exist())
|
if (_ecore_event_exist())
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
have_event = 1;
|
have_event = 1;
|
||||||
have_signal = 1;
|
have_signal = 1;
|
||||||
ret = _ecore_main_select(0);
|
have_msg = 1;
|
||||||
|
_ecore_main_select(0.0);
|
||||||
|
_ecore_main_win32_message(0.0);
|
||||||
goto process_events;
|
goto process_events;
|
||||||
}
|
}
|
||||||
/* call idle enterers ... */
|
/* call idle enterers ... */
|
||||||
|
@ -494,30 +551,30 @@ _ecore_main_loop_iterate_internal(int once_only)
|
||||||
_ecore_idle_enterer_call();
|
_ecore_idle_enterer_call();
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int ret;
|
have_event = have_signal = have_msg = 0;
|
||||||
|
|
||||||
have_event = have_signal = 0;
|
if (_ecore_main_select(0.0) > 0) have_event = 1;
|
||||||
ret = _ecore_main_select(0);
|
|
||||||
|
|
||||||
if (ret > 0) have_event = 1;
|
if (_ecore_main_win32_message(0.0) > 0) have_msg = 1;
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
if (have_signal || have_event)
|
if (have_signal || have_event || have_msg)
|
||||||
goto process_events;
|
goto process_events;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* if these calls caused any biuffered events to appear - deal with them */
|
/* if these calls caused any buffered events to appear - deal with them */
|
||||||
while (_ecore_main_fd_handlers_buf_call());
|
while (_ecore_main_fd_handlers_buf_call());
|
||||||
|
while (_ecore_main_win32_message_buf_call());
|
||||||
/* if ther are any - jump to processing them */
|
/* if ther are any - jump to processing them */
|
||||||
if (_ecore_event_exist())
|
if (_ecore_event_exist())
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
have_event = 1;
|
have_event = 1;
|
||||||
have_signal = 1;
|
have_signal = 1;
|
||||||
ret = _ecore_main_select(0);
|
have_msg = 1;
|
||||||
|
_ecore_main_select(0.0);
|
||||||
|
_ecore_main_win32_message(0.0);
|
||||||
goto process_events;
|
goto process_events;
|
||||||
}
|
}
|
||||||
if (once_only)
|
if (once_only)
|
||||||
|
@ -527,14 +584,12 @@ _ecore_main_loop_iterate_internal(int once_only)
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _WIN32
|
|
||||||
if (_ecore_fps_debug)
|
if (_ecore_fps_debug)
|
||||||
{
|
{
|
||||||
t2 = ecore_time_get();
|
t2 = ecore_time_get();
|
||||||
if ((t1 > 0.0) && (t2 > 0.0))
|
if ((t1 > 0.0) && (t2 > 0.0))
|
||||||
_ecore_fps_debug_runtime_add(t2 - t1);
|
_ecore_fps_debug_runtime_add(t2 - t1);
|
||||||
}
|
}
|
||||||
#endif /* _WIN32 */
|
|
||||||
start_loop:
|
start_loop:
|
||||||
if (do_quit)
|
if (do_quit)
|
||||||
{
|
{
|
||||||
|
@ -544,7 +599,7 @@ _ecore_main_loop_iterate_internal(int once_only)
|
||||||
if (!_ecore_event_exist())
|
if (!_ecore_event_exist())
|
||||||
{
|
{
|
||||||
/* init flags */
|
/* init flags */
|
||||||
have_event = have_signal = 0;
|
have_event = have_signal = have_msg = 0;
|
||||||
next_time = _ecore_timer_next_get();
|
next_time = _ecore_timer_next_get();
|
||||||
/* no timers */
|
/* no timers */
|
||||||
if (next_time < 0)
|
if (next_time < 0)
|
||||||
|
@ -552,10 +607,8 @@ _ecore_main_loop_iterate_internal(int once_only)
|
||||||
/* no idlers */
|
/* no idlers */
|
||||||
if (!_ecore_idler_exist())
|
if (!_ecore_idler_exist())
|
||||||
{
|
{
|
||||||
int ret;
|
if (_ecore_main_select(-1.0) > 0) have_event = 1;
|
||||||
|
if (_ecore_main_win32_message(-1.0) > 0) have_msg = 1;
|
||||||
ret = _ecore_main_select(-1);
|
|
||||||
if (ret > 0) have_event = 1;
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
@ -565,16 +618,14 @@ _ecore_main_loop_iterate_internal(int once_only)
|
||||||
{
|
{
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (!_ecore_idler_call()) goto start_loop;
|
if (!_ecore_idler_call()) goto start_loop;
|
||||||
if (_ecore_event_exist()) break;
|
if (_ecore_event_exist()) break;
|
||||||
ret = _ecore_main_select(0);
|
if (_ecore_main_select(0.0) > 0) have_event = 1;
|
||||||
if (ret > 0) have_event = 1;
|
if (_ecore_main_win32_message(0.0) > 0) have_msg = 1;
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
if (have_event || have_signal) break;
|
if (have_event || have_signal || have_msg) break;
|
||||||
next_time = _ecore_timer_next_get();
|
next_time = _ecore_timer_next_get();
|
||||||
if (next_time >= 0) goto start_loop;
|
if (next_time >= 0) goto start_loop;
|
||||||
if (do_quit) break;
|
if (do_quit) break;
|
||||||
|
@ -587,10 +638,8 @@ _ecore_main_loop_iterate_internal(int once_only)
|
||||||
/* no idlers */
|
/* no idlers */
|
||||||
if (!_ecore_idler_exist())
|
if (!_ecore_idler_exist())
|
||||||
{
|
{
|
||||||
int ret;
|
if (_ecore_main_select(next_time) > 0) have_event = 1;
|
||||||
|
if (_ecore_main_win32_message(next_time) > 0) have_msg = 1;
|
||||||
ret = _ecore_main_select(next_time);
|
|
||||||
if (ret > 0) have_event = 1;
|
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
@ -601,16 +650,15 @@ _ecore_main_loop_iterate_internal(int once_only)
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
double cur_time, t;
|
double cur_time, t;
|
||||||
int ret;
|
|
||||||
|
|
||||||
if (!_ecore_idler_call()) goto start_loop;
|
if (!_ecore_idler_call()) goto start_loop;
|
||||||
if (_ecore_event_exist()) break;
|
if (_ecore_event_exist()) break;
|
||||||
ret = _ecore_main_select(0);
|
if (_ecore_main_select(0.0) > 0) have_event = 1;
|
||||||
if (ret > 0) have_event = 1;
|
if (_ecore_main_win32_message(0.0) > 0) have_msg = 1;
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
if (_ecore_signal_count_get() > 0) have_signal = 1;
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
if ((have_event) || (have_signal)) break;
|
if (have_event || have_signal || have_msg) break;
|
||||||
cur_time = ecore_time_get();
|
cur_time = ecore_time_get();
|
||||||
t = ecore_time_get() - cur_time;
|
t = ecore_time_get() - cur_time;
|
||||||
if (t >= next_time) break;
|
if (t >= next_time) break;
|
||||||
|
@ -621,12 +669,10 @@ _ecore_main_loop_iterate_internal(int once_only)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#ifndef _WIN32
|
|
||||||
if (_ecore_fps_debug)
|
if (_ecore_fps_debug)
|
||||||
{
|
{
|
||||||
t1 = ecore_time_get();
|
t1 = ecore_time_get();
|
||||||
}
|
}
|
||||||
#endif /* _WIN32 */
|
|
||||||
/* we came out of our "wait state" so idle has exited */
|
/* we came out of our "wait state" so idle has exited */
|
||||||
if (!once_only)
|
if (!once_only)
|
||||||
_ecore_idle_exiter_call();
|
_ecore_idle_exiter_call();
|
||||||
|
@ -647,13 +693,8 @@ _ecore_main_loop_iterate_internal(int once_only)
|
||||||
_ecore_main_fd_handlers_cleanup();
|
_ecore_main_fd_handlers_cleanup();
|
||||||
}
|
}
|
||||||
while (_ecore_main_fd_handlers_buf_call());
|
while (_ecore_main_fd_handlers_buf_call());
|
||||||
#ifdef _WIN32
|
if (have_msg) _ecore_main_win32_message_buf_call();
|
||||||
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
|
while (_ecore_main_win32_message_buf_call());
|
||||||
{
|
|
||||||
TranslateMessage(&msg);
|
|
||||||
DispatchMessage(&msg);
|
|
||||||
}
|
|
||||||
#endif /* _WIN32 */
|
|
||||||
if (once_only) _ecore_idle_enterer_call();
|
if (once_only) _ecore_idle_enterer_call();
|
||||||
in_main_loop--;
|
in_main_loop--;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1187,7 +1187,7 @@ _ecore_desktop_menu_merge(const void *data, Ecore_Desktop_Tree * tree,
|
||||||
legacy_data.menu = (char *)tree->elements[0].element;
|
legacy_data.menu = (char *)tree->elements[0].element;
|
||||||
legacy_data.menu += 14;
|
legacy_data.menu += 14;
|
||||||
legacy_data.menu_length =
|
legacy_data.menu_length =
|
||||||
index(legacy_data.menu, '>') - legacy_data.menu;
|
strchr(legacy_data.menu, '>') - legacy_data.menu;
|
||||||
legacy_data.menu[legacy_data.menu_length] = '\0';
|
legacy_data.menu[legacy_data.menu_length] = '\0';
|
||||||
if (strncmp(string, "prefix=\"", 8) == 0)
|
if (strncmp(string, "prefix=\"", 8) == 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -54,6 +54,7 @@ extern "C" {
|
||||||
#define HAVE_ECORE_EVAS_X11_16 1
|
#define HAVE_ECORE_EVAS_X11_16 1
|
||||||
#define HAVE_ECORE_EVAS_DIRECTFB 1
|
#define HAVE_ECORE_EVAS_DIRECTFB 1
|
||||||
#define HAVE_ECORE_EVAS_WIN32 1
|
#define HAVE_ECORE_EVAS_WIN32 1
|
||||||
|
#define HAVE_ECORE_EVAS_SDL 1
|
||||||
|
|
||||||
typedef enum _Ecore_Evas_Engine_Type
|
typedef enum _Ecore_Evas_Engine_Type
|
||||||
{
|
{
|
||||||
|
@ -65,6 +66,7 @@ typedef enum _Ecore_Evas_Engine_Type
|
||||||
ECORE_EVAS_ENGINE_DIRECTFB,
|
ECORE_EVAS_ENGINE_DIRECTFB,
|
||||||
ECORE_EVAS_ENGINE_SOFTWARE_X11_16,
|
ECORE_EVAS_ENGINE_SOFTWARE_X11_16,
|
||||||
ECORE_EVAS_ENGINE_SOFTWARE_DDRAW,
|
ECORE_EVAS_ENGINE_SOFTWARE_DDRAW,
|
||||||
|
ECORE_EVAS_ENGINE_SOFTWARE_DDRAW_16,
|
||||||
ECORE_EVAS_ENGINE_DIRECT3D,
|
ECORE_EVAS_ENGINE_DIRECT3D,
|
||||||
ECORE_EVAS_ENGINE_SDL
|
ECORE_EVAS_ENGINE_SDL
|
||||||
} Ecore_Evas_Engine_Type;
|
} Ecore_Evas_Engine_Type;
|
||||||
|
@ -149,6 +151,14 @@ EAPI Ecore_Evas *ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
|
||||||
|
|
||||||
EAPI Ecore_Win32_Window *ecore_evas_software_ddraw_window_get(Ecore_Evas *ee);
|
EAPI Ecore_Win32_Window *ecore_evas_software_ddraw_window_get(Ecore_Evas *ee);
|
||||||
|
|
||||||
|
EAPI Ecore_Evas *ecore_evas_software_ddraw_16_new(Ecore_Win32_Window *parent,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
|
int width,
|
||||||
|
int height);
|
||||||
|
|
||||||
|
EAPI Ecore_Win32_Window *ecore_evas_software_ddraw_16_window_get(Ecore_Evas *ee);
|
||||||
|
|
||||||
EAPI Ecore_Evas *ecore_evas_direct3d_new(Ecore_Win32_Window *parent,
|
EAPI Ecore_Evas *ecore_evas_direct3d_new(Ecore_Win32_Window *parent,
|
||||||
int x,
|
int x,
|
||||||
int y,
|
int y,
|
||||||
|
|
|
@ -66,6 +66,9 @@
|
||||||
# ifdef HAVE_DIRECTDRAW
|
# ifdef HAVE_DIRECTDRAW
|
||||||
# include <Evas_Engine_Software_DDraw.h>
|
# include <Evas_Engine_Software_DDraw.h>
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef HAVE_DIRECTDRAW_16
|
||||||
|
# include <Evas_Engine_Software_16_DDraw.h>
|
||||||
|
# endif
|
||||||
# ifdef HAVE_DIRECT3D
|
# ifdef HAVE_DIRECT3D
|
||||||
# include <Evas_Engine_Direct3D.h>
|
# include <Evas_Engine_Direct3D.h>
|
||||||
# endif
|
# endif
|
||||||
|
|
|
@ -276,6 +276,7 @@ _ecore_evas_win32_event_mouse_button_up(void *data __UNUSED__, int type __UNUSED
|
||||||
Ecore_Win32_Event_Mouse_Button_Up *e;
|
Ecore_Win32_Event_Mouse_Button_Up *e;
|
||||||
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
|
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
|
||||||
|
|
||||||
|
printf (" * ee event button up 0 \n");
|
||||||
e = event;
|
e = event;
|
||||||
ee = _ecore_evas_win32_match(e->window);
|
ee = _ecore_evas_win32_match(e->window);
|
||||||
if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
|
if ((!ee) || (ee->ignore_events)) return 1; /* pass on event */
|
||||||
|
@ -835,6 +836,42 @@ _ecore_evas_win32_size_step_set(Ecore_Evas *ee, int width, int height)
|
||||||
ecore_win32_window_size_step_set(ee->engine.win32.window, width, height);
|
ecore_win32_window_size_step_set(ee->engine.win32.window, width, height);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
_ecore_evas_win32_cursor_set(Ecore_Evas *ee, Evas_Object *obj, int layer, int hot_x, int hot_y)
|
||||||
|
{
|
||||||
|
#if 0
|
||||||
|
int x, y;
|
||||||
|
|
||||||
|
if (ee->prop.cursor.object) evas_object_del(ee->prop.cursor.object);
|
||||||
|
|
||||||
|
if (obj == NULL)
|
||||||
|
{
|
||||||
|
ee->prop.cursor.object = NULL;
|
||||||
|
ee->prop.cursor.layer = 0;
|
||||||
|
ee->prop.cursor.hot.x = 0;
|
||||||
|
ee->prop.cursor.hot.y = 0;
|
||||||
|
ecore_win32_window_cursor_show(ee->engine.win32.window, 1);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
ee->prop.cursor.object = obj;
|
||||||
|
ee->prop.cursor.layer = layer;
|
||||||
|
ee->prop.cursor.hot.x = hot_x;
|
||||||
|
ee->prop.cursor.hot.y = hot_y;
|
||||||
|
|
||||||
|
ecore_win32_window_cursor_show(ee->engine.win32.window, 0);
|
||||||
|
|
||||||
|
evas_pointer_output_xy_get(ee->evas, &x, &y);
|
||||||
|
evas_object_layer_set(ee->prop.cursor.object, ee->prop.cursor.layer);
|
||||||
|
evas_object_move(ee->prop.cursor.object,
|
||||||
|
x - ee->prop.cursor.hot.x,
|
||||||
|
y - ee->prop.cursor.hot.y);
|
||||||
|
evas_object_pass_events_set(ee->prop.cursor.object, 1);
|
||||||
|
if (evas_pointer_inside_get(ee->evas))
|
||||||
|
evas_object_show(ee->prop.cursor.object);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ecore_evas_win32_focus_set(Ecore_Evas *ee, int on __UNUSED__)
|
_ecore_evas_win32_focus_set(Ecore_Evas *ee, int on __UNUSED__)
|
||||||
{
|
{
|
||||||
|
@ -920,7 +957,7 @@ static const Ecore_Evas_Engine_Func _ecore_win32_engine_func =
|
||||||
_ecore_evas_win32_size_max_set,
|
_ecore_evas_win32_size_max_set,
|
||||||
_ecore_evas_win32_size_base_set,
|
_ecore_evas_win32_size_base_set,
|
||||||
_ecore_evas_win32_size_step_set,
|
_ecore_evas_win32_size_step_set,
|
||||||
NULL, /* _ecore_evas_x_cursor_set */
|
_ecore_evas_win32_cursor_set,
|
||||||
NULL, /* _ecore_evas_x_layer_set */
|
NULL, /* _ecore_evas_x_layer_set */
|
||||||
_ecore_evas_win32_focus_set,
|
_ecore_evas_win32_focus_set,
|
||||||
_ecore_evas_win32_iconified_set,
|
_ecore_evas_win32_iconified_set,
|
||||||
|
@ -947,7 +984,7 @@ ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
|
||||||
int width,
|
int width,
|
||||||
int height)
|
int height)
|
||||||
{
|
{
|
||||||
#ifdef BUILD_ECORE_WIN32
|
#ifdef BUILD_ECORE_EVAS_DIRECTDRAW
|
||||||
Evas_Engine_Info_Software_DDraw *einfo;
|
Evas_Engine_Info_Software_DDraw *einfo;
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
int rmethod;
|
int rmethod;
|
||||||
|
@ -956,6 +993,127 @@ ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
|
||||||
if (!rmethod)
|
if (!rmethod)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
printf ("ecore_evas_software_ddraw_new : ecore_win32_init\n");
|
||||||
|
if (!ecore_win32_init())
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
ee = calloc(1, sizeof(Ecore_Evas));
|
||||||
|
if (!ee)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
|
ECORE_MAGIC_SET(ee, ECORE_MAGIC_EVAS);
|
||||||
|
|
||||||
|
_ecore_evas_win32_init();
|
||||||
|
|
||||||
|
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_win32_engine_func;
|
||||||
|
|
||||||
|
ee->driver = "software_ddraw";
|
||||||
|
|
||||||
|
if (width < 1) width = 1;
|
||||||
|
if (height < 1) height = 1;
|
||||||
|
ee->x = x;
|
||||||
|
ee->y = y;
|
||||||
|
ee->w = width;
|
||||||
|
ee->h = height;
|
||||||
|
|
||||||
|
ee->prop.max.w = 32767;
|
||||||
|
ee->prop.max.h = 32767;
|
||||||
|
ee->prop.layer = 4;
|
||||||
|
ee->prop.request_pos = 0;
|
||||||
|
ee->prop.sticky = 0;
|
||||||
|
/* FIXME: sticky to add */
|
||||||
|
|
||||||
|
/* init evas here */
|
||||||
|
printf ("ecore_evas_software_ddraw_new : evas_new\n");
|
||||||
|
ee->evas = evas_new();
|
||||||
|
evas_data_attach_set(ee->evas, ee);
|
||||||
|
printf ("ecore_evas_software_ddraw_new : evas_output_method_set\n");
|
||||||
|
evas_output_method_set(ee->evas, rmethod);
|
||||||
|
printf ("ecore_evas_software_ddraw_new : evas_output_size_set\n");
|
||||||
|
evas_output_size_set(ee->evas, width, height);
|
||||||
|
printf ("ecore_evas_software_ddraw_new : evas_output_viewport_set\n");
|
||||||
|
evas_output_viewport_set(ee->evas, 0, 0, width, height);
|
||||||
|
|
||||||
|
ee->engine.win32.parent = parent;
|
||||||
|
printf ("ecore_evas_software_ddraw_new : ecore_win32_window_new\n");
|
||||||
|
ee->engine.win32.window = ecore_win32_window_new(parent, x, y, width, height);
|
||||||
|
if (!ee->engine.win32.window)
|
||||||
|
{
|
||||||
|
_ecore_evas_win32_shutdown();
|
||||||
|
free(ee);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf ("ecore_evas_software_ddraw_new : ecore_win32_ddraw_init\n");
|
||||||
|
if (!ecore_win32_ddraw_init(ee->engine.win32.window))
|
||||||
|
{
|
||||||
|
ecore_win32_window_del(ee->engine.win32.window);
|
||||||
|
_ecore_evas_win32_shutdown();
|
||||||
|
free(ee);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
printf ("ecore_evas_software_ddraw_new : evas_engine_info_get\n");
|
||||||
|
einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(ee->evas);
|
||||||
|
if (einfo)
|
||||||
|
{
|
||||||
|
/* FIXME: REDRAW_DEBUG missing for now */
|
||||||
|
einfo->info.window = ((struct _Ecore_Win32_Window *)ee->engine.win32.window)->window;
|
||||||
|
einfo->info.object = ecore_win32_ddraw_object_get(ee->engine.win32.window);
|
||||||
|
einfo->info.surface_primary = ecore_win32_ddraw_surface_primary_get(ee->engine.win32.window);
|
||||||
|
einfo->info.surface_back = ecore_win32_ddraw_surface_back_get(ee->engine.win32.window);
|
||||||
|
einfo->info.depth = ecore_win32_ddraw_depth_get(ee->engine.win32.window);
|
||||||
|
einfo->info.rotation = 0;
|
||||||
|
printf ("ecore_evas_software_ddraw_new : evas_engine_info_set\n");
|
||||||
|
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
|
||||||
|
}
|
||||||
|
|
||||||
|
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);
|
||||||
|
ecore_evases_hash = evas_hash_add(ecore_evases_hash, _ecore_evas_win32_winid_str_get(ee->engine.win32.window), ee);
|
||||||
|
|
||||||
|
return ee;
|
||||||
|
#else
|
||||||
|
return NULL;
|
||||||
|
parent = NULL;
|
||||||
|
x = 0;
|
||||||
|
y = 0;
|
||||||
|
width = 0;
|
||||||
|
height = 0;
|
||||||
|
#endif /* BUILD_ECORE_EVAS_DIRECTDRAW */
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Ecore_Win32_Window *
|
||||||
|
ecore_evas_software_ddraw_window_get(Ecore_Evas *ee)
|
||||||
|
{
|
||||||
|
return (Ecore_Win32_Window *) _ecore_evas_win32_window_get(ee);
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Ecore_Evas *
|
||||||
|
ecore_evas_software_ddraw_16_new(Ecore_Win32_Window *parent,
|
||||||
|
int x,
|
||||||
|
int y,
|
||||||
|
int width,
|
||||||
|
int height)
|
||||||
|
{
|
||||||
|
#ifdef BUILD_ECORE_EVAS_DIRECTDRAW_16
|
||||||
|
Evas_Engine_Info_Software_16_DDraw *einfo;
|
||||||
|
Ecore_Evas *ee;
|
||||||
|
int rmethod;
|
||||||
|
|
||||||
|
rmethod = evas_render_method_lookup("software_16_ddraw");
|
||||||
|
if (!rmethod)
|
||||||
|
return NULL;
|
||||||
|
|
||||||
if (!ecore_win32_init())
|
if (!ecore_win32_init())
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
|
@ -969,7 +1127,7 @@ ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
|
||||||
|
|
||||||
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_win32_engine_func;
|
ee->engine.func = (Ecore_Evas_Engine_Func *)&_ecore_win32_engine_func;
|
||||||
|
|
||||||
ee->driver = "software_ddraw";
|
ee->driver = "software_16_ddraw";
|
||||||
|
|
||||||
if (width < 1) width = 1;
|
if (width < 1) width = 1;
|
||||||
if (height < 1) height = 1;
|
if (height < 1) height = 1;
|
||||||
|
@ -1001,7 +1159,7 @@ ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!ecore_win32_ddraw_init(ee->engine.win32.window))
|
if (!ecore_win32_ddraw_16_init(ee->engine.win32.window))
|
||||||
{
|
{
|
||||||
ecore_win32_window_del(ee->engine.win32.window);
|
ecore_win32_window_del(ee->engine.win32.window);
|
||||||
_ecore_evas_win32_shutdown();
|
_ecore_evas_win32_shutdown();
|
||||||
|
@ -1009,7 +1167,16 @@ ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
einfo = (Evas_Engine_Info_Software_DDraw *)evas_engine_info_get(ee->evas);
|
if (ecore_win32_ddraw_depth_get(ee->engine.win32.window) != 16)
|
||||||
|
{
|
||||||
|
ecore_win32_ddraw_shutdown(ee->engine.win32.window);
|
||||||
|
ecore_win32_window_del(ee->engine.win32.window);
|
||||||
|
_ecore_evas_win32_shutdown();
|
||||||
|
free(ee);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
einfo = (Evas_Engine_Info_Software_16_DDraw *)evas_engine_info_get(ee->evas);
|
||||||
if (einfo)
|
if (einfo)
|
||||||
{
|
{
|
||||||
/* FIXME: REDRAW_DEBUG missing for now */
|
/* FIXME: REDRAW_DEBUG missing for now */
|
||||||
|
@ -1017,7 +1184,9 @@ ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
|
||||||
einfo->info.object = ecore_win32_ddraw_object_get(ee->engine.win32.window);
|
einfo->info.object = ecore_win32_ddraw_object_get(ee->engine.win32.window);
|
||||||
einfo->info.surface_primary = ecore_win32_ddraw_surface_primary_get(ee->engine.win32.window);
|
einfo->info.surface_primary = ecore_win32_ddraw_surface_primary_get(ee->engine.win32.window);
|
||||||
einfo->info.surface_back = ecore_win32_ddraw_surface_back_get(ee->engine.win32.window);
|
einfo->info.surface_back = ecore_win32_ddraw_surface_back_get(ee->engine.win32.window);
|
||||||
|
einfo->info.surface_source = ecore_win32_ddraw_surface_source_get(ee->engine.win32.window);
|
||||||
einfo->info.depth = ecore_win32_ddraw_depth_get(ee->engine.win32.window);
|
einfo->info.depth = ecore_win32_ddraw_depth_get(ee->engine.win32.window);
|
||||||
|
printf ("ecore_evas_software_ddraw_16_new depth : %d\n", einfo->info.depth);
|
||||||
einfo->info.rotation = 0;
|
einfo->info.rotation = 0;
|
||||||
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
|
evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
|
||||||
}
|
}
|
||||||
|
@ -1043,11 +1212,11 @@ ecore_evas_software_ddraw_new(Ecore_Win32_Window *parent,
|
||||||
y = 0;
|
y = 0;
|
||||||
width = 0;
|
width = 0;
|
||||||
height = 0;
|
height = 0;
|
||||||
#endif /* BUILD_ECORE_WIN32 */
|
#endif /* BUILD_ECORE_EVAS_DIRECTDRAW_16 */
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Ecore_Win32_Window *
|
EAPI Ecore_Win32_Window *
|
||||||
ecore_evas_software_ddraw_window_get(Ecore_Evas *ee)
|
ecore_evas_software_ddraw_16_window_get(Ecore_Evas *ee)
|
||||||
{
|
{
|
||||||
return (Ecore_Win32_Window *) _ecore_evas_win32_window_get(ee);
|
return (Ecore_Win32_Window *) _ecore_evas_win32_window_get(ee);
|
||||||
}
|
}
|
||||||
|
@ -1059,7 +1228,7 @@ ecore_evas_direct3d_new(Ecore_Win32_Window *parent,
|
||||||
int width,
|
int width,
|
||||||
int height)
|
int height)
|
||||||
{
|
{
|
||||||
#ifdef BUILD_ECORE_WIN32
|
#ifdef BUILD_ECORE_EVAS_DIRECT3D
|
||||||
Evas_Engine_Info_Direct3D *einfo;
|
Evas_Engine_Info_Direct3D *einfo;
|
||||||
Ecore_Evas *ee;
|
Ecore_Evas *ee;
|
||||||
int rmethod;
|
int rmethod;
|
||||||
|
@ -1156,7 +1325,7 @@ ecore_evas_direct3d_new(Ecore_Win32_Window *parent,
|
||||||
y = 0;
|
y = 0;
|
||||||
width = 0;
|
width = 0;
|
||||||
height = 0;
|
height = 0;
|
||||||
#endif /* BUILD_ECORE_WIN32 */
|
#endif /* BUILD_ECORE_EVAS_DIRECT3D */
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI Ecore_Win32_Window *
|
EAPI Ecore_Win32_Window *
|
||||||
|
|
|
@ -84,6 +84,7 @@ ecore_sdl_feed_events(void)
|
||||||
ev->y = event.motion.y;
|
ev->y = event.motion.y;
|
||||||
ev->time = time;
|
ev->time = time;
|
||||||
|
|
||||||
|
printf (" * ecore message : SDL_MOUSEMOTION\n");
|
||||||
ecore_event_add(ECORE_SDL_EVENT_MOUSE_MOVE, ev, NULL, NULL);
|
ecore_event_add(ECORE_SDL_EVENT_MOUSE_MOVE, ev, NULL, NULL);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -117,6 +118,7 @@ ecore_sdl_feed_events(void)
|
||||||
|
|
||||||
ecore_event_add(ECORE_SDL_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);
|
ecore_event_add(ECORE_SDL_EVENT_MOUSE_BUTTON_DOWN, ev, NULL, NULL);
|
||||||
}
|
}
|
||||||
|
printf (" * ecore message : SDL_MOUSEBUTTONDOWN\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SDL_MOUSEBUTTONUP:
|
case SDL_MOUSEBUTTONUP:
|
||||||
|
@ -132,6 +134,7 @@ ecore_sdl_feed_events(void)
|
||||||
ev->time = time;
|
ev->time = time;
|
||||||
|
|
||||||
ecore_event_add(ECORE_SDL_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
|
ecore_event_add(ECORE_SDL_EVENT_MOUSE_BUTTON_UP, ev, NULL, NULL);
|
||||||
|
printf (" * ecore message : SDL_MOUSEBUTTONUP\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SDL_VIDEORESIZE:
|
case SDL_VIDEORESIZE:
|
||||||
|
@ -143,10 +146,12 @@ ecore_sdl_feed_events(void)
|
||||||
ev->h = event.resize.h;
|
ev->h = event.resize.h;
|
||||||
|
|
||||||
ecore_event_add(ECORE_SDL_EVENT_RESIZE, ev, NULL, NULL);
|
ecore_event_add(ECORE_SDL_EVENT_RESIZE, ev, NULL, NULL);
|
||||||
|
printf (" * ecore message : SDL_VIDEORESIZE\n");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case SDL_VIDEOEXPOSE:
|
case SDL_VIDEOEXPOSE:
|
||||||
ecore_event_add(ECORE_SDL_EVENT_EXPOSE, NULL, NULL, NULL);
|
ecore_event_add(ECORE_SDL_EVENT_EXPOSE, NULL, NULL, NULL);
|
||||||
|
printf (" * ecore message : SDL_VIDEOEXPOSE\n");
|
||||||
break;
|
break;
|
||||||
case SDL_QUIT:
|
case SDL_QUIT:
|
||||||
ecore_main_loop_quit();
|
ecore_main_loop_quit();
|
||||||
|
|
|
@ -42,24 +42,24 @@ typedef void Ecore_Win32_Glew_DC;
|
||||||
|
|
||||||
typedef enum
|
typedef enum
|
||||||
{
|
{
|
||||||
/** The window is iconified. */
|
/* The window is iconified. */
|
||||||
ECORE_WIN32_WINDOW_STATE_ICONIFIED,
|
ECORE_WIN32_WINDOW_STATE_ICONIFIED,
|
||||||
/** The window is a modal dialog box. */
|
/* The window is a modal dialog box. */
|
||||||
ECORE_WIN32_WINDOW_STATE_MODAL,
|
ECORE_WIN32_WINDOW_STATE_MODAL,
|
||||||
/** The window manager should keep the window's position fixed
|
/* The window manager should keep the window's position fixed
|
||||||
* even if the virtual desktop scrolls. */
|
* even if the virtual desktop scrolls. */
|
||||||
ECORE_WIN32_WINDOW_STATE_STICKY,
|
ECORE_WIN32_WINDOW_STATE_STICKY,
|
||||||
/** The window has the maximum vertical size. */
|
/* The window has the maximum vertical size. */
|
||||||
ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT,
|
ECORE_WIN32_WINDOW_STATE_MAXIMIZED_VERT,
|
||||||
/** The window has the maximum horizontal size. */
|
/* The window has the maximum horizontal size. */
|
||||||
ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ,
|
ECORE_WIN32_WINDOW_STATE_MAXIMIZED_HORZ,
|
||||||
/** The window has the maximum horizontal and vertical size. */
|
/* The window has the maximum horizontal and vertical size. */
|
||||||
ECORE_WIN32_WINDOW_STATE_MAXIMIZED,
|
ECORE_WIN32_WINDOW_STATE_MAXIMIZED,
|
||||||
/** The window is shaded. */
|
/* The window is shaded. */
|
||||||
ECORE_WIN32_WINDOW_STATE_SHADED,
|
ECORE_WIN32_WINDOW_STATE_SHADED,
|
||||||
/** The window is invisible (i.e. minimized/iconified) */
|
/* The window is invisible (i.e. minimized/iconified) */
|
||||||
ECORE_WIN32_WINDOW_STATE_HIDDEN,
|
ECORE_WIN32_WINDOW_STATE_HIDDEN,
|
||||||
/** The window should fill the entire screen and have no
|
/* The window should fill the entire screen and have no
|
||||||
* window border/decorations */
|
* window border/decorations */
|
||||||
ECORE_WIN32_WINDOW_STATE_FULLSCREEN,
|
ECORE_WIN32_WINDOW_STATE_FULLSCREEN,
|
||||||
/* The following are not documented because they are not
|
/* The following are not documented because they are not
|
||||||
|
|
Loading…
Reference in New Issue