diff options
author | Tor Lillqvist <tml@novell.com> | 2005-03-10 19:13:19 +0000 |
---|---|---|
committer | Tor Lillqvist <tml@src.gnome.org> | 2005-03-10 19:13:19 +0000 |
commit | f40bcdcfc53ce5f2aaa4f4c1a64b0bbfba4523de (patch) | |
tree | 59f592def30c4e17b2812236ae23546e1964d116 /gdk-pixbuf/gdk-pixbuf-io.c | |
parent | 77265413d948e61aecdaadb614951c45052f36a8 (diff) | |
download | gtk+-f40bcdcfc53ce5f2aaa4f4c1a64b0bbfba4523de.tar.gz |
gdk-pixbuf-core.h gdk-pixbuf-io.c Implement DLL ABI stablility for
2005-03-10 Tor Lillqvist <tml@novell.com>
* gdk-pixbuf-core.h
* gdk-pixbuf-io.c
* gdk-pixbuf.symbols: Implement DLL ABI stablility for
gdk_pixbuf_save() and gdk_pixbuf_savev(). (#167973)
Diffstat (limited to 'gdk-pixbuf/gdk-pixbuf-io.c')
-rw-r--r-- | gdk-pixbuf/gdk-pixbuf-io.c | 77 |
1 files changed, 76 insertions, 1 deletions
diff --git a/gdk-pixbuf/gdk-pixbuf-io.c b/gdk-pixbuf/gdk-pixbuf-io.c index 28ccaec7bc..dbe455b499 100644 --- a/gdk-pixbuf/gdk-pixbuf-io.c +++ b/gdk-pixbuf/gdk-pixbuf-io.c @@ -1599,6 +1599,50 @@ gdk_pixbuf_save (GdkPixbuf *pixbuf, return result; } +#ifdef G_OS_WIN32 + +#undef gdk_pixbuf_save + +gboolean +gdk_pixbuf_save (GdkPixbuf *pixbuf, + const char *filename, + const char *type, + GError **error, + ...) +{ + char *utf8_filename; + gchar **keys = NULL; + gchar **values = NULL; + va_list args; + gboolean result; + + g_return_val_if_fail (error == NULL || *error == NULL, FALSE); + + utf8_filename = g_locale_to_utf8 (filename, -1, NULL, NULL, error); + + if (utf8_filename == NULL) + return FALSE; + + va_start (args, error); + + collect_save_options (args, &keys, &values); + + va_end (args); + + result = gdk_pixbuf_savev_utf8 (pixbuf, utf8_filename, type, + keys, values, + error); + + g_free (utf8_filename); + + g_strfreev (keys); + g_strfreev (values); + + return result; +} + +#endif + /** * gdk_pixbuf_savev: * @pixbuf: a #GdkPixbuf. @@ -1625,7 +1669,6 @@ gdk_pixbuf_savev (GdkPixbuf *pixbuf, { FILE *f = NULL; gboolean result; - g_return_val_if_fail (filename != NULL, FALSE); g_return_val_if_fail (type != NULL, FALSE); @@ -1672,6 +1715,38 @@ gdk_pixbuf_savev (GdkPixbuf *pixbuf, return TRUE; } +#ifdef G_OS_WIN32 + +#undef gdk_pixbuf_savev + +gboolean +gdk_pixbuf_savev (GdkPixbuf *pixbuf, + const char *filename, + const char *type, + char **option_keys, + char **option_values, + GError **error) +{ + char *utf8_filename; + gboolean retval; + + g_return_val_if_fail (filename != NULL, FALSE); + + utf8_filename = g_locale_to_utf8 (filename, -1, NULL, NULL, error); + + if (utf8_filename == NULL) + return FALSE; + + retval = gdk_pixbuf_savev_utf8 (pixbuf, utf8_filename, type, + option_keys, option_values, error); + + g_free (utf8_filename); + + return retval; +} + +#endif + /** * gdk_pixbuf_save_to_callback: * @pixbuf: a #GdkPixbuf. |