mirror of
https://github.com/hyprwm/xdg-desktop-portal-hyprland.git
synced 2024-11-23 14:55:57 +01:00
piece of shit
This commit is contained in:
parent
b50663fcfa
commit
8720298b57
8 changed files with 0 additions and 2241 deletions
|
@ -1,85 +0,0 @@
|
|||
/* Generated by wayland-scanner 1.22.90 */
|
||||
|
||||
/*
|
||||
* Copyright © 2022 Vaxry
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#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 hyprland_global_shortcut_v1_interface;
|
||||
|
||||
static const struct wl_interface *hyprland_global_shortcuts_v1_types[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&hyprland_global_shortcut_v1_interface,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const struct wl_message hyprland_global_shortcuts_manager_v1_requests[] = {
|
||||
{ "register_shortcut", "nssss", hyprland_global_shortcuts_v1_types + 3 },
|
||||
{ "destroy", "", hyprland_global_shortcuts_v1_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface hyprland_global_shortcuts_manager_v1_interface = {
|
||||
"hyprland_global_shortcuts_manager_v1", 1,
|
||||
2, hyprland_global_shortcuts_manager_v1_requests,
|
||||
0, NULL,
|
||||
};
|
||||
|
||||
static const struct wl_message hyprland_global_shortcut_v1_requests[] = {
|
||||
{ "destroy", "", hyprland_global_shortcuts_v1_types + 0 },
|
||||
};
|
||||
|
||||
static const struct wl_message hyprland_global_shortcut_v1_events[] = {
|
||||
{ "pressed", "uuu", hyprland_global_shortcuts_v1_types + 0 },
|
||||
{ "released", "uuu", hyprland_global_shortcuts_v1_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface hyprland_global_shortcut_v1_interface = {
|
||||
"hyprland_global_shortcut_v1", 1,
|
||||
1, hyprland_global_shortcut_v1_requests,
|
||||
2, hyprland_global_shortcut_v1_events,
|
||||
};
|
||||
|
|
@ -1,274 +0,0 @@
|
|||
/* Generated by wayland-scanner 1.22.90 */
|
||||
|
||||
#ifndef HYPRLAND_GLOBAL_SHORTCUTS_V1_CLIENT_PROTOCOL_H
|
||||
#define HYPRLAND_GLOBAL_SHORTCUTS_V1_CLIENT_PROTOCOL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "wayland-client.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @page page_hyprland_global_shortcuts_v1 The hyprland_global_shortcuts_v1 protocol
|
||||
* registering global shortcuts
|
||||
*
|
||||
* @section page_desc_hyprland_global_shortcuts_v1 Description
|
||||
*
|
||||
* This protocol allows a client to register triggerable actions,
|
||||
* meant to be global shortcuts.
|
||||
*
|
||||
* @section page_ifaces_hyprland_global_shortcuts_v1 Interfaces
|
||||
* - @subpage page_iface_hyprland_global_shortcuts_manager_v1 - manager to register global shortcuts
|
||||
* - @subpage page_iface_hyprland_global_shortcut_v1 - a shortcut
|
||||
* @section page_copyright_hyprland_global_shortcuts_v1 Copyright
|
||||
* <pre>
|
||||
*
|
||||
* Copyright © 2022 Vaxry
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* </pre>
|
||||
*/
|
||||
struct hyprland_global_shortcut_v1;
|
||||
struct hyprland_global_shortcuts_manager_v1;
|
||||
|
||||
#ifndef HYPRLAND_GLOBAL_SHORTCUTS_MANAGER_V1_INTERFACE
|
||||
#define HYPRLAND_GLOBAL_SHORTCUTS_MANAGER_V1_INTERFACE
|
||||
/**
|
||||
* @page page_iface_hyprland_global_shortcuts_manager_v1 hyprland_global_shortcuts_manager_v1
|
||||
* @section page_iface_hyprland_global_shortcuts_manager_v1_desc Description
|
||||
*
|
||||
* This object is a manager which offers requests to create global shortcuts.
|
||||
* @section page_iface_hyprland_global_shortcuts_manager_v1_api API
|
||||
* See @ref iface_hyprland_global_shortcuts_manager_v1.
|
||||
*/
|
||||
/**
|
||||
* @defgroup iface_hyprland_global_shortcuts_manager_v1 The hyprland_global_shortcuts_manager_v1 interface
|
||||
*
|
||||
* This object is a manager which offers requests to create global shortcuts.
|
||||
*/
|
||||
extern const struct wl_interface hyprland_global_shortcuts_manager_v1_interface;
|
||||
#endif
|
||||
#ifndef HYPRLAND_GLOBAL_SHORTCUT_V1_INTERFACE
|
||||
#define HYPRLAND_GLOBAL_SHORTCUT_V1_INTERFACE
|
||||
/**
|
||||
* @page page_iface_hyprland_global_shortcut_v1 hyprland_global_shortcut_v1
|
||||
* @section page_iface_hyprland_global_shortcut_v1_desc Description
|
||||
*
|
||||
* This object represents a single shortcut.
|
||||
* @section page_iface_hyprland_global_shortcut_v1_api API
|
||||
* See @ref iface_hyprland_global_shortcut_v1.
|
||||
*/
|
||||
/**
|
||||
* @defgroup iface_hyprland_global_shortcut_v1 The hyprland_global_shortcut_v1 interface
|
||||
*
|
||||
* This object represents a single shortcut.
|
||||
*/
|
||||
extern const struct wl_interface hyprland_global_shortcut_v1_interface;
|
||||
#endif
|
||||
|
||||
#ifndef HYPRLAND_GLOBAL_SHORTCUTS_MANAGER_V1_ERROR_ENUM
|
||||
#define HYPRLAND_GLOBAL_SHORTCUTS_MANAGER_V1_ERROR_ENUM
|
||||
enum hyprland_global_shortcuts_manager_v1_error {
|
||||
/**
|
||||
* the app_id + id combination has already been registered.
|
||||
*/
|
||||
HYPRLAND_GLOBAL_SHORTCUTS_MANAGER_V1_ERROR_ALREADY_TAKEN = 0,
|
||||
};
|
||||
#endif /* HYPRLAND_GLOBAL_SHORTCUTS_MANAGER_V1_ERROR_ENUM */
|
||||
|
||||
#define HYPRLAND_GLOBAL_SHORTCUTS_MANAGER_V1_REGISTER_SHORTCUT 0
|
||||
#define HYPRLAND_GLOBAL_SHORTCUTS_MANAGER_V1_DESTROY 1
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_global_shortcuts_manager_v1
|
||||
*/
|
||||
#define HYPRLAND_GLOBAL_SHORTCUTS_MANAGER_V1_REGISTER_SHORTCUT_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_hyprland_global_shortcuts_manager_v1
|
||||
*/
|
||||
#define HYPRLAND_GLOBAL_SHORTCUTS_MANAGER_V1_DESTROY_SINCE_VERSION 1
|
||||
|
||||
/** @ingroup iface_hyprland_global_shortcuts_manager_v1 */
|
||||
static inline void
|
||||
hyprland_global_shortcuts_manager_v1_set_user_data(struct hyprland_global_shortcuts_manager_v1 *hyprland_global_shortcuts_manager_v1, void *user_data)
|
||||
{
|
||||
wl_proxy_set_user_data((struct wl_proxy *) hyprland_global_shortcuts_manager_v1, user_data);
|
||||
}
|
||||
|
||||
/** @ingroup iface_hyprland_global_shortcuts_manager_v1 */
|
||||
static inline void *
|
||||
hyprland_global_shortcuts_manager_v1_get_user_data(struct hyprland_global_shortcuts_manager_v1 *hyprland_global_shortcuts_manager_v1)
|
||||
{
|
||||
return wl_proxy_get_user_data((struct wl_proxy *) hyprland_global_shortcuts_manager_v1);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
hyprland_global_shortcuts_manager_v1_get_version(struct hyprland_global_shortcuts_manager_v1 *hyprland_global_shortcuts_manager_v1)
|
||||
{
|
||||
return wl_proxy_get_version((struct wl_proxy *) hyprland_global_shortcuts_manager_v1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_global_shortcuts_manager_v1
|
||||
*
|
||||
* Register a new global shortcut.
|
||||
*
|
||||
* A global shortcut is anonymous, meaning the app does not know what key(s) trigger it.
|
||||
*
|
||||
* The shortcut's keybinding shall be dealt with by the compositor.
|
||||
*
|
||||
* In the case of a duplicate app_id + id combination, the already_taken protocol error is raised.
|
||||
*/
|
||||
static inline struct hyprland_global_shortcut_v1 *
|
||||
hyprland_global_shortcuts_manager_v1_register_shortcut(struct hyprland_global_shortcuts_manager_v1 *hyprland_global_shortcuts_manager_v1, const char *id, const char *app_id, const char *description, const char *trigger_description)
|
||||
{
|
||||
struct wl_proxy *shortcut;
|
||||
|
||||
shortcut = wl_proxy_marshal_flags((struct wl_proxy *) hyprland_global_shortcuts_manager_v1,
|
||||
HYPRLAND_GLOBAL_SHORTCUTS_MANAGER_V1_REGISTER_SHORTCUT, &hyprland_global_shortcut_v1_interface, wl_proxy_get_version((struct wl_proxy *) hyprland_global_shortcuts_manager_v1), 0, NULL, id, app_id, description, trigger_description);
|
||||
|
||||
return (struct hyprland_global_shortcut_v1 *) shortcut;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_global_shortcuts_manager_v1
|
||||
*
|
||||
* All objects created by the manager will still remain valid, until their
|
||||
* appropriate destroy request has been called.
|
||||
*/
|
||||
static inline void
|
||||
hyprland_global_shortcuts_manager_v1_destroy(struct hyprland_global_shortcuts_manager_v1 *hyprland_global_shortcuts_manager_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) hyprland_global_shortcuts_manager_v1,
|
||||
HYPRLAND_GLOBAL_SHORTCUTS_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) hyprland_global_shortcuts_manager_v1), WL_MARSHAL_FLAG_DESTROY);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_global_shortcut_v1
|
||||
* @struct hyprland_global_shortcut_v1_listener
|
||||
*/
|
||||
struct hyprland_global_shortcut_v1_listener {
|
||||
/**
|
||||
* keystroke pressed
|
||||
*
|
||||
* The keystroke was pressed.
|
||||
*
|
||||
* tv_ values hold the timestamp of the occurrence.
|
||||
* @param tv_sec_hi high 32 bits of the seconds part of the timestamp
|
||||
* @param tv_sec_lo low 32 bits of the seconds part of the timestamp
|
||||
* @param tv_nsec nanoseconds part of the timestamp
|
||||
*/
|
||||
void (*pressed)(void *data,
|
||||
struct hyprland_global_shortcut_v1 *hyprland_global_shortcut_v1,
|
||||
uint32_t tv_sec_hi,
|
||||
uint32_t tv_sec_lo,
|
||||
uint32_t tv_nsec);
|
||||
/**
|
||||
* keystroke released
|
||||
*
|
||||
* The keystroke was released.
|
||||
*
|
||||
* tv_ values hold the timestamp of the occurrence.
|
||||
* @param tv_sec_hi high 32 bits of the seconds part of the timestamp
|
||||
* @param tv_sec_lo low 32 bits of the seconds part of the timestamp
|
||||
* @param tv_nsec nanoseconds part of the timestamp
|
||||
*/
|
||||
void (*released)(void *data,
|
||||
struct hyprland_global_shortcut_v1 *hyprland_global_shortcut_v1,
|
||||
uint32_t tv_sec_hi,
|
||||
uint32_t tv_sec_lo,
|
||||
uint32_t tv_nsec);
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_global_shortcut_v1
|
||||
*/
|
||||
static inline int
|
||||
hyprland_global_shortcut_v1_add_listener(struct hyprland_global_shortcut_v1 *hyprland_global_shortcut_v1,
|
||||
const struct hyprland_global_shortcut_v1_listener *listener, void *data)
|
||||
{
|
||||
return wl_proxy_add_listener((struct wl_proxy *) hyprland_global_shortcut_v1,
|
||||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
#define HYPRLAND_GLOBAL_SHORTCUT_V1_DESTROY 0
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_global_shortcut_v1
|
||||
*/
|
||||
#define HYPRLAND_GLOBAL_SHORTCUT_V1_PRESSED_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_hyprland_global_shortcut_v1
|
||||
*/
|
||||
#define HYPRLAND_GLOBAL_SHORTCUT_V1_RELEASED_SINCE_VERSION 1
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_global_shortcut_v1
|
||||
*/
|
||||
#define HYPRLAND_GLOBAL_SHORTCUT_V1_DESTROY_SINCE_VERSION 1
|
||||
|
||||
/** @ingroup iface_hyprland_global_shortcut_v1 */
|
||||
static inline void
|
||||
hyprland_global_shortcut_v1_set_user_data(struct hyprland_global_shortcut_v1 *hyprland_global_shortcut_v1, void *user_data)
|
||||
{
|
||||
wl_proxy_set_user_data((struct wl_proxy *) hyprland_global_shortcut_v1, user_data);
|
||||
}
|
||||
|
||||
/** @ingroup iface_hyprland_global_shortcut_v1 */
|
||||
static inline void *
|
||||
hyprland_global_shortcut_v1_get_user_data(struct hyprland_global_shortcut_v1 *hyprland_global_shortcut_v1)
|
||||
{
|
||||
return wl_proxy_get_user_data((struct wl_proxy *) hyprland_global_shortcut_v1);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
hyprland_global_shortcut_v1_get_version(struct hyprland_global_shortcut_v1 *hyprland_global_shortcut_v1)
|
||||
{
|
||||
return wl_proxy_get_version((struct wl_proxy *) hyprland_global_shortcut_v1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_global_shortcut_v1
|
||||
*
|
||||
* Destroys the shortcut. Can be sent at any time by the client.
|
||||
*/
|
||||
static inline void
|
||||
hyprland_global_shortcut_v1_destroy(struct hyprland_global_shortcut_v1 *hyprland_global_shortcut_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) hyprland_global_shortcut_v1,
|
||||
HYPRLAND_GLOBAL_SHORTCUT_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) hyprland_global_shortcut_v1), WL_MARSHAL_FLAG_DESTROY);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,98 +0,0 @@
|
|||
/* Generated by wayland-scanner 1.22.90 */
|
||||
|
||||
/*
|
||||
* Copyright © 2022 Vaxry
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#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 hyprland_toplevel_export_frame_v1_interface;
|
||||
extern const struct wl_interface wl_buffer_interface;
|
||||
extern const struct wl_interface zwlr_foreign_toplevel_handle_v1_interface;
|
||||
|
||||
static const struct wl_interface *hyprland_toplevel_export_v1_types[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&hyprland_toplevel_export_frame_v1_interface,
|
||||
NULL,
|
||||
NULL,
|
||||
&hyprland_toplevel_export_frame_v1_interface,
|
||||
NULL,
|
||||
&zwlr_foreign_toplevel_handle_v1_interface,
|
||||
&wl_buffer_interface,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const struct wl_message hyprland_toplevel_export_manager_v1_requests[] = {
|
||||
{ "capture_toplevel", "niu", hyprland_toplevel_export_v1_types + 4 },
|
||||
{ "destroy", "", hyprland_toplevel_export_v1_types + 0 },
|
||||
{ "capture_toplevel_with_wlr_toplevel_handle", "2nio", hyprland_toplevel_export_v1_types + 7 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface hyprland_toplevel_export_manager_v1_interface = {
|
||||
"hyprland_toplevel_export_manager_v1", 2,
|
||||
3, hyprland_toplevel_export_manager_v1_requests,
|
||||
0, NULL,
|
||||
};
|
||||
|
||||
static const struct wl_message hyprland_toplevel_export_frame_v1_requests[] = {
|
||||
{ "copy", "oi", hyprland_toplevel_export_v1_types + 10 },
|
||||
{ "destroy", "", hyprland_toplevel_export_v1_types + 0 },
|
||||
};
|
||||
|
||||
static const struct wl_message hyprland_toplevel_export_frame_v1_events[] = {
|
||||
{ "buffer", "uuuu", hyprland_toplevel_export_v1_types + 0 },
|
||||
{ "damage", "uuuu", hyprland_toplevel_export_v1_types + 0 },
|
||||
{ "flags", "u", hyprland_toplevel_export_v1_types + 0 },
|
||||
{ "ready", "uuu", hyprland_toplevel_export_v1_types + 0 },
|
||||
{ "failed", "", hyprland_toplevel_export_v1_types + 0 },
|
||||
{ "linux_dmabuf", "uuu", hyprland_toplevel_export_v1_types + 0 },
|
||||
{ "buffer_done", "", hyprland_toplevel_export_v1_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface hyprland_toplevel_export_frame_v1_interface = {
|
||||
"hyprland_toplevel_export_frame_v1", 2,
|
||||
2, hyprland_toplevel_export_frame_v1_requests,
|
||||
7, hyprland_toplevel_export_frame_v1_events,
|
||||
};
|
||||
|
|
@ -1,475 +0,0 @@
|
|||
/* Generated by wayland-scanner 1.22.90 */
|
||||
|
||||
#ifndef HYPRLAND_TOPLEVEL_EXPORT_V1_CLIENT_PROTOCOL_H
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_V1_CLIENT_PROTOCOL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "wayland-client.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @page page_hyprland_toplevel_export_v1 The hyprland_toplevel_export_v1 protocol
|
||||
* capturing the contents of toplevel windows
|
||||
*
|
||||
* @section page_desc_hyprland_toplevel_export_v1 Description
|
||||
*
|
||||
* This protocol allows clients to ask for exporting another toplevel's
|
||||
* surface(s) to a buffer.
|
||||
*
|
||||
* Particularly useful for sharing a single window.
|
||||
*
|
||||
* @section page_ifaces_hyprland_toplevel_export_v1 Interfaces
|
||||
* - @subpage page_iface_hyprland_toplevel_export_manager_v1 - manager to inform clients and begin capturing
|
||||
* - @subpage page_iface_hyprland_toplevel_export_frame_v1 - a frame ready for copy
|
||||
* @section page_copyright_hyprland_toplevel_export_v1 Copyright
|
||||
* <pre>
|
||||
*
|
||||
* Copyright © 2022 Vaxry
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||
* list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||
* this list of conditions and the following disclaimer in the documentation
|
||||
* and/or other materials provided with the distribution.
|
||||
*
|
||||
* 3. Neither the name of the copyright holder nor the names of its
|
||||
* contributors may be used to endorse or promote products derived from
|
||||
* this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
|
||||
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
|
||||
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
|
||||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
* </pre>
|
||||
*/
|
||||
struct hyprland_toplevel_export_frame_v1;
|
||||
struct hyprland_toplevel_export_manager_v1;
|
||||
struct wl_buffer;
|
||||
struct zwlr_foreign_toplevel_handle_v1;
|
||||
|
||||
#ifndef HYPRLAND_TOPLEVEL_EXPORT_MANAGER_V1_INTERFACE
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_MANAGER_V1_INTERFACE
|
||||
/**
|
||||
* @page page_iface_hyprland_toplevel_export_manager_v1 hyprland_toplevel_export_manager_v1
|
||||
* @section page_iface_hyprland_toplevel_export_manager_v1_desc Description
|
||||
*
|
||||
* This object is a manager which offers requests to start capturing from a
|
||||
* source.
|
||||
* @section page_iface_hyprland_toplevel_export_manager_v1_api API
|
||||
* See @ref iface_hyprland_toplevel_export_manager_v1.
|
||||
*/
|
||||
/**
|
||||
* @defgroup iface_hyprland_toplevel_export_manager_v1 The hyprland_toplevel_export_manager_v1 interface
|
||||
*
|
||||
* This object is a manager which offers requests to start capturing from a
|
||||
* source.
|
||||
*/
|
||||
extern const struct wl_interface hyprland_toplevel_export_manager_v1_interface;
|
||||
#endif
|
||||
#ifndef HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_INTERFACE
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_INTERFACE
|
||||
/**
|
||||
* @page page_iface_hyprland_toplevel_export_frame_v1 hyprland_toplevel_export_frame_v1
|
||||
* @section page_iface_hyprland_toplevel_export_frame_v1_desc Description
|
||||
*
|
||||
* This object represents a single frame.
|
||||
*
|
||||
* When created, a series of buffer events will be sent, each representing a
|
||||
* supported buffer type. The "buffer_done" event is sent afterwards to
|
||||
* indicate that all supported buffer types have been enumerated. The client
|
||||
* will then be able to send a "copy" request. If the capture is successful,
|
||||
* the compositor will send a "flags" followed by a "ready" event.
|
||||
*
|
||||
* wl_shm buffers are always supported, ie. the "buffer" event is guaranteed to be sent.
|
||||
*
|
||||
* If the capture failed, the "failed" event is sent. This can happen anytime
|
||||
* before the "ready" event.
|
||||
*
|
||||
* Once either a "ready" or a "failed" event is received, the client should
|
||||
* destroy the frame.
|
||||
* @section page_iface_hyprland_toplevel_export_frame_v1_api API
|
||||
* See @ref iface_hyprland_toplevel_export_frame_v1.
|
||||
*/
|
||||
/**
|
||||
* @defgroup iface_hyprland_toplevel_export_frame_v1 The hyprland_toplevel_export_frame_v1 interface
|
||||
*
|
||||
* This object represents a single frame.
|
||||
*
|
||||
* When created, a series of buffer events will be sent, each representing a
|
||||
* supported buffer type. The "buffer_done" event is sent afterwards to
|
||||
* indicate that all supported buffer types have been enumerated. The client
|
||||
* will then be able to send a "copy" request. If the capture is successful,
|
||||
* the compositor will send a "flags" followed by a "ready" event.
|
||||
*
|
||||
* wl_shm buffers are always supported, ie. the "buffer" event is guaranteed to be sent.
|
||||
*
|
||||
* If the capture failed, the "failed" event is sent. This can happen anytime
|
||||
* before the "ready" event.
|
||||
*
|
||||
* Once either a "ready" or a "failed" event is received, the client should
|
||||
* destroy the frame.
|
||||
*/
|
||||
extern const struct wl_interface hyprland_toplevel_export_frame_v1_interface;
|
||||
#endif
|
||||
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_MANAGER_V1_CAPTURE_TOPLEVEL 0
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_MANAGER_V1_DESTROY 1
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_MANAGER_V1_CAPTURE_TOPLEVEL_WITH_WLR_TOPLEVEL_HANDLE 2
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_manager_v1
|
||||
*/
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_MANAGER_V1_CAPTURE_TOPLEVEL_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_manager_v1
|
||||
*/
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_MANAGER_V1_DESTROY_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_manager_v1
|
||||
*/
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_MANAGER_V1_CAPTURE_TOPLEVEL_WITH_WLR_TOPLEVEL_HANDLE_SINCE_VERSION 2
|
||||
|
||||
/** @ingroup iface_hyprland_toplevel_export_manager_v1 */
|
||||
static inline void
|
||||
hyprland_toplevel_export_manager_v1_set_user_data(struct hyprland_toplevel_export_manager_v1 *hyprland_toplevel_export_manager_v1, void *user_data)
|
||||
{
|
||||
wl_proxy_set_user_data((struct wl_proxy *) hyprland_toplevel_export_manager_v1, user_data);
|
||||
}
|
||||
|
||||
/** @ingroup iface_hyprland_toplevel_export_manager_v1 */
|
||||
static inline void *
|
||||
hyprland_toplevel_export_manager_v1_get_user_data(struct hyprland_toplevel_export_manager_v1 *hyprland_toplevel_export_manager_v1)
|
||||
{
|
||||
return wl_proxy_get_user_data((struct wl_proxy *) hyprland_toplevel_export_manager_v1);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
hyprland_toplevel_export_manager_v1_get_version(struct hyprland_toplevel_export_manager_v1 *hyprland_toplevel_export_manager_v1)
|
||||
{
|
||||
return wl_proxy_get_version((struct wl_proxy *) hyprland_toplevel_export_manager_v1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_manager_v1
|
||||
*
|
||||
* Capture the next frame of a toplevel. (window)
|
||||
*
|
||||
* The captured frame will not contain any server-side decorations and will
|
||||
* ignore the compositor-set geometry, like e.g. rounded corners.
|
||||
*
|
||||
* It will contain all the subsurfaces and popups, however the latter will be clipped
|
||||
* to the geometry of the base surface.
|
||||
*
|
||||
* The handle parameter refers to the address of the window as seen in `hyprctl clients`.
|
||||
* For example, for d161e7b0 it would be 3512854448.
|
||||
*/
|
||||
static inline struct hyprland_toplevel_export_frame_v1 *
|
||||
hyprland_toplevel_export_manager_v1_capture_toplevel(struct hyprland_toplevel_export_manager_v1 *hyprland_toplevel_export_manager_v1, int32_t overlay_cursor, uint32_t handle)
|
||||
{
|
||||
struct wl_proxy *frame;
|
||||
|
||||
frame = wl_proxy_marshal_flags((struct wl_proxy *) hyprland_toplevel_export_manager_v1,
|
||||
HYPRLAND_TOPLEVEL_EXPORT_MANAGER_V1_CAPTURE_TOPLEVEL, &hyprland_toplevel_export_frame_v1_interface, wl_proxy_get_version((struct wl_proxy *) hyprland_toplevel_export_manager_v1), 0, NULL, overlay_cursor, handle);
|
||||
|
||||
return (struct hyprland_toplevel_export_frame_v1 *) frame;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_manager_v1
|
||||
*
|
||||
* All objects created by the manager will still remain valid, until their
|
||||
* appropriate destroy request has been called.
|
||||
*/
|
||||
static inline void
|
||||
hyprland_toplevel_export_manager_v1_destroy(struct hyprland_toplevel_export_manager_v1 *hyprland_toplevel_export_manager_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) hyprland_toplevel_export_manager_v1,
|
||||
HYPRLAND_TOPLEVEL_EXPORT_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) hyprland_toplevel_export_manager_v1), WL_MARSHAL_FLAG_DESTROY);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_manager_v1
|
||||
*
|
||||
* Same as capture_toplevel, but with a zwlr_foreign_toplevel_handle_v1 handle.
|
||||
*/
|
||||
static inline struct hyprland_toplevel_export_frame_v1 *
|
||||
hyprland_toplevel_export_manager_v1_capture_toplevel_with_wlr_toplevel_handle(struct hyprland_toplevel_export_manager_v1 *hyprland_toplevel_export_manager_v1, int32_t overlay_cursor, struct zwlr_foreign_toplevel_handle_v1 *handle)
|
||||
{
|
||||
struct wl_proxy *frame;
|
||||
|
||||
frame = wl_proxy_marshal_flags((struct wl_proxy *) hyprland_toplevel_export_manager_v1,
|
||||
HYPRLAND_TOPLEVEL_EXPORT_MANAGER_V1_CAPTURE_TOPLEVEL_WITH_WLR_TOPLEVEL_HANDLE, &hyprland_toplevel_export_frame_v1_interface, wl_proxy_get_version((struct wl_proxy *) hyprland_toplevel_export_manager_v1), 0, NULL, overlay_cursor, handle);
|
||||
|
||||
return (struct hyprland_toplevel_export_frame_v1 *) frame;
|
||||
}
|
||||
|
||||
#ifndef HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_ERROR_ENUM
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_ERROR_ENUM
|
||||
enum hyprland_toplevel_export_frame_v1_error {
|
||||
/**
|
||||
* the object has already been used to copy a wl_buffer
|
||||
*/
|
||||
HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_ERROR_ALREADY_USED = 0,
|
||||
/**
|
||||
* buffer attributes are invalid
|
||||
*/
|
||||
HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_ERROR_INVALID_BUFFER = 1,
|
||||
};
|
||||
#endif /* HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_ERROR_ENUM */
|
||||
|
||||
#ifndef HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_FLAGS_ENUM
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_FLAGS_ENUM
|
||||
enum hyprland_toplevel_export_frame_v1_flags {
|
||||
/**
|
||||
* contents are y-inverted
|
||||
*/
|
||||
HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_FLAGS_Y_INVERT = 1,
|
||||
};
|
||||
#endif /* HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_FLAGS_ENUM */
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
* @struct hyprland_toplevel_export_frame_v1_listener
|
||||
*/
|
||||
struct hyprland_toplevel_export_frame_v1_listener {
|
||||
/**
|
||||
* wl_shm buffer information
|
||||
*
|
||||
* Provides information about wl_shm buffer parameters that need
|
||||
* to be used for this frame. This event is sent once after the
|
||||
* frame is created if wl_shm buffers are supported.
|
||||
* @param format buffer format
|
||||
* @param width buffer width
|
||||
* @param height buffer height
|
||||
* @param stride buffer stride
|
||||
*/
|
||||
void (*buffer)(void *data,
|
||||
struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1,
|
||||
uint32_t format,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
uint32_t stride);
|
||||
/**
|
||||
* carries the coordinates of the damaged region
|
||||
*
|
||||
* This event is sent right before the ready event when
|
||||
* ignore_damage was not set. It may be generated multiple times
|
||||
* for each copy request.
|
||||
*
|
||||
* The arguments describe a box around an area that has changed
|
||||
* since the last copy request that was derived from the current
|
||||
* screencopy manager instance.
|
||||
*
|
||||
* The union of all regions received between the call to copy and a
|
||||
* ready event is the total damage since the prior ready event.
|
||||
* @param x damaged x coordinates
|
||||
* @param y damaged y coordinates
|
||||
* @param width current width
|
||||
* @param height current height
|
||||
*/
|
||||
void (*damage)(void *data,
|
||||
struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1,
|
||||
uint32_t x,
|
||||
uint32_t y,
|
||||
uint32_t width,
|
||||
uint32_t height);
|
||||
/**
|
||||
* frame flags
|
||||
*
|
||||
* Provides flags about the frame. This event is sent once before
|
||||
* the "ready" event.
|
||||
* @param flags frame flags
|
||||
*/
|
||||
void (*flags)(void *data,
|
||||
struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1,
|
||||
uint32_t flags);
|
||||
/**
|
||||
* indicates frame is available for reading
|
||||
*
|
||||
* Called as soon as the frame is copied, indicating it is
|
||||
* available for reading. This event includes the time at which
|
||||
* presentation happened at.
|
||||
*
|
||||
* The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec
|
||||
* triples, each component being an unsigned 32-bit value. Whole
|
||||
* seconds are in tv_sec which is a 64-bit value combined from
|
||||
* tv_sec_hi and tv_sec_lo, and the additional fractional part in
|
||||
* tv_nsec as nanoseconds. Hence, for valid timestamps tv_nsec must
|
||||
* be in [0, 999999999]. The seconds part may have an arbitrary
|
||||
* offset at start.
|
||||
*
|
||||
* After receiving this event, the client should destroy the
|
||||
* object.
|
||||
* @param tv_sec_hi high 32 bits of the seconds part of the timestamp
|
||||
* @param tv_sec_lo low 32 bits of the seconds part of the timestamp
|
||||
* @param tv_nsec nanoseconds part of the timestamp
|
||||
*/
|
||||
void (*ready)(void *data,
|
||||
struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1,
|
||||
uint32_t tv_sec_hi,
|
||||
uint32_t tv_sec_lo,
|
||||
uint32_t tv_nsec);
|
||||
/**
|
||||
* frame copy failed
|
||||
*
|
||||
* This event indicates that the attempted frame copy has failed.
|
||||
*
|
||||
* After receiving this event, the client should destroy the
|
||||
* object.
|
||||
*/
|
||||
void (*failed)(void *data,
|
||||
struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1);
|
||||
/**
|
||||
* linux-dmabuf buffer information
|
||||
*
|
||||
* Provides information about linux-dmabuf buffer parameters that
|
||||
* need to be used for this frame. This event is sent once after
|
||||
* the frame is created if linux-dmabuf buffers are supported.
|
||||
* @param format fourcc pixel format
|
||||
* @param width buffer width
|
||||
* @param height buffer height
|
||||
*/
|
||||
void (*linux_dmabuf)(void *data,
|
||||
struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1,
|
||||
uint32_t format,
|
||||
uint32_t width,
|
||||
uint32_t height);
|
||||
/**
|
||||
* all buffer types reported
|
||||
*
|
||||
* This event is sent once after all buffer events have been
|
||||
* sent.
|
||||
*
|
||||
* The client should proceed to create a buffer of one of the
|
||||
* supported types, and send a "copy" request.
|
||||
*/
|
||||
void (*buffer_done)(void *data,
|
||||
struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1);
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
*/
|
||||
static inline int
|
||||
hyprland_toplevel_export_frame_v1_add_listener(struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1,
|
||||
const struct hyprland_toplevel_export_frame_v1_listener *listener, void *data)
|
||||
{
|
||||
return wl_proxy_add_listener((struct wl_proxy *) hyprland_toplevel_export_frame_v1,
|
||||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_COPY 0
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_DESTROY 1
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
*/
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_BUFFER_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
*/
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_DAMAGE_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
*/
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_FLAGS_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
*/
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_READY_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
*/
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_FAILED_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
*/
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_LINUX_DMABUF_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
*/
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_BUFFER_DONE_SINCE_VERSION 1
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
*/
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_COPY_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
*/
|
||||
#define HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_DESTROY_SINCE_VERSION 1
|
||||
|
||||
/** @ingroup iface_hyprland_toplevel_export_frame_v1 */
|
||||
static inline void
|
||||
hyprland_toplevel_export_frame_v1_set_user_data(struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1, void *user_data)
|
||||
{
|
||||
wl_proxy_set_user_data((struct wl_proxy *) hyprland_toplevel_export_frame_v1, user_data);
|
||||
}
|
||||
|
||||
/** @ingroup iface_hyprland_toplevel_export_frame_v1 */
|
||||
static inline void *
|
||||
hyprland_toplevel_export_frame_v1_get_user_data(struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1)
|
||||
{
|
||||
return wl_proxy_get_user_data((struct wl_proxy *) hyprland_toplevel_export_frame_v1);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
hyprland_toplevel_export_frame_v1_get_version(struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1)
|
||||
{
|
||||
return wl_proxy_get_version((struct wl_proxy *) hyprland_toplevel_export_frame_v1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
*
|
||||
* Copy the frame to the supplied buffer. The buffer must have the
|
||||
* correct size, see hyprland_toplevel_export_frame_v1.buffer and
|
||||
* hyprland_toplevel_export_frame_v1.linux_dmabuf. The buffer needs to have a
|
||||
* supported format.
|
||||
*
|
||||
* If the frame is successfully copied, a "flags" and a "ready" event is
|
||||
* sent. Otherwise, a "failed" event is sent.
|
||||
*
|
||||
* This event will wait for appropriate damage to be copied, unless the ignore_damage
|
||||
* arg is set to a non-zero value.
|
||||
*/
|
||||
static inline void
|
||||
hyprland_toplevel_export_frame_v1_copy(struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1, struct wl_buffer *buffer, int32_t ignore_damage)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) hyprland_toplevel_export_frame_v1,
|
||||
HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_COPY, NULL, wl_proxy_get_version((struct wl_proxy *) hyprland_toplevel_export_frame_v1), 0, buffer, ignore_damage);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_hyprland_toplevel_export_frame_v1
|
||||
*
|
||||
* Destroys the frame. This request can be sent at any time by the client.
|
||||
*/
|
||||
static inline void
|
||||
hyprland_toplevel_export_frame_v1_destroy(struct hyprland_toplevel_export_frame_v1 *hyprland_toplevel_export_frame_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) hyprland_toplevel_export_frame_v1,
|
||||
HYPRLAND_TOPLEVEL_EXPORT_FRAME_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) hyprland_toplevel_export_frame_v1), WL_MARSHAL_FLAG_DESTROY);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,106 +0,0 @@
|
|||
/* Generated by wayland-scanner 1.22.90 */
|
||||
|
||||
/*
|
||||
* Copyright © 2018 Ilia Bozhinov
|
||||
*
|
||||
* 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 <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 wl_seat_interface;
|
||||
extern const struct wl_interface wl_surface_interface;
|
||||
extern const struct wl_interface zwlr_foreign_toplevel_handle_v1_interface;
|
||||
|
||||
static const struct wl_interface *wlr_foreign_toplevel_management_unstable_v1_types[] = {
|
||||
NULL,
|
||||
&zwlr_foreign_toplevel_handle_v1_interface,
|
||||
&wl_seat_interface,
|
||||
&wl_surface_interface,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&wl_output_interface,
|
||||
&wl_output_interface,
|
||||
&wl_output_interface,
|
||||
&zwlr_foreign_toplevel_handle_v1_interface,
|
||||
};
|
||||
|
||||
static const struct wl_message zwlr_foreign_toplevel_manager_v1_requests[] = {
|
||||
{ "stop", "", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
};
|
||||
|
||||
static const struct wl_message zwlr_foreign_toplevel_manager_v1_events[] = {
|
||||
{ "toplevel", "n", wlr_foreign_toplevel_management_unstable_v1_types + 1 },
|
||||
{ "finished", "", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface zwlr_foreign_toplevel_manager_v1_interface = {
|
||||
"zwlr_foreign_toplevel_manager_v1", 3,
|
||||
1, zwlr_foreign_toplevel_manager_v1_requests,
|
||||
2, zwlr_foreign_toplevel_manager_v1_events,
|
||||
};
|
||||
|
||||
static const struct wl_message zwlr_foreign_toplevel_handle_v1_requests[] = {
|
||||
{ "set_maximized", "", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
{ "unset_maximized", "", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
{ "set_minimized", "", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
{ "unset_minimized", "", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
{ "activate", "o", wlr_foreign_toplevel_management_unstable_v1_types + 2 },
|
||||
{ "close", "", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
{ "set_rectangle", "oiiii", wlr_foreign_toplevel_management_unstable_v1_types + 3 },
|
||||
{ "destroy", "", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
{ "set_fullscreen", "2?o", wlr_foreign_toplevel_management_unstable_v1_types + 8 },
|
||||
{ "unset_fullscreen", "2", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
};
|
||||
|
||||
static const struct wl_message zwlr_foreign_toplevel_handle_v1_events[] = {
|
||||
{ "title", "s", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
{ "app_id", "s", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
{ "output_enter", "o", wlr_foreign_toplevel_management_unstable_v1_types + 9 },
|
||||
{ "output_leave", "o", wlr_foreign_toplevel_management_unstable_v1_types + 10 },
|
||||
{ "state", "a", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
{ "done", "", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
{ "closed", "", wlr_foreign_toplevel_management_unstable_v1_types + 0 },
|
||||
{ "parent", "3?o", wlr_foreign_toplevel_management_unstable_v1_types + 11 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface zwlr_foreign_toplevel_handle_v1_interface = {
|
||||
"zwlr_foreign_toplevel_handle_v1", 3,
|
||||
10, zwlr_foreign_toplevel_handle_v1_requests,
|
||||
8, zwlr_foreign_toplevel_handle_v1_events,
|
||||
};
|
||||
|
|
@ -1,615 +0,0 @@
|
|||
/* Generated by wayland-scanner 1.22.90 */
|
||||
|
||||
#ifndef WLR_FOREIGN_TOPLEVEL_MANAGEMENT_UNSTABLE_V1_CLIENT_PROTOCOL_H
|
||||
#define WLR_FOREIGN_TOPLEVEL_MANAGEMENT_UNSTABLE_V1_CLIENT_PROTOCOL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "wayland-client.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @page page_wlr_foreign_toplevel_management_unstable_v1 The wlr_foreign_toplevel_management_unstable_v1 protocol
|
||||
* @section page_ifaces_wlr_foreign_toplevel_management_unstable_v1 Interfaces
|
||||
* - @subpage page_iface_zwlr_foreign_toplevel_manager_v1 - list and control opened apps
|
||||
* - @subpage page_iface_zwlr_foreign_toplevel_handle_v1 - an opened toplevel
|
||||
* @section page_copyright_wlr_foreign_toplevel_management_unstable_v1 Copyright
|
||||
* <pre>
|
||||
*
|
||||
* Copyright © 2018 Ilia Bozhinov
|
||||
*
|
||||
* 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 wl_output;
|
||||
struct wl_seat;
|
||||
struct wl_surface;
|
||||
struct zwlr_foreign_toplevel_handle_v1;
|
||||
struct zwlr_foreign_toplevel_manager_v1;
|
||||
|
||||
#ifndef ZWLR_FOREIGN_TOPLEVEL_MANAGER_V1_INTERFACE
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_MANAGER_V1_INTERFACE
|
||||
/**
|
||||
* @page page_iface_zwlr_foreign_toplevel_manager_v1 zwlr_foreign_toplevel_manager_v1
|
||||
* @section page_iface_zwlr_foreign_toplevel_manager_v1_desc Description
|
||||
*
|
||||
* The purpose of this protocol is to enable the creation of taskbars
|
||||
* and docks by providing them with a list of opened applications and
|
||||
* letting them request certain actions on them, like maximizing, etc.
|
||||
*
|
||||
* After a client binds the zwlr_foreign_toplevel_manager_v1, each opened
|
||||
* toplevel window will be sent via the toplevel event
|
||||
* @section page_iface_zwlr_foreign_toplevel_manager_v1_api API
|
||||
* See @ref iface_zwlr_foreign_toplevel_manager_v1.
|
||||
*/
|
||||
/**
|
||||
* @defgroup iface_zwlr_foreign_toplevel_manager_v1 The zwlr_foreign_toplevel_manager_v1 interface
|
||||
*
|
||||
* The purpose of this protocol is to enable the creation of taskbars
|
||||
* and docks by providing them with a list of opened applications and
|
||||
* letting them request certain actions on them, like maximizing, etc.
|
||||
*
|
||||
* After a client binds the zwlr_foreign_toplevel_manager_v1, each opened
|
||||
* toplevel window will be sent via the toplevel event
|
||||
*/
|
||||
extern const struct wl_interface zwlr_foreign_toplevel_manager_v1_interface;
|
||||
#endif
|
||||
#ifndef ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_INTERFACE
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_INTERFACE
|
||||
/**
|
||||
* @page page_iface_zwlr_foreign_toplevel_handle_v1 zwlr_foreign_toplevel_handle_v1
|
||||
* @section page_iface_zwlr_foreign_toplevel_handle_v1_desc Description
|
||||
*
|
||||
* A zwlr_foreign_toplevel_handle_v1 object represents an opened toplevel
|
||||
* window. Each app may have multiple opened toplevels.
|
||||
*
|
||||
* Each toplevel has a list of outputs it is visible on, conveyed to the
|
||||
* client with the output_enter and output_leave events.
|
||||
* @section page_iface_zwlr_foreign_toplevel_handle_v1_api API
|
||||
* See @ref iface_zwlr_foreign_toplevel_handle_v1.
|
||||
*/
|
||||
/**
|
||||
* @defgroup iface_zwlr_foreign_toplevel_handle_v1 The zwlr_foreign_toplevel_handle_v1 interface
|
||||
*
|
||||
* A zwlr_foreign_toplevel_handle_v1 object represents an opened toplevel
|
||||
* window. Each app may have multiple opened toplevels.
|
||||
*
|
||||
* Each toplevel has a list of outputs it is visible on, conveyed to the
|
||||
* client with the output_enter and output_leave events.
|
||||
*/
|
||||
extern const struct wl_interface zwlr_foreign_toplevel_handle_v1_interface;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_manager_v1
|
||||
* @struct zwlr_foreign_toplevel_manager_v1_listener
|
||||
*/
|
||||
struct zwlr_foreign_toplevel_manager_v1_listener {
|
||||
/**
|
||||
* a toplevel has been created
|
||||
*
|
||||
* This event is emitted whenever a new toplevel window is
|
||||
* created. It is emitted for all toplevels, regardless of the app
|
||||
* that has created them.
|
||||
*
|
||||
* All initial details of the toplevel(title, app_id, states, etc.)
|
||||
* will be sent immediately after this event via the corresponding
|
||||
* events in zwlr_foreign_toplevel_handle_v1.
|
||||
*/
|
||||
void (*toplevel)(void *data,
|
||||
struct zwlr_foreign_toplevel_manager_v1 *zwlr_foreign_toplevel_manager_v1,
|
||||
struct zwlr_foreign_toplevel_handle_v1 *toplevel);
|
||||
/**
|
||||
* the compositor has finished with the toplevel manager
|
||||
*
|
||||
* This event indicates that the compositor is done sending
|
||||
* events to the zwlr_foreign_toplevel_manager_v1. The server will
|
||||
* destroy the object immediately after sending this request, so it
|
||||
* will become invalid and the client should free any resources
|
||||
* associated with it.
|
||||
*/
|
||||
void (*finished)(void *data,
|
||||
struct zwlr_foreign_toplevel_manager_v1 *zwlr_foreign_toplevel_manager_v1);
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_manager_v1
|
||||
*/
|
||||
static inline int
|
||||
zwlr_foreign_toplevel_manager_v1_add_listener(struct zwlr_foreign_toplevel_manager_v1 *zwlr_foreign_toplevel_manager_v1,
|
||||
const struct zwlr_foreign_toplevel_manager_v1_listener *listener, void *data)
|
||||
{
|
||||
return wl_proxy_add_listener((struct wl_proxy *) zwlr_foreign_toplevel_manager_v1,
|
||||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_MANAGER_V1_STOP 0
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_manager_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_MANAGER_V1_TOPLEVEL_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_manager_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_MANAGER_V1_FINISHED_SINCE_VERSION 1
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_manager_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_MANAGER_V1_STOP_SINCE_VERSION 1
|
||||
|
||||
/** @ingroup iface_zwlr_foreign_toplevel_manager_v1 */
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_manager_v1_set_user_data(struct zwlr_foreign_toplevel_manager_v1 *zwlr_foreign_toplevel_manager_v1, void *user_data)
|
||||
{
|
||||
wl_proxy_set_user_data((struct wl_proxy *) zwlr_foreign_toplevel_manager_v1, user_data);
|
||||
}
|
||||
|
||||
/** @ingroup iface_zwlr_foreign_toplevel_manager_v1 */
|
||||
static inline void *
|
||||
zwlr_foreign_toplevel_manager_v1_get_user_data(struct zwlr_foreign_toplevel_manager_v1 *zwlr_foreign_toplevel_manager_v1)
|
||||
{
|
||||
return wl_proxy_get_user_data((struct wl_proxy *) zwlr_foreign_toplevel_manager_v1);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
zwlr_foreign_toplevel_manager_v1_get_version(struct zwlr_foreign_toplevel_manager_v1 *zwlr_foreign_toplevel_manager_v1)
|
||||
{
|
||||
return wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_manager_v1);
|
||||
}
|
||||
|
||||
/** @ingroup iface_zwlr_foreign_toplevel_manager_v1 */
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_manager_v1_destroy(struct zwlr_foreign_toplevel_manager_v1 *zwlr_foreign_toplevel_manager_v1)
|
||||
{
|
||||
wl_proxy_destroy((struct wl_proxy *) zwlr_foreign_toplevel_manager_v1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_manager_v1
|
||||
*
|
||||
* Indicates the client no longer wishes to receive events for new toplevels.
|
||||
* However the compositor may emit further toplevel_created events, until
|
||||
* the finished event is emitted.
|
||||
*
|
||||
* The client must not send any more requests after this one.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_manager_v1_stop(struct zwlr_foreign_toplevel_manager_v1 *zwlr_foreign_toplevel_manager_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_foreign_toplevel_manager_v1,
|
||||
ZWLR_FOREIGN_TOPLEVEL_MANAGER_V1_STOP, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_manager_v1), 0);
|
||||
}
|
||||
|
||||
#ifndef ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_STATE_ENUM
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_STATE_ENUM
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
* types of states on the toplevel
|
||||
*
|
||||
* The different states that a toplevel can have. These have the same meaning
|
||||
* as the states with the same names defined in xdg-toplevel
|
||||
*/
|
||||
enum zwlr_foreign_toplevel_handle_v1_state {
|
||||
/**
|
||||
* the toplevel is maximized
|
||||
*/
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_STATE_MAXIMIZED = 0,
|
||||
/**
|
||||
* the toplevel is minimized
|
||||
*/
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_STATE_MINIMIZED = 1,
|
||||
/**
|
||||
* the toplevel is active
|
||||
*/
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_STATE_ACTIVATED = 2,
|
||||
/**
|
||||
* the toplevel is fullscreen
|
||||
* @since 2
|
||||
*/
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_STATE_FULLSCREEN = 3,
|
||||
};
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_STATE_FULLSCREEN_SINCE_VERSION 2
|
||||
#endif /* ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_STATE_ENUM */
|
||||
|
||||
#ifndef ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_ERROR_ENUM
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_ERROR_ENUM
|
||||
enum zwlr_foreign_toplevel_handle_v1_error {
|
||||
/**
|
||||
* the provided rectangle is invalid
|
||||
*/
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_ERROR_INVALID_RECTANGLE = 0,
|
||||
};
|
||||
#endif /* ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_ERROR_ENUM */
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
* @struct zwlr_foreign_toplevel_handle_v1_listener
|
||||
*/
|
||||
struct zwlr_foreign_toplevel_handle_v1_listener {
|
||||
/**
|
||||
* title change
|
||||
*
|
||||
* This event is emitted whenever the title of the toplevel
|
||||
* changes.
|
||||
*/
|
||||
void (*title)(void *data,
|
||||
struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1,
|
||||
const char *title);
|
||||
/**
|
||||
* app-id change
|
||||
*
|
||||
* This event is emitted whenever the app-id of the toplevel
|
||||
* changes.
|
||||
*/
|
||||
void (*app_id)(void *data,
|
||||
struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1,
|
||||
const char *app_id);
|
||||
/**
|
||||
* toplevel entered an output
|
||||
*
|
||||
* This event is emitted whenever the toplevel becomes visible on
|
||||
* the given output. A toplevel may be visible on multiple outputs.
|
||||
*/
|
||||
void (*output_enter)(void *data,
|
||||
struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1,
|
||||
struct wl_output *output);
|
||||
/**
|
||||
* toplevel left an output
|
||||
*
|
||||
* This event is emitted whenever the toplevel stops being
|
||||
* visible on the given output. It is guaranteed that an
|
||||
* entered-output event with the same output has been emitted
|
||||
* before this event.
|
||||
*/
|
||||
void (*output_leave)(void *data,
|
||||
struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1,
|
||||
struct wl_output *output);
|
||||
/**
|
||||
* the toplevel state changed
|
||||
*
|
||||
* This event is emitted immediately after the
|
||||
* zlw_foreign_toplevel_handle_v1 is created and each time the
|
||||
* toplevel state changes, either because of a compositor action or
|
||||
* because of a request in this protocol.
|
||||
*/
|
||||
void (*state)(void *data,
|
||||
struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1,
|
||||
struct wl_array *state);
|
||||
/**
|
||||
* all information about the toplevel has been sent
|
||||
*
|
||||
* This event is sent after all changes in the toplevel state
|
||||
* have been sent.
|
||||
*
|
||||
* This allows changes to the zwlr_foreign_toplevel_handle_v1
|
||||
* properties to be seen as atomic, even if they happen via
|
||||
* multiple events.
|
||||
*/
|
||||
void (*done)(void *data,
|
||||
struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1);
|
||||
/**
|
||||
* this toplevel has been destroyed
|
||||
*
|
||||
* This event means the toplevel has been destroyed. It is
|
||||
* guaranteed there won't be any more events for this
|
||||
* zwlr_foreign_toplevel_handle_v1. The toplevel itself becomes
|
||||
* inert so any requests will be ignored except the destroy
|
||||
* request.
|
||||
*/
|
||||
void (*closed)(void *data,
|
||||
struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1);
|
||||
/**
|
||||
* parent change
|
||||
*
|
||||
* This event is emitted whenever the parent of the toplevel
|
||||
* changes.
|
||||
*
|
||||
* No event is emitted when the parent handle is destroyed by the
|
||||
* client.
|
||||
* @since 3
|
||||
*/
|
||||
void (*parent)(void *data,
|
||||
struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1,
|
||||
struct zwlr_foreign_toplevel_handle_v1 *parent);
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
static inline int
|
||||
zwlr_foreign_toplevel_handle_v1_add_listener(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1,
|
||||
const struct zwlr_foreign_toplevel_handle_v1_listener *listener, void *data)
|
||||
{
|
||||
return wl_proxy_add_listener((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1,
|
||||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_SET_MAXIMIZED 0
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_UNSET_MAXIMIZED 1
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_SET_MINIMIZED 2
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_UNSET_MINIMIZED 3
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_ACTIVATE 4
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_CLOSE 5
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_SET_RECTANGLE 6
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_DESTROY 7
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_SET_FULLSCREEN 8
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_UNSET_FULLSCREEN 9
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_TITLE_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_APP_ID_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_OUTPUT_ENTER_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_OUTPUT_LEAVE_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_STATE_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_DONE_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_CLOSED_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_PARENT_SINCE_VERSION 3
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_SET_MAXIMIZED_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_UNSET_MAXIMIZED_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_SET_MINIMIZED_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_UNSET_MINIMIZED_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_ACTIVATE_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_CLOSE_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_SET_RECTANGLE_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_DESTROY_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_SET_FULLSCREEN_SINCE_VERSION 2
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*/
|
||||
#define ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_UNSET_FULLSCREEN_SINCE_VERSION 2
|
||||
|
||||
/** @ingroup iface_zwlr_foreign_toplevel_handle_v1 */
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_handle_v1_set_user_data(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1, void *user_data)
|
||||
{
|
||||
wl_proxy_set_user_data((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1, user_data);
|
||||
}
|
||||
|
||||
/** @ingroup iface_zwlr_foreign_toplevel_handle_v1 */
|
||||
static inline void *
|
||||
zwlr_foreign_toplevel_handle_v1_get_user_data(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1)
|
||||
{
|
||||
return wl_proxy_get_user_data((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
zwlr_foreign_toplevel_handle_v1_get_version(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1)
|
||||
{
|
||||
return wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*
|
||||
* Requests that the toplevel be maximized. If the maximized state actually
|
||||
* changes, this will be indicated by the state event.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_handle_v1_set_maximized(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1,
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_SET_MAXIMIZED, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*
|
||||
* Requests that the toplevel be unmaximized. If the maximized state actually
|
||||
* changes, this will be indicated by the state event.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_handle_v1_unset_maximized(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1,
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_UNSET_MAXIMIZED, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*
|
||||
* Requests that the toplevel be minimized. If the minimized state actually
|
||||
* changes, this will be indicated by the state event.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_handle_v1_set_minimized(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1,
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_SET_MINIMIZED, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*
|
||||
* Requests that the toplevel be unminimized. If the minimized state actually
|
||||
* changes, this will be indicated by the state event.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_handle_v1_unset_minimized(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1,
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_UNSET_MINIMIZED, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*
|
||||
* Request that this toplevel be activated on the given seat.
|
||||
* There is no guarantee the toplevel will be actually activated.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_handle_v1_activate(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1, struct wl_seat *seat)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1,
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_ACTIVATE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1), 0, seat);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*
|
||||
* Send a request to the toplevel to close itself. The compositor would
|
||||
* typically use a shell-specific method to carry out this request, for
|
||||
* example by sending the xdg_toplevel.close event. However, this gives
|
||||
* no guarantees the toplevel will actually be destroyed. If and when
|
||||
* this happens, the zwlr_foreign_toplevel_handle_v1.closed event will
|
||||
* be emitted.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_handle_v1_close(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1,
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_CLOSE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1), 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*
|
||||
* The rectangle of the surface specified in this request corresponds to
|
||||
* the place where the app using this protocol represents the given toplevel.
|
||||
* It can be used by the compositor as a hint for some operations, e.g
|
||||
* minimizing. The client is however not required to set this, in which
|
||||
* case the compositor is free to decide some default value.
|
||||
*
|
||||
* If the client specifies more than one rectangle, only the last one is
|
||||
* considered.
|
||||
*
|
||||
* The dimensions are given in surface-local coordinates.
|
||||
* Setting width=height=0 removes the already-set rectangle.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_handle_v1_set_rectangle(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1, struct wl_surface *surface, int32_t x, int32_t y, int32_t width, int32_t height)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1,
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_SET_RECTANGLE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1), 0, surface, x, y, width, height);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*
|
||||
* Destroys the zwlr_foreign_toplevel_handle_v1 object.
|
||||
*
|
||||
* This request should be called either when the client does not want to
|
||||
* use the toplevel anymore or after the closed event to finalize the
|
||||
* destruction of the object.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_handle_v1_destroy(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1,
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1), WL_MARSHAL_FLAG_DESTROY);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*
|
||||
* Requests that the toplevel be fullscreened on the given output. If the
|
||||
* fullscreen state and/or the outputs the toplevel is visible on actually
|
||||
* change, this will be indicated by the state and output_enter/leave
|
||||
* events.
|
||||
*
|
||||
* The output parameter is only a hint to the compositor. Also, if output
|
||||
* is NULL, the compositor should decide which output the toplevel will be
|
||||
* fullscreened on, if at all.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_handle_v1_set_fullscreen(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1, struct wl_output *output)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1,
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_SET_FULLSCREEN, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1), 0, output);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_foreign_toplevel_handle_v1
|
||||
*
|
||||
* Requests that the toplevel be unfullscreened. If the fullscreen state
|
||||
* actually changes, this will be indicated by the state event.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_foreign_toplevel_handle_v1_unset_fullscreen(struct zwlr_foreign_toplevel_handle_v1 *zwlr_foreign_toplevel_handle_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1,
|
||||
ZWLR_FOREIGN_TOPLEVEL_HANDLE_V1_UNSET_FULLSCREEN, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_foreign_toplevel_handle_v1), 0);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
|
@ -1,97 +0,0 @@
|
|||
/* Generated by wayland-scanner 1.22.90 */
|
||||
|
||||
/*
|
||||
* Copyright © 2018 Simon Ser
|
||||
* Copyright © 2019 Andri Yngvason
|
||||
*
|
||||
* 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 <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_buffer_interface;
|
||||
extern const struct wl_interface wl_output_interface;
|
||||
extern const struct wl_interface zwlr_screencopy_frame_v1_interface;
|
||||
|
||||
static const struct wl_interface *wlr_screencopy_unstable_v1_types[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&zwlr_screencopy_frame_v1_interface,
|
||||
NULL,
|
||||
&wl_output_interface,
|
||||
&zwlr_screencopy_frame_v1_interface,
|
||||
NULL,
|
||||
&wl_output_interface,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&wl_buffer_interface,
|
||||
&wl_buffer_interface,
|
||||
};
|
||||
|
||||
static const struct wl_message zwlr_screencopy_manager_v1_requests[] = {
|
||||
{ "capture_output", "nio", wlr_screencopy_unstable_v1_types + 4 },
|
||||
{ "capture_output_region", "nioiiii", wlr_screencopy_unstable_v1_types + 7 },
|
||||
{ "destroy", "", wlr_screencopy_unstable_v1_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface zwlr_screencopy_manager_v1_interface = {
|
||||
"zwlr_screencopy_manager_v1", 3,
|
||||
3, zwlr_screencopy_manager_v1_requests,
|
||||
0, NULL,
|
||||
};
|
||||
|
||||
static const struct wl_message zwlr_screencopy_frame_v1_requests[] = {
|
||||
{ "copy", "o", wlr_screencopy_unstable_v1_types + 14 },
|
||||
{ "destroy", "", wlr_screencopy_unstable_v1_types + 0 },
|
||||
{ "copy_with_damage", "2o", wlr_screencopy_unstable_v1_types + 15 },
|
||||
};
|
||||
|
||||
static const struct wl_message zwlr_screencopy_frame_v1_events[] = {
|
||||
{ "buffer", "uuuu", wlr_screencopy_unstable_v1_types + 0 },
|
||||
{ "flags", "u", wlr_screencopy_unstable_v1_types + 0 },
|
||||
{ "ready", "uuu", wlr_screencopy_unstable_v1_types + 0 },
|
||||
{ "failed", "", wlr_screencopy_unstable_v1_types + 0 },
|
||||
{ "damage", "2uuuu", wlr_screencopy_unstable_v1_types + 0 },
|
||||
{ "linux_dmabuf", "3uuu", wlr_screencopy_unstable_v1_types + 0 },
|
||||
{ "buffer_done", "3", wlr_screencopy_unstable_v1_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface zwlr_screencopy_frame_v1_interface = {
|
||||
"zwlr_screencopy_frame_v1", 3,
|
||||
3, zwlr_screencopy_frame_v1_requests,
|
||||
7, zwlr_screencopy_frame_v1_events,
|
||||
};
|
||||
|
|
@ -1,491 +0,0 @@
|
|||
/* Generated by wayland-scanner 1.22.90 */
|
||||
|
||||
#ifndef WLR_SCREENCOPY_UNSTABLE_V1_CLIENT_PROTOCOL_H
|
||||
#define WLR_SCREENCOPY_UNSTABLE_V1_CLIENT_PROTOCOL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "wayland-client.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @page page_wlr_screencopy_unstable_v1 The wlr_screencopy_unstable_v1 protocol
|
||||
* screen content capturing on client buffers
|
||||
*
|
||||
* @section page_desc_wlr_screencopy_unstable_v1 Description
|
||||
*
|
||||
* This protocol allows clients to ask the compositor to copy part of the
|
||||
* screen content to a client buffer.
|
||||
*
|
||||
* 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_screencopy_unstable_v1 Interfaces
|
||||
* - @subpage page_iface_zwlr_screencopy_manager_v1 - manager to inform clients and begin capturing
|
||||
* - @subpage page_iface_zwlr_screencopy_frame_v1 - a frame ready for copy
|
||||
* @section page_copyright_wlr_screencopy_unstable_v1 Copyright
|
||||
* <pre>
|
||||
*
|
||||
* Copyright © 2018 Simon Ser
|
||||
* Copyright © 2019 Andri Yngvason
|
||||
*
|
||||
* 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_buffer;
|
||||
struct wl_output;
|
||||
struct zwlr_screencopy_frame_v1;
|
||||
struct zwlr_screencopy_manager_v1;
|
||||
|
||||
#ifndef ZWLR_SCREENCOPY_MANAGER_V1_INTERFACE
|
||||
#define ZWLR_SCREENCOPY_MANAGER_V1_INTERFACE
|
||||
/**
|
||||
* @page page_iface_zwlr_screencopy_manager_v1 zwlr_screencopy_manager_v1
|
||||
* @section page_iface_zwlr_screencopy_manager_v1_desc Description
|
||||
*
|
||||
* This object is a manager which offers requests to start capturing from a
|
||||
* source.
|
||||
* @section page_iface_zwlr_screencopy_manager_v1_api API
|
||||
* See @ref iface_zwlr_screencopy_manager_v1.
|
||||
*/
|
||||
/**
|
||||
* @defgroup iface_zwlr_screencopy_manager_v1 The zwlr_screencopy_manager_v1 interface
|
||||
*
|
||||
* This object is a manager which offers requests to start capturing from a
|
||||
* source.
|
||||
*/
|
||||
extern const struct wl_interface zwlr_screencopy_manager_v1_interface;
|
||||
#endif
|
||||
#ifndef ZWLR_SCREENCOPY_FRAME_V1_INTERFACE
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_INTERFACE
|
||||
/**
|
||||
* @page page_iface_zwlr_screencopy_frame_v1 zwlr_screencopy_frame_v1
|
||||
* @section page_iface_zwlr_screencopy_frame_v1_desc Description
|
||||
*
|
||||
* This object represents a single frame.
|
||||
*
|
||||
* When created, a series of buffer events will be sent, each representing a
|
||||
* supported buffer type. The "buffer_done" event is sent afterwards to
|
||||
* indicate that all supported buffer types have been enumerated. The client
|
||||
* will then be able to send a "copy" request. If the capture is successful,
|
||||
* the compositor will send a "flags" followed by a "ready" event.
|
||||
*
|
||||
* For objects version 2 or lower, wl_shm buffers are always supported, ie.
|
||||
* the "buffer" event is guaranteed to be sent.
|
||||
*
|
||||
* If the capture failed, the "failed" event is sent. This can happen anytime
|
||||
* before the "ready" event.
|
||||
*
|
||||
* Once either a "ready" or a "failed" event is received, the client should
|
||||
* destroy the frame.
|
||||
* @section page_iface_zwlr_screencopy_frame_v1_api API
|
||||
* See @ref iface_zwlr_screencopy_frame_v1.
|
||||
*/
|
||||
/**
|
||||
* @defgroup iface_zwlr_screencopy_frame_v1 The zwlr_screencopy_frame_v1 interface
|
||||
*
|
||||
* This object represents a single frame.
|
||||
*
|
||||
* When created, a series of buffer events will be sent, each representing a
|
||||
* supported buffer type. The "buffer_done" event is sent afterwards to
|
||||
* indicate that all supported buffer types have been enumerated. The client
|
||||
* will then be able to send a "copy" request. If the capture is successful,
|
||||
* the compositor will send a "flags" followed by a "ready" event.
|
||||
*
|
||||
* For objects version 2 or lower, wl_shm buffers are always supported, ie.
|
||||
* the "buffer" event is guaranteed to be sent.
|
||||
*
|
||||
* If the capture failed, the "failed" event is sent. This can happen anytime
|
||||
* before the "ready" event.
|
||||
*
|
||||
* Once either a "ready" or a "failed" event is received, the client should
|
||||
* destroy the frame.
|
||||
*/
|
||||
extern const struct wl_interface zwlr_screencopy_frame_v1_interface;
|
||||
#endif
|
||||
|
||||
#define ZWLR_SCREENCOPY_MANAGER_V1_CAPTURE_OUTPUT 0
|
||||
#define ZWLR_SCREENCOPY_MANAGER_V1_CAPTURE_OUTPUT_REGION 1
|
||||
#define ZWLR_SCREENCOPY_MANAGER_V1_DESTROY 2
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_manager_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_MANAGER_V1_CAPTURE_OUTPUT_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_manager_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_MANAGER_V1_CAPTURE_OUTPUT_REGION_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_manager_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_MANAGER_V1_DESTROY_SINCE_VERSION 1
|
||||
|
||||
/** @ingroup iface_zwlr_screencopy_manager_v1 */
|
||||
static inline void
|
||||
zwlr_screencopy_manager_v1_set_user_data(struct zwlr_screencopy_manager_v1 *zwlr_screencopy_manager_v1, void *user_data)
|
||||
{
|
||||
wl_proxy_set_user_data((struct wl_proxy *) zwlr_screencopy_manager_v1, user_data);
|
||||
}
|
||||
|
||||
/** @ingroup iface_zwlr_screencopy_manager_v1 */
|
||||
static inline void *
|
||||
zwlr_screencopy_manager_v1_get_user_data(struct zwlr_screencopy_manager_v1 *zwlr_screencopy_manager_v1)
|
||||
{
|
||||
return wl_proxy_get_user_data((struct wl_proxy *) zwlr_screencopy_manager_v1);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
zwlr_screencopy_manager_v1_get_version(struct zwlr_screencopy_manager_v1 *zwlr_screencopy_manager_v1)
|
||||
{
|
||||
return wl_proxy_get_version((struct wl_proxy *) zwlr_screencopy_manager_v1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_manager_v1
|
||||
*
|
||||
* Capture the next frame of an entire output.
|
||||
*/
|
||||
static inline struct zwlr_screencopy_frame_v1 *
|
||||
zwlr_screencopy_manager_v1_capture_output(struct zwlr_screencopy_manager_v1 *zwlr_screencopy_manager_v1, int32_t overlay_cursor, struct wl_output *output)
|
||||
{
|
||||
struct wl_proxy *frame;
|
||||
|
||||
frame = wl_proxy_marshal_flags((struct wl_proxy *) zwlr_screencopy_manager_v1,
|
||||
ZWLR_SCREENCOPY_MANAGER_V1_CAPTURE_OUTPUT, &zwlr_screencopy_frame_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwlr_screencopy_manager_v1), 0, NULL, overlay_cursor, output);
|
||||
|
||||
return (struct zwlr_screencopy_frame_v1 *) frame;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_manager_v1
|
||||
*
|
||||
* Capture the next frame of an output's region.
|
||||
*
|
||||
* The region is given in output logical coordinates, see
|
||||
* xdg_output.logical_size. The region will be clipped to the output's
|
||||
* extents.
|
||||
*/
|
||||
static inline struct zwlr_screencopy_frame_v1 *
|
||||
zwlr_screencopy_manager_v1_capture_output_region(struct zwlr_screencopy_manager_v1 *zwlr_screencopy_manager_v1, int32_t overlay_cursor, struct wl_output *output, int32_t x, int32_t y, int32_t width, int32_t height)
|
||||
{
|
||||
struct wl_proxy *frame;
|
||||
|
||||
frame = wl_proxy_marshal_flags((struct wl_proxy *) zwlr_screencopy_manager_v1,
|
||||
ZWLR_SCREENCOPY_MANAGER_V1_CAPTURE_OUTPUT_REGION, &zwlr_screencopy_frame_v1_interface, wl_proxy_get_version((struct wl_proxy *) zwlr_screencopy_manager_v1), 0, NULL, overlay_cursor, output, x, y, width, height);
|
||||
|
||||
return (struct zwlr_screencopy_frame_v1 *) frame;
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_manager_v1
|
||||
*
|
||||
* All objects created by the manager will still remain valid, until their
|
||||
* appropriate destroy request has been called.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_screencopy_manager_v1_destroy(struct zwlr_screencopy_manager_v1 *zwlr_screencopy_manager_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_screencopy_manager_v1,
|
||||
ZWLR_SCREENCOPY_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_screencopy_manager_v1), WL_MARSHAL_FLAG_DESTROY);
|
||||
}
|
||||
|
||||
#ifndef ZWLR_SCREENCOPY_FRAME_V1_ERROR_ENUM
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_ERROR_ENUM
|
||||
enum zwlr_screencopy_frame_v1_error {
|
||||
/**
|
||||
* the object has already been used to copy a wl_buffer
|
||||
*/
|
||||
ZWLR_SCREENCOPY_FRAME_V1_ERROR_ALREADY_USED = 0,
|
||||
/**
|
||||
* buffer attributes are invalid
|
||||
*/
|
||||
ZWLR_SCREENCOPY_FRAME_V1_ERROR_INVALID_BUFFER = 1,
|
||||
};
|
||||
#endif /* ZWLR_SCREENCOPY_FRAME_V1_ERROR_ENUM */
|
||||
|
||||
#ifndef ZWLR_SCREENCOPY_FRAME_V1_FLAGS_ENUM
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_FLAGS_ENUM
|
||||
enum zwlr_screencopy_frame_v1_flags {
|
||||
/**
|
||||
* contents are y-inverted
|
||||
*/
|
||||
ZWLR_SCREENCOPY_FRAME_V1_FLAGS_Y_INVERT = 1,
|
||||
};
|
||||
#endif /* ZWLR_SCREENCOPY_FRAME_V1_FLAGS_ENUM */
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
* @struct zwlr_screencopy_frame_v1_listener
|
||||
*/
|
||||
struct zwlr_screencopy_frame_v1_listener {
|
||||
/**
|
||||
* wl_shm buffer information
|
||||
*
|
||||
* Provides information about wl_shm buffer parameters that need
|
||||
* to be used for this frame. This event is sent once after the
|
||||
* frame is created if wl_shm buffers are supported.
|
||||
* @param format buffer format
|
||||
* @param width buffer width
|
||||
* @param height buffer height
|
||||
* @param stride buffer stride
|
||||
*/
|
||||
void (*buffer)(void *data,
|
||||
struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1,
|
||||
uint32_t format,
|
||||
uint32_t width,
|
||||
uint32_t height,
|
||||
uint32_t stride);
|
||||
/**
|
||||
* frame flags
|
||||
*
|
||||
* Provides flags about the frame. This event is sent once before
|
||||
* the "ready" event.
|
||||
* @param flags frame flags
|
||||
*/
|
||||
void (*flags)(void *data,
|
||||
struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1,
|
||||
uint32_t flags);
|
||||
/**
|
||||
* indicates frame is available for reading
|
||||
*
|
||||
* Called as soon as the frame is copied, indicating it is
|
||||
* available for reading. This event includes the time at which
|
||||
* presentation happened at.
|
||||
*
|
||||
* The timestamp is expressed as tv_sec_hi, tv_sec_lo, tv_nsec
|
||||
* triples, each component being an unsigned 32-bit value. Whole
|
||||
* seconds are in tv_sec which is a 64-bit value combined from
|
||||
* tv_sec_hi and tv_sec_lo, and the additional fractional part in
|
||||
* tv_nsec as nanoseconds. Hence, for valid timestamps tv_nsec must
|
||||
* be in [0, 999999999]. The seconds part may have an arbitrary
|
||||
* offset at start.
|
||||
*
|
||||
* After receiving this event, the client should destroy the
|
||||
* object.
|
||||
* @param tv_sec_hi high 32 bits of the seconds part of the timestamp
|
||||
* @param tv_sec_lo low 32 bits of the seconds part of the timestamp
|
||||
* @param tv_nsec nanoseconds part of the timestamp
|
||||
*/
|
||||
void (*ready)(void *data,
|
||||
struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1,
|
||||
uint32_t tv_sec_hi,
|
||||
uint32_t tv_sec_lo,
|
||||
uint32_t tv_nsec);
|
||||
/**
|
||||
* frame copy failed
|
||||
*
|
||||
* This event indicates that the attempted frame copy has failed.
|
||||
*
|
||||
* After receiving this event, the client should destroy the
|
||||
* object.
|
||||
*/
|
||||
void (*failed)(void *data,
|
||||
struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1);
|
||||
/**
|
||||
* carries the coordinates of the damaged region
|
||||
*
|
||||
* This event is sent right before the ready event when
|
||||
* copy_with_damage is requested. It may be generated multiple
|
||||
* times for each copy_with_damage request.
|
||||
*
|
||||
* The arguments describe a box around an area that has changed
|
||||
* since the last copy request that was derived from the current
|
||||
* screencopy manager instance.
|
||||
*
|
||||
* The union of all regions received between the call to
|
||||
* copy_with_damage and a ready event is the total damage since the
|
||||
* prior ready event.
|
||||
* @param x damaged x coordinates
|
||||
* @param y damaged y coordinates
|
||||
* @param width current width
|
||||
* @param height current height
|
||||
* @since 2
|
||||
*/
|
||||
void (*damage)(void *data,
|
||||
struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1,
|
||||
uint32_t x,
|
||||
uint32_t y,
|
||||
uint32_t width,
|
||||
uint32_t height);
|
||||
/**
|
||||
* linux-dmabuf buffer information
|
||||
*
|
||||
* Provides information about linux-dmabuf buffer parameters that
|
||||
* need to be used for this frame. This event is sent once after
|
||||
* the frame is created if linux-dmabuf buffers are supported.
|
||||
* @param format fourcc pixel format
|
||||
* @param width buffer width
|
||||
* @param height buffer height
|
||||
* @since 3
|
||||
*/
|
||||
void (*linux_dmabuf)(void *data,
|
||||
struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1,
|
||||
uint32_t format,
|
||||
uint32_t width,
|
||||
uint32_t height);
|
||||
/**
|
||||
* all buffer types reported
|
||||
*
|
||||
* This event is sent once after all buffer events have been
|
||||
* sent.
|
||||
*
|
||||
* The client should proceed to create a buffer of one of the
|
||||
* supported types, and send a "copy" request.
|
||||
* @since 3
|
||||
*/
|
||||
void (*buffer_done)(void *data,
|
||||
struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1);
|
||||
};
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*/
|
||||
static inline int
|
||||
zwlr_screencopy_frame_v1_add_listener(struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1,
|
||||
const struct zwlr_screencopy_frame_v1_listener *listener, void *data)
|
||||
{
|
||||
return wl_proxy_add_listener((struct wl_proxy *) zwlr_screencopy_frame_v1,
|
||||
(void (**)(void)) listener, data);
|
||||
}
|
||||
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_COPY 0
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_DESTROY 1
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_COPY_WITH_DAMAGE 2
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_BUFFER_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_FLAGS_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_READY_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_FAILED_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_DAMAGE_SINCE_VERSION 2
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_LINUX_DMABUF_SINCE_VERSION 3
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_BUFFER_DONE_SINCE_VERSION 3
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_COPY_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_DESTROY_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*/
|
||||
#define ZWLR_SCREENCOPY_FRAME_V1_COPY_WITH_DAMAGE_SINCE_VERSION 2
|
||||
|
||||
/** @ingroup iface_zwlr_screencopy_frame_v1 */
|
||||
static inline void
|
||||
zwlr_screencopy_frame_v1_set_user_data(struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1, void *user_data)
|
||||
{
|
||||
wl_proxy_set_user_data((struct wl_proxy *) zwlr_screencopy_frame_v1, user_data);
|
||||
}
|
||||
|
||||
/** @ingroup iface_zwlr_screencopy_frame_v1 */
|
||||
static inline void *
|
||||
zwlr_screencopy_frame_v1_get_user_data(struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1)
|
||||
{
|
||||
return wl_proxy_get_user_data((struct wl_proxy *) zwlr_screencopy_frame_v1);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
zwlr_screencopy_frame_v1_get_version(struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1)
|
||||
{
|
||||
return wl_proxy_get_version((struct wl_proxy *) zwlr_screencopy_frame_v1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*
|
||||
* Copy the frame to the supplied buffer. The buffer must have a the
|
||||
* correct size, see zwlr_screencopy_frame_v1.buffer and
|
||||
* zwlr_screencopy_frame_v1.linux_dmabuf. The buffer needs to have a
|
||||
* supported format.
|
||||
*
|
||||
* If the frame is successfully copied, a "flags" and a "ready" events are
|
||||
* sent. Otherwise, a "failed" event is sent.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_screencopy_frame_v1_copy(struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1, struct wl_buffer *buffer)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_screencopy_frame_v1,
|
||||
ZWLR_SCREENCOPY_FRAME_V1_COPY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_screencopy_frame_v1), 0, buffer);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*
|
||||
* Destroys the frame. This request can be sent at any time by the client.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_screencopy_frame_v1_destroy(struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_screencopy_frame_v1,
|
||||
ZWLR_SCREENCOPY_FRAME_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_screencopy_frame_v1), WL_MARSHAL_FLAG_DESTROY);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_zwlr_screencopy_frame_v1
|
||||
*
|
||||
* Same as copy, except it waits until there is damage to copy.
|
||||
*/
|
||||
static inline void
|
||||
zwlr_screencopy_frame_v1_copy_with_damage(struct zwlr_screencopy_frame_v1 *zwlr_screencopy_frame_v1, struct wl_buffer *buffer)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) zwlr_screencopy_frame_v1,
|
||||
ZWLR_SCREENCOPY_FRAME_V1_COPY_WITH_DAMAGE, NULL, wl_proxy_get_version((struct wl_proxy *) zwlr_screencopy_frame_v1), 0, buffer);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
Loading…
Reference in a new issue