\hypertarget{group__iface__zxdg__popup__v6}{}\section{The zxdg\+\_\+popup\+\_\+v6 interface}
\label{group__iface__zxdg__popup__v6}\index{The zxdg\+\_\+popup\+\_\+v6 interface@{The zxdg\+\_\+popup\+\_\+v6 interface}}


A popup surface is a short-\/lived, temporary surface.  


\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \mbox{\hyperlink{structzxdg__popup__v6__listener}{zxdg\+\_\+popup\+\_\+v6\+\_\+listener}}
\item 
struct \mbox{\hyperlink{structzxdg__popup__v6__interface}{zxdg\+\_\+popup\+\_\+v6\+\_\+interface}}
\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__iface__zxdg__popup__v6_ga008114ad4d8283f1c7681e512c723dc6}\label{group__iface__zxdg__popup__v6_ga008114ad4d8283f1c7681e512c723dc6}} 
\#define {\bfseries Z\+X\+D\+G\+\_\+\+P\+O\+P\+U\+P\+\_\+\+V6\+\_\+\+C\+O\+N\+F\+I\+G\+U\+R\+E\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__zxdg__popup__v6_ga7dedd82f3261dd244f10cea37f221d0a}\label{group__iface__zxdg__popup__v6_ga7dedd82f3261dd244f10cea37f221d0a}} 
\#define {\bfseries Z\+X\+D\+G\+\_\+\+P\+O\+P\+U\+P\+\_\+\+V6\+\_\+\+P\+O\+P\+U\+P\+\_\+\+D\+O\+N\+E\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__zxdg__popup__v6_gad0b97fc86f5e9ea6b1304426cfaa84f1}\label{group__iface__zxdg__popup__v6_gad0b97fc86f5e9ea6b1304426cfaa84f1}} 
\#define {\bfseries Z\+X\+D\+G\+\_\+\+P\+O\+P\+U\+P\+\_\+\+V6\+\_\+\+D\+E\+S\+T\+R\+O\+Y\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__zxdg__popup__v6_ga265f98d0c47b250c758a32da1c8844cd}\label{group__iface__zxdg__popup__v6_ga265f98d0c47b250c758a32da1c8844cd}} 
\#define {\bfseries Z\+X\+D\+G\+\_\+\+P\+O\+P\+U\+P\+\_\+\+V6\+\_\+\+G\+R\+A\+B\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__zxdg__popup__v6_ga008114ad4d8283f1c7681e512c723dc6}\label{group__iface__zxdg__popup__v6_ga008114ad4d8283f1c7681e512c723dc6}} 
\#define {\bfseries Z\+X\+D\+G\+\_\+\+P\+O\+P\+U\+P\+\_\+\+V6\+\_\+\+C\+O\+N\+F\+I\+G\+U\+R\+E\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__zxdg__popup__v6_ga7dedd82f3261dd244f10cea37f221d0a}\label{group__iface__zxdg__popup__v6_ga7dedd82f3261dd244f10cea37f221d0a}} 
\#define {\bfseries Z\+X\+D\+G\+\_\+\+P\+O\+P\+U\+P\+\_\+\+V6\+\_\+\+P\+O\+P\+U\+P\+\_\+\+D\+O\+N\+E\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__zxdg__popup__v6_gad0b97fc86f5e9ea6b1304426cfaa84f1}\label{group__iface__zxdg__popup__v6_gad0b97fc86f5e9ea6b1304426cfaa84f1}} 
\#define {\bfseries Z\+X\+D\+G\+\_\+\+P\+O\+P\+U\+P\+\_\+\+V6\+\_\+\+D\+E\+S\+T\+R\+O\+Y\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\item 
\mbox{\Hypertarget{group__iface__zxdg__popup__v6_ga265f98d0c47b250c758a32da1c8844cd}\label{group__iface__zxdg__popup__v6_ga265f98d0c47b250c758a32da1c8844cd}} 
\#define {\bfseries Z\+X\+D\+G\+\_\+\+P\+O\+P\+U\+P\+\_\+\+V6\+\_\+\+G\+R\+A\+B\+\_\+\+S\+I\+N\+C\+E\+\_\+\+V\+E\+R\+S\+I\+ON}~1
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{group__iface__zxdg__popup__v6_ga75c64048ae7a62648fd361f11c76aea6}\label{group__iface__zxdg__popup__v6_ga75c64048ae7a62648fd361f11c76aea6}} 
static int {\bfseries zxdg\+\_\+popup\+\_\+v6\+\_\+add\+\_\+listener} (struct zxdg\+\_\+popup\+\_\+v6 $\ast$zxdg\+\_\+popup\+\_\+v6, const struct \mbox{\hyperlink{structzxdg__popup__v6__listener}{zxdg\+\_\+popup\+\_\+v6\+\_\+listener}} $\ast$listener, void $\ast$data)
\item 
\mbox{\Hypertarget{group__iface__zxdg__popup__v6_gaadafa04dc1aa12bc1cd46df15cfa1224}\label{group__iface__zxdg__popup__v6_gaadafa04dc1aa12bc1cd46df15cfa1224}} 
static void {\bfseries zxdg\+\_\+popup\+\_\+v6\+\_\+set\+\_\+user\+\_\+data} (struct zxdg\+\_\+popup\+\_\+v6 $\ast$zxdg\+\_\+popup\+\_\+v6, void $\ast$user\+\_\+data)
\item 
\mbox{\Hypertarget{group__iface__zxdg__popup__v6_gabd57bd132dc885a2c15af647ba729a5e}\label{group__iface__zxdg__popup__v6_gabd57bd132dc885a2c15af647ba729a5e}} 
static void $\ast$ {\bfseries zxdg\+\_\+popup\+\_\+v6\+\_\+get\+\_\+user\+\_\+data} (struct zxdg\+\_\+popup\+\_\+v6 $\ast$zxdg\+\_\+popup\+\_\+v6)
\item 
static void \mbox{\hyperlink{group__iface__zxdg__popup__v6_gad87e14e80aa486aa5696c7f9908952a0}{zxdg\+\_\+popup\+\_\+v6\+\_\+destroy}} (struct zxdg\+\_\+popup\+\_\+v6 $\ast$zxdg\+\_\+popup\+\_\+v6)
\begin{DoxyCompactList}\small\item\em This destroys the popup. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{group__iface__zxdg__popup__v6_ga28820a1df71bbea1ff13e2b52b12810d}{zxdg\+\_\+popup\+\_\+v6\+\_\+grab}} (struct zxdg\+\_\+popup\+\_\+v6 $\ast$zxdg\+\_\+popup\+\_\+v6, struct wl\+\_\+seat $\ast$seat, uint32\+\_\+t serial)
\begin{DoxyCompactList}\small\item\em This request makes the created popup take an explicit grab. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{group__iface__zxdg__popup__v6_ga23b52650b4fd7c31554c16bac2b6098d}{zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+configure}} (struct wl\+\_\+resource $\ast$resource\+\_\+, int32\+\_\+t x, int32\+\_\+t y, int32\+\_\+t width, int32\+\_\+t height)
\begin{DoxyCompactList}\small\item\em Sends an configure event to the client owning the resource. \end{DoxyCompactList}\item 
static void \mbox{\hyperlink{group__iface__zxdg__popup__v6_ga294e5d5e48b5c23a2c2e5bf393dc3c1c}{zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+popup\+\_\+done}} (struct wl\+\_\+resource $\ast$resource\+\_\+)
\begin{DoxyCompactList}\small\item\em Sends an popup\+\_\+done event to the client owning the resource. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
A popup surface is a short-\/lived, temporary surface. 

It can be used to implement for example menus, popovers, tooltips and other similar user interface concepts.

A popup can be made to take an explicit grab. See xdg\+\_\+popup.\+grab for details.

When the popup is dismissed, a popup\+\_\+done event will be sent out, and at the same time the surface will be unmapped. See the xdg\+\_\+popup.\+popup\+\_\+done event for details.

Explicitly destroying the xdg\+\_\+popup object will also dismiss the popup and unmap the surface. Clients that want to dismiss the popup when another surface of their own is clicked should dismiss the popup using the destroy request.

The parent surface must have either the xdg\+\_\+toplevel or xdg\+\_\+popup surface role.

A newly created xdg\+\_\+popup will be stacked on top of all previously created xdg\+\_\+popup surfaces associated with the same xdg\+\_\+toplevel.

The parent of an xdg\+\_\+popup must be mapped (see the xdg\+\_\+surface description) before the xdg\+\_\+popup itself.

The x and y arguments passed when creating the popup object specify where the top left of the popup should be placed, relative to the local surface coordinates of the parent surface. See xdg\+\_\+surface.\+get\+\_\+popup. An xdg\+\_\+popup must intersect with or be at least partially adjacent to its parent surface.

The client must call wl\+\_\+surface.\+commit on the corresponding wl\+\_\+surface for the xdg\+\_\+popup state to take effect. 

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



This destroys the popup. 

Explicitly destroying the xdg\+\_\+popup object will also dismiss the popup, and unmap the surface.

If this xdg\+\_\+popup is not the \char`\"{}topmost\char`\"{} popup, a protocol error will be sent. \mbox{\Hypertarget{group__iface__zxdg__popup__v6_ga28820a1df71bbea1ff13e2b52b12810d}\label{group__iface__zxdg__popup__v6_ga28820a1df71bbea1ff13e2b52b12810d}} 
\index{The zxdg\+\_\+popup\+\_\+v6 interface@{The zxdg\+\_\+popup\+\_\+v6 interface}!zxdg\+\_\+popup\+\_\+v6\+\_\+grab@{zxdg\+\_\+popup\+\_\+v6\+\_\+grab}}
\index{zxdg\+\_\+popup\+\_\+v6\+\_\+grab@{zxdg\+\_\+popup\+\_\+v6\+\_\+grab}!The zxdg\+\_\+popup\+\_\+v6 interface@{The zxdg\+\_\+popup\+\_\+v6 interface}}
\subsubsection{\texorpdfstring{zxdg\+\_\+popup\+\_\+v6\+\_\+grab()}{zxdg\_popup\_v6\_grab()}}
{\footnotesize\ttfamily static void zxdg\+\_\+popup\+\_\+v6\+\_\+grab (\begin{DoxyParamCaption}\item[{struct zxdg\+\_\+popup\+\_\+v6 $\ast$}]{zxdg\+\_\+popup\+\_\+v6,  }\item[{struct wl\+\_\+seat $\ast$}]{seat,  }\item[{uint32\+\_\+t}]{serial }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



This request makes the created popup take an explicit grab. 

An explicit grab will be dismissed when the user dismisses the popup, or when the client destroys the xdg\+\_\+popup. This can be done by the user clicking outside the surface, using the keyboard, or even locking the screen through closing the lid or a timeout.

If the compositor denies the grab, the popup will be immediately dismissed.

This request must be used in response to some sort of user action like a button press, key press, or touch down event. The serial number of the event should be passed as \textquotesingle{}serial\textquotesingle{}.

The parent of a grabbing popup must either be an xdg\+\_\+toplevel surface or another xdg\+\_\+popup with an explicit grab. If the parent is another xdg\+\_\+popup it means that the popups are nested, with this popup now being the topmost popup.

Nested popups must be destroyed in the reverse order they were created in, e.\+g. the only popup you are allowed to destroy at all times is the topmost one.

When compositors choose to dismiss a popup, they may dismiss every nested grabbing popup as well. When a compositor dismisses popups, it will follow the same dismissing order as required from the client.

The parent of a grabbing popup must either be another xdg\+\_\+popup with an active explicit grab, or an xdg\+\_\+popup or xdg\+\_\+toplevel, if there are no explicit grabs already taken.

If the topmost grabbing popup is destroyed, the grab will be returned to the parent of the popup, if that parent previously had an explicit grab.

If the parent is a grabbing popup which has already been dismissed, this popup will be immediately dismissed. If the parent is a popup that did not take an explicit grab, an error will be raised.

During a popup grab, the client owning the grab will receive pointer and touch events for all their surfaces as normal (similar to an \char`\"{}owner-\/events\char`\"{} grab in X11 parlance), while the top most grabbing popup will always have keyboard focus. \mbox{\Hypertarget{group__iface__zxdg__popup__v6_ga23b52650b4fd7c31554c16bac2b6098d}\label{group__iface__zxdg__popup__v6_ga23b52650b4fd7c31554c16bac2b6098d}} 
\index{The zxdg\+\_\+popup\+\_\+v6 interface@{The zxdg\+\_\+popup\+\_\+v6 interface}!zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+configure@{zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+configure}}
\index{zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+configure@{zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+configure}!The zxdg\+\_\+popup\+\_\+v6 interface@{The zxdg\+\_\+popup\+\_\+v6 interface}}
\subsubsection{\texorpdfstring{zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+configure()}{zxdg\_popup\_v6\_send\_configure()}}
{\footnotesize\ttfamily static void zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+configure (\begin{DoxyParamCaption}\item[{struct wl\+\_\+resource $\ast$}]{resource\+\_\+,  }\item[{int32\+\_\+t}]{x,  }\item[{int32\+\_\+t}]{y,  }\item[{int32\+\_\+t}]{width,  }\item[{int32\+\_\+t}]{height }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Sends an configure event to the client owning the resource. 


\begin{DoxyParams}{Parameters}
{\em resource\+\_\+} & The client\textquotesingle{}s resource \\
\hline
{\em x} & x position relative to parent surface window geometry \\
\hline
{\em y} & y position relative to parent surface window geometry \\
\hline
{\em width} & window geometry width \\
\hline
{\em height} & window geometry height \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{group__iface__zxdg__popup__v6_ga294e5d5e48b5c23a2c2e5bf393dc3c1c}\label{group__iface__zxdg__popup__v6_ga294e5d5e48b5c23a2c2e5bf393dc3c1c}} 
\index{The zxdg\+\_\+popup\+\_\+v6 interface@{The zxdg\+\_\+popup\+\_\+v6 interface}!zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+popup\+\_\+done@{zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+popup\+\_\+done}}
\index{zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+popup\+\_\+done@{zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+popup\+\_\+done}!The zxdg\+\_\+popup\+\_\+v6 interface@{The zxdg\+\_\+popup\+\_\+v6 interface}}
\subsubsection{\texorpdfstring{zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+popup\+\_\+done()}{zxdg\_popup\_v6\_send\_popup\_done()}}
{\footnotesize\ttfamily static void zxdg\+\_\+popup\+\_\+v6\+\_\+send\+\_\+popup\+\_\+done (\begin{DoxyParamCaption}\item[{struct wl\+\_\+resource $\ast$}]{resource\+\_\+ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}, {\ttfamily [static]}}



Sends an popup\+\_\+done event to the client owning the resource. 


\begin{DoxyParams}{Parameters}
{\em resource\+\_\+} & The client\textquotesingle{}s resource \\
\hline
\end{DoxyParams}
