Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-pywayland for
openSUSE:Factory checked in at 2022-08-27 11:50:49
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pywayland (Old)
and /work/SRC/openSUSE:Factory/.python-pywayland.new.2083 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-pywayland"
Sat Aug 27 11:50:49 2022 rev:2 rq:999525 version:0.4.14
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pywayland/python-pywayland.changes
2022-07-21 11:33:54.562978270 +0200
+++
/work/SRC/openSUSE:Factory/.python-pywayland.new.2083/python-pywayland.changes
2022-08-27 11:50:49.745938328 +0200
@@ -1,0 +2,8 @@
+Sat Aug 20 07:06:08 UTC 2022 - Soc Virnyl Estela <[email protected]>
+
+- Update to version 0.4.14:
+ * Bump wayland protocols version used in CI
+ * Add additional constructors to Client
+ * Add wl_resource_get_client to lib
+
+-------------------------------------------------------------------
Old:
----
pywayland-0.4.13.tar.gz
New:
----
pywayland-0.4.14.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-pywayland.spec ++++++
--- /var/tmp/diff_new_pack.ELFcXT/_old 2022-08-27 11:50:50.241939394 +0200
+++ /var/tmp/diff_new_pack.ELFcXT/_new 2022-08-27 11:50:50.245939402 +0200
@@ -1,5 +1,5 @@
#
-# spec file python-pywayland
+# spec file
#
# Copyright (c) 2022 SUSE LLC
#
@@ -19,7 +19,7 @@
%bcond_without test
%define pyname pywayland
Name: python-%{pyname}
-Version: 0.4.13
+Version: 0.4.14
Release: 0
Summary: Python binding to the wayland library using cffi
License: NCSA
@@ -39,9 +39,9 @@
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(wayland-client) >= 1.21
BuildRequires: pkgconfig(wayland-cursor) >= 1.21
-BuildRequires: pkgconfig(wayland-protocols) >= 1.25
+BuildRequires: pkgconfig(wayland-protocols) >= 1.26
Requires(post): update-alternatives
-Requires(postun): update-alternatives
+Requires(postun):update-alternatives
%python_subpackages
%description
++++++ pywayland-0.4.13.tar.gz -> pywayland-0.4.14.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pywayland-0.4.13/PKG-INFO
new/pywayland-0.4.14/PKG-INFO
--- old/pywayland-0.4.13/PKG-INFO 2022-07-02 02:42:30.023429200 +0200
+++ new/pywayland-0.4.14/PKG-INFO 2022-07-24 20:06:30.609024500 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pywayland
-Version: 0.4.13
+Version: 0.4.14
Summary: Python bindings for the libwayland library written in pure Python
Home-page: https://github.com/flacjacket/pywayland
Author: Sean Vig
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pywayland-0.4.13/pywayland/_ffi/lib.pyi
new/pywayland-0.4.14/pywayland/_ffi/lib.pyi
--- old/pywayland-0.4.13/pywayland/_ffi/lib.pyi 2022-07-02 02:42:24.000000000
+0200
+++ new/pywayland-0.4.14/pywayland/_ffi/lib.pyi 2022-07-24 20:06:26.000000000
+0200
@@ -103,6 +103,7 @@
def wl_resource_get_id(resource: ResourceCData) -> int: ...
def wl_resource_get_user_data(resource: ResourceCData) -> CData: ...
def wl_resource_get_version(resource: ResourceCData) -> int: ...
+def wl_resource_get_client(resource: ResourceCData) -> ClientCData: ...
def wl_resource_add_destroy_listener(
resource: ResourceCData, listener: ListenerCData
) -> None: ...
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pywayland-0.4.13/pywayland/ffi_build.py
new/pywayland-0.4.14/pywayland/ffi_build.py
--- old/pywayland-0.4.13/pywayland/ffi_build.py 2022-07-02 02:42:24.000000000
+0200
+++ new/pywayland-0.4.14/pywayland/ffi_build.py 2022-07-24 20:06:26.000000000
+0200
@@ -293,6 +293,8 @@
int
wl_resource_get_version(struct wl_resource *resource);
+struct wl_client * wl_resource_get_client(struct wl_resource *resource);
+
void
wl_resource_add_destroy_listener(struct wl_resource *resource,
struct wl_listener * listener);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pywayland-0.4.13/pywayland/protocol/single_pixel_buffer_v1/__init__.py
new/pywayland-0.4.14/pywayland/protocol/single_pixel_buffer_v1/__init__.py
--- old/pywayland-0.4.13/pywayland/protocol/single_pixel_buffer_v1/__init__.py
1970-01-01 01:00:00.000000000 +0100
+++ new/pywayland-0.4.14/pywayland/protocol/single_pixel_buffer_v1/__init__.py
2022-07-24 20:06:30.000000000 +0200
@@ -0,0 +1,24 @@
+# This file has been autogenerated by the pywayland scanner
+
+# Copyright ?? 2022 Simon Ser
+#
+# 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.
+
+from .wp_single_pixel_buffer_manager_v1 import WpSinglePixelBufferManagerV1 #
noqa: F401
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pywayland-0.4.13/pywayland/protocol/single_pixel_buffer_v1/wp_single_pixel_buffer_manager_v1.py
new/pywayland-0.4.14/pywayland/protocol/single_pixel_buffer_v1/wp_single_pixel_buffer_manager_v1.py
---
old/pywayland-0.4.13/pywayland/protocol/single_pixel_buffer_v1/wp_single_pixel_buffer_manager_v1.py
1970-01-01 01:00:00.000000000 +0100
+++
new/pywayland-0.4.14/pywayland/protocol/single_pixel_buffer_v1/wp_single_pixel_buffer_manager_v1.py
2022-07-24 20:06:30.000000000 +0200
@@ -0,0 +1,114 @@
+# This file has been autogenerated by the pywayland scanner
+
+# Copyright ?? 2022 Simon Ser
+#
+# 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.
+
+from __future__ import annotations
+
+
+from pywayland.protocol_core import (
+ Argument,
+ ArgumentType,
+ Global,
+ Interface,
+ Proxy,
+ Resource,
+)
+from ..wayland import WlBuffer
+
+
+class WpSinglePixelBufferManagerV1(Interface):
+ """Global factory for single-pixel buffers
+
+ The :class:`WpSinglePixelBufferManagerV1` interface is a factory for
+ single-pixel buffers.
+ """
+
+ name = "wp_single_pixel_buffer_manager_v1"
+ version = 1
+
+
+class WpSinglePixelBufferManagerV1Proxy(Proxy[WpSinglePixelBufferManagerV1]):
+ interface = WpSinglePixelBufferManagerV1
+
+ @WpSinglePixelBufferManagerV1.request()
+ def destroy(self) -> None:
+ """Destroy the manager
+
+ Destroy the :class:`WpSinglePixelBufferManagerV1` object.
+
+ The child objects created via this interface are unaffected.
+ """
+ self._marshal(0)
+ self._destroy()
+
+ @WpSinglePixelBufferManagerV1.request(
+ Argument(ArgumentType.NewId, interface=WlBuffer),
+ Argument(ArgumentType.Uint),
+ Argument(ArgumentType.Uint),
+ Argument(ArgumentType.Uint),
+ Argument(ArgumentType.Uint),
+ )
+ def create_u32_rgba_buffer(self, r: int, g: int, b: int, a: int) ->
Proxy[WlBuffer]:
+ """Create a 1??1 buffer from 32-bit rgba values
+
+ Create a single-pixel buffer from four 32-bit RGBA values.
+
+ Unless specified in another protocol extension, the RGBA values use
+ pre-multiplied alpha.
+
+ The width and height of the buffer are 1.
+
+ :param r:
+ value of the buffer's red channel
+ :type r:
+ `ArgumentType.Uint`
+ :param g:
+ value of the buffer's green channel
+ :type g:
+ `ArgumentType.Uint`
+ :param b:
+ value of the buffer's blue channel
+ :type b:
+ `ArgumentType.Uint`
+ :param a:
+ value of the buffer's alpha channel
+ :type a:
+ `ArgumentType.Uint`
+ :returns:
+ :class:`~pywayland.protocol.wayland.WlBuffer`
+ """
+ id = self._marshal_constructor(1, WlBuffer, r, g, b, a)
+ return id
+
+
+class WpSinglePixelBufferManagerV1Resource(Resource):
+ interface = WpSinglePixelBufferManagerV1
+
+
+class WpSinglePixelBufferManagerV1Global(Global):
+ interface = WpSinglePixelBufferManagerV1
+
+
+WpSinglePixelBufferManagerV1._gen_c()
+WpSinglePixelBufferManagerV1.proxy_class = WpSinglePixelBufferManagerV1Proxy
+WpSinglePixelBufferManagerV1.resource_class =
WpSinglePixelBufferManagerV1Resource
+WpSinglePixelBufferManagerV1.global_class = WpSinglePixelBufferManagerV1Global
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pywayland-0.4.13/pywayland/protocol/tablet_unstable_v2/zwp_tablet_pad_v2.py
new/pywayland-0.4.14/pywayland/protocol/tablet_unstable_v2/zwp_tablet_pad_v2.py
---
old/pywayland-0.4.13/pywayland/protocol/tablet_unstable_v2/zwp_tablet_pad_v2.py
2022-07-02 02:42:28.000000000 +0200
+++
new/pywayland-0.4.14/pywayland/protocol/tablet_unstable_v2/zwp_tablet_pad_v2.py
2022-07-24 20:06:30.000000000 +0200
@@ -264,7 +264,7 @@
Argument(ArgumentType.Object, interface=WlSurface),
)
def leave(self, serial: int, surface: WlSurface) -> None:
- """Enter event
+ """Leave event
Notification that this pad is no longer focused on the specified
surface.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pywayland-0.4.13/pywayland/protocol/text_input_unstable_v3/zwp_text_input_v3.py
new/pywayland-0.4.14/pywayland/protocol/text_input_unstable_v3/zwp_text_input_v3.py
---
old/pywayland-0.4.13/pywayland/protocol/text_input_unstable_v3/zwp_text_input_v3.py
2022-07-02 02:42:28.000000000 +0200
+++
new/pywayland-0.4.14/pywayland/protocol/text_input_unstable_v3/zwp_text_input_v3.py
2022-07-24 20:06:30.000000000 +0200
@@ -515,10 +515,15 @@
The serial number reflects the last state of the
:class:`ZwpTextInputV3` object known to the compositor. The value of
the serial argument must be equal to the number of commit requests
- already issued on that object. When the client receives a done event
- with a serial different than the number of past commit requests, it
- must proceed as normal, except it should not change the current state
- of the :class:`ZwpTextInputV3` object.
+ already issued on that object.
+
+ When the client receives a done event with a serial different than the
+ number of past commit requests, it must proceed with evaluating and
+ applying the changes as normal, except it should not change the current
+ state of the :class:`ZwpTextInputV3` object. All pending state requests
+ (set_surrounding_text, set_content_type and set_cursor_rectangle) on
+ the :class:`ZwpTextInputV3` object should be sent and committed after
+ receiving a :func:`ZwpTextInputV3.done()` event with a matching serial.
:param serial:
:type serial:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pywayland-0.4.13/pywayland/protocol/viewporter/wp_viewport.py
new/pywayland-0.4.14/pywayland/protocol/viewporter/wp_viewport.py
--- old/pywayland-0.4.13/pywayland/protocol/viewporter/wp_viewport.py
2022-07-02 02:42:28.000000000 +0200
+++ new/pywayland-0.4.14/pywayland/protocol/viewporter/wp_viewport.py
2022-07-24 20:06:30.000000000 +0200
@@ -91,12 +91,6 @@
NULL :class:`~pywayland.protocol.wayland.WlBuffer` does not raise the
out_of_buffer error.
- The x, y arguments of :func:`WlSurface.attach()
- <pywayland.protocol.wayland.WlSurface.attach>` are applied as normal to the
- surface. They indicate how many pixels to remove from the surface size from
- the left and the top. In other words, they are still in the surface-local
- coordinate system, just like dst_width and dst_height are.
-
If the :class:`~pywayland.protocol.wayland.WlSurface` associated with the
:class:`WpViewport` is destroyed, all :class:`WpViewport` requests except
'destroy' raise the protocol error no_surface.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pywayland-0.4.13/pywayland/protocol/xdg_shell/xdg_popup.py
new/pywayland-0.4.14/pywayland/protocol/xdg_shell/xdg_popup.py
--- old/pywayland-0.4.13/pywayland/protocol/xdg_shell/xdg_popup.py
2022-07-02 02:42:28.000000000 +0200
+++ new/pywayland-0.4.14/pywayland/protocol/xdg_shell/xdg_popup.py
2022-07-24 20:06:30.000000000 +0200
@@ -76,7 +76,7 @@
"""
name = "xdg_popup"
- version = 4
+ version = 5
class error(enum.IntEnum):
invalid_grab = 0
@@ -132,11 +132,6 @@
nested grabbing popup as well. When a compositor dismisses popups, it
will follow the same dismissing order as required from the client.
- The parent of a grabbing popup must either be another :class:`XdgPopup`
- with an active explicit grab, or an :class:`XdgPopup` or
- :class:`~pywayland.protocol.xdg_shell.XdgToplevel`, if there are no
- explicit grabs already taken.
-
If the topmost grabbing popup is destroyed, the grab will be returned
to the parent of the popup, if that parent previously had an explicit
grab.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pywayland-0.4.13/pywayland/protocol/xdg_shell/xdg_positioner.py
new/pywayland-0.4.14/pywayland/protocol/xdg_shell/xdg_positioner.py
--- old/pywayland-0.4.13/pywayland/protocol/xdg_shell/xdg_positioner.py
2022-07-02 02:42:28.000000000 +0200
+++ new/pywayland-0.4.14/pywayland/protocol/xdg_shell/xdg_positioner.py
2022-07-24 20:06:30.000000000 +0200
@@ -65,7 +65,7 @@
"""
name = "xdg_positioner"
- version = 4
+ version = 5
class error(enum.IntEnum):
invalid_input = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pywayland-0.4.13/pywayland/protocol/xdg_shell/xdg_surface.py
new/pywayland-0.4.14/pywayland/protocol/xdg_shell/xdg_surface.py
--- old/pywayland-0.4.13/pywayland/protocol/xdg_shell/xdg_surface.py
2022-07-02 02:42:28.000000000 +0200
+++ new/pywayland-0.4.14/pywayland/protocol/xdg_shell/xdg_surface.py
2022-07-24 20:06:30.000000000 +0200
@@ -99,7 +99,7 @@
"""
name = "xdg_surface"
- version = 4
+ version = 5
class error(enum.IntEnum):
not_constructed = 1
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pywayland-0.4.13/pywayland/protocol/xdg_shell/xdg_toplevel.py
new/pywayland-0.4.14/pywayland/protocol/xdg_shell/xdg_toplevel.py
--- old/pywayland-0.4.13/pywayland/protocol/xdg_shell/xdg_toplevel.py
2022-07-02 02:42:28.000000000 +0200
+++ new/pywayland-0.4.14/pywayland/protocol/xdg_shell/xdg_toplevel.py
2022-07-24 20:06:30.000000000 +0200
@@ -66,7 +66,7 @@
"""
name = "xdg_toplevel"
- version = 4
+ version = 5
class error(enum.IntEnum):
invalid_resize_edge = 0
@@ -92,6 +92,12 @@
tiled_top = 7
tiled_bottom = 8
+ class wm_capabilities(enum.IntEnum):
+ window_menu = 1
+ maximize = 2
+ fullscreen = 3
+ minimize = 4
+
class XdgToplevelProxy(Proxy[XdgToplevel]):
interface = XdgToplevel
@@ -115,18 +121,19 @@
Set the "parent" of this surface. This surface should be stacked above
the parent surface and all other ancestor surfaces.
- Parent windows should be set on dialogs, toolboxes, or other
+ Parent surfaces should be set on dialogs, toolboxes, or other
"auxiliary" surfaces, so that the parent is raised when the dialog is
raised.
- Setting a null parent for a child window removes any parent-child
- relationship for the child. Setting a null parent for a window which
- currently has no parent is a no-op.
-
- If the parent is unmapped then its children are managed as though the
- parent of the now-unmapped parent has become the parent of this
- surface. If no parent exists for the now-unmapped parent then the
- children are managed as though they have no parent surface.
+ Setting a null parent for a child surface unsets its parent. Setting a
+ null parent for a surface which currently has no parent is a no-op.
+
+ Only mapped surfaces can have child surfaces. Setting a parent which is
+ not mapped is equivalent to setting a null parent. If a surface becomes
+ unmapped, its children's parent is set to the parent of the now-
+ unmapped surface. If the now-unmapped surface has no parent, its
+ children's parent is unset. If the now-unmapped surface becomes mapped
+ again, its parent-child relationship is not restored.
:param parent:
:type parent:
@@ -645,6 +652,44 @@
"""
self._post_event(2, width, height)
+ @XdgToplevel.event(
+ Argument(ArgumentType.Array),
+ version=5,
+ )
+ def wm_capabilities(self, capabilities: list) -> None:
+ """Compositor capabilities
+
+ This event advertises the capabilities supported by the compositor. If
+ a capability isn't supported, clients should hide or disable the UI
+ elements that expose this functionality. For instance, if the
+ compositor doesn't advertise support for minimized toplevels, a button
+ triggering the set_minimized request should not be displayed.
+
+ The compositor will ignore requests it doesn't support. For instance, a
+ compositor which doesn't advertise support for minimized will ignore
+ set_minimized requests.
+
+ Compositors must send this event once before the first
+ :func:`XdgSurface.configure()
+ <pywayland.protocol.xdg_shell.XdgSurface.configure>` event. When the
+ capabilities change, compositors must send this event again and then
+ send an :func:`XdgSurface.configure()
+ <pywayland.protocol.xdg_shell.XdgSurface.configure>` event.
+
+ The configured state should not be applied immediately. See
+ :func:`XdgSurface.configure()
+ <pywayland.protocol.xdg_shell.XdgSurface.configure>` for details.
+
+ The capabilities are sent as an array of 32-bit unsigned integers in
+ native endianness.
+
+ :param capabilities:
+ array of 32-bit capabilities
+ :type capabilities:
+ `ArgumentType.Array`
+ """
+ self._post_event(3, capabilities)
+
class XdgToplevelGlobal(Global):
interface = XdgToplevel
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/pywayland-0.4.13/pywayland/protocol/xdg_shell/xdg_wm_base.py
new/pywayland-0.4.14/pywayland/protocol/xdg_shell/xdg_wm_base.py
--- old/pywayland-0.4.13/pywayland/protocol/xdg_shell/xdg_wm_base.py
2022-07-02 02:42:28.000000000 +0200
+++ new/pywayland-0.4.14/pywayland/protocol/xdg_shell/xdg_wm_base.py
2022-07-24 20:06:30.000000000 +0200
@@ -54,7 +54,7 @@
"""
name = "xdg_wm_base"
- version = 4
+ version = 5
class error(enum.IntEnum):
role = 0
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pywayland-0.4.13/pywayland/server/client.py
new/pywayland-0.4.14/pywayland/server/client.py
--- old/pywayland-0.4.13/pywayland/server/client.py 2022-07-02
02:42:24.000000000 +0200
+++ new/pywayland-0.4.14/pywayland/server/client.py 2022-07-24
20:06:26.000000000 +0200
@@ -39,7 +39,8 @@
Given a file descriptor corresponding to one end of a socket, create a
client struct and add the new client to the compositors client list. At
that point, the client is initialized and ready to run, as if the client
- had connected to the servers listening socket.
+ had connected to the servers listening socket. Alternatively, pass a
pointer to an
+ existing client and use that instead of creating a new one.
The other end of the socket can be passed to
:meth:`~pywayland.client.Display.connect()` on the client side or used with
@@ -49,24 +50,36 @@
:type display: :class:`Display`
:param fd: The file descriptor for the socket to the client
:type fd: `int`
+ :param ptr: A pointer to an existing wl_client
+ :type ptr: `ffi.ClientCData`
"""
- def __init__(self, display: Display, fd: int) -> None:
- if display.destroyed:
- raise ValueError("Display has been destroyed")
-
- ptr = lib.wl_client_create(display._ptr, fd)
-
- destructor = functools.partial(_client_destroy, display)
- self._ptr: ffi.ClientCData | None = ffi.gc(ptr, destructor)
- self._display: Display | None = display
+ def __init__(
+ self,
+ display: Display | None = None,
+ fd: int | None = None,
+ ptr: ffi.ClientCData | None = None,
+ ) -> None:
+ if ptr is None:
+ if display is None or fd is None:
+ raise ValueError("display and fd needed to create new client")
+
+ if display.destroyed:
+ raise ValueError("Display has been destroyed")
+
+ ptr = lib.wl_client_create(display._ptr, fd)
+
+ destructor = functools.partial(_client_destroy, display)
+ self._ptr: ffi.ClientCData | None = ffi.gc(ptr, destructor)
+
+ else:
+ self._ptr = ptr
def destroy(self) -> None:
"""Destroy the client"""
if self._ptr is not None:
ffi.release(self._ptr)
self._ptr = None
- self._display = None
@ensure_valid
def flush(self) -> None:
@@ -128,3 +141,18 @@
resource_handle = lib.wl_resource_get_user_data(res_ptr)
return ffi.from_handle(resource_handle)
+
+ @classmethod
+ def from_resource(cls, resource: ffi.ResourceCData) -> Client:
+ """Look up the corresponding wl_client for a wl_resource
+
+ :param resource: The wl_resource
+ :type resource: pywayland.protocol_core.Resource
+ :returns:
+ A `Client` instance.
+ """
+ return cls(ptr=lib.wl_resource_get_client(resource))
+
+ def __eq__(self, other) -> bool:
+ """Compare this client with another"""
+ return hasattr(other, "_ptr") and self._ptr == other._ptr
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pywayland-0.4.13/pywayland/version.py
new/pywayland-0.4.14/pywayland/version.py
--- old/pywayland-0.4.13/pywayland/version.py 2022-07-02 02:42:24.000000000
+0200
+++ new/pywayland-0.4.14/pywayland/version.py 2022-07-24 20:06:26.000000000
+0200
@@ -12,4 +12,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-__version__ = "0.4.13"
+__version__ = "0.4.14"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pywayland-0.4.13/pywayland.egg-info/PKG-INFO
new/pywayland-0.4.14/pywayland.egg-info/PKG-INFO
--- old/pywayland-0.4.13/pywayland.egg-info/PKG-INFO 2022-07-02
02:42:29.000000000 +0200
+++ new/pywayland-0.4.14/pywayland.egg-info/PKG-INFO 2022-07-24
20:06:30.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: pywayland
-Version: 0.4.13
+Version: 0.4.14
Summary: Python bindings for the libwayland library written in pure Python
Home-page: https://github.com/flacjacket/pywayland
Author: Sean Vig
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/pywayland-0.4.13/pywayland.egg-info/SOURCES.txt
new/pywayland-0.4.14/pywayland.egg-info/SOURCES.txt
--- old/pywayland-0.4.13/pywayland.egg-info/SOURCES.txt 2022-07-02
02:42:29.000000000 +0200
+++ new/pywayland-0.4.14/pywayland.egg-info/SOURCES.txt 2022-07-24
20:06:30.000000000 +0200
@@ -73,6 +73,8 @@
pywayland/protocol/relative_pointer_unstable_v1/__init__.py
pywayland/protocol/relative_pointer_unstable_v1/zwp_relative_pointer_manager_v1.py
pywayland/protocol/relative_pointer_unstable_v1/zwp_relative_pointer_v1.py
+pywayland/protocol/single_pixel_buffer_v1/__init__.py
+pywayland/protocol/single_pixel_buffer_v1/wp_single_pixel_buffer_manager_v1.py
pywayland/protocol/tablet_unstable_v1/__init__.py
pywayland/protocol/tablet_unstable_v1/zwp_tablet_manager_v1.py
pywayland/protocol/tablet_unstable_v1/zwp_tablet_seat_v1.py