\hypertarget{structxdg__positioner__interface}{}\section{xdg\+\_\+positioner\+\_\+interface Struct Reference}
\label{structxdg__positioner__interface}\index{xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}}
\subsection*{Data Fields}
\begin{DoxyCompactItemize}
\item 
void($\ast$ \mbox{\hyperlink{structxdg__positioner__interface_aade5dc57273f00dae32cabfc84c6e9e2}{destroy}} )(struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource)
\begin{DoxyCompactList}\small\item\em destroy the xdg\+\_\+positioner object \end{DoxyCompactList}\item 
void($\ast$ \mbox{\hyperlink{structxdg__positioner__interface_abb1958c5b5b63363786bb5dfab64a4f5}{set\+\_\+size}} )(struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource, int32\+\_\+t width, int32\+\_\+t height)
\begin{DoxyCompactList}\small\item\em set the size of the to-\/be positioned rectangle \end{DoxyCompactList}\item 
void($\ast$ \mbox{\hyperlink{structxdg__positioner__interface_af200098e3191f58528baaf2e660db05a}{set\+\_\+anchor\+\_\+rect}} )(struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource, int32\+\_\+t x, int32\+\_\+t y, int32\+\_\+t width, int32\+\_\+t height)
\begin{DoxyCompactList}\small\item\em set the anchor rectangle within the parent surface \end{DoxyCompactList}\item 
void($\ast$ \mbox{\hyperlink{structxdg__positioner__interface_a33c63bcfb9fd370c4b451a32319f55fc}{set\+\_\+anchor}} )(struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource, uint32\+\_\+t anchor)
\begin{DoxyCompactList}\small\item\em set anchor rectangle anchor \end{DoxyCompactList}\item 
void($\ast$ \mbox{\hyperlink{structxdg__positioner__interface_ab0ea6c3220d9facb4b1e33840b25a5dd}{set\+\_\+gravity}} )(struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource, uint32\+\_\+t gravity)
\begin{DoxyCompactList}\small\item\em set child surface gravity \end{DoxyCompactList}\item 
void($\ast$ \mbox{\hyperlink{structxdg__positioner__interface_ae02c6c88a5e14be651c5202a0df3de84}{set\+\_\+constraint\+\_\+adjustment}} )(struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource, uint32\+\_\+t constraint\+\_\+adjustment)
\begin{DoxyCompactList}\small\item\em set the adjustment to be done when constrained \end{DoxyCompactList}\item 
void($\ast$ \mbox{\hyperlink{structxdg__positioner__interface_a32bf1d115e62be0c229ae9a9e0e367f6}{set\+\_\+offset}} )(struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource, int32\+\_\+t x, int32\+\_\+t y)
\begin{DoxyCompactList}\small\item\em set surface position offset \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Field Documentation}
\mbox{\Hypertarget{structxdg__positioner__interface_aade5dc57273f00dae32cabfc84c6e9e2}\label{structxdg__positioner__interface_aade5dc57273f00dae32cabfc84c6e9e2}} 
\index{xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}!destroy@{destroy}}
\index{destroy@{destroy}!xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}}
\subsubsection{\texorpdfstring{destroy}{destroy}}
{\footnotesize\ttfamily void($\ast$ xdg\+\_\+positioner\+\_\+interface\+::destroy) (struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource)}



destroy the xdg\+\_\+positioner object 

Notify the compositor that the xdg\+\_\+positioner will no longer be used. \mbox{\Hypertarget{structxdg__positioner__interface_abb1958c5b5b63363786bb5dfab64a4f5}\label{structxdg__positioner__interface_abb1958c5b5b63363786bb5dfab64a4f5}} 
\index{xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}!set\+\_\+size@{set\+\_\+size}}
\index{set\+\_\+size@{set\+\_\+size}!xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}}
\subsubsection{\texorpdfstring{set\+\_\+size}{set\_size}}
{\footnotesize\ttfamily void($\ast$ xdg\+\_\+positioner\+\_\+interface\+::set\+\_\+size) (struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource, int32\+\_\+t width, int32\+\_\+t height)}



set the size of the to-\/be positioned rectangle 

Set the size of the surface that is to be positioned with the positioner object. The size is in surface-\/local coordinates and corresponds to the window geometry. See xdg\+\_\+surface.\+set\+\_\+window\+\_\+geometry.

If a zero or negative size is set the invalid\+\_\+input error is raised. 
\begin{DoxyParams}{Parameters}
{\em width} & width of positioned rectangle \\
\hline
{\em height} & height of positioned rectangle \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{structxdg__positioner__interface_af200098e3191f58528baaf2e660db05a}\label{structxdg__positioner__interface_af200098e3191f58528baaf2e660db05a}} 
\index{xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}!set\+\_\+anchor\+\_\+rect@{set\+\_\+anchor\+\_\+rect}}
\index{set\+\_\+anchor\+\_\+rect@{set\+\_\+anchor\+\_\+rect}!xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}}
\subsubsection{\texorpdfstring{set\+\_\+anchor\+\_\+rect}{set\_anchor\_rect}}
{\footnotesize\ttfamily void($\ast$ xdg\+\_\+positioner\+\_\+interface\+::set\+\_\+anchor\+\_\+rect) (struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource, int32\+\_\+t x, int32\+\_\+t y, int32\+\_\+t width, int32\+\_\+t height)}



set the anchor rectangle within the parent surface 

Specify the anchor rectangle within the parent surface that the child surface will be placed relative to. The rectangle is relative to the window geometry as defined by xdg\+\_\+surface.\+set\+\_\+window\+\_\+geometry of the parent surface.

When the xdg\+\_\+positioner object is used to position a child surface, the anchor rectangle may not extend outside the window geometry of the positioned child\textquotesingle{}s parent surface.

If a negative size is set the invalid\+\_\+input error is raised. 
\begin{DoxyParams}{Parameters}
{\em x} & x position of anchor rectangle \\
\hline
{\em y} & y position of anchor rectangle \\
\hline
{\em width} & width of anchor rectangle \\
\hline
{\em height} & height of anchor rectangle \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{structxdg__positioner__interface_a33c63bcfb9fd370c4b451a32319f55fc}\label{structxdg__positioner__interface_a33c63bcfb9fd370c4b451a32319f55fc}} 
\index{xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}!set\+\_\+anchor@{set\+\_\+anchor}}
\index{set\+\_\+anchor@{set\+\_\+anchor}!xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}}
\subsubsection{\texorpdfstring{set\+\_\+anchor}{set\_anchor}}
{\footnotesize\ttfamily void($\ast$ xdg\+\_\+positioner\+\_\+interface\+::set\+\_\+anchor) (struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource, uint32\+\_\+t anchor)}



set anchor rectangle anchor 

Defines the anchor point for the anchor rectangle. The specified anchor is used derive an anchor point that the child surface will be positioned relative to. If a corner anchor is set (e.\+g. \textquotesingle{}top\+\_\+left\textquotesingle{} or \textquotesingle{}bottom\+\_\+right\textquotesingle{}), the anchor point will be at the specified corner; otherwise, the derived anchor point will be centered on the specified edge, or in the center of the anchor rectangle if no edge is specified. 
\begin{DoxyParams}{Parameters}
{\em anchor} & anchor \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{structxdg__positioner__interface_ab0ea6c3220d9facb4b1e33840b25a5dd}\label{structxdg__positioner__interface_ab0ea6c3220d9facb4b1e33840b25a5dd}} 
\index{xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}!set\+\_\+gravity@{set\+\_\+gravity}}
\index{set\+\_\+gravity@{set\+\_\+gravity}!xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}}
\subsubsection{\texorpdfstring{set\+\_\+gravity}{set\_gravity}}
{\footnotesize\ttfamily void($\ast$ xdg\+\_\+positioner\+\_\+interface\+::set\+\_\+gravity) (struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource, uint32\+\_\+t gravity)}



set child surface gravity 

Defines in what direction a surface should be positioned, relative to the anchor point of the parent surface. If a corner gravity is specified (e.\+g. \textquotesingle{}bottom\+\_\+right\textquotesingle{} or \textquotesingle{}top\+\_\+left\textquotesingle{}), then the child surface will be placed towards the specified gravity; otherwise, the child surface will be centered over the anchor point on any axis that had no gravity specified. 
\begin{DoxyParams}{Parameters}
{\em gravity} & gravity direction \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{structxdg__positioner__interface_ae02c6c88a5e14be651c5202a0df3de84}\label{structxdg__positioner__interface_ae02c6c88a5e14be651c5202a0df3de84}} 
\index{xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}!set\+\_\+constraint\+\_\+adjustment@{set\+\_\+constraint\+\_\+adjustment}}
\index{set\+\_\+constraint\+\_\+adjustment@{set\+\_\+constraint\+\_\+adjustment}!xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}}
\subsubsection{\texorpdfstring{set\+\_\+constraint\+\_\+adjustment}{set\_constraint\_adjustment}}
{\footnotesize\ttfamily void($\ast$ xdg\+\_\+positioner\+\_\+interface\+::set\+\_\+constraint\+\_\+adjustment) (struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource, uint32\+\_\+t constraint\+\_\+adjustment)}



set the adjustment to be done when constrained 

Specify how the window should be positioned if the originally intended position caused the surface to be constrained, meaning at least partially outside positioning boundaries set by the compositor. The adjustment is set by constructing a bitmask describing the adjustment to be made when the surface is constrained on that axis.

If no bit for one axis is set, the compositor will assume that the child surface should not change its position on that axis when constrained.

If more than one bit for one axis is set, the order of how adjustments are applied is specified in the corresponding adjustment descriptions.

The default adjustment is none. 
\begin{DoxyParams}{Parameters}
{\em constraint\+\_\+adjustment} & bit mask of constraint adjustments \\
\hline
\end{DoxyParams}
\mbox{\Hypertarget{structxdg__positioner__interface_a32bf1d115e62be0c229ae9a9e0e367f6}\label{structxdg__positioner__interface_a32bf1d115e62be0c229ae9a9e0e367f6}} 
\index{xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}!set\+\_\+offset@{set\+\_\+offset}}
\index{set\+\_\+offset@{set\+\_\+offset}!xdg\+\_\+positioner\+\_\+interface@{xdg\+\_\+positioner\+\_\+interface}}
\subsubsection{\texorpdfstring{set\+\_\+offset}{set\_offset}}
{\footnotesize\ttfamily void($\ast$ xdg\+\_\+positioner\+\_\+interface\+::set\+\_\+offset) (struct wl\+\_\+client $\ast$client, struct wl\+\_\+resource $\ast$resource, int32\+\_\+t x, int32\+\_\+t y)}



set surface position offset 

Specify the surface position offset relative to the position of the anchor on the anchor rectangle and the anchor on the surface. For example if the anchor of the anchor rectangle is at (x, y), the surface has the gravity bottom$\vert$right, and the offset is (ox, oy), the calculated surface position will be (x + ox, y
\begin{DoxyItemize}
\item oy). The offset position of the surface is the one used for constraint testing. See set\+\_\+constraint\+\_\+adjustment.
\end{DoxyItemize}

An example use case is placing a popup menu on top of a user interface element, while aligning the user interface element of the parent surface with some user interface element placed somewhere in the popup surface. 
\begin{DoxyParams}{Parameters}
{\em x} & surface position x offset \\
\hline
{\em y} & surface position y offset \\
\hline
\end{DoxyParams}
