]> Pileus Git - ~andy/gtk/commitdiff
Add _gdk_gc_get_clip_mask
authorAlexander Larsson <alexl@redhat.com>
Tue, 7 Jul 2009 12:33:48 +0000 (14:33 +0200)
committerAlexander Larsson <alexl@redhat.com>
Tue, 7 Jul 2009 15:10:49 +0000 (17:10 +0200)
Internal function to get the clip mask of a gc (if set)

gdk/gdkgc.c
gdk/gdkinternals.h

index b4c6f811d30a1614f67d992472d8d20f57955b42..43e2a5f321af1ed14529f9127e69b1a5f7e6e6e4 100644 (file)
@@ -774,6 +774,24 @@ _gdk_gc_get_clip_region (GdkGC *gc)
   return GDK_GC_GET_PRIVATE (gc)->clip_region;
 }
 
+/**
+ * _gdk_gc_get_clip_mask:
+ * @gc: a #GdkGC
+ *
+ * Gets the current clip mask for @gc, if any.
+ *
+ * Return value: the clip mask for the GC, or %NULL.
+ *   (if a clip region is set, the return will be %NULL)
+ *   This value is owned by the GC and must not be freed.
+ **/
+GdkBitmap *
+_gdk_gc_get_clip_mask (GdkGC *gc)
+{
+  g_return_val_if_fail (GDK_IS_GC (gc), NULL);
+
+  return GDK_GC_GET_PRIVATE (gc)->clip_mask;
+}
+
 /**
  * _gdk_gc_get_fill:
  * @gc: a #GdkGC
index 946c3f9dd9748eaeab5d6cc8c87b147281d3c456..c9843860b13442eb6071c46f3a5b770284e834c3 100644 (file)
@@ -399,6 +399,7 @@ void _gdk_gc_init (GdkGC           *gc,
                   GdkGCValuesMask  values_mask);
 
 GdkRegion *_gdk_gc_get_clip_region (GdkGC *gc);
+GdkBitmap *_gdk_gc_get_clip_mask   (GdkGC *gc);
 gboolean   _gdk_gc_get_exposures   (GdkGC *gc);
 GdkFill    _gdk_gc_get_fill        (GdkGC *gc);
 GdkPixmap *_gdk_gc_get_tile        (GdkGC *gc);