forked from enlightenment/efl
Ecore: add EAPI to retrieve Ecore_Evas parent of a buffer.
This commit is contained in:
parent
d95224b5a7
commit
8002cabf35
|
@ -1271,6 +1271,20 @@ EAPI Ecore_Evas *ecore_evas_buffer_allocfunc_new(int w, int h, void *(*alloc
|
|||
*/
|
||||
EAPI const void *ecore_evas_buffer_pixels_get(Ecore_Evas *ee);
|
||||
|
||||
/**
|
||||
* @brief Return a pointer to the Ecore_Evas parent of the given Ecore_Evas.
|
||||
*
|
||||
* @param ee An @c Ecore_Evas handle
|
||||
* @return A pointer to the Ecore_Evas parent.
|
||||
*
|
||||
* A use case for the function is to determine if the buffer is used inside
|
||||
* X11 or Wayland. Since the buffer engine doesn't give any indication on
|
||||
* it, we need to retrieve information from the Ecore_Evas parents.
|
||||
*
|
||||
* @since 1.13
|
||||
*/
|
||||
EAPI Ecore_Evas *ecore_evas_buffer_ecore_evas_parent_get(Ecore_Evas *ee);
|
||||
|
||||
/**
|
||||
* @brief Create a new @c Ecore_Evas canvas bound to the Evas
|
||||
* @b ews (Ecore + Evas Single Process Windowing System) engine
|
||||
|
|
|
@ -741,6 +741,17 @@ ecore_evas_buffer_pixels_get(Ecore_Evas *ee)
|
|||
return bdata->pixels;
|
||||
}
|
||||
|
||||
EAPI Ecore_Evas *
|
||||
ecore_evas_buffer_ecore_evas_parent_get(Ecore_Evas *ee)
|
||||
{
|
||||
Ecore_Evas_Engine_Buffer_Data *bdata;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(ee, NULL);
|
||||
|
||||
bdata = ee->engine.data;
|
||||
return evas_object_data_get(bdata->image, "Ecore_Evas_Parent");
|
||||
}
|
||||
|
||||
EAPI Evas_Object *
|
||||
ecore_evas_object_image_new(Ecore_Evas *ee_target)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue