\hypertarget{group__iface__xdg__shell}{}\section{The xdg\+\_\+shell interface}
\label{group__iface__xdg__shell}\index{The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}}


xdg\+\_\+shell allows clients to turn a wl\+\_\+surface into a \char`\"{}real window\char`\"{} which can be dragged, resized, stacked, and moved around by the user.  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structxdg__shell__listener}{xdg\+\_\+shell\+\_\+listener}}
\begin{DoxyCompactList}\small\item\em xdg\+\_\+shell -\/ create desktop-\/style surfaces \+: check if the client is alive \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__iface__xdg__shell_ga10f2f149269d0cc8baba08f2c0efaace}\label{group__iface__xdg__shell_ga10f2f149269d0cc8baba08f2c0efaace}} 
\#define {\bfseries X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+P\+I\+N\+G\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__xdg__shell_ga187d7bc6edfcc75596dccba5d391a1f6}\label{group__iface__xdg__shell_ga187d7bc6edfcc75596dccba5d391a1f6}} 
\#define {\bfseries X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+D\+E\+S\+T\+R\+O\+Y\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__xdg__shell_ga0711de068c4ef9818fd648b21b5d298b}\label{group__iface__xdg__shell_ga0711de068c4ef9818fd648b21b5d298b}} 
\#define {\bfseries X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+U\+S\+E\+\_\+\+U\+N\+S\+T\+A\+B\+L\+E\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__xdg__shell_ga143650660de1957000a6441b91ae6d4e}\label{group__iface__xdg__shell_ga143650660de1957000a6441b91ae6d4e}} 
\#define {\bfseries X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+G\+E\+T\+\_\+\+X\+D\+G\+\_\+\+S\+U\+R\+F\+A\+C\+E\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__xdg__shell_ga8206751b73c678f4643a645fed258048}\label{group__iface__xdg__shell_ga8206751b73c678f4643a645fed258048}} 
\#define {\bfseries X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+G\+E\+T\+\_\+\+X\+D\+G\+\_\+\+P\+O\+P\+U\+P\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__xdg__shell_ga6d2821b9c29d712dd3f61e91acd1be3d}\label{group__iface__xdg__shell_ga6d2821b9c29d712dd3f61e91acd1be3d}} 
\#define {\bfseries X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+P\+O\+N\+G\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \mbox{\hyperlink{group__iface__xdg__shell_ga9cb54f0124c0fe4693b59a10ee2693fa}{xdg\+\_\+shell\+\_\+version}} \{ \newline
{\bfseries X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+\+C\+U\+R\+R\+E\+NT} = 5, 
\newline
\mbox{\hyperlink{group__iface__xdg__shell_gga9cb54f0124c0fe4693b59a10ee2693faa1c43ea16443e2230d336f8c336530e30}{X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+\+C\+U\+R\+R\+E\+NT}} = 5
 \}
\begin{DoxyCompactList}\small\item\em latest protocol version \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__iface__xdg__shell_ga3a61bdcd8e9a090ed4ebe9207281384f}\label{group__iface__xdg__shell_ga3a61bdcd8e9a090ed4ebe9207281384f}} 
static int {\bfseries xdg\+\_\+shell\+\_\+add\+\_\+listener} (struct xdg\+\_\+shell $\ast$xdg\+\_\+shell, const struct \mbox{\hyperlink{structxdg__shell__listener}{xdg\+\_\+shell\+\_\+listener}} $\ast$listener, void $\ast$data)
\item 
\mbox{\Hypertarget{group__iface__xdg__shell_ga81a59f4c5d4b65e44e9e537fe624396c}\label{group__iface__xdg__shell_ga81a59f4c5d4b65e44e9e537fe624396c}} 
static void {\bfseries xdg\+\_\+shell\+\_\+set\+\_\+user\+\_\+data} (struct xdg\+\_\+shell $\ast$xdg\+\_\+shell, void $\ast$user\+\_\+data)
\item 
\mbox{\Hypertarget{group__iface__xdg__shell_ga58295314d4fc6e1248185b5ad67a9199}\label{group__iface__xdg__shell_ga58295314d4fc6e1248185b5ad67a9199}} 
static void $\ast$ {\bfseries xdg\+\_\+shell\+\_\+get\+\_\+user\+\_\+data} (struct xdg\+\_\+shell $\ast$xdg\+\_\+shell)
\item 
static void \mbox{\hyperlink{group__iface__xdg__shell_gab9d463e7b1dae622a23b785686173dfa}{xdg\+\_\+shell\+\_\+destroy}} (struct xdg\+\_\+shell $\ast$xdg\+\_\+shell)
\begin{DoxyCompactList}\small\item\em Destroy this xdg\+\_\+shell object. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{group__iface__xdg__shell_gac093b21ee60797551db8df8ac739f9c0}{xdg\+\_\+shell\+\_\+use\+\_\+unstable\+\_\+version}} (struct xdg\+\_\+shell $\ast$xdg\+\_\+shell, int32\+\_\+t version)
\begin{DoxyCompactList}\small\item\em Negotiate the unstable version of the interface. \end{DoxyCompactList}\item 
static struct xdg\+\_\+surface $\ast$ \mbox{\hyperlink{group__iface__xdg__shell_ga59f9db1b6b727aa7c89b6e3446cc245f}{xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+surface}} (struct xdg\+\_\+shell $\ast$xdg\+\_\+shell, struct wl\+\_\+surface $\ast$surface)
\begin{DoxyCompactList}\small\item\em This creates an xdg\+\_\+surface for the given surface and gives it the xdg\+\_\+surface role. \end{DoxyCompactList}\item 
static struct xdg\+\_\+popup $\ast$ \mbox{\hyperlink{group__iface__xdg__shell_ga9d54f24d304a9256a45df52fbdaeec52}{xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+popup}} (struct xdg\+\_\+shell $\ast$xdg\+\_\+shell, struct wl\+\_\+surface $\ast$surface, struct wl\+\_\+surface $\ast$parent, struct wl\+\_\+seat $\ast$seat, uint32\+\_\+t serial, int32\+\_\+t x, int32\+\_\+t y)
\begin{DoxyCompactList}\small\item\em This creates an xdg\+\_\+popup for the given surface and gives it the xdg\+\_\+popup role. \end{DoxyCompactList}\item 
\mbox{\Hypertarget{group__iface__xdg__shell_ga5a8949fa6b267b402adf22b49333fe10}\label{group__iface__xdg__shell_ga5a8949fa6b267b402adf22b49333fe10}} 
static void \mbox{\hyperlink{group__iface__xdg__shell_ga5a8949fa6b267b402adf22b49333fe10}{xdg\+\_\+shell\+\_\+pong}} (struct xdg\+\_\+shell $\ast$xdg\+\_\+shell, uint32\+\_\+t serial)
\begin{DoxyCompactList}\small\item\em A client must respond to a ping event with a pong request or the client may be deemed unresponsive. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
xdg\+\_\+shell allows clients to turn a wl\+\_\+surface into a \char`\"{}real window\char`\"{} which can be dragged, resized, stacked, and moved around by the user. 

Everything about this interface is suited towards traditional desktop environments. 

\subsection{Enumeration Type Documentation}
\mbox{\Hypertarget{group__iface__xdg__shell_ga9cb54f0124c0fe4693b59a10ee2693fa}\label{group__iface__xdg__shell_ga9cb54f0124c0fe4693b59a10ee2693fa}} 
\index{The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}!xdg\+\_\+shell\+\_\+version@{xdg\+\_\+shell\+\_\+version}}
\index{xdg\+\_\+shell\+\_\+version@{xdg\+\_\+shell\+\_\+version}!The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}}
\subsubsection{\texorpdfstring{xdg\+\_\+shell\+\_\+version}{xdg\_shell\_version}}
{\footnotesize\ttfamily enum xdg\+\_\+shell\+\_\+version}



latest protocol version 

The \textquotesingle{}current\textquotesingle{} member of this enum gives the version of the protocol. Implementations can compare this to the version they implement using static\+\_\+assert to ensure the protocol and implementation versions match. \begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+\+C\+U\+R\+R\+E\+NT@{X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+\+C\+U\+R\+R\+E\+NT}!The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}}\index{The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}!X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+\+C\+U\+R\+R\+E\+NT@{X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+\+C\+U\+R\+R\+E\+NT}}}\mbox{\Hypertarget{group__iface__xdg__shell_gga9cb54f0124c0fe4693b59a10ee2693faa1c43ea16443e2230d336f8c336530e30}\label{group__iface__xdg__shell_gga9cb54f0124c0fe4693b59a10ee2693faa1c43ea16443e2230d336f8c336530e30}} 
X\+D\+G\+\_\+\+S\+H\+E\+L\+L\+\_\+\+V\+E\+R\+S\+I\+O\+N\+\_\+\+C\+U\+R\+R\+E\+NT&Always the latest version. \\
\hline

\end{DoxyEnumFields}


\subsection{Function Documentation}
\mbox{\Hypertarget{group__iface__xdg__shell_gab9d463e7b1dae622a23b785686173dfa}\label{group__iface__xdg__shell_gab9d463e7b1dae622a23b785686173dfa}} 
\index{The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}!xdg\+\_\+shell\+\_\+destroy@{xdg\+\_\+shell\+\_\+destroy}}
\index{xdg\+\_\+shell\+\_\+destroy@{xdg\+\_\+shell\+\_\+destroy}!The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}}
\subsubsection{\texorpdfstring{xdg\+\_\+shell\+\_\+destroy()}{xdg\_shell\_destroy()}}
{\footnotesize\ttfamily static void xdg\+\_\+shell\+\_\+destroy (\begin{DoxyParamCaption}\item[{struct xdg\+\_\+shell $\ast$}]{xdg\+\_\+shell }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Destroy this xdg\+\_\+shell object. 

Destroying a bound xdg\+\_\+shell object while there are surfaces still alive created by this xdg\+\_\+shell object instance is illegal and will result in a protocol error. \mbox{\Hypertarget{group__iface__xdg__shell_gac093b21ee60797551db8df8ac739f9c0}\label{group__iface__xdg__shell_gac093b21ee60797551db8df8ac739f9c0}} 
\index{The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}!xdg\+\_\+shell\+\_\+use\+\_\+unstable\+\_\+version@{xdg\+\_\+shell\+\_\+use\+\_\+unstable\+\_\+version}}
\index{xdg\+\_\+shell\+\_\+use\+\_\+unstable\+\_\+version@{xdg\+\_\+shell\+\_\+use\+\_\+unstable\+\_\+version}!The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}}
\subsubsection{\texorpdfstring{xdg\+\_\+shell\+\_\+use\+\_\+unstable\+\_\+version()}{xdg\_shell\_use\_unstable\_version()}}
{\footnotesize\ttfamily static void xdg\+\_\+shell\+\_\+use\+\_\+unstable\+\_\+version (\begin{DoxyParamCaption}\item[{struct xdg\+\_\+shell $\ast$}]{xdg\+\_\+shell,  }\item[{int32\+\_\+t}]{version }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Negotiate the unstable version of the interface. 

This mechanism is in place to ensure client and server agree on the unstable versions of the protocol that they speak or exit cleanly if they don\textquotesingle{}t agree. This request will go away once the xdg-\/shell protocol is stable. \mbox{\Hypertarget{group__iface__xdg__shell_ga59f9db1b6b727aa7c89b6e3446cc245f}\label{group__iface__xdg__shell_ga59f9db1b6b727aa7c89b6e3446cc245f}} 
\index{The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}!xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+surface@{xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+surface}}
\index{xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+surface@{xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+surface}!The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}}
\subsubsection{\texorpdfstring{xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+surface()}{xdg\_shell\_get\_xdg\_surface()}}
{\footnotesize\ttfamily static struct xdg\+\_\+surface$\ast$ xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+surface (\begin{DoxyParamCaption}\item[{struct xdg\+\_\+shell $\ast$}]{xdg\+\_\+shell,  }\item[{struct wl\+\_\+surface $\ast$}]{surface }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



This creates an xdg\+\_\+surface for the given surface and gives it the xdg\+\_\+surface role. 

A wl\+\_\+surface can only be given an xdg\+\_\+surface role once. If get\+\_\+xdg\+\_\+surface is called with a wl\+\_\+surface that already has an active xdg\+\_\+surface associated with it, or if it had any other role, an error is raised.

See the documentation of xdg\+\_\+surface for more details about what an xdg\+\_\+surface is and how it is used. \mbox{\Hypertarget{group__iface__xdg__shell_ga9d54f24d304a9256a45df52fbdaeec52}\label{group__iface__xdg__shell_ga9d54f24d304a9256a45df52fbdaeec52}} 
\index{The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}!xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+popup@{xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+popup}}
\index{xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+popup@{xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+popup}!The xdg\+\_\+shell interface@{The xdg\+\_\+shell interface}}
\subsubsection{\texorpdfstring{xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+popup()}{xdg\_shell\_get\_xdg\_popup()}}
{\footnotesize\ttfamily static struct xdg\+\_\+popup$\ast$ xdg\+\_\+shell\+\_\+get\+\_\+xdg\+\_\+popup (\begin{DoxyParamCaption}\item[{struct xdg\+\_\+shell $\ast$}]{xdg\+\_\+shell,  }\item[{struct wl\+\_\+surface $\ast$}]{surface,  }\item[{struct wl\+\_\+surface $\ast$}]{parent,  }\item[{struct wl\+\_\+seat $\ast$}]{seat,  }\item[{uint32\+\_\+t}]{serial,  }\item[{int32\+\_\+t}]{x,  }\item[{int32\+\_\+t}]{y }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



This creates an xdg\+\_\+popup for the given surface and gives it the xdg\+\_\+popup role. 

A wl\+\_\+surface can only be given an xdg\+\_\+popup role once. If get\+\_\+xdg\+\_\+popup is called with a wl\+\_\+surface that already has an active xdg\+\_\+popup associated with it, or if it had any other role, an error is raised.

This request must be used in response to some sort of user action like a button press, key press, or touch down event.

See the documentation of xdg\+\_\+popup for more details about what an xdg\+\_\+popup is and how it is used. 