Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package python-pywlroots for openSUSE:Factory checked in at 2022-12-12 17:40:10 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-pywlroots (Old) and /work/SRC/openSUSE:Factory/.python-pywlroots.new.1835 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pywlroots" Mon Dec 12 17:40:10 2022 rev:4 rq:1042355 version:0.15.24 Changes: -------- --- /work/SRC/openSUSE:Factory/python-pywlroots/python-pywlroots.changes 2022-10-01 17:44:22.541803166 +0200 +++ /work/SRC/openSUSE:Factory/.python-pywlroots.new.1835/python-pywlroots.changes 2022-12-12 17:42:17.029990107 +0100 @@ -1,0 +2,19 @@ +Mon Dec 12 08:24:15 UTC 2022 - Michael Vetter <mvet...@suse.com> + +- Fix build: pick up a compatible verison of wlroots boo#1206305 + +------------------------------------------------------------------- +Sun Dec 11 09:58:29 UTC 2022 - Soc Virnyl Estela <socvirnyl.est...@gmail.com> + +- Update to version 0.15.24: + * Drag.icon can also return None if clients don't provide icons to render + * Drag.icon can also return None if clients don't provide icons to render + * Add handlers for wlr_pointer_gestures_v1 + +------------------------------------------------------------------- +Mon Nov 21 23:08:50 UTC 2022 - Soc Virnyl Estela <socvirnyl.est...@gmail.com> + +- Remove libwlroots10. Not needed since library is provided already + from wlroots-devel with pkg-config. + +------------------------------------------------------------------- Old: ---- pywlroots-0.15.22.tar.gz New: ---- pywlroots-0.15.24.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-pywlroots.spec ++++++ --- /var/tmp/diff_new_pack.BEEznZ/_old 2022-12-12 17:42:17.505992784 +0100 +++ /var/tmp/diff_new_pack.BEEznZ/_new 2022-12-12 17:42:17.509992807 +0100 @@ -18,7 +18,7 @@ %bcond_without test Name: python-pywlroots -Version: 0.15.22 +Version: 0.15.24 Release: 0 Summary: Python binding to the wlroots library using cffi License: NCSA @@ -39,10 +39,10 @@ BuildRequires: %{pythons} BuildRequires: fdupes BuildRequires: libdrm >= 2.4.113 -BuildRequires: libwlroots10 BuildRequires: python-rpm-macros BuildRequires: pkgconfig(glib-2.0) -BuildRequires: pkgconfig(wlroots) +BuildRequires: pkgconfig(wlroots) >= 0.15.0 +BuildConflicts: pkgconfig(wlroots) >= 0.16.0 BuildRequires: pkgconfig(xkbcommon) BuildRequires: pkgconfig(xwayland) Requires: python-pywayland ++++++ pywlroots-0.15.22.tar.gz -> pywlroots-0.15.24.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/MANIFEST.in new/pywlroots-0.15.24/MANIFEST.in --- old/pywlroots-0.15.22/MANIFEST.in 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/MANIFEST.in 2022-10-29 04:59:37.000000000 +0200 @@ -4,3 +4,4 @@ include tiny/*.py recursive-include tests *.py recursive-include wlroots *.h +recursive-include wlroots *.rst diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/PKG-INFO new/pywlroots-0.15.24/PKG-INFO --- old/pywlroots-0.15.22/PKG-INFO 2022-09-20 04:17:53.261108400 +0200 +++ new/pywlroots-0.15.24/PKG-INFO 2022-10-29 04:59:38.227203600 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pywlroots -Version: 0.15.22 +Version: 0.15.24 Summary: Python binding to the wlroots library using cffi Home-page: https://github.com/flacjacket/pywlroots Author: Sean Vig diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/check_headers.py new/pywlroots-0.15.24/check_headers.py --- old/pywlroots-0.15.22/check_headers.py 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/check_headers.py 2022-10-29 04:59:37.000000000 +0200 @@ -49,7 +49,9 @@ expected_protocol_files = { header_filename(protocol_xml) for protocol_xml in protocols } - protocol_files = {path.name for path in INCLUDE_PATH.iterdir()} + protocol_files = { + path.name for path in INCLUDE_PATH.iterdir() if path.name != "README.rst" + } if expected_protocol_files != protocol_files: unexpected_files = list(expected_protocol_files - protocol_files) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/pywlroots.egg-info/PKG-INFO new/pywlroots-0.15.24/pywlroots.egg-info/PKG-INFO --- old/pywlroots-0.15.22/pywlroots.egg-info/PKG-INFO 2022-09-20 04:17:53.000000000 +0200 +++ new/pywlroots-0.15.24/pywlroots.egg-info/PKG-INFO 2022-10-29 04:59:38.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 2.1 Name: pywlroots -Version: 0.15.22 +Version: 0.15.24 Summary: Python binding to the wlroots library using cffi Home-page: https://github.com/flacjacket/pywlroots Author: Sean Vig diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/pywlroots.egg-info/SOURCES.txt new/pywlroots-0.15.24/pywlroots.egg-info/SOURCES.txt --- old/pywlroots-0.15.22/pywlroots.egg-info/SOURCES.txt 2022-09-20 04:17:53.000000000 +0200 +++ new/pywlroots-0.15.24/pywlroots.egg-info/SOURCES.txt 2022-10-29 04:59:38.000000000 +0200 @@ -35,6 +35,7 @@ wlroots/renderer.py wlroots/version.py wlroots/xwayland.py +wlroots/include/README.rst wlroots/include/idle-inhibit-unstable-v1-protocol.h wlroots/include/idle-protocol.h wlroots/include/pointer-constraints-unstable-v1-protocol.h @@ -70,6 +71,7 @@ wlroots/wlr_types/output_power_management_v1.py wlroots/wlr_types/pointer.py wlroots/wlr_types/pointer_constraints_v1.py +wlroots/wlr_types/pointer_gestures_v1.py wlroots/wlr_types/primary_selection_v1.py wlroots/wlr_types/relative_pointer_manager_v1.py wlroots/wlr_types/scene.py diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/ffi_build.py new/pywlroots-0.15.24/wlroots/ffi_build.py --- old/pywlroots-0.15.22/wlroots/ffi_build.py 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/wlroots/ffi_build.py 2022-10-29 04:59:37.000000000 +0200 @@ -1282,6 +1282,19 @@ bool cancelled; ...; }; + +struct wlr_event_pointer_hold_begin { + struct wlr_input_device *device; + uint32_t time_msec; + uint32_t fingers; + ...; +}; +struct wlr_event_pointer_hold_end { + struct wlr_input_device *device; + uint32_t time_msec; + bool cancelled; + ...; +}; """ # types/wlr_pointer_constraints_v1.h @@ -1360,6 +1373,75 @@ struct wlr_pointer_constraint_v1 *constraint); """ +# types/wlr_pointer_gestures_v1.h +CDEF += """ +struct wlr_pointer_gestures_v1 { + struct wl_global *global; + struct wl_list swipes; + struct wl_list pinches; + struct wl_list holds; + + struct wl_listener display_destroy; + + struct { + struct wl_signal destroy; + } events; + + void *data; + ...; +}; + +struct wlr_pointer_gestures_v1 *wlr_pointer_gestures_v1_create( + struct wl_display *display); + +void wlr_pointer_gestures_v1_send_swipe_begin( + struct wlr_pointer_gestures_v1 *gestures, + struct wlr_seat *seat, + uint32_t time_msec, + uint32_t fingers); +void wlr_pointer_gestures_v1_send_swipe_update( + struct wlr_pointer_gestures_v1 *gestures, + struct wlr_seat *seat, + uint32_t time_msec, + double dx, + double dy); +void wlr_pointer_gestures_v1_send_swipe_end( + struct wlr_pointer_gestures_v1 *gestures, + struct wlr_seat *seat, + uint32_t time_msec, + bool cancelled); + +void wlr_pointer_gestures_v1_send_pinch_begin( + struct wlr_pointer_gestures_v1 *gestures, + struct wlr_seat *seat, + uint32_t time_msec, + uint32_t fingers); +void wlr_pointer_gestures_v1_send_pinch_update( + struct wlr_pointer_gestures_v1 *gestures, + struct wlr_seat *seat, + uint32_t time_msec, + double dx, + double dy, + double scale, + double rotation); +void wlr_pointer_gestures_v1_send_pinch_end( + struct wlr_pointer_gestures_v1 *gestures, + struct wlr_seat *seat, + uint32_t time_msec, + bool cancelled); + +void wlr_pointer_gestures_v1_send_hold_begin( + struct wlr_pointer_gestures_v1 *gestures, + struct wlr_seat *seat, + uint32_t time_msec, + uint32_t fingers); +void wlr_pointer_gestures_v1_send_hold_end( + struct wlr_pointer_gestures_v1 *gestures, + struct wlr_seat *seat, + uint32_t time_msec, + bool cancelled); +""" + # types/wlr_primary_selection_v1.h CDEF += """ struct wlr_primary_selection_v1_device_manager { @@ -2431,6 +2513,7 @@ #include <wlr/types/wlr_output_management_v1.h> #include <wlr/types/wlr_output_power_management_v1.h> #include <wlr/types/wlr_pointer_constraints_v1.h> +#include <wlr/types/wlr_pointer_gestures_v1.h> #include <wlr/types/wlr_primary_selection.h> #include <wlr/types/wlr_primary_selection_v1.h> #include <wlr/types/wlr_relative_pointer_v1.h> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/include/README.rst new/pywlroots-0.15.24/wlroots/include/README.rst --- old/pywlroots-0.15.22/wlroots/include/README.rst 1970-01-01 01:00:00.000000000 +0100 +++ new/pywlroots-0.15.24/wlroots/include/README.rst 2022-10-29 04:59:37.000000000 +0200 @@ -0,0 +1,27 @@ +Included Headers +---------------- + +Generated Wayland protocol headers that are included with the pywlroots ffi +build, and are shipped with the library for downstream libraries to be able to +include these headers. + +Updating Headers +---------------- + +When protocol versions are updated or the wayland scanner generation changes, +the included headers should be updated as well. The match between the latest +protocol and the included files is run in the CI. When that starts to fail, +run: +``` +wayland-scanner server-header /usr/share/wayland-protocols/path/to/file.xml wlroots/include/file.h +``` +This can also be used to add new headers to pywlroots. + +Alternatively, if you download a copy of the upstream wlroots source code, you +can run: +``` +python check_headers.py --wlroots-dir /path/to/wlroots/source --generate +``` +Which will regenerate all of theh current set of protocol headers. Leaving off +the `--generate` option will instread run a check on the currently generated +protocols. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/include/idle-inhibit-unstable-v1-protocol.h new/pywlroots-0.15.24/wlroots/include/idle-inhibit-unstable-v1-protocol.h --- old/pywlroots-0.15.22/wlroots/include/idle-inhibit-unstable-v1-protocol.h 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/wlroots/include/idle-inhibit-unstable-v1-protocol.h 2022-10-29 04:59:37.000000000 +0200 @@ -1,4 +1,4 @@ -/* Generated by wayland-scanner 1.20.0 */ +/* Generated by wayland-scanner 1.21.0 */ #ifndef IDLE_INHIBIT_UNSTABLE_V1_SERVER_PROTOCOL_H #define IDLE_INHIBIT_UNSTABLE_V1_SERVER_PROTOCOL_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/include/idle-protocol.h new/pywlroots-0.15.24/wlroots/include/idle-protocol.h --- old/pywlroots-0.15.22/wlroots/include/idle-protocol.h 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/wlroots/include/idle-protocol.h 2022-10-29 04:59:37.000000000 +0200 @@ -1,4 +1,4 @@ -/* Generated by wayland-scanner 1.20.0 */ +/* Generated by wayland-scanner 1.21.0 */ #ifndef IDLE_SERVER_PROTOCOL_H #define IDLE_SERVER_PROTOCOL_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/include/pointer-constraints-unstable-v1-protocol.h new/pywlroots-0.15.24/wlroots/include/pointer-constraints-unstable-v1-protocol.h --- old/pywlroots-0.15.22/wlroots/include/pointer-constraints-unstable-v1-protocol.h 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/wlroots/include/pointer-constraints-unstable-v1-protocol.h 2022-10-29 04:59:37.000000000 +0200 @@ -1,4 +1,4 @@ -/* Generated by wayland-scanner 1.20.0 */ +/* Generated by wayland-scanner 1.21.0 */ #ifndef POINTER_CONSTRAINTS_UNSTABLE_V1_SERVER_PROTOCOL_H #define POINTER_CONSTRAINTS_UNSTABLE_V1_SERVER_PROTOCOL_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/include/wlr-layer-shell-unstable-v1-protocol.h new/pywlroots-0.15.24/wlroots/include/wlr-layer-shell-unstable-v1-protocol.h --- old/pywlroots-0.15.22/wlroots/include/wlr-layer-shell-unstable-v1-protocol.h 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/wlroots/include/wlr-layer-shell-unstable-v1-protocol.h 2022-10-29 04:59:37.000000000 +0200 @@ -1,4 +1,4 @@ -/* Generated by wayland-scanner 1.20.0 */ +/* Generated by wayland-scanner 1.21.0 */ #ifndef WLR_LAYER_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H #define WLR_LAYER_SHELL_UNSTABLE_V1_SERVER_PROTOCOL_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/include/wlr-output-power-management-unstable-v1-protocol.h new/pywlroots-0.15.24/wlroots/include/wlr-output-power-management-unstable-v1-protocol.h --- old/pywlroots-0.15.22/wlroots/include/wlr-output-power-management-unstable-v1-protocol.h 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/wlroots/include/wlr-output-power-management-unstable-v1-protocol.h 2022-10-29 04:59:37.000000000 +0200 @@ -1,4 +1,4 @@ -/* Generated by wayland-scanner 1.20.0 */ +/* Generated by wayland-scanner 1.21.0 */ #ifndef WLR_OUTPUT_POWER_MANAGEMENT_UNSTABLE_V1_SERVER_PROTOCOL_H #define WLR_OUTPUT_POWER_MANAGEMENT_UNSTABLE_V1_SERVER_PROTOCOL_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/include/xdg-shell-protocol.h new/pywlroots-0.15.24/wlroots/include/xdg-shell-protocol.h --- old/pywlroots-0.15.22/wlroots/include/xdg-shell-protocol.h 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/wlroots/include/xdg-shell-protocol.h 2022-10-29 04:59:37.000000000 +0200 @@ -856,6 +856,7 @@ XDG_SURFACE_ERROR_NOT_CONSTRUCTED = 1, XDG_SURFACE_ERROR_ALREADY_CONSTRUCTED = 2, XDG_SURFACE_ERROR_UNCONFIGURED_BUFFER = 3, + XDG_SURFACE_ERROR_INVALID_SERIAL = 4, }; #endif /* XDG_SURFACE_ERROR_ENUM */ @@ -967,6 +968,18 @@ * committing, but only the last request sent before a commit * indicates which configure event the client really is responding * to. + * + * Sending an ack_configure request consumes the serial number sent + * with the request, as well as serial numbers sent by all + * configure events sent on this xdg_surface prior to the configure + * event referenced by the committed serial. + * + * It is an error to issue multiple ack_configure requests + * referencing a serial from the same configure event, or to issue + * an ack_configure request referencing a serial from a configure + * event issued before the event identified by the last + * ack_configure request for the same xdg_surface. Doing so will + * raise an invalid_serial error. * @param serial the serial from the configure event */ void (*ack_configure)(struct wl_client *client, @@ -1021,6 +1034,10 @@ * provided value is not a valid variant of the resize_edge enum */ XDG_TOPLEVEL_ERROR_INVALID_RESIZE_EDGE = 0, + /** + * invalid parent toplevel + */ + XDG_TOPLEVEL_ERROR_INVALID_PARENT = 1, }; #endif /* XDG_TOPLEVEL_ERROR_ENUM */ @@ -1210,6 +1227,10 @@ * has no parent, its children's parent is unset. If the * now-unmapped surface becomes mapped again, its parent-child * relationship is not restored. + * + * The parent toplevel must not be one of the child toplevel's + * descendants, and the parent must be different from the child + * toplevel, otherwise the invalid_parent protocol error is raised. */ void (*set_parent)(struct wl_client *client, struct wl_resource *resource, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/version.py new/pywlroots-0.15.24/wlroots/version.py --- old/pywlroots-0.15.22/wlroots/version.py 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/wlroots/version.py 2022-10-29 04:59:37.000000000 +0200 @@ -1,3 +1,3 @@ # Copyright (c) Sean Vig 2021 -version = "0.15.22" +version = "0.15.24" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/wlr_types/__init__.py new/pywlroots-0.15.24/wlroots/wlr_types/__init__.py --- old/pywlroots-0.15.22/wlroots/wlr_types/__init__.py 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/wlroots/wlr_types/__init__.py 2022-10-29 04:59:37.000000000 +0200 @@ -26,6 +26,7 @@ PointerConstraintsV1, PointerConstraintV1, ) +from .pointer_gestures_v1 import PointerGesturesV1 # noqa: F401 from .primary_selection_v1 import PrimarySelectionV1DeviceManager # noqa: F401 from .relative_pointer_manager_v1 import RelativePointerManagerV1 # noqa: F401 from .scene import Scene, SceneNode # noqa: F401 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/wlr_types/cursor.py new/pywlroots-0.15.24/wlroots/wlr_types/cursor.py --- old/pywlroots-0.15.22/wlroots/wlr_types/cursor.py 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/wlroots/wlr_types/cursor.py 2022-10-29 04:59:37.000000000 +0200 @@ -19,6 +19,8 @@ PointerEventSwipeBegin, PointerEventSwipeEnd, PointerEventSwipeUpdate, + PointerEventHoldBegin, + PointerEventHoldEnd, ) from .surface import Surface from .touch import ( @@ -89,6 +91,14 @@ ptr=ffi.addressof(self._ptr.events.pinch_end), data_wrapper=PointerEventPinchEnd, ) + self.hold_begin = Signal( + ptr=ffi.addressof(self._ptr.events.hold_begin), + data_wrapper=PointerEventHoldBegin, + ) + self.hold_end = Signal( + ptr=ffi.addressof(self._ptr.events.hold_end), + data_wrapper=PointerEventHoldEnd, + ) self.touch_up_event = Signal( ptr=ffi.addressof(self._ptr.events.touch_up), diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/wlr_types/data_device_manager.py new/pywlroots-0.15.24/wlroots/wlr_types/data_device_manager.py --- old/pywlroots-0.15.22/wlroots/wlr_types/data_device_manager.py 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/wlroots/wlr_types/data_device_manager.py 2022-10-29 04:59:37.000000000 +0200 @@ -37,8 +37,10 @@ self.destroy_event = Signal(ptr=ffi.addressof(self._ptr.events.destroy)) @property - def icon(self) -> "DragIcon": + def icon(self) -> "DragIcon | None": icon_ptr = self._ptr.icon + if icon_ptr == ffi.NULL: + return None _weakkeydict[icon_ptr] = self._ptr return DragIcon(icon_ptr) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/wlr_types/pointer.py new/pywlroots-0.15.24/wlroots/wlr_types/pointer.py --- old/pywlroots-0.15.22/wlroots/wlr_types/pointer.py 2022-09-20 04:17:51.000000000 +0200 +++ new/pywlroots-0.15.24/wlroots/wlr_types/pointer.py 2022-10-29 04:59:37.000000000 +0200 @@ -151,32 +151,132 @@ ptr = ffi.cast("struct wlr_event_pointer_swipe_begin *", ptr) self._ptr = ptr + @property + def time_msec(self) -> int: + return self._ptr.time_msec + + @property + def fingers(self) -> int: + return self._ptr.fingers + class PointerEventSwipeUpdate(Ptr): def __init__(self, ptr) -> None: ptr = ffi.cast("struct wlr_event_pointer_swipe_update *", ptr) self._ptr = ptr + @property + def time_msec(self) -> int: + return self._ptr.time_msec + + @property + def fingers(self) -> int: + return self._ptr.fingers + + @property + def dx(self) -> float: + return self._ptr.dx + + @property + def dy(self) -> float: + return self._ptr.dy + class PointerEventSwipeEnd(Ptr): def __init__(self, ptr) -> None: ptr = ffi.cast("struct wlr_event_pointer_swipe_end *", ptr) self._ptr = ptr + @property + def time_msec(self) -> int: + return self._ptr.time_msec + + @property + def cancelled(self) -> bool: + return self._ptr.cancelled + class PointerEventPinchBegin(Ptr): def __init__(self, ptr) -> None: ptr = ffi.cast("struct wlr_event_pointer_pinch_begin *", ptr) self._ptr = ptr + @property + def time_msec(self) -> int: + return self._ptr.time_msec + + @property + def fingers(self) -> int: + return self._ptr.fingers + class PointerEventPinchUpdate(Ptr): def __init__(self, ptr) -> None: ptr = ffi.cast("struct wlr_event_pointer_pinch_update *", ptr) self._ptr = ptr + @property + def time_msec(self) -> int: + return self._ptr.time_msec + + @property + def fingers(self) -> int: + return self._ptr.fingers + + @property + def dx(self) -> float: + return self._ptr.dx + + @property + def dy(self) -> float: + return self._ptr.dy + + @property + def scale(self) -> float: + return self._ptr.scale + + @property + def rotation(self) -> float: + return self._ptr.rotation + class PointerEventPinchEnd(Ptr): def __init__(self, ptr) -> None: ptr = ffi.cast("struct wlr_event_pointer_pinch_end *", ptr) self._ptr = ptr + + @property + def time_msec(self) -> int: + return self._ptr.time_msec + + @property + def cancelled(self) -> bool: + return self._ptr.cancelled + + +class PointerEventHoldBegin(Ptr): + def __init__(self, ptr) -> None: + ptr = ffi.cast("struct wlr_event_pointer_hold_begin *", ptr) + self._ptr = ptr + + @property + def time_msec(self) -> int: + return self._ptr.time_msec + + @property + def fingers(self) -> int: + return self._ptr.fingers + + +class PointerEventHoldEnd(Ptr): + def __init__(self, ptr) -> None: + ptr = ffi.cast("struct wlr_event_pointer_hold_end *", ptr) + self._ptr = ptr + + @property + def time_msec(self) -> int: + return self._ptr.time_msec + + @property + def cancelled(self) -> bool: + return self._ptr.cancelled diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pywlroots-0.15.22/wlroots/wlr_types/pointer_gestures_v1.py new/pywlroots-0.15.24/wlroots/wlr_types/pointer_gestures_v1.py --- old/pywlroots-0.15.22/wlroots/wlr_types/pointer_gestures_v1.py 1970-01-01 01:00:00.000000000 +0100 +++ new/pywlroots-0.15.24/wlroots/wlr_types/pointer_gestures_v1.py 2022-10-29 04:59:37.000000000 +0200 @@ -0,0 +1,104 @@ +# Copyright (c) Matt Colligan 2022 + +from __future__ import annotations + +from typing import TYPE_CHECKING + +from pywayland.server import Signal + +from wlroots import ffi, lib, PtrHasData + +if TYPE_CHECKING: + from pywayland.server import Display + + from .seat import Seat + + +class PointerGesturesV1(PtrHasData): + def __init__(self, display: Display) -> None: + """Manager to relay pointer gestures to clients. + + :param display: + The display to relay gestures for. + """ + self._ptr = lib.wlr_pointer_gestures_v1_create(display._ptr) + + self.destroy_event = Signal(ptr=ffi.addressof(self._ptr.events.destroy)) + + def send_swipe_begin(self, seat: Seat, time_msec: int, fingers: int) -> None: + lib.wlr_pointer_gestures_v1_send_swipe_begin( + self._ptr, + seat._ptr, + time_msec, + fingers, + ) + + def send_swipe_update( + self, seat: Seat, time_msec: int, dx: float, dy: float + ) -> None: + lib.wlr_pointer_gestures_v1_send_swipe_update( + self._ptr, + seat._ptr, + time_msec, + dx, + dy, + ) + + def send_swipe_end(self, seat: Seat, time_msec: int, cancelled: bool) -> None: + lib.wlr_pointer_gestures_v1_send_swipe_end( + self._ptr, + seat._ptr, + time_msec, + cancelled, + ) + + def send_pinch_begin(self, seat: Seat, time_msec: int, fingers: int) -> None: + lib.wlr_pointer_gestures_v1_send_pinch_begin( + self._ptr, + seat._ptr, + time_msec, + fingers, + ) + + def send_pinch_update( + self, + seat: Seat, + time_msec: int, + dx: float, + dy: float, + scale: float, + rotation: float, + ) -> None: + lib.wlr_pointer_gestures_v1_send_pinch_update( + self._ptr, + seat._ptr, + time_msec, + dx, + dy, + scale, + rotation, + ) + + def send_pinch_end(self, seat: Seat, time_msec: int, cancelled: bool) -> None: + lib.wlr_pointer_gestures_v1_send_pinch_end( + self._ptr, + seat._ptr, + time_msec, + cancelled, + ) + + def send_hold_begin(self, seat: Seat, time_msec: int, fingers: int) -> None: + lib.wlr_pointer_gestures_v1_send_hold_begin( + self._ptr, + seat._ptr, + time_msec, + fingers, + ) + + def send_hold_end(self, seat: Seat, time_msec: int, cancelled: bool) -> None: + lib.wlr_pointer_gestures_v1_send_hold_end( + self._ptr, + seat._ptr, + time_msec, + cancelled, + )