
    j                     f    d Z ddlmZ ddlmZmZ ddlmZmZ  G d de          Z	e	eej
        <   dS )	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                       e Zd ZdZd Zd ZdS )
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
    c                     t          |          }t          j        |j        ||||          }t	          j        | |           d S )N)r   r   cairo_xcb_surface_create_connr   __init__)selfconndrawablevisualwidthheightc_visualps           T/home/ubuntu/budget-transfer-bot/.venv/lib/python3.11/site-packages/cairocffi/xcb.pyr   zXCBSurface.__init__"   sG    )&11*J(E6; ;q!!!!!    c                 d    t          j        | j        ||           |                                  dS )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   r   r   s      r   set_sizezXCBSurface.set_size)   s3     	(vFFFr   N)__name__
__module____qualname____doc__r   r    r   r   r
   r
      s<          " " "    r   r
   N)r!   xcffibr    r   r   surfacesr   r   r
   SURFACE_TYPE_XCBr"   r   r   <module>r'      s     * ) ) ) ) )         4 4 4 4 4 4 4 4( ( ( ( ( ( ( (V 5? i0 1 1 1r   