[gtk+] Add a boxed type for cairo_pattern_t.



commit 02a30118c6110bc7906602adf1c38622d520f7de
Author: Carlos Garnacho <carlosg gnome org>
Date:   Thu Sep 2 01:45:17 2010 +0200

    Add a boxed type for cairo_pattern_t.

 gdk/gdkcairo.c |    2 ++
 gdk/gdkcairo.h |    3 +++
 2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gdk/gdkcairo.c b/gdk/gdkcairo.c
index 0d4b8bd..60ac621 100644
--- a/gdk/gdkcairo.c
+++ b/gdk/gdkcairo.c
@@ -25,6 +25,8 @@
 
 #include <math.h>
 
+G_DEFINE_BOXED_TYPE (cairo_pattern_t, gdk_cairo_pattern, cairo_pattern_reference, cairo_pattern_destroy)
+
 /**
  * SECTION:cairo_interaction
  * @Short_description: Functions to support using Cairo
diff --git a/gdk/gdkcairo.h b/gdk/gdkcairo.h
index 67e08aa..836c0be 100644
--- a/gdk/gdkcairo.h
+++ b/gdk/gdkcairo.h
@@ -32,6 +32,9 @@
 G_BEGIN_DECLS
 
 cairo_t *gdk_cairo_create            (GdkWindow          *window);
+#define GDK_TYPE_CAIRO_PATTERN (gdk_cairo_pattern_get_type ())
+
+GType    gdk_cairo_pattern_get_type  (void) G_GNUC_CONST;
 gboolean gdk_cairo_get_clip_rectangle(cairo_t            *cr,
                                       GdkRectangle       *rect);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]