]> Pileus Git - ~andy/gtk/commitdiff
gdk-pixbuf-core.h gdk-pixbuf-io.c Implement DLL ABI stablility for
authorTor Lillqvist <tml@novell.com>
Thu, 10 Mar 2005 19:13:19 +0000 (19:13 +0000)
committerTor Lillqvist <tml@src.gnome.org>
Thu, 10 Mar 2005 19:13:19 +0000 (19:13 +0000)
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)

gdk-pixbuf/ChangeLog
gdk-pixbuf/gdk-pixbuf-core.h
gdk-pixbuf/gdk-pixbuf-io.c
gdk-pixbuf/gdk-pixbuf.symbols

index 883c7414f2297b3807d1c29f12411d787a2506ad..c4de18aae9923c70d3467db732d12ada583e1c9e 100644 (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 
index 3aeb40d98d639233ed185f93e0d422f643073af7..f7abfd0c7f3576e502c2c5e9bcac2f60ae67bccf 100644 (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, 
index 28ccaec7bc0dc57e28d0fa7e8032980d1df39ca8..dbe455b4992d58f1b1b074e1c6a440e7f8d94a1e 100644 (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.
@@ -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.
index 3210a4c7d6780e384cbb62edd803b820c6823508..18cf21d2216f13c9005c09ad601f667cc8fc5175 100644 (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