Commit f40bcdcf authored by Tor Lillqvist's avatar Tor Lillqvist Committed by Tor Lillqvist

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)
parent 77265413
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)
2005-03-09 Matthias Clasen <mclasen@redhat.com>
* io-gif-animation.c (gdk_pixbuf_gif_anim_frame_composite): Fix
......
......@@ -156,6 +156,12 @@ void gdk_pixbuf_fill (GdkPixbuf *pixbuf,
/* Saving */
#ifdef G_OS_WIN32
/* DLL ABI stability hack. */
#define gdk_pixbuf_save gdk_pixbuf_save_utf8
#define gdk_pixbuf_savev gdk_pixbuf_savev_utf8
#endif
gboolean gdk_pixbuf_save (GdkPixbuf *pixbuf,
const char *filename,
const char *type,
......
......@@ -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.
......
......@@ -82,12 +82,18 @@ gdk_pixbuf_ref
gdk_pixbuf_rotate_simple
gdk_pixbuf_rotation_get_type G_GNUC_CONST
gdk_pixbuf_saturate_and_pixelate
gdk_pixbuf_save G_GNUC_NULL_TERMINATED
gdk_pixbuf_save PRIVATE G_GNUC_NULL_TERMINATED
#ifdef G_OS_WIN32
gdk_pixbuf_save_utf8
#endif
gdk_pixbuf_save_to_buffer G_GNUC_NULL_TERMINATED
gdk_pixbuf_save_to_bufferv
gdk_pixbuf_save_to_callback G_GNUC_NULL_TERMINATED
gdk_pixbuf_save_to_callbackv
gdk_pixbuf_savev
gdk_pixbuf_savev PRIVATE
#ifdef G_OS_WIN32
gdk_pixbuf_savev_utf8
#endif
gdk_pixbuf_scale
gdk_pixbuf_scale_simple
gdk_pixbuf_set_option
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment