rename 'x11' to 'xlib' for software x11 based engines when it makes sense
authorcaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 14 Jul 2009 21:18:27 +0000 (21:18 +0000)
committercaro <caro@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Tue, 14 Jul 2009 21:18:27 +0000 (21:18 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/ecore@41330 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

configure.ac
src/lib/ecore_evas/Ecore_Evas.h
src/lib/ecore_evas/ecore_evas.c
src/lib/ecore_evas/ecore_evas_private.h
src/lib/ecore_evas/ecore_evas_x.c

index eb70b58..a8ae45f 100644 (file)
@@ -898,15 +898,23 @@ ECORE_EVAS_CHECK_MODULE([software-buffer],
 
 # ecore_evas_software_x11
 
-ecore_evas_xlib_deps="no"
-if test "x${have_ecore_x}" = "xyes" -a "x${have_ecore_x_xlib}" = "xyes" ; then
-   ecore_evas_xlib_deps="yes"
-fi
-
 ECORE_EVAS_CHECK_MODULE([software-x11],
    [${want_ecore_evas_software_x11}],
-   [Software Xlib],
-   [${ecore_evas_xlib_deps}])
+   [Software X11],
+   [${have_ecore_x}])
+
+have_ecore_evas_software_xlib=no"
+have_ecore_evas_software_xcb=no"
+if test "x$have_ecore_evas_software_x11" = "xyes" ; then
+   have_ecore_evas_software_xlib=`${PKG_CONFIG} --variable=Xlib evas-software-x11`
+   if test "x${have_ecore_evas_software_xlib}" = "xyes" -a "x${have_ecore_x_xlib}" = "xyes" ; then
+      AC_DEFINE(BUILD_ECORE_EVAS_SOFTWARE_XLIB, 1, [Evas Software Xlib Engine Support])
+   fi
+   have_ecore_evas_software_xcb=`${PKG_CONFIG} --variable=XCB evas-software-x11`
+   if test "x$have_ecore_evas_software_xcb" = "xyes" -a "x${have_ecore_x_xcb}" = "xyes" ; then
+      AC_DEFINE(BUILD_ECORE_EVAS_SOFTWARE_XCB, 1, [Evas Software XCB Engine Support])
+   fi
+fi
 
 # ecore_evas_xrender_x11
 
@@ -929,18 +937,6 @@ ECORE_EVAS_CHECK_MODULE([software-16-x11],
    [Software Xlib 16 bits],
    [${ecore_evas_xlib_deps}])
 
-# ecore_evas_software_xcb
-
-ecore_evas_xcb_deps="no"
-if test "x${have_ecore_x}" = "xyes" -a "x${have_ecore_x_xcb}" = "xyes" ; then
-   ecore_evas_xcb_deps="yes"
-fi
-
-ECORE_EVAS_CHECK_MODULE([software-xcb],
-   [${want_ecore_evas_software_xcb}],
-   [Software XCB],
-   [${ecore_evas_xcb_deps}])
-
 # ecore_evas_xrender_xcb
 
 ECORE_EVAS_CHECK_MODULE([xrender-xcb],
@@ -1203,10 +1199,18 @@ echo
 echo "  Ecore_Evas...................: $have_ecore_evas"
 if test "x${have_ecore_evas}" = "xyes" ; then
   echo "    Software Memory Buffer.....: $have_ecore_evas_software_buffer"
-  echo "    Software X11...............: $have_ecore_evas_software_x11"
+  if test "x${have_ecore_evas_software_x11}" = "xyes" ; then
+    if test "x${have_ecore_evas_software_xlib}" = "xyes" ; then
+      echo "    Software X11...............: $have_ecore_evas_software_x11 (Xlib)"
+    fi
+    if test "x${have_ecore_evas_software_xcb}" = "xyes" ; then
+      echo "    Software X11...............: $have_ecore_evas_software_x11 (XCB)"
+    fi
+  else
+    echo "    Software X11...............: $have_ecore_evas_software_x11"
+  fi
   echo "    XRender X11................: $have_ecore_evas_xrender_x11"
   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"
index ccff83c..5222f09 100644 (file)
@@ -71,7 +71,7 @@ extern "C" {
 typedef enum _Ecore_Evas_Engine_Type
 {
    ECORE_EVAS_ENGINE_SOFTWARE_BUFFER,
-   ECORE_EVAS_ENGINE_SOFTWARE_X11,
+   ECORE_EVAS_ENGINE_SOFTWARE_XLIB,
    ECORE_EVAS_ENGINE_XRENDER_X11,
    ECORE_EVAS_ENGINE_OPENGL_X11,
    ECORE_EVAS_ENGINE_SOFTWARE_XCB,
index 8acdef3..47617c3 100644 (file)
@@ -38,8 +38,8 @@ ecore_evas_engine_type_supported_get(Ecore_Evas_Engine_Type engine)
 #else
        return 0;
 #endif
-      case ECORE_EVAS_ENGINE_SOFTWARE_X11:
-#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
+      case ECORE_EVAS_ENGINE_SOFTWARE_XLIB:
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_XLIB
        return 1;
 #else
        return 0;
@@ -507,9 +507,6 @@ static const struct ecore_evas_engine _engines[] = {
 #ifdef BUILD_ECORE_EVAS_OPENGL_X11
   {"opengl_x11", _ecore_evas_constructor_opengl_x11},
 #endif
-#ifdef BUILD_ECORE_EVAS_SOFTWARE_XCB
-  {"software_xcb", _ecore_evas_constructor_software_x11},
-#endif
 #ifdef BUILD_ECORE_EVAS_XRENDER_XCB
   {"xrender_xcb", _ecore_evas_constructor_xrender_x11},
 #endif
index 8c3f3f8..199a43b 100644 (file)
@@ -42,7 +42,7 @@
 # ifdef HAVE_ECORE_X_XLIB
 #  include <X11/Xlib.h>
 #  include <X11/Xutil.h>
-#  ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
+#  ifdef BUILD_ECORE_EVAS_SOFTWARE_XLIB
 #   include <Evas_Engine_Software_X11.h>
 #  endif
 #  ifdef BUILD_ECORE_EVAS_XRENDER_X11
@@ -157,7 +157,7 @@ struct _Ecore_Evas_Engine
 {
    Ecore_Evas_Engine_Func *func;
 
-#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_XCB)
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
    struct {
       Ecore_X_Window win_root;
       Eina_List     *win_extra;
index 77ae23d..5938556 100644 (file)
@@ -315,7 +315,7 @@ _ecore_evas_x_resize_shape(Ecore_Evas *ee)
 {
    if (!strcmp(ee->driver, "software_x11"))
      {
-#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_XCB)
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
        Evas_Engine_Info_Software_X11 *einfo;
 
        einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(ee->evas);
@@ -337,7 +337,7 @@ _ecore_evas_x_resize_shape(Ecore_Evas *ee)
             evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
             evas_damage_rectangle_add(ee->evas, 0, 0, ee->w, ee->h);
          }
-#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 || BUILD_ECORE_EVAS_SOFTWARE_XCB */
+#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
      }
    else if (!strcmp(ee->driver, "xrender_x11"))
      {
@@ -1313,7 +1313,7 @@ _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation)
    if (!strcmp(ee->driver, "xrender_x11")) return;
    if (!strcmp(ee->driver, "software_x11"))
      {
-#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_XCB)
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
        Evas_Engine_Info_Software_X11 *einfo;
 
        einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(ee->evas);
@@ -1321,7 +1321,7 @@ _ecore_evas_x_rotation_set(Ecore_Evas *ee, int rotation)
        einfo->info.rotation = rotation;
        _ecore_evas_x_rotation_set_internal
          (ee, rotation, (Evas_Engine_Info *)einfo);
-#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 || BUILD_ECORE_EVAS_SOFTWARE_XCB */
+#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
      }
    else if (!strcmp(ee->driver,  "software_16_x11"))
      {
@@ -1345,7 +1345,7 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped)
    if (!strcmp(ee->driver, "opengl_x11")) return;
    if (!strcmp(ee->driver, "software_x11"))
      {
-#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_XCB)
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
        Evas_Engine_Info_Software_X11 *einfo;
 
        einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(ee->evas);
@@ -1381,7 +1381,7 @@ _ecore_evas_x_shaped_set(Ecore_Evas *ee, int shaped)
                  ecore_x_window_shape_input_mask_set(ee->prop.window, 0);
               }
          }
-#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 || BUILD_ECORE_EVAS_SOFTWARE_XCB */
+#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
      }
    else if (!strcmp(ee->driver, "xrender_x11"))
      {
@@ -1476,7 +1476,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
 
    if (!strcmp(ee->driver, "software_x11"))
      {
-#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_XCB)
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
        Evas_Engine_Info_Software_X11 *einfo;
 
        einfo = (Evas_Engine_Info_Software_X11 *)evas_engine_info_get(ee->evas);
@@ -1545,7 +1545,7 @@ _ecore_evas_x_alpha_set(Ecore_Evas *ee, int alpha)
             ecore_x_icccm_title_set(ee->prop.window, ee->prop.title);
             ecore_x_netwm_name_set(ee->prop.window, ee->prop.title);
          }
-#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 || BUILD_ECORE_EVAS_SOFTWARE_XCB */
+#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
      }
    else if (!strcmp(ee->driver, "xrender_x11"))
      {
@@ -2047,7 +2047,7 @@ _ecore_evas_x_avoid_damage_set(Ecore_Evas *ee, int on)
 
    if (!strcmp(ee->driver, "software_x11"))
      {
-#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_XCB)
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
        Evas_Engine_Info_Software_X11 *einfo;
 
        ee->prop.avoid_damage = on;
@@ -2094,7 +2094,7 @@ _ecore_evas_x_avoid_damage_set(Ecore_Evas *ee, int on)
                  evas_engine_info_set(ee->evas, (Evas_Engine_Info *)einfo);
               }
          }
-#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 || BUILD_ECORE_EVAS_SOFTWARE_XCB */
+#endif /* BUILD_ECORE_EVAS_SOFTWARE_X11 */
      }
    else if (!strcmp(ee->driver, "software_16_x11"))
      {
@@ -2222,7 +2222,7 @@ static const Ecore_Evas_Engine_Func _ecore_x_engine_func =
  *
  * FIXME: To be fixed.
  */
-#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_XCB)
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
 EAPI Ecore_Evas *
 ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent,
                            int x, int y, int w, int h)
@@ -2379,11 +2379,11 @@ ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent,
               redraw_debug = 0;
          }
 # ifdef BUILD_ECORE_EVAS_SOFTWARE_XCB
-        einfo->info.backend = 1;
+        einfo->info.backend = EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XCB;
        einfo->info.connection = ecore_x_connection_get();
        einfo->info.screen = screen;
 # else
-        einfo->info.backend = 0;
+        einfo->info.backend = EVAS_ENGINE_INFO_SOFTWARE_X11_BACKEND_XLIB;
        einfo->info.connection = ecore_x_display_get();
        einfo->info.screen = NULL;
 # endif /* ! BUILD_ECORE_EVAS_SOFTWARE_XCB */
@@ -2463,7 +2463,7 @@ ecore_evas_software_x11_new(const char *disp_name __UNUSED__, Ecore_X_Window par
  *
  * FIXME: To be fixed.
  */
-#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_XCB)
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
 EAPI Ecore_X_Window
 ecore_evas_software_x11_window_get(const Ecore_Evas *ee)
 {
@@ -2482,7 +2482,7 @@ ecore_evas_software_x11_window_get(const Ecore_Evas *ee __UNUSED__)
  *
  * FIXME: To be fixed.
  */
-#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_XCB)
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
 EAPI void
 ecore_evas_software_x11_direct_resize_set(Ecore_Evas *ee, int on)
 {
@@ -2518,7 +2518,7 @@ ecore_evas_software_x11_direct_resize_set(Ecore_Evas *ee __UNUSED__, int on __UN
  *
  * FIXME: To be fixed.
  */
-#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_XCB)
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
 EAPI int
 ecore_evas_software_x11_direct_resize_get(const Ecore_Evas *ee)
 {
@@ -2537,7 +2537,7 @@ ecore_evas_software_x11_direct_resize_get(const Ecore_Evas *ee __UNUSED__)
  *
  * FIXME: To be fixed.
  */
-#if defined (BUILD_ECORE_EVAS_SOFTWARE_X11) || defined (BUILD_ECORE_EVAS_SOFTWARE_XCB)
+#ifdef BUILD_ECORE_EVAS_SOFTWARE_X11
 EAPI void
 ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window win)
 {