mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
app: fix build constraints for nowayland,nox11 on OpenBSD, FreeBSD
While here, add new-style //go:build constraints to generated wayland glue files. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+176
-15
@@ -1,4 +1,4 @@
|
||||
/* Generated by wayland-scanner 1.17.0 */
|
||||
/* Generated by wayland-scanner 1.19.0 */
|
||||
|
||||
#ifndef XDG_SHELL_CLIENT_PROTOCOL_H
|
||||
#define XDG_SHELL_CLIENT_PROTOCOL_H
|
||||
@@ -58,6 +58,8 @@ struct xdg_surface;
|
||||
struct xdg_toplevel;
|
||||
struct xdg_wm_base;
|
||||
|
||||
#ifndef XDG_WM_BASE_INTERFACE
|
||||
#define XDG_WM_BASE_INTERFACE
|
||||
/**
|
||||
* @page page_iface_xdg_wm_base xdg_wm_base
|
||||
* @section page_iface_xdg_wm_base_desc Description
|
||||
@@ -80,6 +82,9 @@ struct xdg_wm_base;
|
||||
* creating transient windows such as popup menus.
|
||||
*/
|
||||
extern const struct wl_interface xdg_wm_base_interface;
|
||||
#endif
|
||||
#ifndef XDG_POSITIONER_INTERFACE
|
||||
#define XDG_POSITIONER_INTERFACE
|
||||
/**
|
||||
* @page page_iface_xdg_positioner xdg_positioner
|
||||
* @section page_iface_xdg_positioner_desc Description
|
||||
@@ -130,6 +135,9 @@ extern const struct wl_interface xdg_wm_base_interface;
|
||||
* positioning a surface raises an error.
|
||||
*/
|
||||
extern const struct wl_interface xdg_positioner_interface;
|
||||
#endif
|
||||
#ifndef XDG_SURFACE_INTERFACE
|
||||
#define XDG_SURFACE_INTERFACE
|
||||
/**
|
||||
* @page page_iface_xdg_surface xdg_surface
|
||||
* @section page_iface_xdg_surface_desc Description
|
||||
@@ -159,6 +167,11 @@ extern const struct wl_interface xdg_positioner_interface;
|
||||
* manipulate a buffer prior to the first xdg_surface.configure call must
|
||||
* also be treated as errors.
|
||||
*
|
||||
* After creating a role-specific object and setting it up, the client must
|
||||
* perform an initial commit without any buffer attached. The compositor
|
||||
* will reply with an xdg_surface.configure event. The client must
|
||||
* acknowledge it and is then allowed to attach a buffer to map the surface.
|
||||
*
|
||||
* Mapping an xdg_surface-based role surface is defined as making it
|
||||
* possible for the surface to be shown by the compositor. Note that
|
||||
* a mapped surface is not guaranteed to be visible once it is mapped.
|
||||
@@ -204,6 +217,11 @@ extern const struct wl_interface xdg_positioner_interface;
|
||||
* manipulate a buffer prior to the first xdg_surface.configure call must
|
||||
* also be treated as errors.
|
||||
*
|
||||
* After creating a role-specific object and setting it up, the client must
|
||||
* perform an initial commit without any buffer attached. The compositor
|
||||
* will reply with an xdg_surface.configure event. The client must
|
||||
* acknowledge it and is then allowed to attach a buffer to map the surface.
|
||||
*
|
||||
* Mapping an xdg_surface-based role surface is defined as making it
|
||||
* possible for the surface to be shown by the compositor. Note that
|
||||
* a mapped surface is not guaranteed to be visible once it is mapped.
|
||||
@@ -220,6 +238,9 @@ extern const struct wl_interface xdg_positioner_interface;
|
||||
* has not been destroyed.
|
||||
*/
|
||||
extern const struct wl_interface xdg_surface_interface;
|
||||
#endif
|
||||
#ifndef XDG_TOPLEVEL_INTERFACE
|
||||
#define XDG_TOPLEVEL_INTERFACE
|
||||
/**
|
||||
* @page page_iface_xdg_toplevel xdg_toplevel
|
||||
* @section page_iface_xdg_toplevel_desc Description
|
||||
@@ -234,7 +255,11 @@ extern const struct wl_interface xdg_surface_interface;
|
||||
* by the compositor until it is explicitly mapped again.
|
||||
* All active operations (e.g., move, resize) are canceled and all
|
||||
* attributes (e.g. title, state, stacking, ...) are discarded for
|
||||
* an xdg_toplevel surface when it is unmapped.
|
||||
* an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to
|
||||
* the state it had right after xdg_surface.get_toplevel. The client
|
||||
* can re-map the toplevel by perfoming a commit without any buffer
|
||||
* attached, waiting for a configure event and handling it as usual (see
|
||||
* xdg_surface description).
|
||||
*
|
||||
* Attaching a null buffer to a toplevel unmaps the surface.
|
||||
* @section page_iface_xdg_toplevel_api API
|
||||
@@ -253,11 +278,18 @@ extern const struct wl_interface xdg_surface_interface;
|
||||
* by the compositor until it is explicitly mapped again.
|
||||
* All active operations (e.g., move, resize) are canceled and all
|
||||
* attributes (e.g. title, state, stacking, ...) are discarded for
|
||||
* an xdg_toplevel surface when it is unmapped.
|
||||
* an xdg_toplevel surface when it is unmapped. The xdg_toplevel returns to
|
||||
* the state it had right after xdg_surface.get_toplevel. The client
|
||||
* can re-map the toplevel by perfoming a commit without any buffer
|
||||
* attached, waiting for a configure event and handling it as usual (see
|
||||
* xdg_surface description).
|
||||
*
|
||||
* Attaching a null buffer to a toplevel unmaps the surface.
|
||||
*/
|
||||
extern const struct wl_interface xdg_toplevel_interface;
|
||||
#endif
|
||||
#ifndef XDG_POPUP_INTERFACE
|
||||
#define XDG_POPUP_INTERFACE
|
||||
/**
|
||||
* @page page_iface_xdg_popup xdg_popup
|
||||
* @section page_iface_xdg_popup_desc Description
|
||||
@@ -284,12 +316,6 @@ extern const struct wl_interface xdg_toplevel_interface;
|
||||
* 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.
|
||||
* @section page_iface_xdg_popup_api API
|
||||
@@ -320,16 +346,11 @@ extern const struct wl_interface xdg_toplevel_interface;
|
||||
* 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.
|
||||
*/
|
||||
extern const struct wl_interface xdg_popup_interface;
|
||||
#endif
|
||||
|
||||
#ifndef XDG_WM_BASE_ERROR_ENUM
|
||||
#define XDG_WM_BASE_ERROR_ENUM
|
||||
@@ -587,6 +608,9 @@ enum xdg_positioner_constraint_adjustment {
|
||||
#define XDG_POSITIONER_SET_GRAVITY 4
|
||||
#define XDG_POSITIONER_SET_CONSTRAINT_ADJUSTMENT 5
|
||||
#define XDG_POSITIONER_SET_OFFSET 6
|
||||
#define XDG_POSITIONER_SET_REACTIVE 7
|
||||
#define XDG_POSITIONER_SET_PARENT_SIZE 8
|
||||
#define XDG_POSITIONER_SET_PARENT_CONFIGURE 9
|
||||
|
||||
|
||||
/**
|
||||
@@ -617,6 +641,18 @@ enum xdg_positioner_constraint_adjustment {
|
||||
* @ingroup iface_xdg_positioner
|
||||
*/
|
||||
#define XDG_POSITIONER_SET_OFFSET_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_xdg_positioner
|
||||
*/
|
||||
#define XDG_POSITIONER_SET_REACTIVE_SINCE_VERSION 3
|
||||
/**
|
||||
* @ingroup iface_xdg_positioner
|
||||
*/
|
||||
#define XDG_POSITIONER_SET_PARENT_SIZE_SINCE_VERSION 3
|
||||
/**
|
||||
* @ingroup iface_xdg_positioner
|
||||
*/
|
||||
#define XDG_POSITIONER_SET_PARENT_CONFIGURE_SINCE_VERSION 3
|
||||
|
||||
/** @ingroup iface_xdg_positioner */
|
||||
static inline void
|
||||
@@ -769,6 +805,56 @@ xdg_positioner_set_offset(struct xdg_positioner *xdg_positioner, int32_t x, int3
|
||||
XDG_POSITIONER_SET_OFFSET, x, y);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_xdg_positioner
|
||||
*
|
||||
* When set reactive, the surface is reconstrained if the conditions used
|
||||
* for constraining changed, e.g. the parent window moved.
|
||||
*
|
||||
* If the conditions changed and the popup was reconstrained, an
|
||||
* xdg_popup.configure event is sent with updated geometry, followed by an
|
||||
* xdg_surface.configure event.
|
||||
*/
|
||||
static inline void
|
||||
xdg_positioner_set_reactive(struct xdg_positioner *xdg_positioner)
|
||||
{
|
||||
wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
|
||||
XDG_POSITIONER_SET_REACTIVE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_xdg_positioner
|
||||
*
|
||||
* Set the parent window geometry the compositor should use when
|
||||
* positioning the popup. The compositor may use this information to
|
||||
* determine the future state the popup should be constrained using. If
|
||||
* this doesn't match the dimension of the parent the popup is eventually
|
||||
* positioned against, the behavior is undefined.
|
||||
*
|
||||
* The arguments are given in the surface-local coordinate space.
|
||||
*/
|
||||
static inline void
|
||||
xdg_positioner_set_parent_size(struct xdg_positioner *xdg_positioner, int32_t parent_width, int32_t parent_height)
|
||||
{
|
||||
wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
|
||||
XDG_POSITIONER_SET_PARENT_SIZE, parent_width, parent_height);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_xdg_positioner
|
||||
*
|
||||
* Set the serial of an xdg_surface.configure event this positioner will be
|
||||
* used in response to. The compositor may use this information together
|
||||
* with set_parent_size to determine what future state the popup should be
|
||||
* constrained using.
|
||||
*/
|
||||
static inline void
|
||||
xdg_positioner_set_parent_configure(struct xdg_positioner *xdg_positioner, uint32_t serial)
|
||||
{
|
||||
wl_proxy_marshal((struct wl_proxy *) xdg_positioner,
|
||||
XDG_POSITIONER_SET_PARENT_CONFIGURE, serial);
|
||||
}
|
||||
|
||||
#ifndef XDG_SURFACE_ERROR_ENUM
|
||||
#define XDG_SURFACE_ERROR_ENUM
|
||||
enum xdg_surface_error {
|
||||
@@ -1691,6 +1777,12 @@ struct xdg_popup_listener {
|
||||
* The x and y arguments represent the position the popup was
|
||||
* placed at given the xdg_positioner rule, relative to the upper
|
||||
* left corner of the window geometry of the parent surface.
|
||||
*
|
||||
* For version 2 or older, the configure event for an xdg_popup is
|
||||
* only ever sent once for the initial configuration. Starting with
|
||||
* version 3, it may be sent again if the popup is setup with an
|
||||
* xdg_positioner with set_reactive requested, or in response to
|
||||
* xdg_popup.reposition requests.
|
||||
* @param x x position relative to parent surface window geometry
|
||||
* @param y y position relative to parent surface window geometry
|
||||
* @param width window geometry width
|
||||
@@ -1711,6 +1803,32 @@ struct xdg_popup_listener {
|
||||
*/
|
||||
void (*popup_done)(void *data,
|
||||
struct xdg_popup *xdg_popup);
|
||||
/**
|
||||
* signal the completion of a repositioned request
|
||||
*
|
||||
* The repositioned event is sent as part of a popup
|
||||
* configuration sequence, together with xdg_popup.configure and
|
||||
* lastly xdg_surface.configure to notify the completion of a
|
||||
* reposition request.
|
||||
*
|
||||
* The repositioned event is to notify about the completion of a
|
||||
* xdg_popup.reposition request. The token argument is the token
|
||||
* passed in the xdg_popup.reposition request.
|
||||
*
|
||||
* Immediately after this event is emitted, xdg_popup.configure and
|
||||
* xdg_surface.configure will be sent with the updated size and
|
||||
* position, as well as a new configure serial.
|
||||
*
|
||||
* The client should optionally update the content of the popup,
|
||||
* but must acknowledge the new popup configuration for the new
|
||||
* position to take effect. See xdg_surface.ack_configure for
|
||||
* details.
|
||||
* @param token reposition request token
|
||||
* @since 3
|
||||
*/
|
||||
void (*repositioned)(void *data,
|
||||
struct xdg_popup *xdg_popup,
|
||||
uint32_t token);
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -1726,6 +1844,7 @@ xdg_popup_add_listener(struct xdg_popup *xdg_popup,
|
||||
|
||||
#define XDG_POPUP_DESTROY 0
|
||||
#define XDG_POPUP_GRAB 1
|
||||
#define XDG_POPUP_REPOSITION 2
|
||||
|
||||
/**
|
||||
* @ingroup iface_xdg_popup
|
||||
@@ -1735,6 +1854,10 @@ xdg_popup_add_listener(struct xdg_popup *xdg_popup,
|
||||
* @ingroup iface_xdg_popup
|
||||
*/
|
||||
#define XDG_POPUP_POPUP_DONE_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_xdg_popup
|
||||
*/
|
||||
#define XDG_POPUP_REPOSITIONED_SINCE_VERSION 3
|
||||
|
||||
/**
|
||||
* @ingroup iface_xdg_popup
|
||||
@@ -1744,6 +1867,10 @@ xdg_popup_add_listener(struct xdg_popup *xdg_popup,
|
||||
* @ingroup iface_xdg_popup
|
||||
*/
|
||||
#define XDG_POPUP_GRAB_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_xdg_popup
|
||||
*/
|
||||
#define XDG_POPUP_REPOSITION_SINCE_VERSION 3
|
||||
|
||||
/** @ingroup iface_xdg_popup */
|
||||
static inline void
|
||||
@@ -1835,6 +1962,40 @@ xdg_popup_grab(struct xdg_popup *xdg_popup, struct wl_seat *seat, uint32_t seria
|
||||
XDG_POPUP_GRAB, seat, serial);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_xdg_popup
|
||||
*
|
||||
* Reposition an already-mapped popup. The popup will be placed given the
|
||||
* details in the passed xdg_positioner object, and a
|
||||
* xdg_popup.repositioned followed by xdg_popup.configure and
|
||||
* xdg_surface.configure will be emitted in response. Any parameters set
|
||||
* by the previous positioner will be discarded.
|
||||
*
|
||||
* The passed token will be sent in the corresponding
|
||||
* xdg_popup.repositioned event. The new popup position will not take
|
||||
* effect until the corresponding configure event is acknowledged by the
|
||||
* client. See xdg_popup.repositioned for details. The token itself is
|
||||
* opaque, and has no other special meaning.
|
||||
*
|
||||
* If multiple reposition requests are sent, the compositor may skip all
|
||||
* but the last one.
|
||||
*
|
||||
* If the popup is repositioned in response to a configure event for its
|
||||
* parent, the client should send an xdg_positioner.set_parent_configure
|
||||
* and possibly an xdg_positioner.set_parent_size request to allow the
|
||||
* compositor to properly constrain the popup.
|
||||
*
|
||||
* If the popup is repositioned together with a parent that is being
|
||||
* resized, but not in response to a configure event, the client should
|
||||
* send an xdg_positioner.set_parent_size request.
|
||||
*/
|
||||
static inline void
|
||||
xdg_popup_reposition(struct xdg_popup *xdg_popup, struct xdg_positioner *positioner, uint32_t token)
|
||||
{
|
||||
wl_proxy_marshal((struct wl_proxy *) xdg_popup,
|
||||
XDG_POPUP_REPOSITION, positioner, token);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user