diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2020-02-11 17:24:01 +0000 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2020-02-13 14:53:25 +0000 |
commit | cdd7e4c5ec8f44d80c886a071984eaf85b5eed69 (patch) | |
tree | d2dc510fd7d00f5c8a4a046d717316458c9c1064 /gdk/gdkcontentproviderimpl.h | |
parent | 47f2a6cafd1b2353a3414147ec083e84e9d95885 (diff) | |
download | gtk+-cdd7e4c5ec8f44d80c886a071984eaf85b5eed69.tar.gz |
Add a notify function to GdkContentProvider
The callback-based content providers need a GDestroyNotify function to
free the data passed to them on construction, otherwise they are going
to leak.
Diffstat (limited to 'gdk/gdkcontentproviderimpl.h')
-rw-r--r-- | gdk/gdkcontentproviderimpl.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gdk/gdkcontentproviderimpl.h b/gdk/gdkcontentproviderimpl.h index 19ac6969e1..cea0b6b667 100644 --- a/gdk/gdkcontentproviderimpl.h +++ b/gdk/gdkcontentproviderimpl.h @@ -41,7 +41,8 @@ typedef void (*GdkContentProviderGetValueFunc) (GValue *value, GDK_AVAILABLE_IN_ALL GdkContentProvider * gdk_content_provider_new_with_callback (GType type, GdkContentProviderGetValueFunc func, - gpointer data); + gpointer data, + GDestroyNotify notify); typedef GBytes * (*GdkContentProviderGetBytesFunc) (const char *mime_type, gpointer data); @@ -49,7 +50,8 @@ typedef GBytes * (*GdkContentProviderGetBytesFunc) (const char *mime_type, GDK_AVAILABLE_IN_ALL GdkContentProvider * gdk_content_provider_new_with_formats (GdkContentFormats *formats, GdkContentProviderGetBytesFunc func, - gpointer data); + gpointer data, + GDestroyNotify notify); G_END_DECLS |