Add features to Makefile

make release - compiles with clang, uses more aggressive compilation
flags for errors/warnings.
CC=tcc/gcc/clang make - lets you select your wanted compiler.
This commit is contained in:
2026-06-28 18:03:05 -04:00
parent e8199f6d33
commit 1024a222be
17 changed files with 5126 additions and 9 deletions
+8 -1
View File
@@ -5,7 +5,8 @@ VERSION = `git describe --tags --dirty 2>/dev/null || echo 0.2`
PREFIX = /usr/local
PKG_CONFIG = pkg-config
# Auto-detect compiler: TCC > Clang > GCC
# Auto-detect compiler: TCC > Clang > GCC (only if CC not set)
ifeq ($(origin CC),default)
ifeq ($(shell which tcc 2>/dev/null),)
ifeq ($(shell which clang 2>/dev/null),)
CC = gcc
@@ -15,6 +16,7 @@ ifeq ($(shell which tcc 2>/dev/null),)
else
CC = tcc
endif
endif
# Uncomment to build without XWayland support
#XWAYLAND =
@@ -47,6 +49,11 @@ all: peachwm smsg/smsg
package:
$(MAKE) MARCH=
release: CC = clang
release: CFLAGS += -Werror -Wpedantic -Wmissing-prototypes -Wstrict-prototypes \
-Wold-style-definition -Wmissing-declarations -Wimplicit-fallthrough
release: peachwm smsg/smsg
# Compositor
peachwm: src/peachwm.o src/util.o parser/parser.o \
Executable
BIN
View File
Binary file not shown.
+201
View File
@@ -0,0 +1,201 @@
/* Generated by wayland-scanner 1.25.0 */
#ifndef CURSOR_SHAPE_V1_ENUM_PROTOCOL_H
#define CURSOR_SHAPE_V1_ENUM_PROTOCOL_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM
#define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM
/**
* @ingroup iface_wp_cursor_shape_device_v1
* cursor shapes
*
* This enum describes cursor shapes.
*
* The names are taken from the CSS W3C specification:
* https://w3c.github.io/csswg-drafts/css-ui/#cursor
* with a few additions.
*
* Note that there are some groups of cursor shapes that are related:
* The first group is drag-and-drop cursors which are used to indicate
* the selected action during dnd operations. The second group is resize
* cursors which are used to indicate resizing and moving possibilities
* on window borders. It is recommended that the shapes in these groups
* should use visually compatible images and metaphors.
*/
enum wp_cursor_shape_device_v1_shape {
/**
* default cursor
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DEFAULT = 1,
/**
* a context menu is available for the object under the cursor
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CONTEXT_MENU = 2,
/**
* help is available for the object under the cursor
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_HELP = 3,
/**
* pointer that indicates a link or another interactive element
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_POINTER = 4,
/**
* progress indicator
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_PROGRESS = 5,
/**
* program is busy, user should wait
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_WAIT = 6,
/**
* a cell or set of cells may be selected
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CELL = 7,
/**
* simple crosshair
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_CROSSHAIR = 8,
/**
* text may be selected
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_TEXT = 9,
/**
* vertical text may be selected
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_VERTICAL_TEXT = 10,
/**
* drag-and-drop: alias of/shortcut to something is to be created
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALIAS = 11,
/**
* drag-and-drop: something is to be copied
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COPY = 12,
/**
* drag-and-drop: something is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_MOVE = 13,
/**
* drag-and-drop: the dragged item cannot be dropped at the current cursor location
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NO_DROP = 14,
/**
* drag-and-drop: the requested action will not be carried out
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NOT_ALLOWED = 15,
/**
* drag-and-drop: something can be grabbed
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRAB = 16,
/**
* drag-and-drop: something is being grabbed
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_GRABBING = 17,
/**
* resizing: the east border is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_E_RESIZE = 18,
/**
* resizing: the north border is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_N_RESIZE = 19,
/**
* resizing: the north-east corner is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NE_RESIZE = 20,
/**
* resizing: the north-west corner is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NW_RESIZE = 21,
/**
* resizing: the south border is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_S_RESIZE = 22,
/**
* resizing: the south-east corner is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SE_RESIZE = 23,
/**
* resizing: the south-west corner is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_SW_RESIZE = 24,
/**
* resizing: the west border is to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_W_RESIZE = 25,
/**
* resizing: the east and west borders are to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_EW_RESIZE = 26,
/**
* resizing: the north and south borders are to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NS_RESIZE = 27,
/**
* resizing: the north-east and south-west corners are to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NESW_RESIZE = 28,
/**
* resizing: the north-west and south-east corners are to be moved
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_NWSE_RESIZE = 29,
/**
* resizing: that the item/column can be resized horizontally
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_COL_RESIZE = 30,
/**
* resizing: that the item/row can be resized vertically
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ROW_RESIZE = 31,
/**
* something can be scrolled in any direction
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_SCROLL = 32,
/**
* something can be zoomed in
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_IN = 33,
/**
* something can be zoomed out
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ZOOM_OUT = 34,
/**
* drag-and-drop: the user will select which action will be carried out (non-css value)
* @since 2
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DND_ASK = 35,
/**
* resizing: something can be moved or resized in any direction (non-css value)
* @since 2
*/
WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_RESIZE = 36,
};
/**
* @ingroup iface_wp_cursor_shape_device_v1
*/
#define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_DND_ASK_SINCE_VERSION 2
/**
* @ingroup iface_wp_cursor_shape_device_v1
*/
#define WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ALL_RESIZE_SINCE_VERSION 2
#endif /* WP_CURSOR_SHAPE_DEVICE_V1_SHAPE_ENUM */
#ifndef WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM
#define WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM
enum wp_cursor_shape_device_v1_error {
/**
* the specified shape value is invalid
*/
WP_CURSOR_SHAPE_DEVICE_V1_ERROR_INVALID_SHAPE = 1,
};
#endif /* WP_CURSOR_SHAPE_DEVICE_V1_ERROR_ENUM */
#ifdef __cplusplus
}
#endif
#endif
+120
View File
@@ -0,0 +1,120 @@
/* Generated by wayland-scanner 1.25.0 */
/*
* Copyright © 2019 Christopher Billington
* Copyright © 2020 Ilia Bozhinov
* Copyright © 2022 Victoria Brekenfeld
*
* Permission to use, copy, modify, distribute, and sell this
* software and its documentation for any purpose is hereby granted
* without fee, provided that the above copyright notice appear in
* all copies and that both that copyright notice and this permission
* notice appear in supporting documentation, and that the name of
* the copyright holders not be used in advertising or publicity
* pertaining to distribution of the software without specific,
* written prior permission. The copyright holders make no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied
* warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
* THIS SOFTWARE.
*/
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface ext_workspace_group_handle_v1_interface;
extern const struct wl_interface ext_workspace_handle_v1_interface;
extern const struct wl_interface wl_output_interface;
static const struct wl_interface *ext_workspace_v1_types[] = {
NULL,
&ext_workspace_group_handle_v1_interface,
&ext_workspace_handle_v1_interface,
&wl_output_interface,
&wl_output_interface,
&ext_workspace_handle_v1_interface,
&ext_workspace_handle_v1_interface,
&ext_workspace_group_handle_v1_interface,
};
static const struct wl_message ext_workspace_manager_v1_requests[] = {
{ "commit", "", ext_workspace_v1_types + 0 },
{ "stop", "", ext_workspace_v1_types + 0 },
};
static const struct wl_message ext_workspace_manager_v1_events[] = {
{ "workspace_group", "n", ext_workspace_v1_types + 1 },
{ "workspace", "n", ext_workspace_v1_types + 2 },
{ "done", "", ext_workspace_v1_types + 0 },
{ "finished", "", ext_workspace_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface ext_workspace_manager_v1_interface = {
"ext_workspace_manager_v1", 1,
2, ext_workspace_manager_v1_requests,
4, ext_workspace_manager_v1_events,
};
static const struct wl_message ext_workspace_group_handle_v1_requests[] = {
{ "create_workspace", "s", ext_workspace_v1_types + 0 },
{ "destroy", "", ext_workspace_v1_types + 0 },
};
static const struct wl_message ext_workspace_group_handle_v1_events[] = {
{ "capabilities", "u", ext_workspace_v1_types + 0 },
{ "output_enter", "o", ext_workspace_v1_types + 3 },
{ "output_leave", "o", ext_workspace_v1_types + 4 },
{ "workspace_enter", "o", ext_workspace_v1_types + 5 },
{ "workspace_leave", "o", ext_workspace_v1_types + 6 },
{ "removed", "", ext_workspace_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface ext_workspace_group_handle_v1_interface = {
"ext_workspace_group_handle_v1", 1,
2, ext_workspace_group_handle_v1_requests,
6, ext_workspace_group_handle_v1_events,
};
static const struct wl_message ext_workspace_handle_v1_requests[] = {
{ "destroy", "", ext_workspace_v1_types + 0 },
{ "activate", "", ext_workspace_v1_types + 0 },
{ "deactivate", "", ext_workspace_v1_types + 0 },
{ "assign", "o", ext_workspace_v1_types + 7 },
{ "remove", "", ext_workspace_v1_types + 0 },
};
static const struct wl_message ext_workspace_handle_v1_events[] = {
{ "id", "s", ext_workspace_v1_types + 0 },
{ "name", "s", ext_workspace_v1_types + 0 },
{ "coordinates", "a", ext_workspace_v1_types + 0 },
{ "state", "u", ext_workspace_v1_types + 0 },
{ "capabilities", "u", ext_workspace_v1_types + 0 },
{ "removed", "", ext_workspace_v1_types + 0 },
};
WL_PRIVATE const struct wl_interface ext_workspace_handle_v1_interface = {
"ext_workspace_handle_v1", 1,
5, ext_workspace_handle_v1_requests,
6, ext_workspace_handle_v1_events,
};
+752
View File
@@ -0,0 +1,752 @@
/* Generated by wayland-scanner 1.25.0 */
#ifndef EXT_WORKSPACE_V1_SERVER_PROTOCOL_H
#define EXT_WORKSPACE_V1_SERVER_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-server.h"
#ifdef __cplusplus
extern "C" {
#endif
struct wl_client;
struct wl_resource;
/**
* @page page_ext_workspace_v1 The ext_workspace_v1 protocol
* @section page_ifaces_ext_workspace_v1 Interfaces
* - @subpage page_iface_ext_workspace_manager_v1 - list and control workspaces
* - @subpage page_iface_ext_workspace_group_handle_v1 - a workspace group assigned to a set of outputs
* - @subpage page_iface_ext_workspace_handle_v1 - a workspace handing a group of surfaces
* @section page_copyright_ext_workspace_v1 Copyright
* <pre>
*
* Copyright © 2019 Christopher Billington
* Copyright © 2020 Ilia Bozhinov
* Copyright © 2022 Victoria Brekenfeld
*
* Permission to use, copy, modify, distribute, and sell this
* software and its documentation for any purpose is hereby granted
* without fee, provided that the above copyright notice appear in
* all copies and that both that copyright notice and this permission
* notice appear in supporting documentation, and that the name of
* the copyright holders not be used in advertising or publicity
* pertaining to distribution of the software without specific,
* written prior permission. The copyright holders make no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied
* warranty.
*
* THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
* ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
* THIS SOFTWARE.
* </pre>
*/
struct ext_workspace_group_handle_v1;
struct ext_workspace_handle_v1;
struct ext_workspace_manager_v1;
struct wl_output;
#ifndef EXT_WORKSPACE_MANAGER_V1_INTERFACE
#define EXT_WORKSPACE_MANAGER_V1_INTERFACE
/**
* @page page_iface_ext_workspace_manager_v1 ext_workspace_manager_v1
* @section page_iface_ext_workspace_manager_v1_desc Description
*
* Workspaces, also called virtual desktops, are groups of surfaces. A
* compositor with a concept of workspaces may only show some such groups of
* surfaces (those of 'active' workspaces) at a time. 'Activating' a
* workspace is a request for the compositor to display that workspace's
* surfaces as normal, whereas the compositor may hide or otherwise
* de-emphasise surfaces that are associated only with 'inactive' workspaces.
* Workspaces are grouped by which sets of outputs they correspond to, and
* may contain surfaces only from those outputs. In this way, it is possible
* for each output to have its own set of workspaces, or for all outputs (or
* any other arbitrary grouping) to share workspaces. Compositors may
* optionally conceptually arrange each group of workspaces in an
* N-dimensional grid.
*
* The purpose of this protocol is to enable the creation of taskbars and
* docks by providing them with a list of workspaces and their properties,
* and allowing them to activate and deactivate workspaces.
*
* After a client binds the ext_workspace_manager_v1, each workspace will be
* sent via the workspace event.
* @section page_iface_ext_workspace_manager_v1_api API
* See @ref iface_ext_workspace_manager_v1.
*/
/**
* @defgroup iface_ext_workspace_manager_v1 The ext_workspace_manager_v1 interface
*
* Workspaces, also called virtual desktops, are groups of surfaces. A
* compositor with a concept of workspaces may only show some such groups of
* surfaces (those of 'active' workspaces) at a time. 'Activating' a
* workspace is a request for the compositor to display that workspace's
* surfaces as normal, whereas the compositor may hide or otherwise
* de-emphasise surfaces that are associated only with 'inactive' workspaces.
* Workspaces are grouped by which sets of outputs they correspond to, and
* may contain surfaces only from those outputs. In this way, it is possible
* for each output to have its own set of workspaces, or for all outputs (or
* any other arbitrary grouping) to share workspaces. Compositors may
* optionally conceptually arrange each group of workspaces in an
* N-dimensional grid.
*
* The purpose of this protocol is to enable the creation of taskbars and
* docks by providing them with a list of workspaces and their properties,
* and allowing them to activate and deactivate workspaces.
*
* After a client binds the ext_workspace_manager_v1, each workspace will be
* sent via the workspace event.
*/
extern const struct wl_interface ext_workspace_manager_v1_interface;
#endif
#ifndef EXT_WORKSPACE_GROUP_HANDLE_V1_INTERFACE
#define EXT_WORKSPACE_GROUP_HANDLE_V1_INTERFACE
/**
* @page page_iface_ext_workspace_group_handle_v1 ext_workspace_group_handle_v1
* @section page_iface_ext_workspace_group_handle_v1_desc Description
*
* A ext_workspace_group_handle_v1 object represents a workspace group
* that is assigned a set of outputs and contains a number of workspaces.
*
* The set of outputs assigned to the workspace group is conveyed to the client via
* output_enter and output_leave events, and its workspaces are conveyed with
* workspace events.
*
* For example, a compositor which has a set of workspaces for each output may
* advertise a workspace group (and its workspaces) per output, whereas a compositor
* where a workspace spans all outputs may advertise a single workspace group for all
* outputs.
* @section page_iface_ext_workspace_group_handle_v1_api API
* See @ref iface_ext_workspace_group_handle_v1.
*/
/**
* @defgroup iface_ext_workspace_group_handle_v1 The ext_workspace_group_handle_v1 interface
*
* A ext_workspace_group_handle_v1 object represents a workspace group
* that is assigned a set of outputs and contains a number of workspaces.
*
* The set of outputs assigned to the workspace group is conveyed to the client via
* output_enter and output_leave events, and its workspaces are conveyed with
* workspace events.
*
* For example, a compositor which has a set of workspaces for each output may
* advertise a workspace group (and its workspaces) per output, whereas a compositor
* where a workspace spans all outputs may advertise a single workspace group for all
* outputs.
*/
extern const struct wl_interface ext_workspace_group_handle_v1_interface;
#endif
#ifndef EXT_WORKSPACE_HANDLE_V1_INTERFACE
#define EXT_WORKSPACE_HANDLE_V1_INTERFACE
/**
* @page page_iface_ext_workspace_handle_v1 ext_workspace_handle_v1
* @section page_iface_ext_workspace_handle_v1_desc Description
*
* A ext_workspace_handle_v1 object represents a workspace that handles a
* group of surfaces.
*
* Each workspace has:
* - a name, conveyed to the client with the name event
* - potentially an id conveyed with the id event
* - a list of states, conveyed to the client with the state event
* - and optionally a set of coordinates, conveyed to the client with the
* coordinates event
*
* The client may request that the compositor activate or deactivate the workspace.
*
* Each workspace can belong to only a single workspace group.
* Depending on the compositor policy, there might be workspaces with
* the same name in different workspace groups, but these workspaces are still
* separate (e.g. one of them might be active while the other is not).
* @section page_iface_ext_workspace_handle_v1_api API
* See @ref iface_ext_workspace_handle_v1.
*/
/**
* @defgroup iface_ext_workspace_handle_v1 The ext_workspace_handle_v1 interface
*
* A ext_workspace_handle_v1 object represents a workspace that handles a
* group of surfaces.
*
* Each workspace has:
* - a name, conveyed to the client with the name event
* - potentially an id conveyed with the id event
* - a list of states, conveyed to the client with the state event
* - and optionally a set of coordinates, conveyed to the client with the
* coordinates event
*
* The client may request that the compositor activate or deactivate the workspace.
*
* Each workspace can belong to only a single workspace group.
* Depending on the compositor policy, there might be workspaces with
* the same name in different workspace groups, but these workspaces are still
* separate (e.g. one of them might be active while the other is not).
*/
extern const struct wl_interface ext_workspace_handle_v1_interface;
#endif
/**
* @ingroup iface_ext_workspace_manager_v1
* @struct ext_workspace_manager_v1_interface
*/
struct ext_workspace_manager_v1_interface {
/**
* all requests about the workspaces have been sent
*
* The client must send this request after it has finished
* sending other requests. The compositor must process a series of
* requests preceding a commit request atomically.
*
* This allows changes to the workspace properties to be seen as
* atomic, even if they happen via multiple events, and even if
* they involve multiple ext_workspace_handle_v1 objects, for
* example, deactivating one workspace and activating another.
*/
void (*commit)(struct wl_client *client,
struct wl_resource *resource);
/**
* stop sending events
*
* Indicates the client no longer wishes to receive events for
* new workspace groups. However the compositor may emit further
* workspace events, until the finished event is emitted. The
* compositor is expected to send the finished event eventually
* once the stop request has been processed.
*
* The client must not send any requests after this one, doing so
* will raise a wl_display invalid_object error.
*/
void (*stop)(struct wl_client *client,
struct wl_resource *resource);
};
#define EXT_WORKSPACE_MANAGER_V1_WORKSPACE_GROUP 0
#define EXT_WORKSPACE_MANAGER_V1_WORKSPACE 1
#define EXT_WORKSPACE_MANAGER_V1_DONE 2
#define EXT_WORKSPACE_MANAGER_V1_FINISHED 3
/**
* @ingroup iface_ext_workspace_manager_v1
*/
#define EXT_WORKSPACE_MANAGER_V1_WORKSPACE_GROUP_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_manager_v1
*/
#define EXT_WORKSPACE_MANAGER_V1_WORKSPACE_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_manager_v1
*/
#define EXT_WORKSPACE_MANAGER_V1_DONE_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_manager_v1
*/
#define EXT_WORKSPACE_MANAGER_V1_FINISHED_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_manager_v1
*/
#define EXT_WORKSPACE_MANAGER_V1_COMMIT_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_manager_v1
*/
#define EXT_WORKSPACE_MANAGER_V1_STOP_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_manager_v1
* Sends an workspace_group event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_manager_v1_send_workspace_group(struct wl_resource *resource_, struct wl_resource *workspace_group)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_MANAGER_V1_WORKSPACE_GROUP, workspace_group);
}
/**
* @ingroup iface_ext_workspace_manager_v1
* Sends an workspace event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_manager_v1_send_workspace(struct wl_resource *resource_, struct wl_resource *workspace)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_MANAGER_V1_WORKSPACE, workspace);
}
/**
* @ingroup iface_ext_workspace_manager_v1
* Sends an done event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_manager_v1_send_done(struct wl_resource *resource_)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_MANAGER_V1_DONE);
}
/**
* @ingroup iface_ext_workspace_manager_v1
* Sends an finished event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_manager_v1_send_finished(struct wl_resource *resource_)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_MANAGER_V1_FINISHED);
}
#ifndef EXT_WORKSPACE_GROUP_HANDLE_V1_GROUP_CAPABILITIES_ENUM
#define EXT_WORKSPACE_GROUP_HANDLE_V1_GROUP_CAPABILITIES_ENUM
enum ext_workspace_group_handle_v1_group_capabilities {
/**
* create_workspace request is available
*/
EXT_WORKSPACE_GROUP_HANDLE_V1_GROUP_CAPABILITIES_CREATE_WORKSPACE = 1,
};
#endif /* EXT_WORKSPACE_GROUP_HANDLE_V1_GROUP_CAPABILITIES_ENUM */
#ifndef EXT_WORKSPACE_GROUP_HANDLE_V1_GROUP_CAPABILITIES_ENUM_IS_VALID
#define EXT_WORKSPACE_GROUP_HANDLE_V1_GROUP_CAPABILITIES_ENUM_IS_VALID
/**
* @ingroup iface_ext_workspace_group_handle_v1
* Validate a ext_workspace_group_handle_v1 group_capabilities value.
*
* @return true on success, false on error.
* @ref ext_workspace_group_handle_v1_group_capabilities
*/
static inline bool
ext_workspace_group_handle_v1_group_capabilities_is_valid(uint32_t value, uint32_t version) {
uint32_t valid = 0;
if (version >= 1)
valid |= EXT_WORKSPACE_GROUP_HANDLE_V1_GROUP_CAPABILITIES_CREATE_WORKSPACE;
return (value & ~valid) == 0;
}
#endif /* EXT_WORKSPACE_GROUP_HANDLE_V1_GROUP_CAPABILITIES_ENUM_IS_VALID */
/**
* @ingroup iface_ext_workspace_group_handle_v1
* @struct ext_workspace_group_handle_v1_interface
*/
struct ext_workspace_group_handle_v1_interface {
/**
* create a new workspace
*
* Request that the compositor create a new workspace with the
* given name and assign it to this group.
*
* There is no guarantee that the compositor will create a new
* workspace, or that the created workspace will have the provided
* name.
*/
void (*create_workspace)(struct wl_client *client,
struct wl_resource *resource,
const char *workspace);
/**
* destroy the ext_workspace_group_handle_v1 object
*
* Destroys the ext_workspace_group_handle_v1 object.
*
* This request should be send either when the client does not want
* to use the workspace group object any more or after the removed
* event to finalize the destruction of the object.
*/
void (*destroy)(struct wl_client *client,
struct wl_resource *resource);
};
#define EXT_WORKSPACE_GROUP_HANDLE_V1_CAPABILITIES 0
#define EXT_WORKSPACE_GROUP_HANDLE_V1_OUTPUT_ENTER 1
#define EXT_WORKSPACE_GROUP_HANDLE_V1_OUTPUT_LEAVE 2
#define EXT_WORKSPACE_GROUP_HANDLE_V1_WORKSPACE_ENTER 3
#define EXT_WORKSPACE_GROUP_HANDLE_V1_WORKSPACE_LEAVE 4
#define EXT_WORKSPACE_GROUP_HANDLE_V1_REMOVED 5
/**
* @ingroup iface_ext_workspace_group_handle_v1
*/
#define EXT_WORKSPACE_GROUP_HANDLE_V1_CAPABILITIES_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_group_handle_v1
*/
#define EXT_WORKSPACE_GROUP_HANDLE_V1_OUTPUT_ENTER_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_group_handle_v1
*/
#define EXT_WORKSPACE_GROUP_HANDLE_V1_OUTPUT_LEAVE_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_group_handle_v1
*/
#define EXT_WORKSPACE_GROUP_HANDLE_V1_WORKSPACE_ENTER_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_group_handle_v1
*/
#define EXT_WORKSPACE_GROUP_HANDLE_V1_WORKSPACE_LEAVE_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_group_handle_v1
*/
#define EXT_WORKSPACE_GROUP_HANDLE_V1_REMOVED_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_group_handle_v1
*/
#define EXT_WORKSPACE_GROUP_HANDLE_V1_CREATE_WORKSPACE_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_group_handle_v1
*/
#define EXT_WORKSPACE_GROUP_HANDLE_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_group_handle_v1
* Sends an capabilities event to the client owning the resource.
* @param resource_ The client's resource
* @param capabilities capabilities
*/
static inline void
ext_workspace_group_handle_v1_send_capabilities(struct wl_resource *resource_, uint32_t capabilities)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_GROUP_HANDLE_V1_CAPABILITIES, capabilities);
}
/**
* @ingroup iface_ext_workspace_group_handle_v1
* Sends an output_enter event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_group_handle_v1_send_output_enter(struct wl_resource *resource_, struct wl_resource *output)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_GROUP_HANDLE_V1_OUTPUT_ENTER, output);
}
/**
* @ingroup iface_ext_workspace_group_handle_v1
* Sends an output_leave event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_group_handle_v1_send_output_leave(struct wl_resource *resource_, struct wl_resource *output)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_GROUP_HANDLE_V1_OUTPUT_LEAVE, output);
}
/**
* @ingroup iface_ext_workspace_group_handle_v1
* Sends an workspace_enter event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_group_handle_v1_send_workspace_enter(struct wl_resource *resource_, struct wl_resource *workspace)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_GROUP_HANDLE_V1_WORKSPACE_ENTER, workspace);
}
/**
* @ingroup iface_ext_workspace_group_handle_v1
* Sends an workspace_leave event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_group_handle_v1_send_workspace_leave(struct wl_resource *resource_, struct wl_resource *workspace)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_GROUP_HANDLE_V1_WORKSPACE_LEAVE, workspace);
}
/**
* @ingroup iface_ext_workspace_group_handle_v1
* Sends an removed event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_group_handle_v1_send_removed(struct wl_resource *resource_)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_GROUP_HANDLE_V1_REMOVED);
}
#ifndef EXT_WORKSPACE_HANDLE_V1_STATE_ENUM
#define EXT_WORKSPACE_HANDLE_V1_STATE_ENUM
/**
* @ingroup iface_ext_workspace_handle_v1
* types of states on the workspace
*
* The different states that a workspace can have.
*/
enum ext_workspace_handle_v1_state {
/**
* the workspace is active
*/
EXT_WORKSPACE_HANDLE_V1_STATE_ACTIVE = 1,
/**
* the workspace requests attention
*/
EXT_WORKSPACE_HANDLE_V1_STATE_URGENT = 2,
/**
* the workspace is not visible
*
* The workspace is not visible in its workspace group, and
* clients attempting to visualize the compositor workspace state
* should not display such workspaces.
*/
EXT_WORKSPACE_HANDLE_V1_STATE_HIDDEN = 4,
};
#endif /* EXT_WORKSPACE_HANDLE_V1_STATE_ENUM */
#ifndef EXT_WORKSPACE_HANDLE_V1_STATE_ENUM_IS_VALID
#define EXT_WORKSPACE_HANDLE_V1_STATE_ENUM_IS_VALID
/**
* @ingroup iface_ext_workspace_handle_v1
* Validate a ext_workspace_handle_v1 state value.
*
* @return true on success, false on error.
* @ref ext_workspace_handle_v1_state
*/
static inline bool
ext_workspace_handle_v1_state_is_valid(uint32_t value, uint32_t version) {
uint32_t valid = 0;
if (version >= 1)
valid |= EXT_WORKSPACE_HANDLE_V1_STATE_ACTIVE;
if (version >= 1)
valid |= EXT_WORKSPACE_HANDLE_V1_STATE_URGENT;
if (version >= 1)
valid |= EXT_WORKSPACE_HANDLE_V1_STATE_HIDDEN;
return (value & ~valid) == 0;
}
#endif /* EXT_WORKSPACE_HANDLE_V1_STATE_ENUM_IS_VALID */
#ifndef EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_ENUM
#define EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_ENUM
enum ext_workspace_handle_v1_workspace_capabilities {
/**
* activate request is available
*/
EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_ACTIVATE = 1,
/**
* deactivate request is available
*/
EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_DEACTIVATE = 2,
/**
* remove request is available
*/
EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_REMOVE = 4,
/**
* assign request is available
*/
EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_ASSIGN = 8,
};
#endif /* EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_ENUM */
#ifndef EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_ENUM_IS_VALID
#define EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_ENUM_IS_VALID
/**
* @ingroup iface_ext_workspace_handle_v1
* Validate a ext_workspace_handle_v1 workspace_capabilities value.
*
* @return true on success, false on error.
* @ref ext_workspace_handle_v1_workspace_capabilities
*/
static inline bool
ext_workspace_handle_v1_workspace_capabilities_is_valid(uint32_t value, uint32_t version) {
uint32_t valid = 0;
if (version >= 1)
valid |= EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_ACTIVATE;
if (version >= 1)
valid |= EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_DEACTIVATE;
if (version >= 1)
valid |= EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_REMOVE;
if (version >= 1)
valid |= EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_ASSIGN;
return (value & ~valid) == 0;
}
#endif /* EXT_WORKSPACE_HANDLE_V1_WORKSPACE_CAPABILITIES_ENUM_IS_VALID */
/**
* @ingroup iface_ext_workspace_handle_v1
* @struct ext_workspace_handle_v1_interface
*/
struct ext_workspace_handle_v1_interface {
/**
* destroy the ext_workspace_handle_v1 object
*
* Destroys the ext_workspace_handle_v1 object.
*
* This request should be made either when the client does not want
* to use the workspace object any more or after the remove event
* to finalize the destruction of the object.
*/
void (*destroy)(struct wl_client *client,
struct wl_resource *resource);
/**
* activate the workspace
*
* Request that this workspace be activated.
*
* There is no guarantee the workspace will be actually activated,
* and behaviour may be compositor-dependent. For example,
* activating a workspace may or may not deactivate all other
* workspaces in the same group.
*/
void (*activate)(struct wl_client *client,
struct wl_resource *resource);
/**
* deactivate the workspace
*
* Request that this workspace be deactivated.
*
* There is no guarantee the workspace will be actually
* deactivated.
*/
void (*deactivate)(struct wl_client *client,
struct wl_resource *resource);
/**
* assign workspace to group
*
* Requests that this workspace is assigned to the given
* workspace group.
*
* There is no guarantee the workspace will be assigned.
*/
void (*assign)(struct wl_client *client,
struct wl_resource *resource,
struct wl_resource *workspace_group);
/**
* remove the workspace
*
* Request that this workspace be removed.
*
* There is no guarantee the workspace will be actually removed.
*/
void (*remove)(struct wl_client *client,
struct wl_resource *resource);
};
#define EXT_WORKSPACE_HANDLE_V1_ID 0
#define EXT_WORKSPACE_HANDLE_V1_NAME 1
#define EXT_WORKSPACE_HANDLE_V1_COORDINATES 2
#define EXT_WORKSPACE_HANDLE_V1_STATE 3
#define EXT_WORKSPACE_HANDLE_V1_CAPABILITIES 4
#define EXT_WORKSPACE_HANDLE_V1_REMOVED 5
/**
* @ingroup iface_ext_workspace_handle_v1
*/
#define EXT_WORKSPACE_HANDLE_V1_ID_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_handle_v1
*/
#define EXT_WORKSPACE_HANDLE_V1_NAME_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_handle_v1
*/
#define EXT_WORKSPACE_HANDLE_V1_COORDINATES_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_handle_v1
*/
#define EXT_WORKSPACE_HANDLE_V1_STATE_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_handle_v1
*/
#define EXT_WORKSPACE_HANDLE_V1_CAPABILITIES_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_handle_v1
*/
#define EXT_WORKSPACE_HANDLE_V1_REMOVED_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_handle_v1
*/
#define EXT_WORKSPACE_HANDLE_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_handle_v1
*/
#define EXT_WORKSPACE_HANDLE_V1_ACTIVATE_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_handle_v1
*/
#define EXT_WORKSPACE_HANDLE_V1_DEACTIVATE_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_handle_v1
*/
#define EXT_WORKSPACE_HANDLE_V1_ASSIGN_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_handle_v1
*/
#define EXT_WORKSPACE_HANDLE_V1_REMOVE_SINCE_VERSION 1
/**
* @ingroup iface_ext_workspace_handle_v1
* Sends an id event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_handle_v1_send_id(struct wl_resource *resource_, const char *id)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_HANDLE_V1_ID, id);
}
/**
* @ingroup iface_ext_workspace_handle_v1
* Sends an name event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_handle_v1_send_name(struct wl_resource *resource_, const char *name)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_HANDLE_V1_NAME, name);
}
/**
* @ingroup iface_ext_workspace_handle_v1
* Sends an coordinates event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_handle_v1_send_coordinates(struct wl_resource *resource_, struct wl_array *coordinates)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_HANDLE_V1_COORDINATES, coordinates);
}
/**
* @ingroup iface_ext_workspace_handle_v1
* Sends an state event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_handle_v1_send_state(struct wl_resource *resource_, uint32_t state)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_HANDLE_V1_STATE, state);
}
/**
* @ingroup iface_ext_workspace_handle_v1
* Sends an capabilities event to the client owning the resource.
* @param resource_ The client's resource
* @param capabilities capabilities
*/
static inline void
ext_workspace_handle_v1_send_capabilities(struct wl_resource *resource_, uint32_t capabilities)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_HANDLE_V1_CAPABILITIES, capabilities);
}
/**
* @ingroup iface_ext_workspace_handle_v1
* Sends an removed event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
ext_workspace_handle_v1_send_removed(struct wl_resource *resource_)
{
wl_resource_post_event(resource_, EXT_WORKSPACE_HANDLE_V1_REMOVED);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,94 @@
/* Generated by wayland-scanner 1.25.0 */
/*
* Copyright (C) 2022 Russell Newcomb
*
* 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:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* 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.
*/
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_output_interface;
extern const struct wl_interface zpeachwm_ipc_output_v2_interface;
static const struct wl_interface *peachwm_ipc_unstable_v2_types[] = {
NULL,
NULL,
NULL,
NULL,
&zpeachwm_ipc_output_v2_interface,
&wl_output_interface,
};
static const struct wl_message zpeachwm_ipc_manager_v2_requests[] = {
{ "release", "", peachwm_ipc_unstable_v2_types + 0 },
{ "get_output", "no", peachwm_ipc_unstable_v2_types + 4 },
};
static const struct wl_message zpeachwm_ipc_manager_v2_events[] = {
{ "tags", "u", peachwm_ipc_unstable_v2_types + 0 },
{ "layout", "s", peachwm_ipc_unstable_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zpeachwm_ipc_manager_v2_interface = {
"zpeachwm_ipc_manager_v2", 2,
2, zpeachwm_ipc_manager_v2_requests,
2, zpeachwm_ipc_manager_v2_events,
};
static const struct wl_message zpeachwm_ipc_output_v2_requests[] = {
{ "release", "", peachwm_ipc_unstable_v2_types + 0 },
{ "set_tags", "uu", peachwm_ipc_unstable_v2_types + 0 },
{ "set_client_tags", "uu", peachwm_ipc_unstable_v2_types + 0 },
{ "set_layout", "u", peachwm_ipc_unstable_v2_types + 0 },
};
static const struct wl_message zpeachwm_ipc_output_v2_events[] = {
{ "toggle_visibility", "", peachwm_ipc_unstable_v2_types + 0 },
{ "active", "u", peachwm_ipc_unstable_v2_types + 0 },
{ "tag", "uuuu", peachwm_ipc_unstable_v2_types + 0 },
{ "layout", "u", peachwm_ipc_unstable_v2_types + 0 },
{ "title", "s", peachwm_ipc_unstable_v2_types + 0 },
{ "appid", "s", peachwm_ipc_unstable_v2_types + 0 },
{ "layout_symbol", "s", peachwm_ipc_unstable_v2_types + 0 },
{ "frame", "", peachwm_ipc_unstable_v2_types + 0 },
{ "fullscreen", "2u", peachwm_ipc_unstable_v2_types + 0 },
{ "floating", "2u", peachwm_ipc_unstable_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zpeachwm_ipc_output_v2_interface = {
"zpeachwm_ipc_output_v2", 2,
4, zpeachwm_ipc_output_v2_requests,
10, zpeachwm_ipc_output_v2_events,
};
@@ -0,0 +1,447 @@
/* Generated by wayland-scanner 1.25.0 */
#ifndef PEACHWM_IPC_UNSTABLE_V2_SERVER_PROTOCOL_H
#define PEACHWM_IPC_UNSTABLE_V2_SERVER_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-server.h"
#ifdef __cplusplus
extern "C" {
#endif
struct wl_client;
struct wl_resource;
/**
* @page page_peachwm_ipc_unstable_v2 The peachwm_ipc_unstable_v2 protocol
* @section page_ifaces_peachwm_ipc_unstable_v2 Interfaces
* - @subpage page_iface_zpeachwm_ipc_manager_v2 - manage peachwm state
* - @subpage page_iface_zpeachwm_ipc_output_v2 - interact with peachwm output state
* @section page_copyright_peachwm_ipc_unstable_v2 Copyright
* <pre>
*
* Copyright (C) 2022 Russell Newcomb
*
* 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:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* 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.
* </pre>
*/
struct wl_output;
struct zpeachwm_ipc_manager_v2;
struct zpeachwm_ipc_output_v2;
#ifndef ZPEACHWM_IPC_MANAGER_V2_INTERFACE
#define ZPEACHWM_IPC_MANAGER_V2_INTERFACE
/**
* @page page_iface_zpeachwm_ipc_manager_v2 zpeachwm_ipc_manager_v2
* @section page_iface_zpeachwm_ipc_manager_v2_desc Description
*
* This interface is exposed as a global in the Wayland registry and allows
* clients to query and set peachwm state.
*
* Warning! The protocol described in this file is experimental and
* backward incompatible changes may be made. Backward compatible changes
* may be added together with the corresponding interface version bump.
* Backward incompatible changes are done by bumping the version number in
* the protocol and interface names and resetting the interface version.
* Once the protocol is to be declared stable, the 'z' prefix and the
* version number in the protocol and interface names are removed and the
* interface version is reset.
* @section page_iface_zpeachwm_ipc_manager_v2_api API
* See @ref iface_zpeachwm_ipc_manager_v2.
*/
/**
* @defgroup iface_zpeachwm_ipc_manager_v2 The zpeachwm_ipc_manager_v2 interface
*
* This interface is exposed as a global in the Wayland registry and allows
* clients to query and set peachwm state.
*
* Warning! The protocol described in this file is experimental and
* backward incompatible changes may be made. Backward compatible changes
* may be added together with the corresponding interface version bump.
* Backward incompatible changes are done by bumping the version number in
* the protocol and interface names and resetting the interface version.
* Once the protocol is to be declared stable, the 'z' prefix and the
* version number in the protocol and interface names are removed and the
* interface version is reset.
*/
extern const struct wl_interface zpeachwm_ipc_manager_v2_interface;
#endif
#ifndef ZPEACHWM_IPC_OUTPUT_V2_INTERFACE
#define ZPEACHWM_IPC_OUTPUT_V2_INTERFACE
/**
* @page page_iface_zpeachwm_ipc_output_v2 zpeachwm_ipc_output_v2
* @section page_iface_zpeachwm_ipc_output_v2_desc Description
*
* Observe and control a peachwm output.
* @section page_iface_zpeachwm_ipc_output_v2_api API
* See @ref iface_zpeachwm_ipc_output_v2.
*/
/**
* @defgroup iface_zpeachwm_ipc_output_v2 The zpeachwm_ipc_output_v2 interface
*
* Observe and control a peachwm output.
*/
extern const struct wl_interface zpeachwm_ipc_output_v2_interface;
#endif
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
* @struct zpeachwm_ipc_manager_v2_interface
*/
struct zpeachwm_ipc_manager_v2_interface {
/**
* release peachwm_ipc_manager
*
* Indicates that the client will not use the manager object
* anymore. Objects created through this interface remain valid.
*/
void (*release)(struct wl_client *client,
struct wl_resource *resource);
/**
* get a peachwm_ipc_output for a wl_output
*
* Get a peachwm_ipc_output for the given wl_output.
*/
void (*get_output)(struct wl_client *client,
struct wl_resource *resource,
uint32_t id,
struct wl_resource *output);
};
#define ZPEACHWM_IPC_MANAGER_V2_TAGS 0
#define ZPEACHWM_IPC_MANAGER_V2_LAYOUT 1
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
*/
#define ZPEACHWM_IPC_MANAGER_V2_TAGS_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
*/
#define ZPEACHWM_IPC_MANAGER_V2_LAYOUT_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
*/
#define ZPEACHWM_IPC_MANAGER_V2_RELEASE_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
*/
#define ZPEACHWM_IPC_MANAGER_V2_GET_OUTPUT_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
* Sends an tags event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
zpeachwm_ipc_manager_v2_send_tags(struct wl_resource *resource_, uint32_t amount)
{
wl_resource_post_event(resource_, ZPEACHWM_IPC_MANAGER_V2_TAGS, amount);
}
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
* Sends an layout event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
zpeachwm_ipc_manager_v2_send_layout(struct wl_resource *resource_, const char *name)
{
wl_resource_post_event(resource_, ZPEACHWM_IPC_MANAGER_V2_LAYOUT, name);
}
#ifndef ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_ENUM
#define ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_ENUM
enum zpeachwm_ipc_output_v2_tag_state {
/**
* no state
*/
ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_NONE = 0,
/**
* tag is active
*/
ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_ACTIVE = 1,
/**
* tag has urgent client
*/
ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_URGENT = 2,
};
#endif /* ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_ENUM */
#ifndef ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_ENUM_IS_VALID
#define ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_ENUM_IS_VALID
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* Validate a zpeachwm_ipc_output_v2 tag_state value.
*
* @return true on success, false on error.
* @ref zpeachwm_ipc_output_v2_tag_state
*/
static inline bool
zpeachwm_ipc_output_v2_tag_state_is_valid(uint32_t value, uint32_t version) {
switch (value) {
case ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_NONE:
return version >= 1;
case ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_ACTIVE:
return version >= 1;
case ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_URGENT:
return version >= 1;
default:
return false;
}
}
#endif /* ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_ENUM_IS_VALID */
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* @struct zpeachwm_ipc_output_v2_interface
*/
struct zpeachwm_ipc_output_v2_interface {
/**
* release peachwm_ipc_output
*
* Indicates that the client will not use the peachwm_ipc_output
* object anymore. Objects created through this interface remain
* valid.
*/
void (*release)(struct wl_client *client,
struct wl_resource *resource);
/**
* set the active tags of this output
*
* set the active tags of this output.
* @param tagmask bitmask of the tags that should be set
* @param toggle_tagset whether to toggle the tagset
*/
void (*set_tags)(struct wl_client *client,
struct wl_resource *resource,
uint32_t tagmask,
uint32_t toggle_tagset);
/**
* set the tags of the focused client
*
* Set the tags of the focused client.
*/
void (*set_client_tags)(struct wl_client *client,
struct wl_resource *resource,
uint32_t and_tags,
uint32_t xor_tags);
/**
* set the layout of this output
*
* Set the layout of this output.
*/
void (*set_layout)(struct wl_client *client,
struct wl_resource *resource,
uint32_t index);
};
#define ZPEACHWM_IPC_OUTPUT_V2_TOGGLE_VISIBILITY 0
#define ZPEACHWM_IPC_OUTPUT_V2_ACTIVE 1
#define ZPEACHWM_IPC_OUTPUT_V2_TAG 2
#define ZPEACHWM_IPC_OUTPUT_V2_LAYOUT 3
#define ZPEACHWM_IPC_OUTPUT_V2_TITLE 4
#define ZPEACHWM_IPC_OUTPUT_V2_APPID 5
#define ZPEACHWM_IPC_OUTPUT_V2_LAYOUT_SYMBOL 6
#define ZPEACHWM_IPC_OUTPUT_V2_FRAME 7
#define ZPEACHWM_IPC_OUTPUT_V2_FULLSCREEN 8
#define ZPEACHWM_IPC_OUTPUT_V2_FLOATING 9
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_TOGGLE_VISIBILITY_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_ACTIVE_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_TAG_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_LAYOUT_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_TITLE_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_APPID_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_LAYOUT_SYMBOL_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_FRAME_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_FULLSCREEN_SINCE_VERSION 2
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_FLOATING_SINCE_VERSION 2
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_RELEASE_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_SET_TAGS_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_SET_CLIENT_TAGS_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_SET_LAYOUT_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* Sends an toggle_visibility event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
zpeachwm_ipc_output_v2_send_toggle_visibility(struct wl_resource *resource_)
{
wl_resource_post_event(resource_, ZPEACHWM_IPC_OUTPUT_V2_TOGGLE_VISIBILITY);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* Sends an active event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
zpeachwm_ipc_output_v2_send_active(struct wl_resource *resource_, uint32_t active)
{
wl_resource_post_event(resource_, ZPEACHWM_IPC_OUTPUT_V2_ACTIVE, active);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* Sends an tag event to the client owning the resource.
* @param resource_ The client's resource
* @param tag index of the tag
* @param state state of the tag
* @param clients number of clients in tag
* @param focused 1 if focused client is in this tag
*/
static inline void
zpeachwm_ipc_output_v2_send_tag(struct wl_resource *resource_, uint32_t tag, uint32_t state, uint32_t clients, uint32_t focused)
{
wl_resource_post_event(resource_, ZPEACHWM_IPC_OUTPUT_V2_TAG, tag, state, clients, focused);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* Sends an layout event to the client owning the resource.
* @param resource_ The client's resource
* @param layout index of the layout
*/
static inline void
zpeachwm_ipc_output_v2_send_layout(struct wl_resource *resource_, uint32_t layout)
{
wl_resource_post_event(resource_, ZPEACHWM_IPC_OUTPUT_V2_LAYOUT, layout);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* Sends an title event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
zpeachwm_ipc_output_v2_send_title(struct wl_resource *resource_, const char *title)
{
wl_resource_post_event(resource_, ZPEACHWM_IPC_OUTPUT_V2_TITLE, title);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* Sends an appid event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
zpeachwm_ipc_output_v2_send_appid(struct wl_resource *resource_, const char *appid)
{
wl_resource_post_event(resource_, ZPEACHWM_IPC_OUTPUT_V2_APPID, appid);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* Sends an layout_symbol event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
zpeachwm_ipc_output_v2_send_layout_symbol(struct wl_resource *resource_, const char *layout)
{
wl_resource_post_event(resource_, ZPEACHWM_IPC_OUTPUT_V2_LAYOUT_SYMBOL, layout);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* Sends an frame event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
zpeachwm_ipc_output_v2_send_frame(struct wl_resource *resource_)
{
wl_resource_post_event(resource_, ZPEACHWM_IPC_OUTPUT_V2_FRAME);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* Sends an fullscreen event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
zpeachwm_ipc_output_v2_send_fullscreen(struct wl_resource *resource_, uint32_t is_fullscreen)
{
wl_resource_post_event(resource_, ZPEACHWM_IPC_OUTPUT_V2_FULLSCREEN, is_fullscreen);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* Sends an floating event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
zpeachwm_ipc_output_v2_send_floating(struct wl_resource *resource_, uint32_t is_floating)
{
wl_resource_post_event(resource_, ZPEACHWM_IPC_OUTPUT_V2_FLOATING, is_floating);
}
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,63 @@
/* Generated by wayland-scanner 1.25.0 */
#ifndef POINTER_CONSTRAINTS_UNSTABLE_V1_ENUM_PROTOCOL_H
#define POINTER_CONSTRAINTS_UNSTABLE_V1_ENUM_PROTOCOL_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM
#define ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM
/**
* @ingroup iface_zwp_pointer_constraints_v1
* wp_pointer_constraints error values
*
* These errors can be emitted in response to wp_pointer_constraints
* requests.
*/
enum zwp_pointer_constraints_v1_error {
/**
* pointer constraint already requested on that surface
*/
ZWP_POINTER_CONSTRAINTS_V1_ERROR_ALREADY_CONSTRAINED = 1,
};
#endif /* ZWP_POINTER_CONSTRAINTS_V1_ERROR_ENUM */
#ifndef ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM
#define ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM
/**
* @ingroup iface_zwp_pointer_constraints_v1
* constraint lifetime
*
* These values represent different lifetime semantics. They are passed
* as arguments to the factory requests to specify how the constraint
* lifetimes should be managed.
*/
enum zwp_pointer_constraints_v1_lifetime {
/**
* the pointer constraint is defunct once deactivated
*
* A oneshot pointer constraint will never reactivate once it has
* been deactivated. See the corresponding deactivation event
* (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined)
* for details.
*/
ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ONESHOT = 1,
/**
* the pointer constraint may reactivate
*
* A persistent pointer constraint may again reactivate once it
* has been deactivated. See the corresponding deactivation event
* (wp_locked_pointer.unlocked and wp_confined_pointer.unconfined)
* for details.
*/
ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_PERSISTENT = 2,
};
#endif /* ZWP_POINTER_CONSTRAINTS_V1_LIFETIME_ENUM */
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,177 @@
/* Generated by wayland-scanner 1.25.0 */
#ifndef WLR_LAYER_SHELL_UNSTABLE_V1_ENUM_PROTOCOL_H
#define WLR_LAYER_SHELL_UNSTABLE_V1_ENUM_PROTOCOL_H
#ifdef __cplusplus
extern "C" {
#endif
#ifndef ZWLR_LAYER_SHELL_V1_ERROR_ENUM
#define ZWLR_LAYER_SHELL_V1_ERROR_ENUM
enum zwlr_layer_shell_v1_error {
/**
* wl_surface has another role
*/
ZWLR_LAYER_SHELL_V1_ERROR_ROLE = 0,
/**
* layer value is invalid
*/
ZWLR_LAYER_SHELL_V1_ERROR_INVALID_LAYER = 1,
/**
* wl_surface has a buffer attached or committed
*/
ZWLR_LAYER_SHELL_V1_ERROR_ALREADY_CONSTRUCTED = 2,
};
#endif /* ZWLR_LAYER_SHELL_V1_ERROR_ENUM */
#ifndef ZWLR_LAYER_SHELL_V1_LAYER_ENUM
#define ZWLR_LAYER_SHELL_V1_LAYER_ENUM
/**
* @ingroup iface_zwlr_layer_shell_v1
* available layers for surfaces
*
* These values indicate which layers a surface can be rendered in. They
* are ordered by z depth, bottom-most first. Traditional shell surfaces
* will typically be rendered between the bottom and top layers.
* Fullscreen shell surfaces are typically rendered at the top layer.
* Multiple surfaces can share a single layer, and ordering within a
* single layer is undefined.
*/
enum zwlr_layer_shell_v1_layer {
ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND = 0,
ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM = 1,
ZWLR_LAYER_SHELL_V1_LAYER_TOP = 2,
ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY = 3,
};
#endif /* ZWLR_LAYER_SHELL_V1_LAYER_ENUM */
#ifndef ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ENUM
#define ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ENUM
/**
* @ingroup iface_zwlr_layer_surface_v1
* types of keyboard interaction possible for a layer shell surface
*
* Types of keyboard interaction possible for layer shell surfaces. The
* rationale for this is twofold: (1) some applications are not interested
* in keyboard events and not allowing them to be focused can improve the
* desktop experience; (2) some applications will want to take exclusive
* keyboard focus.
*/
enum zwlr_layer_surface_v1_keyboard_interactivity {
/**
* no keyboard focus is possible
*
* This value indicates that this surface is not interested in
* keyboard events and the compositor should never assign it the
* keyboard focus.
*
* This is the default value, set for newly created layer shell
* surfaces.
*
* This is useful for e.g. desktop widgets that display information
* or only have interaction with non-keyboard input devices.
*/
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_NONE = 0,
/**
* request exclusive keyboard focus
*
* Request exclusive keyboard focus if this surface is above the
* shell surface layer.
*
* For the top and overlay layers, the seat will always give
* exclusive keyboard focus to the top-most layer which has
* keyboard interactivity set to exclusive. If this layer contains
* multiple surfaces with keyboard interactivity set to exclusive,
* the compositor determines the one receiving keyboard events in
* an implementation- defined manner. In this case, no guarantee is
* made when this surface will receive keyboard focus (if ever).
*
* For the bottom and background layers, the compositor is allowed
* to use normal focus semantics.
*
* This setting is mainly intended for applications that need to
* ensure they receive all keyboard events, such as a lock screen
* or a password prompt.
*/
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_EXCLUSIVE = 1,
/**
* request regular keyboard focus semantics
*
* This requests the compositor to allow this surface to be
* focused and unfocused by the user in an implementation-defined
* manner. The user should be able to unfocus this surface even
* regardless of the layer it is on.
*
* Typically, the compositor will want to use its normal mechanism
* to manage keyboard focus between layer shell surfaces with this
* setting and regular toplevels on the desktop layer (e.g. click
* to focus). Nevertheless, it is possible for a compositor to
* require a special interaction to focus or unfocus layer shell
* surfaces (e.g. requiring a click even if focus follows the mouse
* normally, or providing a keybinding to switch focus between
* layers).
*
* This setting is mainly intended for desktop shell components
* (e.g. panels) that allow keyboard interaction. Using this option
* can allow implementing a desktop shell that can be fully usable
* without the mouse.
* @since 4
*/
ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND = 2,
};
/**
* @ingroup iface_zwlr_layer_surface_v1
*/
#define ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ON_DEMAND_SINCE_VERSION 4
#endif /* ZWLR_LAYER_SURFACE_V1_KEYBOARD_INTERACTIVITY_ENUM */
#ifndef ZWLR_LAYER_SURFACE_V1_ERROR_ENUM
#define ZWLR_LAYER_SURFACE_V1_ERROR_ENUM
enum zwlr_layer_surface_v1_error {
/**
* provided surface state is invalid
*/
ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SURFACE_STATE = 0,
/**
* size is invalid
*/
ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_SIZE = 1,
/**
* anchor bitfield is invalid
*/
ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_ANCHOR = 2,
/**
* keyboard interactivity is invalid
*/
ZWLR_LAYER_SURFACE_V1_ERROR_INVALID_KEYBOARD_INTERACTIVITY = 3,
};
#endif /* ZWLR_LAYER_SURFACE_V1_ERROR_ENUM */
#ifndef ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM
#define ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM
enum zwlr_layer_surface_v1_anchor {
/**
* the top edge of the anchor rectangle
*/
ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP = 1,
/**
* the bottom edge of the anchor rectangle
*/
ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM = 2,
/**
* the left edge of the anchor rectangle
*/
ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT = 4,
/**
* the right edge of the anchor rectangle
*/
ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT = 8,
};
#endif /* ZWLR_LAYER_SURFACE_V1_ANCHOR_ENUM */
#ifdef __cplusplus
}
#endif
#endif
@@ -0,0 +1,285 @@
/* Generated by wayland-scanner 1.25.0 */
#ifndef WLR_OUTPUT_POWER_MANAGEMENT_UNSTABLE_V1_SERVER_PROTOCOL_H
#define WLR_OUTPUT_POWER_MANAGEMENT_UNSTABLE_V1_SERVER_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-server.h"
#ifdef __cplusplus
extern "C" {
#endif
struct wl_client;
struct wl_resource;
/**
* @page page_wlr_output_power_management_unstable_v1 The wlr_output_power_management_unstable_v1 protocol
* Control power management modes of outputs
*
* @section page_desc_wlr_output_power_management_unstable_v1 Description
*
* This protocol allows clients to control power management modes
* of outputs that are currently part of the compositor space. The
* intent is to allow special clients like desktop shells to power
* down outputs when the system is idle.
*
* To modify outputs not currently part of the compositor space see
* wlr-output-management.
*
* Warning! The protocol described in this file is experimental and
* backward incompatible changes may be made. Backward compatible changes
* may be added together with the corresponding interface version bump.
* Backward incompatible changes are done by bumping the version number in
* the protocol and interface names and resetting the interface version.
* Once the protocol is to be declared stable, the 'z' prefix and the
* version number in the protocol and interface names are removed and the
* interface version number is reset.
*
* @section page_ifaces_wlr_output_power_management_unstable_v1 Interfaces
* - @subpage page_iface_zwlr_output_power_manager_v1 - manager to create per-output power management
* - @subpage page_iface_zwlr_output_power_v1 - adjust power management mode for an output
* @section page_copyright_wlr_output_power_management_unstable_v1 Copyright
* <pre>
*
* Copyright © 2019 Purism SPC
*
* 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:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* 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.
* </pre>
*/
struct wl_output;
struct zwlr_output_power_manager_v1;
struct zwlr_output_power_v1;
#ifndef ZWLR_OUTPUT_POWER_MANAGER_V1_INTERFACE
#define ZWLR_OUTPUT_POWER_MANAGER_V1_INTERFACE
/**
* @page page_iface_zwlr_output_power_manager_v1 zwlr_output_power_manager_v1
* @section page_iface_zwlr_output_power_manager_v1_desc Description
*
* This interface is a manager that allows creating per-output power
* management mode controls.
* @section page_iface_zwlr_output_power_manager_v1_api API
* See @ref iface_zwlr_output_power_manager_v1.
*/
/**
* @defgroup iface_zwlr_output_power_manager_v1 The zwlr_output_power_manager_v1 interface
*
* This interface is a manager that allows creating per-output power
* management mode controls.
*/
extern const struct wl_interface zwlr_output_power_manager_v1_interface;
#endif
#ifndef ZWLR_OUTPUT_POWER_V1_INTERFACE
#define ZWLR_OUTPUT_POWER_V1_INTERFACE
/**
* @page page_iface_zwlr_output_power_v1 zwlr_output_power_v1
* @section page_iface_zwlr_output_power_v1_desc Description
*
* This object offers requests to set the power management mode of
* an output.
* @section page_iface_zwlr_output_power_v1_api API
* See @ref iface_zwlr_output_power_v1.
*/
/**
* @defgroup iface_zwlr_output_power_v1 The zwlr_output_power_v1 interface
*
* This object offers requests to set the power management mode of
* an output.
*/
extern const struct wl_interface zwlr_output_power_v1_interface;
#endif
/**
* @ingroup iface_zwlr_output_power_manager_v1
* @struct zwlr_output_power_manager_v1_interface
*/
struct zwlr_output_power_manager_v1_interface {
/**
* get a power management for an output
*
* Create a output power management mode control that can be used
* to adjust the power management mode for a given output.
*/
void (*get_output_power)(struct wl_client *client,
struct wl_resource *resource,
uint32_t id,
struct wl_resource *output);
/**
* destroy the manager
*
* All objects created by the manager will still remain valid,
* until their appropriate destroy request has been called.
*/
void (*destroy)(struct wl_client *client,
struct wl_resource *resource);
};
/**
* @ingroup iface_zwlr_output_power_manager_v1
*/
#define ZWLR_OUTPUT_POWER_MANAGER_V1_GET_OUTPUT_POWER_SINCE_VERSION 1
/**
* @ingroup iface_zwlr_output_power_manager_v1
*/
#define ZWLR_OUTPUT_POWER_MANAGER_V1_DESTROY_SINCE_VERSION 1
#ifndef ZWLR_OUTPUT_POWER_V1_MODE_ENUM
#define ZWLR_OUTPUT_POWER_V1_MODE_ENUM
enum zwlr_output_power_v1_mode {
/**
* Output is turned off.
*/
ZWLR_OUTPUT_POWER_V1_MODE_OFF = 0,
/**
* Output is turned on, no power saving
*/
ZWLR_OUTPUT_POWER_V1_MODE_ON = 1,
};
#endif /* ZWLR_OUTPUT_POWER_V1_MODE_ENUM */
#ifndef ZWLR_OUTPUT_POWER_V1_MODE_ENUM_IS_VALID
#define ZWLR_OUTPUT_POWER_V1_MODE_ENUM_IS_VALID
/**
* @ingroup iface_zwlr_output_power_v1
* Validate a zwlr_output_power_v1 mode value.
*
* @return true on success, false on error.
* @ref zwlr_output_power_v1_mode
*/
static inline bool
zwlr_output_power_v1_mode_is_valid(uint32_t value, uint32_t version) {
switch (value) {
case ZWLR_OUTPUT_POWER_V1_MODE_OFF:
return version >= 1;
case ZWLR_OUTPUT_POWER_V1_MODE_ON:
return version >= 1;
default:
return false;
}
}
#endif /* ZWLR_OUTPUT_POWER_V1_MODE_ENUM_IS_VALID */
#ifndef ZWLR_OUTPUT_POWER_V1_ERROR_ENUM
#define ZWLR_OUTPUT_POWER_V1_ERROR_ENUM
enum zwlr_output_power_v1_error {
/**
* inexistent power save mode
*/
ZWLR_OUTPUT_POWER_V1_ERROR_INVALID_MODE = 1,
};
#endif /* ZWLR_OUTPUT_POWER_V1_ERROR_ENUM */
#ifndef ZWLR_OUTPUT_POWER_V1_ERROR_ENUM_IS_VALID
#define ZWLR_OUTPUT_POWER_V1_ERROR_ENUM_IS_VALID
/**
* @ingroup iface_zwlr_output_power_v1
* Validate a zwlr_output_power_v1 error value.
*
* @return true on success, false on error.
* @ref zwlr_output_power_v1_error
*/
static inline bool
zwlr_output_power_v1_error_is_valid(uint32_t value, uint32_t version) {
switch (value) {
case ZWLR_OUTPUT_POWER_V1_ERROR_INVALID_MODE:
return version >= 1;
default:
return false;
}
}
#endif /* ZWLR_OUTPUT_POWER_V1_ERROR_ENUM_IS_VALID */
/**
* @ingroup iface_zwlr_output_power_v1
* @struct zwlr_output_power_v1_interface
*/
struct zwlr_output_power_v1_interface {
/**
* Set an outputs power save mode
*
* Set an output's power save mode to the given mode. The mode
* change is effective immediately. If the output does not support
* the given mode a failed event is sent.
* @param mode the power save mode to set
*/
void (*set_mode)(struct wl_client *client,
struct wl_resource *resource,
uint32_t mode);
/**
* destroy this power management
*
* Destroys the output power management mode control object.
*/
void (*destroy)(struct wl_client *client,
struct wl_resource *resource);
};
#define ZWLR_OUTPUT_POWER_V1_MODE 0
#define ZWLR_OUTPUT_POWER_V1_FAILED 1
/**
* @ingroup iface_zwlr_output_power_v1
*/
#define ZWLR_OUTPUT_POWER_V1_MODE_SINCE_VERSION 1
/**
* @ingroup iface_zwlr_output_power_v1
*/
#define ZWLR_OUTPUT_POWER_V1_FAILED_SINCE_VERSION 1
/**
* @ingroup iface_zwlr_output_power_v1
*/
#define ZWLR_OUTPUT_POWER_V1_SET_MODE_SINCE_VERSION 1
/**
* @ingroup iface_zwlr_output_power_v1
*/
#define ZWLR_OUTPUT_POWER_V1_DESTROY_SINCE_VERSION 1
/**
* @ingroup iface_zwlr_output_power_v1
* Sends an mode event to the client owning the resource.
* @param resource_ The client's resource
* @param mode the output's new power management mode
*/
static inline void
zwlr_output_power_v1_send_mode(struct wl_resource *resource_, uint32_t mode)
{
wl_resource_post_event(resource_, ZWLR_OUTPUT_POWER_V1_MODE, mode);
}
/**
* @ingroup iface_zwlr_output_power_v1
* Sends an failed event to the client owning the resource.
* @param resource_ The client's resource
*/
static inline void
zwlr_output_power_v1_send_failed(struct wl_resource *resource_)
{
wl_resource_post_event(resource_, ZWLR_OUTPUT_POWER_V1_FAILED);
}
#ifdef __cplusplus
}
#endif
#endif
File diff suppressed because it is too large Load Diff
+94
View File
@@ -0,0 +1,94 @@
/* Generated by wayland-scanner 1.25.0 */
/*
* Copyright (C) 2022 Russell Newcomb
*
* 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:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* 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.
*/
#include <stdbool.h>
#include <stdlib.h>
#include <stdint.h>
#include "wayland-util.h"
#ifndef __has_attribute
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
#endif
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
#else
#define WL_PRIVATE
#endif
extern const struct wl_interface wl_output_interface;
extern const struct wl_interface zpeachwm_ipc_output_v2_interface;
static const struct wl_interface *peachwm_ipc_unstable_v2_types[] = {
NULL,
NULL,
NULL,
NULL,
&zpeachwm_ipc_output_v2_interface,
&wl_output_interface,
};
static const struct wl_message zpeachwm_ipc_manager_v2_requests[] = {
{ "release", "", peachwm_ipc_unstable_v2_types + 0 },
{ "get_output", "no", peachwm_ipc_unstable_v2_types + 4 },
};
static const struct wl_message zpeachwm_ipc_manager_v2_events[] = {
{ "tags", "u", peachwm_ipc_unstable_v2_types + 0 },
{ "layout", "s", peachwm_ipc_unstable_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zpeachwm_ipc_manager_v2_interface = {
"zpeachwm_ipc_manager_v2", 2,
2, zpeachwm_ipc_manager_v2_requests,
2, zpeachwm_ipc_manager_v2_events,
};
static const struct wl_message zpeachwm_ipc_output_v2_requests[] = {
{ "release", "", peachwm_ipc_unstable_v2_types + 0 },
{ "set_tags", "uu", peachwm_ipc_unstable_v2_types + 0 },
{ "set_client_tags", "uu", peachwm_ipc_unstable_v2_types + 0 },
{ "set_layout", "u", peachwm_ipc_unstable_v2_types + 0 },
};
static const struct wl_message zpeachwm_ipc_output_v2_events[] = {
{ "toggle_visibility", "", peachwm_ipc_unstable_v2_types + 0 },
{ "active", "u", peachwm_ipc_unstable_v2_types + 0 },
{ "tag", "uuuu", peachwm_ipc_unstable_v2_types + 0 },
{ "layout", "u", peachwm_ipc_unstable_v2_types + 0 },
{ "title", "s", peachwm_ipc_unstable_v2_types + 0 },
{ "appid", "s", peachwm_ipc_unstable_v2_types + 0 },
{ "layout_symbol", "s", peachwm_ipc_unstable_v2_types + 0 },
{ "frame", "", peachwm_ipc_unstable_v2_types + 0 },
{ "fullscreen", "2u", peachwm_ipc_unstable_v2_types + 0 },
{ "floating", "2u", peachwm_ipc_unstable_v2_types + 0 },
};
WL_PRIVATE const struct wl_interface zpeachwm_ipc_output_v2_interface = {
"zpeachwm_ipc_output_v2", 2,
4, zpeachwm_ipc_output_v2_requests,
10, zpeachwm_ipc_output_v2_events,
};
+484
View File
@@ -0,0 +1,484 @@
/* Generated by wayland-scanner 1.25.0 */
#ifndef PEACHWM_IPC_UNSTABLE_V2_CLIENT_PROTOCOL_H
#define PEACHWM_IPC_UNSTABLE_V2_CLIENT_PROTOCOL_H
#include <stdint.h>
#include <stddef.h>
#include "wayland-client.h"
#ifdef __cplusplus
extern "C" {
#endif
/**
* @page page_peachwm_ipc_unstable_v2 The peachwm_ipc_unstable_v2 protocol
* @section page_ifaces_peachwm_ipc_unstable_v2 Interfaces
* - @subpage page_iface_zpeachwm_ipc_manager_v2 - manage peachwm state
* - @subpage page_iface_zpeachwm_ipc_output_v2 - interact with peachwm output state
* @section page_copyright_peachwm_ipc_unstable_v2 Copyright
* <pre>
*
* Copyright (C) 2022 Russell Newcomb
*
* 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:
*
* The above copyright notice and this permission notice (including the next
* paragraph) shall be included in all copies or substantial portions of the
* Software.
*
* 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.
* </pre>
*/
struct wl_output;
struct zpeachwm_ipc_manager_v2;
struct zpeachwm_ipc_output_v2;
#ifndef ZPEACHWM_IPC_MANAGER_V2_INTERFACE
#define ZPEACHWM_IPC_MANAGER_V2_INTERFACE
/**
* @page page_iface_zpeachwm_ipc_manager_v2 zpeachwm_ipc_manager_v2
* @section page_iface_zpeachwm_ipc_manager_v2_desc Description
*
* This interface is exposed as a global in the Wayland registry and allows
* clients to query and set peachwm state.
*
* Warning! The protocol described in this file is experimental and
* backward incompatible changes may be made. Backward compatible changes
* may be added together with the corresponding interface version bump.
* Backward incompatible changes are done by bumping the version number in
* the protocol and interface names and resetting the interface version.
* Once the protocol is to be declared stable, the 'z' prefix and the
* version number in the protocol and interface names are removed and the
* interface version is reset.
* @section page_iface_zpeachwm_ipc_manager_v2_api API
* See @ref iface_zpeachwm_ipc_manager_v2.
*/
/**
* @defgroup iface_zpeachwm_ipc_manager_v2 The zpeachwm_ipc_manager_v2 interface
*
* This interface is exposed as a global in the Wayland registry and allows
* clients to query and set peachwm state.
*
* Warning! The protocol described in this file is experimental and
* backward incompatible changes may be made. Backward compatible changes
* may be added together with the corresponding interface version bump.
* Backward incompatible changes are done by bumping the version number in
* the protocol and interface names and resetting the interface version.
* Once the protocol is to be declared stable, the 'z' prefix and the
* version number in the protocol and interface names are removed and the
* interface version is reset.
*/
extern const struct wl_interface zpeachwm_ipc_manager_v2_interface;
#endif
#ifndef ZPEACHWM_IPC_OUTPUT_V2_INTERFACE
#define ZPEACHWM_IPC_OUTPUT_V2_INTERFACE
/**
* @page page_iface_zpeachwm_ipc_output_v2 zpeachwm_ipc_output_v2
* @section page_iface_zpeachwm_ipc_output_v2_desc Description
*
* Observe and control a peachwm output.
* @section page_iface_zpeachwm_ipc_output_v2_api API
* See @ref iface_zpeachwm_ipc_output_v2.
*/
/**
* @defgroup iface_zpeachwm_ipc_output_v2 The zpeachwm_ipc_output_v2 interface
*
* Observe and control a peachwm output.
*/
extern const struct wl_interface zpeachwm_ipc_output_v2_interface;
#endif
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
* @struct zpeachwm_ipc_manager_v2_listener
*/
struct zpeachwm_ipc_manager_v2_listener {
/**
* announces number of tags
*
* This event is sent after binding and announces the number of
* tags.
*/
void (*tags)(void *data,
struct zpeachwm_ipc_manager_v2 *zpeachwm_ipc_manager_v2,
uint32_t amount);
/**
* announces a layout
*
* This event is sent after binding and announces a layout.
* Layouts are announced in order.
*/
void (*layout)(void *data,
struct zpeachwm_ipc_manager_v2 *zpeachwm_ipc_manager_v2,
const char *name);
};
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
*/
static inline int
zpeachwm_ipc_manager_v2_add_listener(struct zpeachwm_ipc_manager_v2 *zpeachwm_ipc_manager_v2,
const struct zpeachwm_ipc_manager_v2_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zpeachwm_ipc_manager_v2,
(void (**)(void)) listener, data);
}
#define ZPEACHWM_IPC_MANAGER_V2_RELEASE 0
#define ZPEACHWM_IPC_MANAGER_V2_GET_OUTPUT 1
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
*/
#define ZPEACHWM_IPC_MANAGER_V2_TAGS_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
*/
#define ZPEACHWM_IPC_MANAGER_V2_LAYOUT_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
*/
#define ZPEACHWM_IPC_MANAGER_V2_RELEASE_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
*/
#define ZPEACHWM_IPC_MANAGER_V2_GET_OUTPUT_SINCE_VERSION 1
/** @ingroup iface_zpeachwm_ipc_manager_v2 */
static inline void
zpeachwm_ipc_manager_v2_set_user_data(struct zpeachwm_ipc_manager_v2 *zpeachwm_ipc_manager_v2, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zpeachwm_ipc_manager_v2, user_data);
}
/** @ingroup iface_zpeachwm_ipc_manager_v2 */
static inline void *
zpeachwm_ipc_manager_v2_get_user_data(struct zpeachwm_ipc_manager_v2 *zpeachwm_ipc_manager_v2)
{
return wl_proxy_get_user_data((struct wl_proxy *) zpeachwm_ipc_manager_v2);
}
static inline uint32_t
zpeachwm_ipc_manager_v2_get_version(struct zpeachwm_ipc_manager_v2 *zpeachwm_ipc_manager_v2)
{
return wl_proxy_get_version((struct wl_proxy *) zpeachwm_ipc_manager_v2);
}
/** @ingroup iface_zpeachwm_ipc_manager_v2 */
static inline void
zpeachwm_ipc_manager_v2_destroy(struct zpeachwm_ipc_manager_v2 *zpeachwm_ipc_manager_v2)
{
wl_proxy_destroy((struct wl_proxy *) zpeachwm_ipc_manager_v2);
}
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
*
* Indicates that the client will not use the manager object anymore.
* Objects created through this interface remain valid.
*/
static inline void
zpeachwm_ipc_manager_v2_release(struct zpeachwm_ipc_manager_v2 *zpeachwm_ipc_manager_v2)
{
wl_proxy_marshal_flags((struct wl_proxy *) zpeachwm_ipc_manager_v2,
ZPEACHWM_IPC_MANAGER_V2_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) zpeachwm_ipc_manager_v2), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zpeachwm_ipc_manager_v2
*
* Get a peachwm_ipc_output for the given wl_output.
*/
static inline struct zpeachwm_ipc_output_v2 *
zpeachwm_ipc_manager_v2_get_output(struct zpeachwm_ipc_manager_v2 *zpeachwm_ipc_manager_v2, struct wl_output *output)
{
struct wl_proxy *id;
id = wl_proxy_marshal_flags((struct wl_proxy *) zpeachwm_ipc_manager_v2,
ZPEACHWM_IPC_MANAGER_V2_GET_OUTPUT, &zpeachwm_ipc_output_v2_interface, wl_proxy_get_version((struct wl_proxy *) zpeachwm_ipc_manager_v2), 0, NULL, output);
return (struct zpeachwm_ipc_output_v2 *) id;
}
#ifndef ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_ENUM
#define ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_ENUM
enum zpeachwm_ipc_output_v2_tag_state {
/**
* no state
*/
ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_NONE = 0,
/**
* tag is active
*/
ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_ACTIVE = 1,
/**
* tag has urgent client
*/
ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_URGENT = 2,
};
#endif /* ZPEACHWM_IPC_OUTPUT_V2_TAG_STATE_ENUM */
/**
* @ingroup iface_zpeachwm_ipc_output_v2
* @struct zpeachwm_ipc_output_v2_listener
*/
struct zpeachwm_ipc_output_v2_listener {
/**
* peachwm visibility has been toggled
*
* Indicates that peachwm visibility has been toggled.
*/
void (*toggle_visibility)(void *data,
struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2);
/**
* output is active
*
* Indicates the output is active (selected monitor).
*/
void (*active)(void *data,
struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2,
uint32_t active);
/**
* tag state changed
*
* Indicates a tag state change.
* @param tag index of the tag
* @param state state of the tag
* @param clients number of clients in tag
* @param focused 1 if focused client is in this tag
*/
void (*tag)(void *data,
struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2,
uint32_t tag,
uint32_t state,
uint32_t clients,
uint32_t focused);
/**
* layout changed
*
* Indicates the layout changed.
* @param layout index of the layout
*/
void (*layout)(void *data,
struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2,
uint32_t layout);
/**
* title changed
*
* Indicates the focused client title changed.
*/
void (*title)(void *data,
struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2,
const char *title);
/**
* appid changed
*
* Indicates the focused client appid changed.
*/
void (*appid)(void *data,
struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2,
const char *appid);
/**
* layout symbol changed
*
* Indicates the layout symbol changed.
*/
void (*layout_symbol)(void *data,
struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2,
const char *layout);
/**
* frame event
*
* Sent after all state events have been sent for a given state
* change.
*/
void (*frame)(void *data,
struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2);
/**
* fullscreen state changed
*
* Indicates the fullscreen state changed.
* @since 2
*/
void (*fullscreen)(void *data,
struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2,
uint32_t is_fullscreen);
/**
* floating state changed
*
* Indicates the floating state changed.
* @since 2
*/
void (*floating)(void *data,
struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2,
uint32_t is_floating);
};
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
static inline int
zpeachwm_ipc_output_v2_add_listener(struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2,
const struct zpeachwm_ipc_output_v2_listener *listener, void *data)
{
return wl_proxy_add_listener((struct wl_proxy *) zpeachwm_ipc_output_v2,
(void (**)(void)) listener, data);
}
#define ZPEACHWM_IPC_OUTPUT_V2_RELEASE 0
#define ZPEACHWM_IPC_OUTPUT_V2_SET_TAGS 1
#define ZPEACHWM_IPC_OUTPUT_V2_SET_CLIENT_TAGS 2
#define ZPEACHWM_IPC_OUTPUT_V2_SET_LAYOUT 3
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_TOGGLE_VISIBILITY_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_ACTIVE_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_TAG_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_LAYOUT_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_TITLE_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_APPID_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_LAYOUT_SYMBOL_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_FRAME_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_FULLSCREEN_SINCE_VERSION 2
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_FLOATING_SINCE_VERSION 2
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_RELEASE_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_SET_TAGS_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_SET_CLIENT_TAGS_SINCE_VERSION 1
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*/
#define ZPEACHWM_IPC_OUTPUT_V2_SET_LAYOUT_SINCE_VERSION 1
/** @ingroup iface_zpeachwm_ipc_output_v2 */
static inline void
zpeachwm_ipc_output_v2_set_user_data(struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2, void *user_data)
{
wl_proxy_set_user_data((struct wl_proxy *) zpeachwm_ipc_output_v2, user_data);
}
/** @ingroup iface_zpeachwm_ipc_output_v2 */
static inline void *
zpeachwm_ipc_output_v2_get_user_data(struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2)
{
return wl_proxy_get_user_data((struct wl_proxy *) zpeachwm_ipc_output_v2);
}
static inline uint32_t
zpeachwm_ipc_output_v2_get_version(struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2)
{
return wl_proxy_get_version((struct wl_proxy *) zpeachwm_ipc_output_v2);
}
/** @ingroup iface_zpeachwm_ipc_output_v2 */
static inline void
zpeachwm_ipc_output_v2_destroy(struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2)
{
wl_proxy_destroy((struct wl_proxy *) zpeachwm_ipc_output_v2);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*
* Indicates that the client will not use the peachwm_ipc_output object
* anymore. Objects created through this interface remain valid.
*/
static inline void
zpeachwm_ipc_output_v2_release(struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2)
{
wl_proxy_marshal_flags((struct wl_proxy *) zpeachwm_ipc_output_v2,
ZPEACHWM_IPC_OUTPUT_V2_RELEASE, NULL, wl_proxy_get_version((struct wl_proxy *) zpeachwm_ipc_output_v2), WL_MARSHAL_FLAG_DESTROY);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*
* set the active tags of this output.
*/
static inline void
zpeachwm_ipc_output_v2_set_tags(struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2, uint32_t tagmask, uint32_t toggle_tagset)
{
wl_proxy_marshal_flags((struct wl_proxy *) zpeachwm_ipc_output_v2,
ZPEACHWM_IPC_OUTPUT_V2_SET_TAGS, NULL, wl_proxy_get_version((struct wl_proxy *) zpeachwm_ipc_output_v2), 0, tagmask, toggle_tagset);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*
* Set the tags of the focused client.
*/
static inline void
zpeachwm_ipc_output_v2_set_client_tags(struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2, uint32_t and_tags, uint32_t xor_tags)
{
wl_proxy_marshal_flags((struct wl_proxy *) zpeachwm_ipc_output_v2,
ZPEACHWM_IPC_OUTPUT_V2_SET_CLIENT_TAGS, NULL, wl_proxy_get_version((struct wl_proxy *) zpeachwm_ipc_output_v2), 0, and_tags, xor_tags);
}
/**
* @ingroup iface_zpeachwm_ipc_output_v2
*
* Set the layout of this output.
*/
static inline void
zpeachwm_ipc_output_v2_set_layout(struct zpeachwm_ipc_output_v2 *zpeachwm_ipc_output_v2, uint32_t index)
{
wl_proxy_marshal_flags((struct wl_proxy *) zpeachwm_ipc_output_v2,
ZPEACHWM_IPC_OUTPUT_V2_SET_LAYOUT, NULL, wl_proxy_get_version((struct wl_proxy *) zpeachwm_ipc_output_v2), 0, index);
}
#ifdef __cplusplus
}
#endif
#endif
Executable
BIN
View File
Binary file not shown.
+1
View File
@@ -4003,6 +4003,7 @@ int main(int argc, char *argv[]) {
break;
case 'v':
die("peachwm " VERSION);
break;
default:
goto usage;
}
+1 -1
View File
@@ -7,7 +7,7 @@
#include "util.h"
void
_Noreturn void
die(const char *fmt, ...) {
va_list ap;
+1 -1
View File
@@ -1,5 +1,5 @@
/* See LICENSE.dwm file for copyright and license details. */
void die(const char *fmt, ...);
_Noreturn void die(const char *fmt, ...);
void *ecalloc(size_t nmemb, size_t size);
int fd_set_nonblock(int fd);