\hypertarget{group__iface__xdg__wm__base}{}\section{The xdg\+\_\+wm\+\_\+base interface}
\label{group__iface__xdg__wm__base}\index{The xdg\+\_\+wm\+\_\+base interface@{The xdg\+\_\+wm\+\_\+base interface}}


The xdg\+\_\+wm\+\_\+base interface is exposed as a global object enabling clients to turn their wl\+\_\+surfaces into windows in a desktop environment.  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structxdg__wm__base__listener}{xdg\+\_\+wm\+\_\+base\+\_\+listener}}
\item 
struct \mbox{\hyperlink{structxdg__wm__base__interface}{xdg\+\_\+wm\+\_\+base\+\_\+interface}}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__iface__xdg__wm__base_ga418896ccb516abf4361755b94a3a503f}\label{group__iface__xdg__wm__base_ga418896ccb516abf4361755b94a3a503f}} 
\#define {\bfseries X\+D\+G\+\_\+\+W\+M\+\_\+\+B\+A\+S\+E\+\_\+\+P\+I\+N\+G\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__xdg__wm__base_ga6b425713c80443ceaf846d8c065ff133}\label{group__iface__xdg__wm__base_ga6b425713c80443ceaf846d8c065ff133}} 
\#define {\bfseries X\+D\+G\+\_\+\+W\+M\+\_\+\+B\+A\+S\+E\+\_\+\+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__wm__base_ga11828b3dde2f34364cfc0a1423230aad}\label{group__iface__xdg__wm__base_ga11828b3dde2f34364cfc0a1423230aad}} 
\#define {\bfseries X\+D\+G\+\_\+\+W\+M\+\_\+\+B\+A\+S\+E\+\_\+\+C\+R\+E\+A\+T\+E\+\_\+\+P\+O\+S\+I\+T\+I\+O\+N\+E\+R\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__xdg__wm__base_ga123013ed24904a0e2e27fcf8e1ff7e68}\label{group__iface__xdg__wm__base_ga123013ed24904a0e2e27fcf8e1ff7e68}} 
\#define {\bfseries X\+D\+G\+\_\+\+W\+M\+\_\+\+B\+A\+S\+E\+\_\+\+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__wm__base_ga79767418b9f5d722e3418b9c193e4aa2}\label{group__iface__xdg__wm__base_ga79767418b9f5d722e3418b9c193e4aa2}} 
\#define {\bfseries X\+D\+G\+\_\+\+W\+M\+\_\+\+B\+A\+S\+E\+\_\+\+P\+O\+N\+G\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__xdg__wm__base_ga418896ccb516abf4361755b94a3a503f}\label{group__iface__xdg__wm__base_ga418896ccb516abf4361755b94a3a503f}} 
\#define {\bfseries X\+D\+G\+\_\+\+W\+M\+\_\+\+B\+A\+S\+E\+\_\+\+P\+I\+N\+G\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__xdg__wm__base_ga6b425713c80443ceaf846d8c065ff133}\label{group__iface__xdg__wm__base_ga6b425713c80443ceaf846d8c065ff133}} 
\#define {\bfseries X\+D\+G\+\_\+\+W\+M\+\_\+\+B\+A\+S\+E\+\_\+\+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__wm__base_ga11828b3dde2f34364cfc0a1423230aad}\label{group__iface__xdg__wm__base_ga11828b3dde2f34364cfc0a1423230aad}} 
\#define {\bfseries X\+D\+G\+\_\+\+W\+M\+\_\+\+B\+A\+S\+E\+\_\+\+C\+R\+E\+A\+T\+E\+\_\+\+P\+O\+S\+I\+T\+I\+O\+N\+E\+R\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__xdg__wm__base_ga123013ed24904a0e2e27fcf8e1ff7e68}\label{group__iface__xdg__wm__base_ga123013ed24904a0e2e27fcf8e1ff7e68}} 
\#define {\bfseries X\+D\+G\+\_\+\+W\+M\+\_\+\+B\+A\+S\+E\+\_\+\+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__wm__base_ga79767418b9f5d722e3418b9c193e4aa2}\label{group__iface__xdg__wm__base_ga79767418b9f5d722e3418b9c193e4aa2}} 
\#define {\bfseries X\+D\+G\+\_\+\+W\+M\+\_\+\+B\+A\+S\+E\+\_\+\+P\+O\+N\+G\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__iface__xdg__wm__base_ga8f46ae46604ede327e8f69869875449f}\label{group__iface__xdg__wm__base_ga8f46ae46604ede327e8f69869875449f}} 
static int {\bfseries xdg\+\_\+wm\+\_\+base\+\_\+add\+\_\+listener} (struct xdg\+\_\+wm\+\_\+base $\ast$xdg\+\_\+wm\+\_\+base, const struct \mbox{\hyperlink{structxdg__wm__base__listener}{xdg\+\_\+wm\+\_\+base\+\_\+listener}} $\ast$listener, void $\ast$data)
\item 
\mbox{\Hypertarget{group__iface__xdg__wm__base_ga39f0e05e8b647aeea30f08282b24439c}\label{group__iface__xdg__wm__base_ga39f0e05e8b647aeea30f08282b24439c}} 
static void {\bfseries xdg\+\_\+wm\+\_\+base\+\_\+set\+\_\+user\+\_\+data} (struct xdg\+\_\+wm\+\_\+base $\ast$xdg\+\_\+wm\+\_\+base, void $\ast$user\+\_\+data)
\item 
\mbox{\Hypertarget{group__iface__xdg__wm__base_ga6ee591118d27659f013644e38f4a2c77}\label{group__iface__xdg__wm__base_ga6ee591118d27659f013644e38f4a2c77}} 
static void $\ast$ {\bfseries xdg\+\_\+wm\+\_\+base\+\_\+get\+\_\+user\+\_\+data} (struct xdg\+\_\+wm\+\_\+base $\ast$xdg\+\_\+wm\+\_\+base)
\item 
static void \mbox{\hyperlink{group__iface__xdg__wm__base_ga22e80540ffc487720837e85a46834552}{xdg\+\_\+wm\+\_\+base\+\_\+destroy}} (struct xdg\+\_\+wm\+\_\+base $\ast$xdg\+\_\+wm\+\_\+base)
\begin{DoxyCompactList}\small\item\em Destroy this xdg\+\_\+wm\+\_\+base object. \end{DoxyCompactList}\item 
static struct xdg\+\_\+positioner $\ast$ \mbox{\hyperlink{group__iface__xdg__wm__base_ga26d0f63aa223031659780f053c5793cb}{xdg\+\_\+wm\+\_\+base\+\_\+create\+\_\+positioner}} (struct xdg\+\_\+wm\+\_\+base $\ast$xdg\+\_\+wm\+\_\+base)
\begin{DoxyCompactList}\small\item\em Create a positioner object. \end{DoxyCompactList}\item 
static struct xdg\+\_\+surface $\ast$ \mbox{\hyperlink{group__iface__xdg__wm__base_ga6e9508d587e48bd1008c2d6ba981dd5b}{xdg\+\_\+wm\+\_\+base\+\_\+get\+\_\+xdg\+\_\+surface}} (struct xdg\+\_\+wm\+\_\+base $\ast$xdg\+\_\+wm\+\_\+base, struct wl\+\_\+surface $\ast$surface)
\begin{DoxyCompactList}\small\item\em This creates an xdg\+\_\+surface for the given surface. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{group__iface__xdg__wm__base_gaf1105ebe9c99f0eb6bf2792fab28f742}{xdg\+\_\+wm\+\_\+base\+\_\+pong}} (struct xdg\+\_\+wm\+\_\+base $\ast$xdg\+\_\+wm\+\_\+base, 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}\item 
static void \mbox{\hyperlink{group__iface__xdg__wm__base_ga51e4b30ab650380a433035164baacd8f}{xdg\+\_\+wm\+\_\+base\+\_\+send\+\_\+ping}} (struct wl\+\_\+resource $\ast$resource\+\_\+, uint32\+\_\+t serial)
\begin{DoxyCompactList}\small\item\em Sends an ping event to the client owning the resource. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
The xdg\+\_\+wm\+\_\+base interface is exposed as a global object enabling clients to turn their wl\+\_\+surfaces into windows in a desktop environment. 

It defines the basic functionality needed for clients and the compositor to create windows that can be dragged, resized, maximized, etc, as well as creating transient windows such as popup menus. 

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



Destroy this xdg\+\_\+wm\+\_\+base object. 

Destroying a bound xdg\+\_\+wm\+\_\+base object while there are surfaces still alive created by this xdg\+\_\+wm\+\_\+base object instance is illegal and will result in a protocol error. \mbox{\Hypertarget{group__iface__xdg__wm__base_ga26d0f63aa223031659780f053c5793cb}\label{group__iface__xdg__wm__base_ga26d0f63aa223031659780f053c5793cb}} 
\index{The xdg\+\_\+wm\+\_\+base interface@{The xdg\+\_\+wm\+\_\+base interface}!xdg\+\_\+wm\+\_\+base\+\_\+create\+\_\+positioner@{xdg\+\_\+wm\+\_\+base\+\_\+create\+\_\+positioner}}
\index{xdg\+\_\+wm\+\_\+base\+\_\+create\+\_\+positioner@{xdg\+\_\+wm\+\_\+base\+\_\+create\+\_\+positioner}!The xdg\+\_\+wm\+\_\+base interface@{The xdg\+\_\+wm\+\_\+base interface}}
\subsubsection{\texorpdfstring{xdg\+\_\+wm\+\_\+base\+\_\+create\+\_\+positioner()}{xdg\_wm\_base\_create\_positioner()}}
{\footnotesize\ttfamily static struct xdg\+\_\+positioner$\ast$ xdg\+\_\+wm\+\_\+base\+\_\+create\+\_\+positioner (\begin{DoxyParamCaption}\item[{struct xdg\+\_\+wm\+\_\+base $\ast$}]{xdg\+\_\+wm\+\_\+base }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Create a positioner object. 

A positioner object is used to position surfaces relative to some parent surface. See the interface description and xdg\+\_\+surface.\+get\+\_\+popup for details. \mbox{\Hypertarget{group__iface__xdg__wm__base_ga6e9508d587e48bd1008c2d6ba981dd5b}\label{group__iface__xdg__wm__base_ga6e9508d587e48bd1008c2d6ba981dd5b}} 
\index{The xdg\+\_\+wm\+\_\+base interface@{The xdg\+\_\+wm\+\_\+base interface}!xdg\+\_\+wm\+\_\+base\+\_\+get\+\_\+xdg\+\_\+surface@{xdg\+\_\+wm\+\_\+base\+\_\+get\+\_\+xdg\+\_\+surface}}
\index{xdg\+\_\+wm\+\_\+base\+\_\+get\+\_\+xdg\+\_\+surface@{xdg\+\_\+wm\+\_\+base\+\_\+get\+\_\+xdg\+\_\+surface}!The xdg\+\_\+wm\+\_\+base interface@{The xdg\+\_\+wm\+\_\+base interface}}
\subsubsection{\texorpdfstring{xdg\+\_\+wm\+\_\+base\+\_\+get\+\_\+xdg\+\_\+surface()}{xdg\_wm\_base\_get\_xdg\_surface()}}
{\footnotesize\ttfamily static struct xdg\+\_\+surface$\ast$ xdg\+\_\+wm\+\_\+base\+\_\+get\+\_\+xdg\+\_\+surface (\begin{DoxyParamCaption}\item[{struct xdg\+\_\+wm\+\_\+base $\ast$}]{xdg\+\_\+wm\+\_\+base,  }\item[{struct wl\+\_\+surface $\ast$}]{surface }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



This creates an xdg\+\_\+surface for the given surface. 

While xdg\+\_\+surface itself is not a role, the corresponding surface may only be assigned a role extending xdg\+\_\+surface, such as xdg\+\_\+toplevel or xdg\+\_\+popup.

This creates an xdg\+\_\+surface for the given surface. An xdg\+\_\+surface is used as basis to define a role to a given surface, such as xdg\+\_\+toplevel or xdg\+\_\+popup. It also manages functionality shared between xdg\+\_\+surface based surface roles.

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__wm__base_gaf1105ebe9c99f0eb6bf2792fab28f742}\label{group__iface__xdg__wm__base_gaf1105ebe9c99f0eb6bf2792fab28f742}} 
\index{The xdg\+\_\+wm\+\_\+base interface@{The xdg\+\_\+wm\+\_\+base interface}!xdg\+\_\+wm\+\_\+base\+\_\+pong@{xdg\+\_\+wm\+\_\+base\+\_\+pong}}
\index{xdg\+\_\+wm\+\_\+base\+\_\+pong@{xdg\+\_\+wm\+\_\+base\+\_\+pong}!The xdg\+\_\+wm\+\_\+base interface@{The xdg\+\_\+wm\+\_\+base interface}}
\subsubsection{\texorpdfstring{xdg\+\_\+wm\+\_\+base\+\_\+pong()}{xdg\_wm\_base\_pong()}}
{\footnotesize\ttfamily static void xdg\+\_\+wm\+\_\+base\+\_\+pong (\begin{DoxyParamCaption}\item[{struct xdg\+\_\+wm\+\_\+base $\ast$}]{xdg\+\_\+wm\+\_\+base,  }\item[{uint32\+\_\+t}]{serial }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



A client must respond to a ping event with a pong request or the client may be deemed unresponsive. 

See xdg\+\_\+wm\+\_\+base.\+ping. \mbox{\Hypertarget{group__iface__xdg__wm__base_ga51e4b30ab650380a433035164baacd8f}\label{group__iface__xdg__wm__base_ga51e4b30ab650380a433035164baacd8f}} 
\index{The xdg\+\_\+wm\+\_\+base interface@{The xdg\+\_\+wm\+\_\+base interface}!xdg\+\_\+wm\+\_\+base\+\_\+send\+\_\+ping@{xdg\+\_\+wm\+\_\+base\+\_\+send\+\_\+ping}}
\index{xdg\+\_\+wm\+\_\+base\+\_\+send\+\_\+ping@{xdg\+\_\+wm\+\_\+base\+\_\+send\+\_\+ping}!The xdg\+\_\+wm\+\_\+base interface@{The xdg\+\_\+wm\+\_\+base interface}}
\subsubsection{\texorpdfstring{xdg\+\_\+wm\+\_\+base\+\_\+send\+\_\+ping()}{xdg\_wm\_base\_send\_ping()}}
{\footnotesize\ttfamily static void xdg\+\_\+wm\+\_\+base\+\_\+send\+\_\+ping (\begin{DoxyParamCaption}\item[{struct wl\+\_\+resource $\ast$}]{resource\+\_\+,  }\item[{uint32\+\_\+t}]{serial }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Sends an ping event to the client owning the resource. 


\begin{DoxyParams}{Parameters}
{\em resource\+\_\+} & The client\textquotesingle{}s resource \\
\hline
{\em serial} & pass this to the pong request \\
\hline
\end{DoxyParams}
