\hypertarget{page_xdg_shell_unstable_v5_page_ifaces_xdg_shell_unstable_v5}{}\section{Interfaces}\label{page_xdg_shell_unstable_v5_page_ifaces_xdg_shell_unstable_v5}

\begin{DoxyItemize}
\item \mbox{\hyperlink{page_iface_xdg_shell}{xdg\+\_\+shell}} -\/ create desktop-\/style surfaces
\item \mbox{\hyperlink{page_iface_xdg_surface}{xdg\+\_\+surface}} -\/ A desktop window
\item \mbox{\hyperlink{page_iface_xdg_popup}{xdg\+\_\+popup}} -\/ short-\/lived, popup surfaces for menus 
\end{DoxyItemize}\hypertarget{page_xdg_shell_unstable_v5_page_copyright_xdg_shell_unstable_v5}{}\section{Copyright}\label{page_xdg_shell_unstable_v5_page_copyright_xdg_shell_unstable_v5}

\begin{DoxyPre}\end{DoxyPre}



\begin{DoxyPre}Copyright © 2008-2013 Kristian Høgsberg
Copyright © 2013      Rafael Antognolli
Copyright © 2013      Jasper St. Pierre
Copyright © 2010-2013 Intel Corporation\end{DoxyPre}



\begin{DoxyPre}Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the "Software"),
to deal in the Software without restriction, including without limitation
the rights to use, copy, modify, merge, publish, distribute, sublicense,
and/or sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following conditions:\end{DoxyPre}



\begin{DoxyPre}The above copyright notice and this permission notice (including the next
paragraph) shall be included in all copies or substantial portions of the
Software.\end{DoxyPre}



\begin{DoxyPre}THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
\end{DoxyPre}
 \hypertarget{page_iface_xdg_shell}{}\section{xdg\+\_\+shell}\label{page_iface_xdg_shell}
\hypertarget{page_iface_xdg_shell_page_iface_xdg_shell_desc}{}\subsection{Description}\label{page_iface_xdg_shell_page_iface_xdg_shell_desc}
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. \hypertarget{page_iface_xdg_shell_page_iface_xdg_shell_api}{}\subsection{A\+PI}\label{page_iface_xdg_shell_page_iface_xdg_shell_api}
See \mbox{\hyperlink{group__iface__xdg__shell}{The xdg\+\_\+shell interface}}. \hypertarget{page_iface_xdg_surface}{}\section{xdg\+\_\+surface}\label{page_iface_xdg_surface}
\hypertarget{page_iface_xdg_surface_page_iface_xdg_surface_desc}{}\subsection{Description}\label{page_iface_xdg_surface_page_iface_xdg_surface_desc}
An interface that may be implemented by a wl\+\_\+surface, for implementations that provide a desktop-\/style user interface.

It provides requests to treat surfaces like windows, allowing to set properties like maximized, fullscreen, minimized, and to move and resize them, and associate metadata like title and app id.

The client must call wl\+\_\+surface.\+commit on the corresponding wl\+\_\+surface for the xdg\+\_\+surface state to take effect. Prior to committing the new state, it can set up initial configuration, such as maximizing or setting a window geometry.

Even without attaching a buffer the compositor must respond to initial committed configuration, for instance sending a configure event with expected window geometry if the client maximized its surface during initialization.

For a surface to be mapped by the compositor the client must have committed both an xdg\+\_\+surface state and a buffer. \hypertarget{page_iface_xdg_surface_page_iface_xdg_surface_api}{}\subsection{A\+PI}\label{page_iface_xdg_surface_page_iface_xdg_surface_api}
See \mbox{\hyperlink{group__iface__xdg__surface}{The xdg\+\_\+surface interface}}. \hypertarget{page_iface_xdg_popup}{}\section{xdg\+\_\+popup}\label{page_iface_xdg_popup}
\hypertarget{page_iface_xdg_popup_page_iface_xdg_popup_desc}{}\subsection{Description}\label{page_iface_xdg_popup_page_iface_xdg_popup_desc}
A popup surface is a short-\/lived, temporary surface that can be used to implement menus. It takes an explicit grab on the surface that will be dismissed when the user dismisses the 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.

When the popup is dismissed, a popup\+\_\+done event will be sent out, and at the same time the surface will be unmapped. The xdg\+\_\+popup object is now inert and cannot be reactivated, so clients should destroy it. Explicitly destroying the xdg\+\_\+popup object will also dismiss the popup and unmap the surface.

Clients will receive events for all their surfaces during this grab (which is an \char`\"{}owner-\/events\char`\"{} grab in X11 parlance). This is done so that users can navigate through submenus and other \char`\"{}nested\char`\"{} popup windows without having to dismiss the topmost popup.

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 an xdg\+\_\+surface or xdg\+\_\+popup role.

Specifying an xdg\+\_\+popup for the parent 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.

If there is an existing popup when creating a new popup, the parent must be the current topmost popup.

A parent surface must be mapped before the new popup is mapped.

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

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\+\_\+shell.\+get\+\_\+xdg\+\_\+popup.

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

For a surface to be mapped by the compositor the client must have committed both the xdg\+\_\+popup state and a buffer. \hypertarget{page_iface_xdg_popup_page_iface_xdg_popup_api}{}\subsection{A\+PI}\label{page_iface_xdg_popup_page_iface_xdg_popup_api}
See \mbox{\hyperlink{group__iface__xdg__popup}{The xdg\+\_\+popup interface}}. 