diff options
author | Benjamin Otte <otte@redhat.com> | 2010-10-06 19:12:27 +0200 |
---|---|---|
committer | Benjamin Otte <otte@redhat.com> | 2010-12-02 20:17:28 +0100 |
commit | 97e6e9d212de2cfe543872513c6956bdee6dc6e7 (patch) | |
tree | e84d70c80e77ee9736445a96f7e7ed7ab41646ac /gdk/gdkcairo.c | |
parent | 65dde2f92f8d2fb78688966d2258848383270877 (diff) | |
download | gtk+-97e6e9d212de2cfe543872513c6956bdee6dc6e7.tar.gz |
API: Make gdk_cairo_create() take a GdkWindow
This is not strictly an API change as GdkDrawable is typedeffed to
GdkWindow, but it changes the header, so I'm marking it as such.
gdk_cairo_create() can only be used with windows these days, so it makes
sense to pass a window. With that, we can alseo remove the
set_cairo_clip() vfunc from GdkDrawable and implement it inside
gdkwindow.c.
Diffstat (limited to 'gdk/gdkcairo.c')
-rw-r--r-- | gdk/gdkcairo.c | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c index a554241fff..7fe0ccc770 100644 --- a/gdk/gdkcairo.c +++ b/gdk/gdkcairo.c @@ -43,42 +43,6 @@ /** - * gdk_cairo_create: - * @drawable: a #GdkDrawable - * - * Creates a Cairo context for drawing to @drawable. - * - * <note><para> - * Note that due to double-buffering, Cairo contexts created - * in a GTK+ expose event handler cannot be cached and reused - * between different expose events. - * </para></note> - * - * Return value: A newly created Cairo context. Free with - * cairo_destroy() when you are done drawing. - * - * Since: 2.8 - **/ -cairo_t * -gdk_cairo_create (GdkDrawable *drawable) -{ - cairo_surface_t *surface; - cairo_t *cr; - - g_return_val_if_fail (GDK_IS_DRAWABLE (drawable), NULL); - - surface = _gdk_drawable_ref_cairo_surface (drawable); - cr = cairo_create (surface); - - if (GDK_DRAWABLE_GET_CLASS (drawable)->set_cairo_clip) - GDK_DRAWABLE_GET_CLASS (drawable)->set_cairo_clip (drawable, cr); - - cairo_surface_destroy (surface); - - return cr; -} - -/** * gdk_cairo_get_clip_rectangle: * @cr: a cairo context * @rect: (out) (allow-none): return location for the clip, or %NULL |