Implement new window dragging system
This commit is contained in:
2
Source/ThirdParty/Wayland/Wayland.Build.cs
vendored
2
Source/ThirdParty/Wayland/Wayland.Build.cs
vendored
@@ -32,6 +32,6 @@ public class Wayland : ThirdPartyModule
|
||||
|
||||
// Include generated protocol files for dependency
|
||||
options.PublicIncludePaths.Add(Path.Combine(FolderPath, "include"));
|
||||
options.SourceFiles.AddRange(Directory.GetFiles(FolderPath, "*.cpp", SearchOption.TopDirectoryOnly));
|
||||
options.SourceFiles.AddRange(Directory.GetFiles(FolderPath, "*.c", SearchOption.TopDirectoryOnly));
|
||||
}
|
||||
}
|
||||
|
||||
2325
Source/ThirdParty/Wayland/include/wayland/xdg-shell.h
vendored
Normal file
2325
Source/ThirdParty/Wayland/include/wayland/xdg-shell.h
vendored
Normal file
File diff suppressed because it is too large
Load Diff
320
Source/ThirdParty/Wayland/include/wayland/xdg-toplevel-drag-v1.h
vendored
Normal file
320
Source/ThirdParty/Wayland/include/wayland/xdg-toplevel-drag-v1.h
vendored
Normal file
@@ -0,0 +1,320 @@
|
||||
/* Generated by wayland-scanner 1.23.1 */
|
||||
|
||||
#ifndef XDG_TOPLEVEL_DRAG_V1_CLIENT_PROTOCOL_H
|
||||
#define XDG_TOPLEVEL_DRAG_V1_CLIENT_PROTOCOL_H
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
#include "wayland-client.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @page page_xdg_toplevel_drag_v1 The xdg_toplevel_drag_v1 protocol
|
||||
* @section page_ifaces_xdg_toplevel_drag_v1 Interfaces
|
||||
* - @subpage page_iface_xdg_toplevel_drag_manager_v1 - Move a window during a drag
|
||||
* - @subpage page_iface_xdg_toplevel_drag_v1 - Object representing a toplevel move during a drag
|
||||
* @section page_copyright_xdg_toplevel_drag_v1 Copyright
|
||||
* <pre>
|
||||
*
|
||||
* Copyright 2023 David Redondo
|
||||
*
|
||||
* 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_data_source;
|
||||
struct xdg_toplevel;
|
||||
struct xdg_toplevel_drag_manager_v1;
|
||||
struct xdg_toplevel_drag_v1;
|
||||
|
||||
#ifndef XDG_TOPLEVEL_DRAG_MANAGER_V1_INTERFACE
|
||||
#define XDG_TOPLEVEL_DRAG_MANAGER_V1_INTERFACE
|
||||
/**
|
||||
* @page page_iface_xdg_toplevel_drag_manager_v1 xdg_toplevel_drag_manager_v1
|
||||
* @section page_iface_xdg_toplevel_drag_manager_v1_desc Description
|
||||
*
|
||||
* This protocol enhances normal drag and drop with the ability to move a
|
||||
* window at the same time. This allows having detachable parts of a window
|
||||
* that when dragged out of it become a new window and can be dragged over
|
||||
* an existing window to be reattached.
|
||||
*
|
||||
* A typical workflow would be when the user starts dragging on top of a
|
||||
* detachable part of a window, the client would create a wl_data_source and
|
||||
* a xdg_toplevel_drag_v1 object and start the drag as normal via
|
||||
* wl_data_device.start_drag. Once the client determines that the detachable
|
||||
* window contents should be detached from the originating window, it creates
|
||||
* a new xdg_toplevel with these contents and issues a
|
||||
* xdg_toplevel_drag_v1.attach request before mapping it. From now on the new
|
||||
* window is moved by the compositor during the drag as if the client called
|
||||
* xdg_toplevel.move.
|
||||
*
|
||||
* Dragging an existing window is similar. The client creates a
|
||||
* xdg_toplevel_drag_v1 object and attaches the existing toplevel before
|
||||
* starting the drag.
|
||||
*
|
||||
* Clients use the existing drag and drop mechanism to detect when a window
|
||||
* can be docked or undocked. If the client wants to snap a window into a
|
||||
* parent window it should delete or unmap the dragged top-level. If the
|
||||
* contents should be detached again it attaches a new toplevel as described
|
||||
* above. If a drag operation is cancelled without being dropped, clients
|
||||
* should revert to the previous state, deleting any newly created windows
|
||||
* as appropriate. When a drag operation ends as indicated by
|
||||
* wl_data_source.dnd_drop_performed the dragged toplevel window's final
|
||||
* position is determined as if a xdg_toplevel_move operation ended.
|
||||
*
|
||||
* Warning! The protocol described in this file is currently in the testing
|
||||
* phase. Backward compatible changes may be added together with the
|
||||
* corresponding interface version bump. Backward incompatible changes can
|
||||
* only be done by creating a new major version of the extension.
|
||||
* @section page_iface_xdg_toplevel_drag_manager_v1_api API
|
||||
* See @ref iface_xdg_toplevel_drag_manager_v1.
|
||||
*/
|
||||
/**
|
||||
* @defgroup iface_xdg_toplevel_drag_manager_v1 The xdg_toplevel_drag_manager_v1 interface
|
||||
*
|
||||
* This protocol enhances normal drag and drop with the ability to move a
|
||||
* window at the same time. This allows having detachable parts of a window
|
||||
* that when dragged out of it become a new window and can be dragged over
|
||||
* an existing window to be reattached.
|
||||
*
|
||||
* A typical workflow would be when the user starts dragging on top of a
|
||||
* detachable part of a window, the client would create a wl_data_source and
|
||||
* a xdg_toplevel_drag_v1 object and start the drag as normal via
|
||||
* wl_data_device.start_drag. Once the client determines that the detachable
|
||||
* window contents should be detached from the originating window, it creates
|
||||
* a new xdg_toplevel with these contents and issues a
|
||||
* xdg_toplevel_drag_v1.attach request before mapping it. From now on the new
|
||||
* window is moved by the compositor during the drag as if the client called
|
||||
* xdg_toplevel.move.
|
||||
*
|
||||
* Dragging an existing window is similar. The client creates a
|
||||
* xdg_toplevel_drag_v1 object and attaches the existing toplevel before
|
||||
* starting the drag.
|
||||
*
|
||||
* Clients use the existing drag and drop mechanism to detect when a window
|
||||
* can be docked or undocked. If the client wants to snap a window into a
|
||||
* parent window it should delete or unmap the dragged top-level. If the
|
||||
* contents should be detached again it attaches a new toplevel as described
|
||||
* above. If a drag operation is cancelled without being dropped, clients
|
||||
* should revert to the previous state, deleting any newly created windows
|
||||
* as appropriate. When a drag operation ends as indicated by
|
||||
* wl_data_source.dnd_drop_performed the dragged toplevel window's final
|
||||
* position is determined as if a xdg_toplevel_move operation ended.
|
||||
*
|
||||
* Warning! The protocol described in this file is currently in the testing
|
||||
* phase. Backward compatible changes may be added together with the
|
||||
* corresponding interface version bump. Backward incompatible changes can
|
||||
* only be done by creating a new major version of the extension.
|
||||
*/
|
||||
extern const struct wl_interface xdg_toplevel_drag_manager_v1_interface;
|
||||
#endif
|
||||
#ifndef XDG_TOPLEVEL_DRAG_V1_INTERFACE
|
||||
#define XDG_TOPLEVEL_DRAG_V1_INTERFACE
|
||||
/**
|
||||
* @page page_iface_xdg_toplevel_drag_v1 xdg_toplevel_drag_v1
|
||||
* @section page_iface_xdg_toplevel_drag_v1_desc Description
|
||||
*
|
||||
* @section page_iface_xdg_toplevel_drag_v1_api API
|
||||
* See @ref iface_xdg_toplevel_drag_v1.
|
||||
*/
|
||||
/**
|
||||
* @defgroup iface_xdg_toplevel_drag_v1 The xdg_toplevel_drag_v1 interface
|
||||
*
|
||||
*/
|
||||
extern const struct wl_interface xdg_toplevel_drag_v1_interface;
|
||||
#endif
|
||||
|
||||
#ifndef XDG_TOPLEVEL_DRAG_MANAGER_V1_ERROR_ENUM
|
||||
#define XDG_TOPLEVEL_DRAG_MANAGER_V1_ERROR_ENUM
|
||||
enum xdg_toplevel_drag_manager_v1_error {
|
||||
/**
|
||||
* data_source already used for toplevel drag
|
||||
*/
|
||||
XDG_TOPLEVEL_DRAG_MANAGER_V1_ERROR_INVALID_SOURCE = 0,
|
||||
};
|
||||
#endif /* XDG_TOPLEVEL_DRAG_MANAGER_V1_ERROR_ENUM */
|
||||
|
||||
#define XDG_TOPLEVEL_DRAG_MANAGER_V1_DESTROY 0
|
||||
#define XDG_TOPLEVEL_DRAG_MANAGER_V1_GET_XDG_TOPLEVEL_DRAG 1
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup iface_xdg_toplevel_drag_manager_v1
|
||||
*/
|
||||
#define XDG_TOPLEVEL_DRAG_MANAGER_V1_DESTROY_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_xdg_toplevel_drag_manager_v1
|
||||
*/
|
||||
#define XDG_TOPLEVEL_DRAG_MANAGER_V1_GET_XDG_TOPLEVEL_DRAG_SINCE_VERSION 1
|
||||
|
||||
/** @ingroup iface_xdg_toplevel_drag_manager_v1 */
|
||||
static inline void
|
||||
xdg_toplevel_drag_manager_v1_set_user_data(struct xdg_toplevel_drag_manager_v1 *xdg_toplevel_drag_manager_v1, void *user_data)
|
||||
{
|
||||
wl_proxy_set_user_data((struct wl_proxy *) xdg_toplevel_drag_manager_v1, user_data);
|
||||
}
|
||||
|
||||
/** @ingroup iface_xdg_toplevel_drag_manager_v1 */
|
||||
static inline void *
|
||||
xdg_toplevel_drag_manager_v1_get_user_data(struct xdg_toplevel_drag_manager_v1 *xdg_toplevel_drag_manager_v1)
|
||||
{
|
||||
return wl_proxy_get_user_data((struct wl_proxy *) xdg_toplevel_drag_manager_v1);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
xdg_toplevel_drag_manager_v1_get_version(struct xdg_toplevel_drag_manager_v1 *xdg_toplevel_drag_manager_v1)
|
||||
{
|
||||
return wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_drag_manager_v1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_xdg_toplevel_drag_manager_v1
|
||||
*
|
||||
* Destroy this xdg_toplevel_drag_manager_v1 object. Other objects,
|
||||
* including xdg_toplevel_drag_v1 objects created by this factory, are not
|
||||
* affected by this request.
|
||||
*/
|
||||
static inline void
|
||||
xdg_toplevel_drag_manager_v1_destroy(struct xdg_toplevel_drag_manager_v1 *xdg_toplevel_drag_manager_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_drag_manager_v1,
|
||||
XDG_TOPLEVEL_DRAG_MANAGER_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_drag_manager_v1), WL_MARSHAL_FLAG_DESTROY);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_xdg_toplevel_drag_manager_v1
|
||||
*
|
||||
* Create an xdg_toplevel_drag for a drag and drop operation that is going
|
||||
* to be started with data_source.
|
||||
*
|
||||
* This request can only be made on sources used in drag-and-drop, so it
|
||||
* must be performed before wl_data_device.start_drag. Attempting to use
|
||||
* the source other than for drag-and-drop such as in
|
||||
* wl_data_device.set_selection will raise an invalid_source error.
|
||||
*
|
||||
* Destroying data_source while a toplevel is attached to the
|
||||
* xdg_toplevel_drag is undefined.
|
||||
*/
|
||||
static inline struct xdg_toplevel_drag_v1 *
|
||||
xdg_toplevel_drag_manager_v1_get_xdg_toplevel_drag(struct xdg_toplevel_drag_manager_v1 *xdg_toplevel_drag_manager_v1, struct wl_data_source *data_source)
|
||||
{
|
||||
struct wl_proxy *id;
|
||||
|
||||
id = wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_drag_manager_v1,
|
||||
XDG_TOPLEVEL_DRAG_MANAGER_V1_GET_XDG_TOPLEVEL_DRAG, &xdg_toplevel_drag_v1_interface, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_drag_manager_v1), 0, NULL, data_source);
|
||||
|
||||
return (struct xdg_toplevel_drag_v1 *) id;
|
||||
}
|
||||
|
||||
#ifndef XDG_TOPLEVEL_DRAG_V1_ERROR_ENUM
|
||||
#define XDG_TOPLEVEL_DRAG_V1_ERROR_ENUM
|
||||
enum xdg_toplevel_drag_v1_error {
|
||||
/**
|
||||
* valid toplevel already attached
|
||||
*/
|
||||
XDG_TOPLEVEL_DRAG_V1_ERROR_TOPLEVEL_ATTACHED = 0,
|
||||
/**
|
||||
* drag has not ended
|
||||
*/
|
||||
XDG_TOPLEVEL_DRAG_V1_ERROR_ONGOING_DRAG = 1,
|
||||
};
|
||||
#endif /* XDG_TOPLEVEL_DRAG_V1_ERROR_ENUM */
|
||||
|
||||
#define XDG_TOPLEVEL_DRAG_V1_DESTROY 0
|
||||
#define XDG_TOPLEVEL_DRAG_V1_ATTACH 1
|
||||
|
||||
|
||||
/**
|
||||
* @ingroup iface_xdg_toplevel_drag_v1
|
||||
*/
|
||||
#define XDG_TOPLEVEL_DRAG_V1_DESTROY_SINCE_VERSION 1
|
||||
/**
|
||||
* @ingroup iface_xdg_toplevel_drag_v1
|
||||
*/
|
||||
#define XDG_TOPLEVEL_DRAG_V1_ATTACH_SINCE_VERSION 1
|
||||
|
||||
/** @ingroup iface_xdg_toplevel_drag_v1 */
|
||||
static inline void
|
||||
xdg_toplevel_drag_v1_set_user_data(struct xdg_toplevel_drag_v1 *xdg_toplevel_drag_v1, void *user_data)
|
||||
{
|
||||
wl_proxy_set_user_data((struct wl_proxy *) xdg_toplevel_drag_v1, user_data);
|
||||
}
|
||||
|
||||
/** @ingroup iface_xdg_toplevel_drag_v1 */
|
||||
static inline void *
|
||||
xdg_toplevel_drag_v1_get_user_data(struct xdg_toplevel_drag_v1 *xdg_toplevel_drag_v1)
|
||||
{
|
||||
return wl_proxy_get_user_data((struct wl_proxy *) xdg_toplevel_drag_v1);
|
||||
}
|
||||
|
||||
static inline uint32_t
|
||||
xdg_toplevel_drag_v1_get_version(struct xdg_toplevel_drag_v1 *xdg_toplevel_drag_v1)
|
||||
{
|
||||
return wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_drag_v1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_xdg_toplevel_drag_v1
|
||||
*
|
||||
* Destroy this xdg_toplevel_drag_v1 object. This request must only be
|
||||
* called after the underlying wl_data_source drag has ended, as indicated
|
||||
* by the dnd_drop_performed or cancelled events. In any other case an
|
||||
* ongoing_drag error is raised.
|
||||
*/
|
||||
static inline void
|
||||
xdg_toplevel_drag_v1_destroy(struct xdg_toplevel_drag_v1 *xdg_toplevel_drag_v1)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_drag_v1,
|
||||
XDG_TOPLEVEL_DRAG_V1_DESTROY, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_drag_v1), WL_MARSHAL_FLAG_DESTROY);
|
||||
}
|
||||
|
||||
/**
|
||||
* @ingroup iface_xdg_toplevel_drag_v1
|
||||
*
|
||||
* Request that the window will be moved with the cursor during the drag
|
||||
* operation. The offset is a hint to the compositor how the toplevel
|
||||
* should be positioned relative to the cursor hotspot in surface local
|
||||
* coordinates and relative to the geometry of the toplevel being attached.
|
||||
* See xdg_surface.set_window_geometry. For example it might only
|
||||
* be used when an unmapped window is attached. The attached window
|
||||
* does not participate in the selection of the drag target.
|
||||
*
|
||||
* If the toplevel is unmapped while it is attached, it is automatically
|
||||
* detached from the drag. In this case this request has to be called again
|
||||
* if the window should be attached after it is remapped.
|
||||
*
|
||||
* This request can be called multiple times but issuing it while a
|
||||
* toplevel with an active role is attached raises a toplevel_attached
|
||||
* error.
|
||||
*/
|
||||
static inline void
|
||||
xdg_toplevel_drag_v1_attach(struct xdg_toplevel_drag_v1 *xdg_toplevel_drag_v1, struct xdg_toplevel *toplevel, int32_t x_offset, int32_t y_offset)
|
||||
{
|
||||
wl_proxy_marshal_flags((struct wl_proxy *) xdg_toplevel_drag_v1,
|
||||
XDG_TOPLEVEL_DRAG_V1_ATTACH, NULL, wl_proxy_get_version((struct wl_proxy *) xdg_toplevel_drag_v1), 0, toplevel, x_offset, y_offset);
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
1383
Source/ThirdParty/Wayland/protocols/xdg-shell.xml
vendored
Normal file
1383
Source/ThirdParty/Wayland/protocols/xdg-shell.xml
vendored
Normal file
File diff suppressed because it is too large
Load Diff
142
Source/ThirdParty/Wayland/protocols/xdg-toplevel-drag-v1.xml
vendored
Normal file
142
Source/ThirdParty/Wayland/protocols/xdg-toplevel-drag-v1.xml
vendored
Normal file
@@ -0,0 +1,142 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<protocol name="xdg_toplevel_drag_v1">
|
||||
|
||||
<copyright>
|
||||
Copyright 2023 David Redondo
|
||||
|
||||
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.
|
||||
</copyright>
|
||||
|
||||
<interface name="xdg_toplevel_drag_manager_v1" version="1">
|
||||
<description summary="Move a window during a drag">
|
||||
This protocol enhances normal drag and drop with the ability to move a
|
||||
window at the same time. This allows having detachable parts of a window
|
||||
that when dragged out of it become a new window and can be dragged over
|
||||
an existing window to be reattached.
|
||||
|
||||
A typical workflow would be when the user starts dragging on top of a
|
||||
detachable part of a window, the client would create a wl_data_source and
|
||||
a xdg_toplevel_drag_v1 object and start the drag as normal via
|
||||
wl_data_device.start_drag. Once the client determines that the detachable
|
||||
window contents should be detached from the originating window, it creates
|
||||
a new xdg_toplevel with these contents and issues a
|
||||
xdg_toplevel_drag_v1.attach request before mapping it. From now on the new
|
||||
window is moved by the compositor during the drag as if the client called
|
||||
xdg_toplevel.move.
|
||||
|
||||
Dragging an existing window is similar. The client creates a
|
||||
xdg_toplevel_drag_v1 object and attaches the existing toplevel before
|
||||
starting the drag.
|
||||
|
||||
Clients use the existing drag and drop mechanism to detect when a window
|
||||
can be docked or undocked. If the client wants to snap a window into a
|
||||
parent window it should delete or unmap the dragged top-level. If the
|
||||
contents should be detached again it attaches a new toplevel as described
|
||||
above. If a drag operation is cancelled without being dropped, clients
|
||||
should revert to the previous state, deleting any newly created windows
|
||||
as appropriate. When a drag operation ends as indicated by
|
||||
wl_data_source.dnd_drop_performed the dragged toplevel window's final
|
||||
position is determined as if a xdg_toplevel_move operation ended.
|
||||
|
||||
Warning! The protocol described in this file is currently in the testing
|
||||
phase. Backward compatible changes may be added together with the
|
||||
corresponding interface version bump. Backward incompatible changes can
|
||||
only be done by creating a new major version of the extension.
|
||||
</description>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="invalid_source" value="0"
|
||||
summary="data_source already used for toplevel drag"/>
|
||||
</enum>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy the xdg_toplevel_drag_manager_v1 object">
|
||||
Destroy this xdg_toplevel_drag_manager_v1 object. Other objects,
|
||||
including xdg_toplevel_drag_v1 objects created by this factory, are not
|
||||
affected by this request.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="get_xdg_toplevel_drag">
|
||||
<description summary="get an xdg_toplevel_drag for a wl_data_source">
|
||||
Create an xdg_toplevel_drag for a drag and drop operation that is going
|
||||
to be started with data_source.
|
||||
|
||||
This request can only be made on sources used in drag-and-drop, so it
|
||||
must be performed before wl_data_device.start_drag. Attempting to use
|
||||
the source other than for drag-and-drop such as in
|
||||
wl_data_device.set_selection will raise an invalid_source error.
|
||||
|
||||
Destroying data_source while a toplevel is attached to the
|
||||
xdg_toplevel_drag is undefined.
|
||||
</description>
|
||||
|
||||
<arg name="id" type="new_id" interface="xdg_toplevel_drag_v1"/>
|
||||
<arg name="data_source" type="object" interface="wl_data_source"/>
|
||||
</request>
|
||||
</interface>
|
||||
|
||||
<interface name="xdg_toplevel_drag_v1" version="1">
|
||||
<description summary="Object representing a toplevel move during a drag">
|
||||
</description>
|
||||
|
||||
<enum name="error">
|
||||
<entry name="toplevel_attached" value="0"
|
||||
summary="valid toplevel already attached"/>
|
||||
<entry name="ongoing_drag" value="1"
|
||||
summary="drag has not ended" />
|
||||
</enum>
|
||||
|
||||
<request name="destroy" type="destructor">
|
||||
<description summary="destroy an xdg_toplevel_drag_v1 object">
|
||||
Destroy this xdg_toplevel_drag_v1 object. This request must only be
|
||||
called after the underlying wl_data_source drag has ended, as indicated
|
||||
by the dnd_drop_performed or cancelled events. In any other case an
|
||||
ongoing_drag error is raised.
|
||||
</description>
|
||||
</request>
|
||||
|
||||
<request name="attach">
|
||||
<description summary="Move a toplevel with the drag operation">
|
||||
Request that the window will be moved with the cursor during the drag
|
||||
operation. The offset is a hint to the compositor how the toplevel
|
||||
should be positioned relative to the cursor hotspot in surface local
|
||||
coordinates and relative to the geometry of the toplevel being attached.
|
||||
See xdg_surface.set_window_geometry. For example it might only
|
||||
be used when an unmapped window is attached. The attached window
|
||||
does not participate in the selection of the drag target.
|
||||
|
||||
If the toplevel is unmapped while it is attached, it is automatically
|
||||
detached from the drag. In this case this request has to be called again
|
||||
if the window should be attached after it is remapped.
|
||||
|
||||
This request can be called multiple times but issuing it while a
|
||||
toplevel with an active role is attached raises a toplevel_attached
|
||||
error.
|
||||
</description>
|
||||
|
||||
<arg name="toplevel" type="object" interface="xdg_toplevel"/>
|
||||
<arg name="x_offset" type="int" summary="dragged surface x offset"/>
|
||||
<arg name="y_offset" type="int" summary="dragged surface y offset"/>
|
||||
</request>
|
||||
|
||||
</interface>
|
||||
</protocol>
|
||||
|
||||
184
Source/ThirdParty/Wayland/xdg-shell.c
vendored
Normal file
184
Source/ThirdParty/Wayland/xdg-shell.c
vendored
Normal file
@@ -0,0 +1,184 @@
|
||||
/* Generated by wayland-scanner 1.23.1 */
|
||||
|
||||
/*
|
||||
* Copyright © 2008-2013 Kristian Høgsberg
|
||||
* Copyright © 2013 Rafael Antognolli
|
||||
* Copyright © 2013 Jasper St. Pierre
|
||||
* Copyright © 2010-2013 Intel Corporation
|
||||
* Copyright © 2015-2017 Samsung Electronics Co., Ltd
|
||||
* Copyright © 2015-2017 Red Hat Inc.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "wayland-util.h"
|
||||
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
|
||||
#endif
|
||||
|
||||
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
|
||||
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
|
||||
#else
|
||||
#define WL_PRIVATE
|
||||
#endif
|
||||
|
||||
extern const struct wl_interface wl_output_interface;
|
||||
extern const struct wl_interface wl_seat_interface;
|
||||
extern const struct wl_interface wl_surface_interface;
|
||||
extern const struct wl_interface xdg_popup_interface;
|
||||
extern const struct wl_interface xdg_positioner_interface;
|
||||
extern const struct wl_interface xdg_surface_interface;
|
||||
extern const struct wl_interface xdg_toplevel_interface;
|
||||
|
||||
static const struct wl_interface *xdg_shell_types[] = {
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&xdg_positioner_interface,
|
||||
&xdg_surface_interface,
|
||||
&wl_surface_interface,
|
||||
&xdg_toplevel_interface,
|
||||
&xdg_popup_interface,
|
||||
&xdg_surface_interface,
|
||||
&xdg_positioner_interface,
|
||||
&xdg_toplevel_interface,
|
||||
&wl_seat_interface,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL,
|
||||
&wl_seat_interface,
|
||||
NULL,
|
||||
&wl_seat_interface,
|
||||
NULL,
|
||||
NULL,
|
||||
&wl_output_interface,
|
||||
&wl_seat_interface,
|
||||
NULL,
|
||||
&xdg_positioner_interface,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const struct wl_message xdg_wm_base_requests[] = {
|
||||
{ "destroy", "", xdg_shell_types + 0 },
|
||||
{ "create_positioner", "n", xdg_shell_types + 4 },
|
||||
{ "get_xdg_surface", "no", xdg_shell_types + 5 },
|
||||
{ "pong", "u", xdg_shell_types + 0 },
|
||||
};
|
||||
|
||||
static const struct wl_message xdg_wm_base_events[] = {
|
||||
{ "ping", "u", xdg_shell_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface xdg_wm_base_interface = {
|
||||
"xdg_wm_base", 6,
|
||||
4, xdg_wm_base_requests,
|
||||
1, xdg_wm_base_events,
|
||||
};
|
||||
|
||||
static const struct wl_message xdg_positioner_requests[] = {
|
||||
{ "destroy", "", xdg_shell_types + 0 },
|
||||
{ "set_size", "ii", xdg_shell_types + 0 },
|
||||
{ "set_anchor_rect", "iiii", xdg_shell_types + 0 },
|
||||
{ "set_anchor", "u", xdg_shell_types + 0 },
|
||||
{ "set_gravity", "u", xdg_shell_types + 0 },
|
||||
{ "set_constraint_adjustment", "u", xdg_shell_types + 0 },
|
||||
{ "set_offset", "ii", xdg_shell_types + 0 },
|
||||
{ "set_reactive", "3", xdg_shell_types + 0 },
|
||||
{ "set_parent_size", "3ii", xdg_shell_types + 0 },
|
||||
{ "set_parent_configure", "3u", xdg_shell_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface xdg_positioner_interface = {
|
||||
"xdg_positioner", 6,
|
||||
10, xdg_positioner_requests,
|
||||
0, NULL,
|
||||
};
|
||||
|
||||
static const struct wl_message xdg_surface_requests[] = {
|
||||
{ "destroy", "", xdg_shell_types + 0 },
|
||||
{ "get_toplevel", "n", xdg_shell_types + 7 },
|
||||
{ "get_popup", "n?oo", xdg_shell_types + 8 },
|
||||
{ "set_window_geometry", "iiii", xdg_shell_types + 0 },
|
||||
{ "ack_configure", "u", xdg_shell_types + 0 },
|
||||
};
|
||||
|
||||
static const struct wl_message xdg_surface_events[] = {
|
||||
{ "configure", "u", xdg_shell_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface xdg_surface_interface = {
|
||||
"xdg_surface", 6,
|
||||
5, xdg_surface_requests,
|
||||
1, xdg_surface_events,
|
||||
};
|
||||
|
||||
static const struct wl_message xdg_toplevel_requests[] = {
|
||||
{ "destroy", "", xdg_shell_types + 0 },
|
||||
{ "set_parent", "?o", xdg_shell_types + 11 },
|
||||
{ "set_title", "s", xdg_shell_types + 0 },
|
||||
{ "set_app_id", "s", xdg_shell_types + 0 },
|
||||
{ "show_window_menu", "ouii", xdg_shell_types + 12 },
|
||||
{ "move", "ou", xdg_shell_types + 16 },
|
||||
{ "resize", "ouu", xdg_shell_types + 18 },
|
||||
{ "set_max_size", "ii", xdg_shell_types + 0 },
|
||||
{ "set_min_size", "ii", xdg_shell_types + 0 },
|
||||
{ "set_maximized", "", xdg_shell_types + 0 },
|
||||
{ "unset_maximized", "", xdg_shell_types + 0 },
|
||||
{ "set_fullscreen", "?o", xdg_shell_types + 21 },
|
||||
{ "unset_fullscreen", "", xdg_shell_types + 0 },
|
||||
{ "set_minimized", "", xdg_shell_types + 0 },
|
||||
};
|
||||
|
||||
static const struct wl_message xdg_toplevel_events[] = {
|
||||
{ "configure", "iia", xdg_shell_types + 0 },
|
||||
{ "close", "", xdg_shell_types + 0 },
|
||||
{ "configure_bounds", "4ii", xdg_shell_types + 0 },
|
||||
{ "wm_capabilities", "5a", xdg_shell_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface xdg_toplevel_interface = {
|
||||
"xdg_toplevel", 6,
|
||||
14, xdg_toplevel_requests,
|
||||
4, xdg_toplevel_events,
|
||||
};
|
||||
|
||||
static const struct wl_message xdg_popup_requests[] = {
|
||||
{ "destroy", "", xdg_shell_types + 0 },
|
||||
{ "grab", "ou", xdg_shell_types + 22 },
|
||||
{ "reposition", "3ou", xdg_shell_types + 24 },
|
||||
};
|
||||
|
||||
static const struct wl_message xdg_popup_events[] = {
|
||||
{ "configure", "iiii", xdg_shell_types + 0 },
|
||||
{ "popup_done", "", xdg_shell_types + 0 },
|
||||
{ "repositioned", "3u", xdg_shell_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface xdg_popup_interface = {
|
||||
"xdg_popup", 6,
|
||||
3, xdg_popup_requests,
|
||||
3, xdg_popup_events,
|
||||
};
|
||||
|
||||
74
Source/ThirdParty/Wayland/xdg-toplevel-drag-v1.c
vendored
Normal file
74
Source/ThirdParty/Wayland/xdg-toplevel-drag-v1.c
vendored
Normal file
@@ -0,0 +1,74 @@
|
||||
/* Generated by wayland-scanner 1.23.1 */
|
||||
|
||||
/*
|
||||
* Copyright 2023 David Redondo
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdint.h>
|
||||
#include "wayland-util.h"
|
||||
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0 /* Compatibility with non-clang compilers. */
|
||||
#endif
|
||||
|
||||
#if (__has_attribute(visibility) || defined(__GNUC__) && __GNUC__ >= 4)
|
||||
#define WL_PRIVATE __attribute__ ((visibility("hidden")))
|
||||
#else
|
||||
#define WL_PRIVATE
|
||||
#endif
|
||||
|
||||
extern const struct wl_interface wl_data_source_interface;
|
||||
extern const struct wl_interface xdg_toplevel_interface;
|
||||
extern const struct wl_interface xdg_toplevel_drag_v1_interface;
|
||||
|
||||
static const struct wl_interface *xdg_toplevel_drag_v1_types[] = {
|
||||
&xdg_toplevel_drag_v1_interface,
|
||||
&wl_data_source_interface,
|
||||
&xdg_toplevel_interface,
|
||||
NULL,
|
||||
NULL,
|
||||
};
|
||||
|
||||
static const struct wl_message xdg_toplevel_drag_manager_v1_requests[] = {
|
||||
{ "destroy", "", xdg_toplevel_drag_v1_types + 0 },
|
||||
{ "get_xdg_toplevel_drag", "no", xdg_toplevel_drag_v1_types + 0 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface xdg_toplevel_drag_manager_v1_interface = {
|
||||
"xdg_toplevel_drag_manager_v1", 1,
|
||||
2, xdg_toplevel_drag_manager_v1_requests,
|
||||
0, NULL,
|
||||
};
|
||||
|
||||
static const struct wl_message xdg_toplevel_drag_v1_requests[] = {
|
||||
{ "destroy", "", xdg_toplevel_drag_v1_types + 0 },
|
||||
{ "attach", "oii", xdg_toplevel_drag_v1_types + 2 },
|
||||
};
|
||||
|
||||
WL_PRIVATE const struct wl_interface xdg_toplevel_drag_v1_interface = {
|
||||
"xdg_toplevel_drag_v1", 1,
|
||||
2, xdg_toplevel_drag_v1_requests,
|
||||
0, NULL,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user