aboutsummaryrefslogtreecommitdiffstats
path: root/legacy
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-11-06 09:47:28 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-11-06 09:47:28 +0000
commitd1861a8d4c20c7b39076729ee971adacbfdeb129 (patch)
tree1e672a38a7e4be1375888283487b93d03a19c0c3 /legacy
parentfix leakies (diff)
downloadefl-d1861a8d4c20c7b39076729ee971adacbfdeb129.tar.gz
add a call
SVN revision: 18336
Diffstat (limited to 'legacy')
-rw-r--r--legacy/ecore/src/lib/ecore_evas/Ecore_Evas.h1
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas.c12
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_buffer.c2
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_directfb.c1
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c1
-rw-r--r--legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c3
-rw-r--r--legacy/evas/src/lib/Evas.h3
-rw-r--r--legacy/evas/src/lib/canvas/evas_main.c30
-rw-r--r--legacy/evas/src/lib/include/evas_private.h1
9 files changed, 54 insertions, 0 deletions
diff --git a/legacy/ecore/src/lib/ecore_evas/Ecore_Evas.h b/legacy/ecore/src/lib/ecore_evas/Ecore_Evas.h
index d2a8a3287c..9719f1c1f9 100644
--- a/legacy/ecore/src/lib/ecore_evas/Ecore_Evas.h
+++ b/legacy/ecore/src/lib/ecore_evas/Ecore_Evas.h
@@ -113,6 +113,7 @@ EAPI const int *ecore_evas_buffer_pixels_get(Ecore_Evas *ee);
EAPI Evas_Object *ecore_evas_object_image_new(Ecore_Evas *ee_target);
/* generic manipulation calls */
+EAPI Ecore_Evas *ecore_evas_ecore_evas_get(Evas *e);
EAPI void ecore_evas_free(Ecore_Evas *ee);
EAPI void *ecore_evas_data_get(Ecore_Evas *ee, const char *key);
EAPI void ecore_evas_data_set(Ecore_Evas *ee, const char *key, const void *data);
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas.c
index edf3b196e3..d913ee28fd 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas.c
@@ -113,6 +113,18 @@ ecore_evas_shutdown(void)
}
/**
+ * Return the Ecore_Evase for this Evas
+ *
+ * @param e The Evas to get the Ecore_Evas from
+ * @return The Ecore_Evas that holds this Evas
+ */
+Ecore_Evas *
+ecore_evas_ecore_evas_get(Evas *e)
+{
+ return evas_data_attach_get(e);
+}
+
+/**
* Free an Ecore_Evas
* @param ee The Ecore_Evas to free
*
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_buffer.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_buffer.c
index 2cafcc89a7..aa87b4882a 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_buffer.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_buffer.c
@@ -465,6 +465,7 @@ ecore_evas_buffer_new(int w, int h)
/* init evas here */
ee->evas = evas_new();
+ evas_data_attach_set(ee->evas, ee);
evas_output_method_set(ee->evas, rmethod);
evas_output_size_set(ee->evas, w, h);
evas_output_viewport_set(ee->evas, 0, 0, w, h);
@@ -558,6 +559,7 @@ ecore_evas_object_image_new(Ecore_Evas *ee_target)
/* init evas here */
ee->evas = evas_new();
+ evas_data_attach_set(ee->evas, ee);
evas_output_method_set(ee->evas, rmethod);
evas_output_size_set(ee->evas, w, h);
evas_output_viewport_set(ee->evas, 0, 0, w, h);
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_directfb.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_directfb.c
index 0de39bc3a2..f99a84ccc8 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_directfb.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_directfb.c
@@ -600,6 +600,7 @@ ecore_evas_directfb_new(const char *disp_name, int windowed, int x, int y, int w
/* init evas here */
ee->evas = evas_new();
+ evas_data_attach_set(ee->evas, ee);
evas_output_method_set(ee->evas, rmethod);
evas_output_size_set(ee->evas, w, h);
evas_output_viewport_set(ee->evas, 0, 0, w, h);
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c
index d973b7bf76..fb9e4e3972 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_fb.c
@@ -512,6 +512,7 @@ ecore_evas_fb_new(char *disp_name, int rotation, int w, int h)
/* init evas here */
ee->evas = evas_new();
+ evas_data_attach_set(ee->evas, ee);
evas_output_method_set(ee->evas, rmethod);
evas_output_size_set(ee->evas, w, h);
evas_output_viewport_set(ee->evas, 0, 0, w, h);
diff --git a/legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c b/legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c
index 75edd58648..2b9e6bb730 100644
--- a/legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c
+++ b/legacy/ecore/src/lib/ecore_evas/ecore_evas_x.c
@@ -1824,6 +1824,7 @@ ecore_evas_software_x11_new(const char *disp_name, Ecore_X_Window parent,
/* init evas here */
ee->evas = evas_new();
+ evas_data_attach_set(ee->evas, ee);
evas_output_method_set(ee->evas, rmethod);
evas_output_size_set(ee->evas, w, h);
evas_output_viewport_set(ee->evas, 0, 0, w, h);
@@ -2050,6 +2051,7 @@ ecore_evas_gl_x11_new(const char *disp_name, Ecore_X_Window parent,
/* init evas here */
ee->evas = evas_new();
+ evas_data_attach_set(ee->evas, ee);
evas_output_method_set(ee->evas, rmethod);
evas_output_size_set(ee->evas, w, h);
evas_output_viewport_set(ee->evas, 0, 0, w, h);
@@ -2265,6 +2267,7 @@ ecore_evas_xrender_x11_new(const char *disp_name, Ecore_X_Window parent,
/* init evas here */
ee->evas = evas_new();
+ evas_data_attach_set(ee->evas, ee);
evas_output_method_set(ee->evas, rmethod);
evas_output_size_set(ee->evas, w, h);
evas_output_viewport_set(ee->evas, 0, 0, w, h);
diff --git a/legacy/evas/src/lib/Evas.h b/legacy/evas/src/lib/Evas.h
index 6cb3609854..7843c33d19 100644
--- a/legacy/evas/src/lib/Evas.h
+++ b/legacy/evas/src/lib/Evas.h
@@ -340,6 +340,9 @@ extern "C" {
EAPI void evas_pointer_canvas_xy_get (Evas *e, Evas_Coord *x, Evas_Coord *y);
EAPI int evas_pointer_button_down_mask_get (Evas *e);
EAPI Evas_Bool evas_pointer_inside_get (Evas *e);
+ EAPI void evas_data_attach_set (Evas *e, void *data);
+ EAPI void *evas_data_attach_get (Evas *e);
+
/* DOC UP TO HERE */
EAPI void evas_damage_rectangle_add (Evas *e, int x, int y, int w, int h);
EAPI void evas_obscured_rectangle_add (Evas *e, int x, int y, int w, int h);
diff --git a/legacy/evas/src/lib/canvas/evas_main.c b/legacy/evas/src/lib/canvas/evas_main.c
index 4d162490b5..a73865d972 100644
--- a/legacy/evas/src/lib/canvas/evas_main.c
+++ b/legacy/evas/src/lib/canvas/evas_main.c
@@ -983,3 +983,33 @@ evas_pointer_inside_get(Evas *e)
MAGIC_CHECK_END();
return (int)e->pointer.inside;
}
+
+/**
+ * Attaches a specific pointer to the evas for fetching later
+ *
+ * @param e The canvas to attach the pointer to
+ * @param data The pointer to attach
+ */
+void
+evas_data_attach_set(Evas *e, void *data)
+{
+ MAGIC_CHECK(e, Evas, MAGIC_EVAS);
+ return;
+ MAGIC_CHECK_END();
+ e->attach_data = data;
+}
+
+/**
+ * Returns the pointer attached by evas_data_attach_set()
+ *
+ * @param e The canvas to attach the pointer to
+ * @return The pointer attached
+ */
+void *
+evas_data_attach_get(Evas *e)
+{
+ MAGIC_CHECK(e, Evas, MAGIC_EVAS);
+ return NULL;
+ MAGIC_CHECK_END();
+ return e->attach_data;
+}
diff --git a/legacy/evas/src/lib/include/evas_private.h b/legacy/evas/src/lib/include/evas_private.h
index e64fb9fe7a..c48a66a073 100644
--- a/legacy/evas/src/lib/include/evas_private.h
+++ b/legacy/evas/src/lib/include/evas_private.h
@@ -273,6 +273,7 @@ struct _Evas
Evas_Modifier modifiers;
Evas_Lock locks;
unsigned int last_timestamp;
+ void *attach_data;
};
struct _Evas_Layer