ecore_wl2: Add API to get dmabuf protocol object

This commit is contained in:
Derek Foreman 2016-04-11 16:09:12 -05:00 committed by Mike Blumenkrantz
parent ed665ee6ee
commit f7cbb12fd4
2 changed files with 29 additions and 0 deletions

View File

@ -325,6 +325,28 @@ EAPI struct wl_display *ecore_wl2_display_get(Ecore_Wl2_Display *display);
*/
EAPI struct wl_shm *ecore_wl2_display_shm_get(Ecore_Wl2_Display *display);
/**
* Retrieve the wl_dmabuf from a given Ecore_Wl2_Display
*
*
* @param display The Ecore_Wl2_Display for which to retrieve the existing
* Wayland dmabuf interface from
*
*
* @return The wl_dmabuf which this Ecore_Wl2_Display is using
*
* @ingroup Ecore_Wl2_Display_Group
*
* @note This is intended for client use only and should be used only
* after ecore_wl2_display_connect(). Also, the return type is
* void * instead of zpw_linux_dmabuf_v1 * since we don't want
* to change our public API every time the version changes in
* wayland-protocols.
*
* @since 1.18
*/
EAPI void * ecore_wl2_display_dmabuf_get(Ecore_Wl2_Display *display);
/**
* Return an Eina_Iterator that can be used to iterate through globals
*

View File

@ -703,6 +703,13 @@ ecore_wl2_display_shm_get(Ecore_Wl2_Display *display)
return display->wl.shm;
}
EAPI void *
ecore_wl2_display_dmabuf_get(Ecore_Wl2_Display *display)
{
EINA_SAFETY_ON_NULL_RETURN_VAL(display, NULL);
return display->wl.dmabuf;
}
EAPI Eina_Iterator *
ecore_wl2_display_globals_get(Ecore_Wl2_Display *display)
{