\hypertarget{group__Ecore__Wl2__Subsurface__Group}{}\doxysection{Functions to manipulate subsurfaces.}
\label{group__Ecore__Wl2__Subsurface__Group}\index{Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}}


Functions to manipulate wayland subsurfaces, using Ecore\+\_\+\+Wl2\+\_\+\+Subsurface.  


\doxysubsection*{Functions}
\begin{DoxyCompactItemize}
\item 
EAPI Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$ \mbox{\hyperlink{group__Ecore__Wl2__Subsurface__Group_ga57a94d7e129049ad79b0607d608605e4}{ecore\+\_\+wl2\+\_\+subsurface\+\_\+new}} (Ecore\+\_\+\+Wl2\+\_\+\+Window $\ast$window)
\begin{DoxyCompactList}\small\item\em Create and return a new subsurface. \end{DoxyCompactList}\item 
EAPI void \mbox{\hyperlink{group__Ecore__Wl2__Subsurface__Group_ga1fd1b90d63c2e4ef59c6fba1b04fc4dd}{ecore\+\_\+wl2\+\_\+subsurface\+\_\+del}} (Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$subsurface)
\begin{DoxyCompactList}\small\item\em Destroy the given subsurface, as well as the surface associated with it. \end{DoxyCompactList}\item 
EAPI struct wl\+\_\+surface $\ast$ \mbox{\hyperlink{group__Ecore__Wl2__Subsurface__Group_ga4d687084dfe6cb0e02f111a5a37ee447}{ecore\+\_\+wl2\+\_\+subsurface\+\_\+surface\+\_\+get}} (Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$subsurface)
\begin{DoxyCompactList}\small\item\em Get the wl\+\_\+surface for this subsurface. \end{DoxyCompactList}\item 
EAPI void \mbox{\hyperlink{group__Ecore__Wl2__Subsurface__Group_ga693875c24a6c9193b1b1859861004dd4}{ecore\+\_\+wl2\+\_\+subsurface\+\_\+position\+\_\+set}} (Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$subsurface, int x, int y)
\begin{DoxyCompactList}\small\item\em Set the position of this subsurface, relative to its parent surface. \end{DoxyCompactList}\item 
EAPI void \mbox{\hyperlink{group__Ecore__Wl2__Subsurface__Group_ga83fdbf8ac139811c1eaadba93f4ccf38}{ecore\+\_\+wl2\+\_\+subsurface\+\_\+position\+\_\+get}} (Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$subsurface, int $\ast$x, int $\ast$y)
\begin{DoxyCompactList}\small\item\em Get the position of this subsurface, relative to its parent surface. \end{DoxyCompactList}\item 
EAPI void \mbox{\hyperlink{group__Ecore__Wl2__Subsurface__Group_gac5f108a9024ff626b162387575285af8}{ecore\+\_\+wl2\+\_\+subsurface\+\_\+place\+\_\+above}} (Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$subsurface, struct wl\+\_\+surface $\ast$surface)
\begin{DoxyCompactList}\small\item\em Place subsurface on layer above a reference surface. \end{DoxyCompactList}\item 
EAPI void \mbox{\hyperlink{group__Ecore__Wl2__Subsurface__Group_ga65395881576846357fb4d843aa6494e9}{ecore\+\_\+wl2\+\_\+subsurface\+\_\+place\+\_\+below}} (Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$subsurface, struct wl\+\_\+surface $\ast$surface)
\begin{DoxyCompactList}\small\item\em Place subsurface on layer below a reference surface. \end{DoxyCompactList}\item 
EAPI void \mbox{\hyperlink{group__Ecore__Wl2__Subsurface__Group_gad08935fa0259b93ee9bfa68fb233ff7f}{ecore\+\_\+wl2\+\_\+subsurface\+\_\+sync\+\_\+set}} (Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$subsurface, \mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}} sync)
\begin{DoxyCompactList}\small\item\em Enables or disables sub-\/surface synchronization. \end{DoxyCompactList}\item 
EAPI void \mbox{\hyperlink{group__Ecore__Wl2__Subsurface__Group_gadac25a91022eeea48fde333bb4d4e1da}{ecore\+\_\+wl2\+\_\+subsurface\+\_\+opaque\+\_\+region\+\_\+set}} (Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$subsurface, int x, int y, int w, int h)
\begin{DoxyCompactList}\small\item\em Set an opaque region for the given subsurface. \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Functions to manipulate wayland subsurfaces, using Ecore\+\_\+\+Wl2\+\_\+\+Subsurface. 

This API is intended to expose Wayland subsurface functionality, although it should not be necessary for most applications to use it, as soon as we have means to make Evas automatically switch Evas images to use subsurfaces.

It can/should be used, for instance, when subsurfaces are needed to be not in sync with the main window surface. 

\doxysubsection{Function Documentation}
\mbox{\Hypertarget{group__Ecore__Wl2__Subsurface__Group_ga57a94d7e129049ad79b0607d608605e4}\label{group__Ecore__Wl2__Subsurface__Group_ga57a94d7e129049ad79b0607d608605e4}} 
\index{Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}!ecore\_wl2\_subsurface\_new@{ecore\_wl2\_subsurface\_new}}
\index{ecore\_wl2\_subsurface\_new@{ecore\_wl2\_subsurface\_new}!Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}}
\doxysubsubsection{\texorpdfstring{ecore\_wl2\_subsurface\_new()}{ecore\_wl2\_subsurface\_new()}}
{\footnotesize\ttfamily EAPI Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$ ecore\+\_\+wl2\+\_\+subsurface\+\_\+new (\begin{DoxyParamCaption}\item[{Ecore\+\_\+\+Wl2\+\_\+\+Window $\ast$}]{window }\end{DoxyParamCaption})}



Create and return a new subsurface. 

Create a new surface (and subsurface interface), with the parent surface being the one associated with the given window.


\begin{DoxyParams}{Parameters}
{\em window} & The window. It must be visible, otherwise there will be no surface created for it yet.\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the allocated and initialized Ecore\+\_\+\+Wl2\+\_\+\+Subsurface object, or NULL on failure
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+17 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Inline__List__Group_gaef650e653f43178ecfee2c661bea7a85}{eina\+\_\+inlist\+\_\+append()}}, \mbox{\hyperlink{group__Eina__Inline__List__Group_ga5bc991428e75557c6195f6b9e38321fb}{EINA\+\_\+\+INLIST\+\_\+\+GET}}, \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}, and \mbox{\hyperlink{group__Eina__Types__Group_ga05c12dacc8b4058994df842b41be85fc}{EINA\+\_\+\+TRUE}}.

\mbox{\Hypertarget{group__Ecore__Wl2__Subsurface__Group_ga1fd1b90d63c2e4ef59c6fba1b04fc4dd}\label{group__Ecore__Wl2__Subsurface__Group_ga1fd1b90d63c2e4ef59c6fba1b04fc4dd}} 
\index{Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}!ecore\_wl2\_subsurface\_del@{ecore\_wl2\_subsurface\_del}}
\index{ecore\_wl2\_subsurface\_del@{ecore\_wl2\_subsurface\_del}!Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}}
\doxysubsubsection{\texorpdfstring{ecore\_wl2\_subsurface\_del()}{ecore\_wl2\_subsurface\_del()}}
{\footnotesize\ttfamily EAPI void ecore\+\_\+wl2\+\_\+subsurface\+\_\+del (\begin{DoxyParamCaption}\item[{Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$}]{subsurface }\end{DoxyParamCaption})}



Destroy the given subsurface, as well as the surface associated with it. 


\begin{DoxyParams}{Parameters}
{\em subsurface} & the subsurface\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+17 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1ccf8538d0015b3801ff642e6156843a}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN}}.

\mbox{\Hypertarget{group__Ecore__Wl2__Subsurface__Group_ga4d687084dfe6cb0e02f111a5a37ee447}\label{group__Ecore__Wl2__Subsurface__Group_ga4d687084dfe6cb0e02f111a5a37ee447}} 
\index{Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}!ecore\_wl2\_subsurface\_surface\_get@{ecore\_wl2\_subsurface\_surface\_get}}
\index{ecore\_wl2\_subsurface\_surface\_get@{ecore\_wl2\_subsurface\_surface\_get}!Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}}
\doxysubsubsection{\texorpdfstring{ecore\_wl2\_subsurface\_surface\_get()}{ecore\_wl2\_subsurface\_surface\_get()}}
{\footnotesize\ttfamily EAPI struct wl\+\_\+surface $\ast$ ecore\+\_\+wl2\+\_\+subsurface\+\_\+surface\+\_\+get (\begin{DoxyParamCaption}\item[{Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$}]{subsurface }\end{DoxyParamCaption})}



Get the wl\+\_\+surface for this subsurface. 


\begin{DoxyParams}{Parameters}
{\em subsurface} & the subsurface\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
the wl\+\_\+surface associated with this subsurface, or NULL on failure
\end{DoxyReturn}
\begin{DoxySince}{Since}
1.\+17 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_gab2b07061fc6500dedd9cd41c8d16f95d}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN\+\_\+\+VAL}}.

\mbox{\Hypertarget{group__Ecore__Wl2__Subsurface__Group_ga693875c24a6c9193b1b1859861004dd4}\label{group__Ecore__Wl2__Subsurface__Group_ga693875c24a6c9193b1b1859861004dd4}} 
\index{Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}!ecore\_wl2\_subsurface\_position\_set@{ecore\_wl2\_subsurface\_position\_set}}
\index{ecore\_wl2\_subsurface\_position\_set@{ecore\_wl2\_subsurface\_position\_set}!Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}}
\doxysubsubsection{\texorpdfstring{ecore\_wl2\_subsurface\_position\_set()}{ecore\_wl2\_subsurface\_position\_set()}}
{\footnotesize\ttfamily EAPI void ecore\+\_\+wl2\+\_\+subsurface\+\_\+position\+\_\+set (\begin{DoxyParamCaption}\item[{Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$}]{subsurface,  }\item[{int}]{x,  }\item[{int}]{y }\end{DoxyParamCaption})}



Set the position of this subsurface, relative to its parent surface. 

If subsurface is defined and the x, y coordinates differ from the currently tracked position, this also schedules a sub-\/surface position change.


\begin{DoxyParams}{Parameters}
{\em subsurface} & the subsurface \\
\hline
{\em x} & coordinate in the parent surface \\
\hline
{\em y} & coordinate in the parent surface\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+17 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1ccf8538d0015b3801ff642e6156843a}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN}}.

\mbox{\Hypertarget{group__Ecore__Wl2__Subsurface__Group_ga83fdbf8ac139811c1eaadba93f4ccf38}\label{group__Ecore__Wl2__Subsurface__Group_ga83fdbf8ac139811c1eaadba93f4ccf38}} 
\index{Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}!ecore\_wl2\_subsurface\_position\_get@{ecore\_wl2\_subsurface\_position\_get}}
\index{ecore\_wl2\_subsurface\_position\_get@{ecore\_wl2\_subsurface\_position\_get}!Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}}
\doxysubsubsection{\texorpdfstring{ecore\_wl2\_subsurface\_position\_get()}{ecore\_wl2\_subsurface\_position\_get()}}
{\footnotesize\ttfamily EAPI void ecore\+\_\+wl2\+\_\+subsurface\+\_\+position\+\_\+get (\begin{DoxyParamCaption}\item[{Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$}]{subsurface,  }\item[{int $\ast$}]{x,  }\item[{int $\ast$}]{y }\end{DoxyParamCaption})}



Get the position of this subsurface, relative to its parent surface. 

Coordinates will be returned in x and y if non-\/\+NULL.


\begin{DoxyParams}{Parameters}
{\em subsurface} & the subsurface \\
\hline
{\em x} & coordinate in the parent surface, or NULL to ignore \\
\hline
{\em y} & coordinate in the parent surface, or NULL to ignore\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+17 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1ccf8538d0015b3801ff642e6156843a}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN}}.

\mbox{\Hypertarget{group__Ecore__Wl2__Subsurface__Group_gac5f108a9024ff626b162387575285af8}\label{group__Ecore__Wl2__Subsurface__Group_gac5f108a9024ff626b162387575285af8}} 
\index{Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}!ecore\_wl2\_subsurface\_place\_above@{ecore\_wl2\_subsurface\_place\_above}}
\index{ecore\_wl2\_subsurface\_place\_above@{ecore\_wl2\_subsurface\_place\_above}!Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}}
\doxysubsubsection{\texorpdfstring{ecore\_wl2\_subsurface\_place\_above()}{ecore\_wl2\_subsurface\_place\_above()}}
{\footnotesize\ttfamily EAPI void ecore\+\_\+wl2\+\_\+subsurface\+\_\+place\+\_\+above (\begin{DoxyParamCaption}\item[{Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$}]{subsurface,  }\item[{struct wl\+\_\+surface $\ast$}]{surface }\end{DoxyParamCaption})}



Place subsurface on layer above a reference surface. 

Moves the subsurface to just above the reference surface, changing the z-\/order. The reference surface must be either a sibling or parent surface, else a protocol error will be generated.


\begin{DoxyParams}{Parameters}
{\em subsurface} & the subsurface \\
\hline
{\em surface} & the sibling reference surface\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+17 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1ccf8538d0015b3801ff642e6156843a}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN}}.

\mbox{\Hypertarget{group__Ecore__Wl2__Subsurface__Group_ga65395881576846357fb4d843aa6494e9}\label{group__Ecore__Wl2__Subsurface__Group_ga65395881576846357fb4d843aa6494e9}} 
\index{Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}!ecore\_wl2\_subsurface\_place\_below@{ecore\_wl2\_subsurface\_place\_below}}
\index{ecore\_wl2\_subsurface\_place\_below@{ecore\_wl2\_subsurface\_place\_below}!Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}}
\doxysubsubsection{\texorpdfstring{ecore\_wl2\_subsurface\_place\_below()}{ecore\_wl2\_subsurface\_place\_below()}}
{\footnotesize\ttfamily EAPI void ecore\+\_\+wl2\+\_\+subsurface\+\_\+place\+\_\+below (\begin{DoxyParamCaption}\item[{Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$}]{subsurface,  }\item[{struct wl\+\_\+surface $\ast$}]{surface }\end{DoxyParamCaption})}



Place subsurface on layer below a reference surface. 

See ecore\+\_\+wl2\+\_\+subsurface\+\_\+place\+\_\+above.


\begin{DoxyParams}{Parameters}
{\em subsurface} & the subsurface \\
\hline
{\em surface} & the sibling reference surface\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+17 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1ccf8538d0015b3801ff642e6156843a}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN}}.

\mbox{\Hypertarget{group__Ecore__Wl2__Subsurface__Group_gad08935fa0259b93ee9bfa68fb233ff7f}\label{group__Ecore__Wl2__Subsurface__Group_gad08935fa0259b93ee9bfa68fb233ff7f}} 
\index{Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}!ecore\_wl2\_subsurface\_sync\_set@{ecore\_wl2\_subsurface\_sync\_set}}
\index{ecore\_wl2\_subsurface\_sync\_set@{ecore\_wl2\_subsurface\_sync\_set}!Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}}
\doxysubsubsection{\texorpdfstring{ecore\_wl2\_subsurface\_sync\_set()}{ecore\_wl2\_subsurface\_sync\_set()}}
{\footnotesize\ttfamily EAPI void ecore\+\_\+wl2\+\_\+subsurface\+\_\+sync\+\_\+set (\begin{DoxyParamCaption}\item[{Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$}]{subsurface,  }\item[{\mbox{\hyperlink{group__Eina__Types__Group_ga3fe0caf72e93b1bab1ca8ee3ccf3f226}{Eina\+\_\+\+Bool}}}]{sync }\end{DoxyParamCaption})}



Enables or disables sub-\/surface synchronization. 

When synchronization is enabled, surface commits on the subsurface will be cached and only applied when the parent surface\textquotesingle{}s state is applied. This ensures atomic updates of the parent and all of its synchronized sub-\/surfaces.

When synchronization is disabled, commits will apply to the pending state directly without caching, just like a normal wl\+\_\+surface. If there are already cached events when this is set, those events are applied simultaneously with the desync event.

Attempting to enable synchronization when the subsurface already thinks it\textquotesingle{}s sync\textquotesingle{}d, or desync when it believes its desync\textquotesingle{}d, will be trivially ignored and will not generate a Wayland event.

See Wayland\textquotesingle{}s set\+\_\+desync documentation for further details and exceptional cases.


\begin{DoxyParams}{Parameters}
{\em subsurface} & the subsurface \\
\hline
{\em sync} & true to enable synchronization, false to desynchronize\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+17 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1ccf8538d0015b3801ff642e6156843a}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN}}.

\mbox{\Hypertarget{group__Ecore__Wl2__Subsurface__Group_gadac25a91022eeea48fde333bb4d4e1da}\label{group__Ecore__Wl2__Subsurface__Group_gadac25a91022eeea48fde333bb4d4e1da}} 
\index{Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}!ecore\_wl2\_subsurface\_opaque\_region\_set@{ecore\_wl2\_subsurface\_opaque\_region\_set}}
\index{ecore\_wl2\_subsurface\_opaque\_region\_set@{ecore\_wl2\_subsurface\_opaque\_region\_set}!Functions to manipulate subsurfaces.@{Functions to manipulate subsurfaces.}}
\doxysubsubsection{\texorpdfstring{ecore\_wl2\_subsurface\_opaque\_region\_set()}{ecore\_wl2\_subsurface\_opaque\_region\_set()}}
{\footnotesize\ttfamily EAPI void ecore\+\_\+wl2\+\_\+subsurface\+\_\+opaque\+\_\+region\+\_\+set (\begin{DoxyParamCaption}\item[{Ecore\+\_\+\+Wl2\+\_\+\+Subsurface $\ast$}]{subsurface,  }\item[{int}]{x,  }\item[{int}]{y,  }\item[{int}]{w,  }\item[{int}]{h }\end{DoxyParamCaption})}



Set an opaque region for the given subsurface. 

This is an optimization hint to the compositor to allow it avoid redrawing content unnecessarily. Note that marking transparent content as opaque will cause repaint artifacts.

Use a 0x0 region size to unset the opaque region.


\begin{DoxyParams}{Parameters}
{\em subsurface} & the subsurface \\
\hline
{\em x} & coordinate in the parent surface \\
\hline
{\em y} & coordinate in the parent surface \\
\hline
{\em w} & width to set as opaque \\
\hline
{\em h} & height to set as opaque\\
\hline
\end{DoxyParams}
\begin{DoxySince}{Since}
1.\+17 
\end{DoxySince}


References \mbox{\hyperlink{group__Eina__Safety__Checks__Group_ga1ccf8538d0015b3801ff642e6156843a}{EINA\+\_\+\+SAFETY\+\_\+\+ON\+\_\+\+NULL\+\_\+\+RETURN}}.

