Elementary: Added Wayland_Egl backend support.
authorChristopher Michael <cpmichael1@comcast.net>
Thu, 12 Jan 2012 09:10:27 +0000 (09:10 +0000)
committerChristopher Michael <cpmichael1@comcast.net>
Thu, 12 Jan 2012 09:10:27 +0000 (09:10 +0000)
Modified elm_win to use generic wayland_resize function (for
ecore_evas).

SVN revision: 67134

src/bin/config.c
src/lib/elm_config.c
src/lib/elm_priv.h
src/lib/elm_win.c

index 8c16ee3..c32fe1b 100644 (file)
@@ -2714,6 +2714,7 @@ _elm_engine_supported(const char *engine)
       "opengl_cocoa",
       "psl1ght",
       "wayland_shm",
+      "wayland_egl",
       NULL
    };
 
index 36c4664..ba922bc 100644 (file)
@@ -36,6 +36,7 @@ const char *_elm_engines[] = {
    "opengl_cocoa",
    "psl1ght",
    "wayland_shm",
+   "wayland_egl",
    NULL
 };
 
@@ -1202,6 +1203,8 @@ _env_get(void)
           eina_stringshare_replace(&_elm_config->engine, ELM_EWS);
         else if ((!strcasecmp(s, "wayland_shm")))
           eina_stringshare_replace(&_elm_config->engine, ELM_WAYLAND_SHM);
+        else if ((!strcasecmp(s, "wayland_egl")))
+          eina_stringshare_replace(&_elm_config->engine, ELM_WAYLAND_EGL);
      }
 
    s = getenv("ELM_VSYNC");
index 6b0f9bf..dfc2577 100644 (file)
@@ -90,6 +90,7 @@ extern const char *_elm_engines[];
 #define ELM_OPENGL_COCOA      (_elm_engines[14])
 #define ELM_SOFTWARE_PSL1GHT  (_elm_engines[15])
 #define ELM_WAYLAND_SHM       (_elm_engines[16])
+#define ELM_WAYLAND_EGL       (_elm_engines[17])
 
 #define ELM_FONT_TOKEN_STYLE  ":style="
 
index 4171b1a..588c1af 100644 (file)
@@ -1,4 +1,4 @@
- #include <Elementary.h>
+#include <Elementary.h>
 #include "elm_priv.h"
 
 typedef struct _Elm_Win Elm_Win;
@@ -1380,8 +1380,9 @@ _elm_win_frame_cb_resize_start(void *data, Evas_Object *obj __UNUSED__, const ch
    else
      win->resize_location = 0;
 
+   /* FIXME: Change to more generic wayland resize function */
    if (win->resize_location > 0)
-     ecore_evas_wayland_shm_resize(win->ee, win->resize_location);
+     ecore_evas_wayland_resize(win->ee, win->resize_location);
 }
 
 static void 
@@ -1665,6 +1666,13 @@ elm_win_add(Evas_Object *parent, const char *name, Elm_Win_Type type)
 
              _elm_win_frame_add(win, "default");
           }
+        else if (ENGINE_COMPARE(ELM_WAYLAND_EGL)) 
+          {
+             win->ee = ecore_evas_wayland_egl_new(NULL, 0, 0, 1, 1, 0);
+             win->evas = ecore_evas_get(win->ee);
+
+             _elm_win_frame_add(win, "default");
+          }
         else if (!strncmp(_elm_config->engine, "shot:", 5))
           {
              win->ee = ecore_evas_buffer_new(1, 1);