devilhorns pushed a commit to branch master.

commit 72a3a4c787efe5da3e63032bddcbefd7daa2388e
Author: Chris Michael <[email protected]>
Date:   Thu Jul 11 10:46:20 2013 +0100

    Add function code for:
    - ecore_evas_pixmap_visual_get
    - ecore_evas_pixmap_colormap_get
    - ecore_evas_pixmap_depth_get
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_evas/ecore_evas.c | 93 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 93 insertions(+)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 72ac807..3bd8b11 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2396,6 +2396,99 @@ ecore_evas_pointer_warp(const Ecore_Evas *ee, Evas_Coord 
x, Evas_Coord y)
    return EINA_FALSE;
 }
 
+EAPI void *
+ecore_evas_pixmap_visual_get(const Ecore_Evas *ee)
+{
+   if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+     {
+        ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, "ecore_evas_pixmap_visual_get");
+        return NULL;
+     }
+
+   if (!strcmp(ee->driver, "software_x11"))
+     {
+        Ecore_Evas_Interface_Software_X11 *iface;
+        iface = (Ecore_Evas_Interface_Software_X11 
*)_ecore_evas_interface_get(ee, "software_x11");
+        EINA_SAFETY_ON_NULL_RETURN_VAL(iface, NULL);
+
+        if (iface->pixmap_visual_get)
+          return iface->pixmap_visual_get(ee);
+     }
+   else if (!strcmp(ee->driver, "opengl_x11"))
+     {
+        Ecore_Evas_Interface_Gl_X11 *iface;
+        iface = (Ecore_Evas_Interface_Gl_X11 *)_ecore_evas_interface_get(ee, 
"gl_x11");
+        EINA_SAFETY_ON_NULL_RETURN_VAL(iface, NULL);
+
+        if (iface->pixmap_visual_get)
+          return iface->pixmap_visual_get(ee);
+     }
+
+   return NULL;
+}
+
+EAPI unsigned long 
+ecore_evas_pixmap_colormap_get(const Ecore_Evas *ee)
+{
+   if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+     {
+        ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, 
"ecore_evas_pixmap_colormap_get");
+        return 0;
+     }
+
+   if (!strcmp(ee->driver, "software_x11"))
+     {
+        Ecore_Evas_Interface_Software_X11 *iface;
+        iface = (Ecore_Evas_Interface_Software_X11 
*)_ecore_evas_interface_get(ee, "software_x11");
+        EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
+
+        if (iface->pixmap_colormap_get)
+          return iface->pixmap_colormap_get(ee);
+     }
+   else if (!strcmp(ee->driver, "opengl_x11"))
+     {
+        Ecore_Evas_Interface_Gl_X11 *iface;
+        iface = (Ecore_Evas_Interface_Gl_X11 *)_ecore_evas_interface_get(ee, 
"gl_x11");
+        EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
+
+        if (iface->pixmap_colormap_get)
+          return iface->pixmap_colormap_get(ee);
+     }
+
+   return 0;
+}
+
+EAPI int 
+ecore_evas_pixmap_depth_get(const Ecore_Evas *ee)
+{
+   if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
+     {
+        ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, "ecore_evas_pixmap_depth_get");
+        return 0;
+     }
+
+   if (!strcmp(ee->driver, "software_x11"))
+     {
+        Ecore_Evas_Interface_Software_X11 *iface;
+        iface = (Ecore_Evas_Interface_Software_X11 
*)_ecore_evas_interface_get(ee, "software_x11");
+        EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
+
+        if (iface->pixmap_depth_get)
+          return iface->pixmap_depth_get(ee);
+     }
+   else if (!strcmp(ee->driver, "opengl_x11"))
+     {
+        Ecore_Evas_Interface_Gl_X11 *iface;
+        iface = (Ecore_Evas_Interface_Gl_X11 *)_ecore_evas_interface_get(ee, 
"gl_x11");
+        EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
+
+        if (iface->pixmap_depth_get)
+          return iface->pixmap_depth_get(ee);
+     }
+
+   return 0;
+}
+
 /* fps debug calls - for debugging how much time your app actually spends */
 /* rendering graphics... :) */
 

-- 

------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk

Reply via email to