
     h                     h    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                  <   y)	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y)
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
                  | |       y )N)r   r   cairo_xcb_surface_create_connr   __init__)selfconndrawablevisualwidthheightc_visualps           i/home/developers/rajanand/mypropertyqr-fmb-refixing-v2/venv/lib/python3.12/site-packages/cairocffi/xcb.pyr   zXCBSurface.__init__"   s;    )&1**JJ(E6;q!    c                 f    t        j                  | j                  ||       | j                          y)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)   s&     	((v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'      s5    *  4( (V 5? i00 1r   