diff options
author | Julien Danjou <julien@danjou.info> | 2010-01-14 11:48:05 +0100 |
---|---|---|
committer | Steve Chaplin <stevech1097@yahoo.com.au> | 2010-02-06 13:03:06 +0800 |
commit | d98974c0a3de11fde1e5cdfd6dd469624c6c17d6 (patch) | |
tree | 38e331379357bd452ef7eb838f7d1c943b3da688 /doc | |
parent | 9b1c3a86f13d86dbd3f26c4d527f64309f64389a (diff) |
Add XCB support using xpyb
Signed-off-by: Julien Danjou <julien@danjou.info>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/reference/surfaces.rst | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/doc/reference/surfaces.rst b/doc/reference/surfaces.rst index 0957649..fbec39e 100644 --- a/doc/reference/surfaces.rst +++ b/doc/reference/surfaces.rst @@ -637,10 +637,27 @@ Note that the XCB surface automatically takes advantage of X render extension if it is available. .. class:: XCBSurface + :param connection: an XCB connection + :param drawable: a X drawable + :param visualtype: a X visualtype + :param width: The surface width + :param height: The surface height - .. note:: *XCBSurface* cannot be instantiated directly because Python - interaction with XCB would require open source Python bindings to Xlib - which provided a C API. + Creates a cairo surface that targets the given drawable (pixmap or window). + + .. note:: This methods works using xpyb. + + .. method:: set_size(width, height) + :param width: The width of the surface + :param height: The height of the surface + + 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 ConfigureNotify events.) + + A Pixmap can never change size, so it is never necessary to call this function on a surface + created for a Pixmap. class XlibSurface(:class:`Surface`) |