summaryrefslogtreecommitdiff
path: root/src/lib/ecore_evas/ecore_evas.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2013-07-05 10:35:52 +0100
committerChris Michael <cp.michael@samsung.com>2013-07-05 10:44:18 +0100
commit159232b593aa014581bb6def758dc1e085130d33 (patch)
tree727dff11d3136e7026fcd359a3c22a1442fcde66 /src/lib/ecore_evas/ecore_evas.c
parent1e8f6d3b454e74387fbbb8e7c9c548e28b2784d5 (diff)
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 <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_evas/ecore_evas.c')
-rw-r--r--src/lib/ecore_evas/ecore_evas.c49
1 files changed, 44 insertions, 5 deletions
diff --git a/src/lib/ecore_evas/ecore_evas.c b/src/lib/ecore_evas/ecore_evas.c
index 8bac6ecbf0..7b20a5f1c1 100644
--- a/src/lib/ecore_evas/ecore_evas.c
+++ b/src/lib/ecore_evas/ecore_evas.c
@@ -2302,11 +2302,11 @@ EAPI Ecore_Window
2302ecore_evas_window_get(const Ecore_Evas *ee) 2302ecore_evas_window_get(const Ecore_Evas *ee)
2303{ 2303{
2304 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS)) 2304 if (!ECORE_MAGIC_CHECK(ee, ECORE_MAGIC_EVAS))
2305 { 2305 {
2306 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS, 2306 ECORE_MAGIC_FAIL(ee, ECORE_MAGIC_EVAS,
2307 "ecore_evas_window_get"); 2307 "ecore_evas_window_get");
2308 return 0; 2308 return 0;
2309 } 2309 }
2310 2310
2311 return ee->prop.window; 2311 return ee->prop.window;
2312} 2312}
@@ -2948,6 +2948,45 @@ ecore_evas_software_x11_extra_event_window_add(Ecore_Evas *ee, Ecore_X_Window wi
2948} 2948}
2949 2949
2950/** 2950/**
2951 * @brief Create a new Ecore_Evas which does not contain an XWindow. It will
2952 * only contain an XPixmap to render to
2953 *
2954 * @since 1.8
2955 */
2956EAPI Ecore_Evas *
2957ecore_evas_software_x11_pixmap_new(const char *disp_name, Ecore_X_Window parent, int x, int y, int w, int h)
2958{
2959 Ecore_Evas *(*new)(const char *, Ecore_X_Window, int, int, int, int);
2960 Eina_Module *m = _ecore_evas_engine_load("x");
2961 EINA_SAFETY_ON_NULL_RETURN_VAL(m, NULL);
2962
2963 new = eina_module_symbol_get(m, "ecore_evas_software_x11_pixmap_new_internal");
2964 EINA_SAFETY_ON_NULL_RETURN_VAL(new, NULL);
2965
2966 return new(disp_name, parent, x, y, w, h);
2967}
2968
2969/**
2970 * @brief Returns the underlying Ecore_X_Pixmap used in the Ecore_Evas
2971 *
2972 * @param ee The Ecore_Evas whose pixmap is desired.
2973 * @return The underlying Ecore_X_Pixmap
2974 *
2975 * @warning Support for this depends on the underlying windowing system.
2976 *
2977 * @since 1.8
2978 */
2979EAPI Ecore_X_Pixmap
2980ecore_evas_software_x11_pixmap_get(const Ecore_Evas *ee)
2981{
2982 Ecore_Evas_Interface_Software_X11 *iface;
2983 iface = (Ecore_Evas_Interface_Software_X11 *)_ecore_evas_interface_get(ee, "software_x11");
2984 EINA_SAFETY_ON_NULL_RETURN_VAL(iface, 0);
2985
2986 return iface->pixmap_get(ee);
2987}
2988
2989/**
2951 * @brief Create Ecore_Evas using opengl x11. 2990 * @brief Create Ecore_Evas using opengl x11.
2952 * @note If ecore is not compiled with support to x11 then nothing is done and NULL is returned. 2991 * @note If ecore is not compiled with support to x11 then nothing is done and NULL is returned.
2953 * @param disp_name The name of the display of the Ecore_Evas to be created. 2992 * @param disp_name The name of the display of the Ecore_Evas to be created.