jpayne@68: jpayne@68: jpayne@68:
jpayne@68: jpayne@68:jpayne@68: Top jpayne@68: | jpayne@68:![]() |
jpayne@68: ![]() |
jpayne@68: ![]() |
jpayne@68: ![]() |
jpayne@68:
jpayne@68: XCB Surfacesjpayne@68:XCB Surfaces — X Window System rendering using the XCB library jpayne@68: |
jpayne@68: jpayne@68: |
jpayne@68: cairo_surface_t * jpayne@68: | jpayne@68:jpayne@68: cairo_xcb_surface_create () jpayne@68: | jpayne@68:
jpayne@68: cairo_surface_t * jpayne@68: | jpayne@68:jpayne@68: cairo_xcb_surface_create_for_bitmap () jpayne@68: | jpayne@68:
jpayne@68: cairo_surface_t * jpayne@68: | jpayne@68:jpayne@68: cairo_xcb_surface_create_with_xrender_format () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_xcb_surface_set_size () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_xcb_surface_set_drawable () jpayne@68: | jpayne@68:
jpayne@68: xcb_connection_t * jpayne@68: | jpayne@68:jpayne@68: cairo_xcb_device_get_connection () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_xcb_device_debug_cap_xrender_version () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_xcb_device_debug_cap_xshm_version () jpayne@68: | jpayne@68:
jpayne@68: int jpayne@68: | jpayne@68:jpayne@68: cairo_xcb_device_debug_get_precision () jpayne@68: | jpayne@68:
jpayne@68: void jpayne@68: | jpayne@68:jpayne@68: cairo_xcb_device_debug_set_precision () jpayne@68: | jpayne@68:
#define | jpayne@68:CAIRO_HAS_XCB_SURFACE | jpayne@68:
#define | jpayne@68:CAIRO_HAS_XCB_SHM_FUNCTIONS | jpayne@68:
The XCB surface is used to render cairo graphics to X Window System jpayne@68: windows and pixmaps using the XCB library.
jpayne@68:Note that the XCB surface automatically takes advantage of the X render jpayne@68: extension if it is available.
jpayne@68:cairo_surface_t * jpayne@68: cairo_xcb_surface_create (jpayne@68:xcb_connection_t *connection
, jpayne@68:xcb_drawable_t drawable
, jpayne@68:xcb_visualtype_t *visual
, jpayne@68:int width
, jpayne@68:int height
);
Creates an XCB surface that draws to the given drawable. jpayne@68: The way that colors are represented in the drawable is specified jpayne@68: by the provided visual.
jpayne@68:Note: If drawable
jpayne@68: is a Window, then the function
jpayne@68: cairo_xcb_surface_set_size()
must be called whenever the size of the
jpayne@68: window changes.
When drawable
jpayne@68: is a Window containing child windows then drawing to
jpayne@68: the created surface will be clipped by those child windows. When
jpayne@68: the created surface is used as a source, the contents of the
jpayne@68: children will be included.
connection |
jpayne@68: an XCB connection |
jpayne@68: jpayne@68: |
drawable |
jpayne@68: an XCB drawable |
jpayne@68: jpayne@68: |
visual |
jpayne@68: the visual to use for drawing to |
jpayne@68: jpayne@68: |
width |
jpayne@68: the current width of |
jpayne@68: jpayne@68: |
height |
jpayne@68: the current height of |
jpayne@68: jpayne@68: |
a pointer to the newly created surface. The caller
jpayne@68: owns the surface and should call cairo_surface_destroy()
when done
jpayne@68: with it.
This function always returns a valid pointer, but it will return a
jpayne@68: pointer to a "nil" surface if an error such as out of memory
jpayne@68: occurs. You can use cairo_surface_status()
to check for this.
Since: 1.12
jpayne@68:cairo_surface_t * jpayne@68: cairo_xcb_surface_create_for_bitmap (jpayne@68:xcb_connection_t *connection
, jpayne@68:xcb_screen_t *screen
, jpayne@68:xcb_pixmap_t bitmap
, jpayne@68:int width
, jpayne@68:int height
);
Creates an XCB surface that draws to the given bitmap.
jpayne@68: This will be drawn to as a CAIRO_FORMAT_A1
object.
connection |
jpayne@68: an XCB connection |
jpayne@68: jpayne@68: |
screen |
jpayne@68: the XCB screen associated with |
jpayne@68: jpayne@68: |
bitmap |
jpayne@68: an XCB drawable (a Pixmap with depth 1) |
jpayne@68: jpayne@68: |
width |
jpayne@68: the current width of |
jpayne@68: jpayne@68: |
height |
jpayne@68: the current height of |
jpayne@68: jpayne@68: |
a pointer to the newly created surface. The caller
jpayne@68: owns the surface and should call cairo_surface_destroy()
when done
jpayne@68: with it.
This function always returns a valid pointer, but it will return a
jpayne@68: pointer to a "nil" surface if an error such as out of memory
jpayne@68: occurs. You can use cairo_surface_status()
to check for this.
Since: 1.12
jpayne@68:cairo_surface_t * jpayne@68: cairo_xcb_surface_create_with_xrender_format jpayne@68: (jpayne@68:xcb_connection_t *connection
, jpayne@68:xcb_screen_t *screen
, jpayne@68:xcb_drawable_t drawable
, jpayne@68:xcb_render_pictforminfo_t *format
, jpayne@68:int width
, jpayne@68:int height
);
Creates an XCB surface that draws to the given drawable. jpayne@68: The way that colors are represented in the drawable is specified jpayne@68: by the provided picture format.
jpayne@68:Note: If drawable
jpayne@68: is a Window, then the function
jpayne@68: cairo_xcb_surface_set_size()
must be called whenever the size of the
jpayne@68: window changes.
When drawable
jpayne@68: is a Window containing child windows then drawing to
jpayne@68: the created surface will be clipped by those child windows. When
jpayne@68: the created surface is used as a source, the contents of the
jpayne@68: children will be included.
connection |
jpayne@68: an XCB connection |
jpayne@68: jpayne@68: |
drawable |
jpayne@68: an XCB drawable |
jpayne@68: jpayne@68: |
screen |
jpayne@68: the XCB screen associated with |
jpayne@68: jpayne@68: |
format |
jpayne@68: the picture format to use for drawing to |
jpayne@68: jpayne@68: |
width |
jpayne@68: the current width of |
jpayne@68: jpayne@68: |
height |
jpayne@68: the current height of |
jpayne@68: jpayne@68: |
a pointer to the newly created surface. The caller
jpayne@68: owns the surface and should call cairo_surface_destroy()
when done
jpayne@68: with it.
This function always returns a valid pointer, but it will return a
jpayne@68: pointer to a "nil" surface if an error such as out of memory
jpayne@68: occurs. You can use cairo_surface_status()
to check for this.
Since: 1.12
jpayne@68:void jpayne@68: cairo_xcb_surface_set_size (jpayne@68:cairo_surface_t *surface
, jpayne@68:int width
, jpayne@68:int height
);
Informs cairo of the new size of the XCB drawable underlying the jpayne@68: surface. For a surface created for a window (rather than a pixmap), jpayne@68: this function must be called each time the size of the window jpayne@68: changes. (For a subwindow, you are normally resizing the window jpayne@68: yourself, but for a toplevel window, it is necessary to listen for jpayne@68: ConfigureNotify events.)
jpayne@68:A pixmap can never change size, so it is never necessary to call jpayne@68: this function on a surface created for a pixmap.
jpayne@68:If cairo_surface_flush()
wasn't called, some pending operations
jpayne@68: might be discarded.
surface |
jpayne@68: a cairo_surface_t for the XCB backend |
jpayne@68: jpayne@68: |
width |
jpayne@68: the new width of the surface |
jpayne@68: jpayne@68: |
height |
jpayne@68: the new height of the surface |
jpayne@68: jpayne@68: |
Since: 1.12
jpayne@68:void jpayne@68: cairo_xcb_surface_set_drawable (jpayne@68:cairo_surface_t *surface
, jpayne@68:xcb_drawable_t drawable
, jpayne@68:int width
, jpayne@68:int height
);
Informs cairo of the new drawable and size of the XCB drawable underlying the jpayne@68: surface.
jpayne@68:If cairo_surface_flush()
wasn't called, some pending operations
jpayne@68: might be discarded.
surface |
jpayne@68: a cairo_surface_t for the XCB backend |
jpayne@68: jpayne@68: |
drawable |
jpayne@68: the new drawable of the surface |
jpayne@68: jpayne@68: |
width |
jpayne@68: the new width of the surface |
jpayne@68: jpayne@68: |
height |
jpayne@68: the new height of the surface |
jpayne@68: jpayne@68: |
Since: 1.12
jpayne@68:xcb_connection_t *
jpayne@68: cairo_xcb_device_get_connection (cairo_device_t *device
);
jpayne@68: Get the connection for the XCB device.
jpayne@68:device |
jpayne@68: a cairo_device_t for the XCB backend |
jpayne@68: jpayne@68: |
Since: 1.12
jpayne@68:void jpayne@68: cairo_xcb_device_debug_cap_xrender_version jpayne@68: (jpayne@68:cairo_device_t *device
, jpayne@68:int major_version
, jpayne@68:int minor_version
);
Restricts all future XCB surfaces for this devices to the specified version jpayne@68: of the RENDER extension. This function exists solely for debugging purpose. jpayne@68: It let's you find out how cairo would behave with an older version of jpayne@68: the RENDER extension.
jpayne@68:Use the special values -1 and -1 for disabling the RENDER extension.
jpayne@68:device |
jpayne@68: a cairo_device_t for the XCB backend |
jpayne@68: jpayne@68: |
major_version |
jpayne@68: major version to restrict to |
jpayne@68: jpayne@68: |
minor_version |
jpayne@68: minor version to restrict to |
jpayne@68: jpayne@68: |
Since: 1.12
jpayne@68:void jpayne@68: cairo_xcb_device_debug_cap_xshm_version jpayne@68: (jpayne@68:cairo_device_t *device
, jpayne@68:int major_version
, jpayne@68:int minor_version
);
Restricts all future XCB surfaces for this devices to the specified version jpayne@68: of the SHM extension. This function exists solely for debugging purpose. jpayne@68: It let's you find out how cairo would behave with an older version of jpayne@68: the SHM extension.
jpayne@68:Use the special values -1 and -1 for disabling the SHM extension.
jpayne@68:device |
jpayne@68: a cairo_device_t for the XCB backend |
jpayne@68: jpayne@68: |
major_version |
jpayne@68: major version to restrict to |
jpayne@68: jpayne@68: |
minor_version |
jpayne@68: minor version to restrict to |
jpayne@68: jpayne@68: |
Since: 1.12
jpayne@68:int
jpayne@68: cairo_xcb_device_debug_get_precision (cairo_device_t *device
);
jpayne@68: Get the Xrender precision mode.
jpayne@68:device |
jpayne@68: a cairo_device_t for the XCB backend |
jpayne@68: jpayne@68: |
Since: 1.12
jpayne@68:void jpayne@68: cairo_xcb_device_debug_set_precision (jpayne@68:cairo_device_t *device
, jpayne@68:int precision
);
Render supports two modes of precision when rendering trapezoids. Set jpayne@68: the precision to the desired mode.
jpayne@68:device |
jpayne@68: a cairo_device_t for the XCB backend |
jpayne@68: jpayne@68: |
precision |
jpayne@68: the precision to use |
jpayne@68: jpayne@68: |
Since: 1.12
jpayne@68:#define CAIRO_HAS_XCB_SURFACE 1 jpayne@68:jpayne@68:
Defined if the xcb surface backend is available. jpayne@68: This macro can be used to conditionally compile backend-specific code.
jpayne@68:Since: 1.12
jpayne@68: