elementary: Add ecore_cocoa backend to elementary

SVN revision: 64657
This commit is contained in:
Nicolas Aguirre 2011-11-02 19:26:29 +00:00
parent d689aa55b2
commit ec32ba1369
5 changed files with 43 additions and 3 deletions

View File

@ -327,6 +327,29 @@ if test "x$want_elementary_sdl" = "xyes" -a "x$have_elementary_sdl" = "xno"; the
AC_MSG_ERROR([ecore-sdl support requested, but not found by pkg-config.])
fi
have_elementary_cocoa="no"
want_elementary_cocoa="auto"
AC_ARG_ENABLE([ecore-cocoa],
[AC_HELP_STRING([--disable-ecore-cocoa], [disable ecore-cocoa support. @<:@default=detect@:>@])],
[want_elementary_cocoa=$enableval], [])
if test "x$want_elementary_cocoa" != "xno"; then
PKG_CHECK_MODULES([ELEMENTARY_COCOA],
[ecore-cocoa >= 1.0.0],
[
AC_DEFINE(HAVE_ELEMENTARY_COCOA, 1, [COCOA support for Elementary])
have_elementary_cocoa="yes"
requirement_elm="ecore-cocoa >= 1.0.0 ${requirement_elm}"
],
[have_elementary_cocoa="no"]
)
else
have_elementary_cocoa="no"
fi
if test "x$want_elementary_cocoa" = "xyes" -a "x$have_elementary_cocoa" = "xno"; then
AC_MSG_ERROR([ecore-cocoa support requested, but not found by pkg-config.])
fi
have_elementary_win32="no"
want_elementary_win32="auto"
AC_ARG_ENABLE([ecore-win32],
@ -666,6 +689,7 @@ echo " Engines:"
echo " X11....................: ${have_elementary_x}"
echo " Framebuffer............: ${have_elementary_fb}"
echo " SDL....................: ${have_elementary_sdl}"
echo " Cocoa..................: ${have_elementary_cocoa}"
echo " Windows XP.............: ${have_elementary_win32}"
echo " Windows CE.............: ${have_elementary_wince}"
echo

View File

@ -33,6 +33,7 @@ const char *_elm_engines[] = {
"opengl_sdl",
"buffer",
"ews",
"opengl_cocoa",
NULL
};
@ -1172,6 +1173,11 @@ _env_get(void)
(!strcasecmp(s, "gl-sdl")) ||
(!strcasecmp(s, "gl_sdl")))
eina_stringshare_replace(&_elm_config->engine, ELM_OPENGL_SDL);
else if ((!strcasecmp(s, "opengl-cocoa")) ||
(!strcasecmp(s, "opengl_cocoa")) ||
(!strcasecmp(s, "gl-cocoa")) ||
(!strcasecmp(s, "gl_cocoa")))
eina_stringshare_replace(&_elm_config->engine, ELM_OPENGL_COCOA);
else if ((!strcasecmp(s, "gdi")) ||
(!strcasecmp(s, "software-gdi")) ||
(!strcasecmp(s, "software_gdi")))
@ -1428,7 +1434,8 @@ _elm_config_sub_shutdown(void)
if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
ENGINE_COMPARE(ELM_XRENDER_X11) ||
ENGINE_COMPARE(ELM_OPENGL_X11))
ENGINE_COMPARE(ELM_OPENGL_X11) ||
ENGINE_COMPARE(ELM_OPENGL_COCOA))
#undef ENGINE_COMPARE
{
#ifdef HAVE_ELEMENTARY_X
@ -1444,7 +1451,8 @@ _elm_config_sub_init(void)
if (ENGINE_COMPARE(ELM_SOFTWARE_X11) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_X11) ||
ENGINE_COMPARE(ELM_XRENDER_X11) ||
ENGINE_COMPARE(ELM_OPENGL_X11))
ENGINE_COMPARE(ELM_OPENGL_X11) ||
ENGINE_COMPARE(ELM_OPENGL_COCOA))
#undef ENGINE_COMPARE
{
#ifdef HAVE_ELEMENTARY_X

View File

@ -462,6 +462,7 @@ elm_quicklaunch_sub_shutdown(void)
ENGINE_COMPARE(ELM_SOFTWARE_SDL) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_SDL) ||
ENGINE_COMPARE(ELM_OPENGL_SDL) ||
ENGINE_COMPARE(ELM_OPENGL_COCOA) ||
ENGINE_COMPARE(ELM_SOFTWARE_WIN32) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_WINCE) ||
ENGINE_COMPARE(ELM_EWS))

View File

@ -81,6 +81,7 @@ extern const char *_elm_engines[];
#define ELM_OPENGL_SDL (_elm_engines[11])
#define ELM_BUFFER (_elm_engines[12])
#define ELM_EWS (_elm_engines[13])
#define ELM_OPENGL_COCOA (_elm_engines[14])
#define ELM_FONT_TOKEN_STYLE ":style="

View File

@ -703,7 +703,8 @@ _elm_win_xwindow_get(Elm_Win *win)
ENGINE_COMPARE(ELM_SOFTWARE_16_WINCE) ||
ENGINE_COMPARE(ELM_SOFTWARE_SDL) ||
ENGINE_COMPARE(ELM_SOFTWARE_16_SDL) ||
ENGINE_COMPARE(ELM_OPENGL_SDL))
ENGINE_COMPARE(ELM_OPENGL_SDL) ||
ENGINE_COMPARE(ELM_OPENGL_COCOA))
{
}
else if (ENGINE_COMPARE(ELM_SOFTWARE_16_X11))
@ -1488,6 +1489,11 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
win->ee = ecore_evas_gl_sdl_new(NULL, 1, 1, 0, 0);
FALLBACK_TRY("OpenGL SDL");
}
else if (ENGINE_COMPARE(ELM_OPENGL_COCOA))
{
win->ee = ecore_evas_cocoa_new(NULL, 1, 1, 0, 0);
FALLBACK_TRY("OpenGL Cocoa");
}
else if (ENGINE_COMPARE(ELM_BUFFER))
{
win->ee = ecore_evas_buffer_new(1, 1);