diff options
author | Owen Taylor <otaylor@redhat.com> | 2005-03-15 16:25:30 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@redhat.com> | 2005-03-15 16:25:30 +0000 |
commit | 5fecf69e2c41ed1957fdde8b0208e7a4aa031466 (patch) | |
tree | 975380f3f8d1fb632e4e637c4b8f29174036c466 /src/cairo-xlib.h | |
parent | 30e771d8118a6b240f483b4d0db26bb970e88181 (diff) | |
download | cairo-5fecf69e2c41ed1957fdde8b0208e7a4aa031466.tar.gz |
src/cairo-xlib.h src/cairo_xlib_surface.c: Rework set of contructors for XLib surfaces. Add cairo_xlib_surface_set_size().
src/cairo-xlib.h src/cairo_xlib_surface.c: Add cairo_xlib_surface_set_device_offset().
Rewrite for clarity and efficiency.
Use a temporary pixmap to avoid possible BadMatch when fetch from windows.
src/cairo.[ch] src/cairo-xlib.h: Fix some parameter names for the docs.
Update
Diffstat (limited to 'src/cairo-xlib.h')
-rw-r--r-- | src/cairo-xlib.h | 38 |
1 files changed, 27 insertions, 11 deletions
diff --git a/src/cairo-xlib.h b/src/cairo-xlib.h index 18db7b114..dc6e81ec6 100644 --- a/src/cairo-xlib.h +++ b/src/cairo-xlib.h @@ -45,29 +45,45 @@ CAIRO_BEGIN_DECLS -/* XXX: This shold be renamed to cairo_set_target_xlib to match the +/* XXX: This should be renamed to cairo_set_target_xlib to match the * other backends */ void cairo_set_target_drawable (cairo_t *cr, Display *dpy, Drawable drawable); -/* XXX: This is a mess from the user's POV. Should the Visual or the - cairo_format_t control what render format is used? Maybe I can have - cairo_surface_create_for_window with a visual, and - cairo_surface_create_for_pixmap with a cairo_format_t. Would that work? -*/ +cairo_surface_t * +cairo_xlib_surface_create_for_pixmap (Display *dpy, + Pixmap pixmap, + cairo_format_t format); + +cairo_surface_t * +cairo_xlib_surface_create_for_pixmap_with_visual (Display *dpy, + Pixmap pixmap, + Visual *visual); + +cairo_surface_t * +cairo_xlib_surface_create_for_window_with_visual (Display *dpy, + Window window, + Visual *visual); + +/* Deprecated in favor of the more specific functions above */ cairo_surface_t * cairo_xlib_surface_create (Display *dpy, Drawable drawable, Visual *visual, cairo_format_t format, Colormap colormap); - -/* XXX: This has been proposed -cairo_status_t -cairo_xlib_surface_set_size (cairo_surface_t *surface, int width, int height); -*/ + +void +cairo_xlib_surface_set_size (cairo_surface_t *surface, + int width, + int height); + +void +cairo_xlib_surface_set_device_offset (cairo_surface_t *surface, + int x_offset, + int y_offset); CAIRO_END_DECLS |