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)
This commit is contained in:
Tor Lillqvist 2005-03-10 19:13:19 +00:00 committed by Tor Lillqvist
parent 77265413d9
commit f40bcdcfc5
4 changed files with 97 additions and 3 deletions

View File

@ -1,3 +1,10 @@
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

View File

@ -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,

View File

@ -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.
@ -1626,7 +1670,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);
g_return_val_if_fail (error == NULL || *error == 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.

View File

@ -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