Add pixman_image_get_destroy_data()
authorAlexander Larsson <alexl@redhat.com>
Tue, 9 Feb 2010 14:57:18 +0000 (15:57 +0100)
committerAlexander Larsson <alexl@redhat.com>
Tue, 9 Feb 2010 14:57:18 +0000 (15:57 +0100)
This way you can get back user data that was set using
pixman_image_set_destroy_function().

pixman/pixman-image.c
pixman/pixman.h

index c035eca..6036c56 100644 (file)
@@ -231,6 +231,12 @@ pixman_image_set_destroy_function (pixman_image_t *            image,
     image->common.destroy_data = data;
 }
 
+PIXMAN_EXPORT void *
+pixman_image_get_destroy_data (pixman_image_t *image)
+{
+  return image->common.destroy_data;
+}
+
 void
 _pixman_image_reset_clip_region (pixman_image_t *image)
 {
index 5e35d92..03a233e 100644 (file)
@@ -726,6 +726,7 @@ pixman_bool_t   pixman_image_unref                   (pixman_image_t
 void           pixman_image_set_destroy_function    (pixman_image_t               *image,
                                                      pixman_image_destroy_func_t   function,
                                                      void                         *data);
+void *         pixman_image_get_destroy_data        (pixman_image_t               *image);
 
 /* Set properties */
 pixman_bool_t   pixman_image_set_clip_region         (pixman_image_t               *image,