devilhorns pushed a commit to branch master.

commit 159232b593aa014581bb6def758dc1e085130d33
Author: Chris Michael <[email protected]>
Date:   Fri Jul 5 10:35:52 2013 +0100

    Add code for ecore_evas_software_x11_pixmap_new/get functions.
    Fix formatting in ecore_evas_window_get.
    
      NB: This will be used to create an ecore_evas that Renders to a
          Pixmap (not a window). As such, Some ecore_evas functions may
          not operate as expected when using this type of ecore_evas.
    
    Signed-off-by: Chris Michael <[email protected]>
---
 src/lib/ecore_evas/ecore_evas.c | 49 ++++++++++++++++++++++++++++++++++++-----
 1 file changed, 44 insertions(+), 5 deletions(-)

diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 8bac6ec..7b20a5f 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2302,11 +2302,11 @@ EAPI Ecore_Window
 ecore_evas_window_get(const Ecore_Evas *ee)
 {
    if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
-   {
-      ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
-         "ecore_evas_window_get");
-      return 0;
-   }
+     {
+        ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
+                         "ecore_evas_window_get");
+        return 0;
+     }
 
    return ee->prop.window;
 }
@@ -2948,6 +2948,45 @@ 
ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window wi
 }
 
 /**
+ * @brief Create a new Ecore_Evas which does not contain an XWindow. It will 
+ * only contain an XPixmap to render to
+ * 
+ * @since 1.8
+ */
+EAPI Ecore_Evas *
+ecore_evas_software_x11_pixmap_new(const char *disp_name, Ecore_X_Window 
parent, int x, int y, int w, int h)
+{
+   Ecore_Evas *(*new)(const char *, Ecore_X_Window, int, int, int, int);
+   Eina_Module *m = _ecore_evas_engine_load("x");
+   EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
+
+   new = eina_module_symbol_get(m, 
"ecore_evas_software_x11_pixmap_new_internal");
+   EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
+
+   return new(disp_name, parent, x, y, w, h);
+}
+
+/**
+ * @brief Returns the underlying Ecore_X_Pixmap used in the Ecore_Evas
+ * 
+ * @param ee The Ecore_Evas whose pixmap is desired.
+ * @return The underlying Ecore_X_Pixmap
+ * 
+ * @warning Support for this depends on the underlying windowing system.
+ * 
+ * @since 1.8
+ */
+EAPI Ecore_X_Pixmap 
+ecore_evas_software_x11_pixmap_get(const Ecore_Evas *ee)
+{
+   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);
+
+   return iface->pixmap_get(ee);
+}
+
+/**
  * @brief Create Ecore_Evas using opengl x11.
  * @note If ecore is not compiled with support to x11 then nothing is done and 
NULL is returned.
  * @param disp_name The name of the display of the Ecore_Evas to be created.

-- 

------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev

Reply via email to