HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //home/arjun/projects/env/lib/python3.10/site-packages/cairocffi/__pycache__/xcb.cpython-310.pyc
o

*we��@sNdZddlmZddlmZmZddlmZmZGdd�de�Z	e	eej
<dS)	z�
    cairocffi.xcb
    ~~~~~~~~~~~~~

    Bindings for XCB surface objects using xcffib.

    :copyright: Copyright 2014-2019 by Simon Sapin
    :license: BSD, see LICENSE for details.
�)�visualtype_to_c_struct�)�cairo�	constants)�SURFACE_TYPE_TO_CLASS�Surfacec@s eZdZdZdd�Zdd�ZdS)�
XCBSurfacea/The XCB surface is used to render cairo graphics to X Window System
    windows and pixmaps using the XCB library.

    Creates a cairo surface that targets the given drawable (pixmap or window).

    .. note::

        This class works using objects and libraries in ``xcffib``.

    :param conn: The ``xcffib.Connection`` for an open XCB connection
    :param drawable:
        An XID corresponding to an XCB drawable (a pixmap or a window)
    :param visual: An ``xcffib.xproto.VISUALTYPE`` object.
    :param width: integer
    :param height: integer
    cCs,t|�}t�|j||||�}t�||�dS)N)rr�cairo_xcb_surface_create�_connr�__init__)�self�conn�drawable�visual�width�height�c_visual�p�r�F/home/arjun/projects/env/lib/python3.10/site-packages/cairocffi/xcb.pyr"s
�zXCBSurface.__init__cCst�|j||�|��dS)am
        Informs cairo of the new size of the X Drawable underlying the surface.
        For a surface created for a Window (rather than a Pixmap), this
        function must be called each time the size of the window changes (for
        a subwindow, you are normally resizing the window yourself, but for a
        toplevel window, it is necessary to listen for
        :class:`xcffib.xproto.ConfigureNotifyEvent`'s).

        A Pixmap can never change size, so it is never necessary to call this
        function on a surface created for a Pixmap.

        :param width: integer
        :param height: integer
        N)r�cairo_xcb_surface_set_size�_pointer�
_check_status)rrrrrr�set_size)szXCBSurface.set_sizeN)�__name__�
__module__�__qualname__�__doc__rrrrrrrsrN)r�xcffibr�rr�surfacesrrr�SURFACE_TYPE_XCBrrrr�<module>s
+