Commit 0c479224 authored by Chun-wei Fan's avatar Chun-wei Fan
Browse files

Add version macro header

Add a version macro header that would reveal the availability of the
various APIs, which is used to  indicate what stable release series an
API is available, and what release series is an API deprecated.  This
is also used to export the symbols using compiler directives, which
would eliminate the need to maintain .symbols files.

Annotate the symbols in the pubic headers accordingly, and update the
doc sections file so that the macros are included in the documentation.

https://bugzilla.gnome.org/show_bug.cgi?id=767164
parent f0312dd9
......@@ -13,9 +13,90 @@ GDK_PIXBUF_VERSION
GDK_PIXBUF_MAJOR
GDK_PIXBUF_MINOR
GDK_PIXBUF_MICRO
GDK_PIXBUF_VERSION_2_0
GDK_PIXBUF_VERSION_2_2
GDK_PIXBUF_VERSION_2_4
GDK_PIXBUF_VERSION_2_6
GDK_PIXBUF_VERSION_2_8
GDK_PIXBUF_VERSION_2_10
GDK_PIXBUF_VERSION_2_12
GDK_PIXBUF_VERSION_2_14
GDK_PIXBUF_VERSION_2_16
GDK_PIXBUF_VERSION_2_18
GDK_PIXBUF_VERSION_2_20
GDK_PIXBUF_VERSION_2_22
GDK_PIXBUF_VERSION_2_24
GDK_PIXBUF_VERSION_2_26
GDK_PIXBUF_VERSION_2_28
GDK_PIXBUF_VERSION_2_30
GDK_PIXBUF_VERSION_2_32
GDK_PIXBUF_VERSION_2_34
GDK_PIXBUF_VERSION_2_36
GDK_PIXBUF_VERSION_MIN_REQUIRED
GDK_PIXBUF_VERSION_MAX_ALLOWED
<SUBSECTION Private>
GDK_PIXBUF_VAR
GDK_PIXBUF_VERSION_CUR_STABLE
GDK_PIXBUF_VERSION_PREV_STABLE
GDK_PIXBUF_AVAILABLE_IN_ALL
GDK_PIXBUF_AVAILABLE_IN_2_0
GDK_PIXBUF_AVAILABLE_IN_2_2
GDK_PIXBUF_AVAILABLE_IN_2_4
GDK_PIXBUF_AVAILABLE_IN_2_6
GDK_PIXBUF_AVAILABLE_IN_2_8
GDK_PIXBUF_AVAILABLE_IN_2_10
GDK_PIXBUF_AVAILABLE_IN_2_12
GDK_PIXBUF_AVAILABLE_IN_2_14
GDK_PIXBUF_AVAILABLE_IN_2_16
GDK_PIXBUF_AVAILABLE_IN_2_18
GDK_PIXBUF_AVAILABLE_IN_2_20
GDK_PIXBUF_AVAILABLE_IN_2_22
GDK_PIXBUF_AVAILABLE_IN_2_24
GDK_PIXBUF_AVAILABLE_IN_2_26
GDK_PIXBUF_AVAILABLE_IN_2_28
GDK_PIXBUF_AVAILABLE_IN_2_30
GDK_PIXBUF_AVAILABLE_IN_2_32
GDK_PIXBUF_AVAILABLE_IN_2_34
GDK_PIXBUF_AVAILABLE_IN_2_36
GDK_PIXBUF_DEPRECATED_IN_2_0
GDK_PIXBUF_DEPRECATED_IN_2_0_FOR
GDK_PIXBUF_DEPRECATED_IN_2_2
GDK_PIXBUF_DEPRECATED_IN_2_2_FOR
GDK_PIXBUF_DEPRECATED_IN_2_4
GDK_PIXBUF_DEPRECATED_IN_2_4_FOR
GDK_PIXBUF_DEPRECATED_IN_2_6
GDK_PIXBUF_DEPRECATED_IN_2_6_FOR
GDK_PIXBUF_DEPRECATED_IN_2_8
GDK_PIXBUF_DEPRECATED_IN_2_8_FOR
GDK_PIXBUF_DEPRECATED_IN_2_10
GDK_PIXBUF_DEPRECATED_IN_2_10_FOR
GDK_PIXBUF_DEPRECATED_IN_2_12
GDK_PIXBUF_DEPRECATED_IN_2_12_FOR
GDK_PIXBUF_DEPRECATED_IN_2_14
GDK_PIXBUF_DEPRECATED_IN_2_14_FOR
GDK_PIXBUF_DEPRECATED_IN_2_16
GDK_PIXBUF_DEPRECATED_IN_2_16_FOR
GDK_PIXBUF_DEPRECATED_IN_2_18
GDK_PIXBUF_DEPRECATED_IN_2_18_FOR
GDK_PIXBUF_DEPRECATED_IN_2_20
GDK_PIXBUF_DEPRECATED_IN_2_20_FOR
GDK_PIXBUF_DEPRECATED_IN_2_22
GDK_PIXBUF_DEPRECATED_IN_2_22_FOR
GDK_PIXBUF_DEPRECATED_IN_2_24
GDK_PIXBUF_DEPRECATED_IN_2_24_FOR
GDK_PIXBUF_DEPRECATED_IN_2_26
GDK_PIXBUF_DEPRECATED_IN_2_26_FOR
GDK_PIXBUF_DEPRECATED_IN_2_28
GDK_PIXBUF_DEPRECATED_IN_2_28_FOR
GDK_PIXBUF_DEPRECATED_IN_2_30
GDK_PIXBUF_DEPRECATED_IN_2_30_FOR
GDK_PIXBUF_DEPRECATED_IN_2_32
GDK_PIXBUF_DEPRECATED_IN_2_32_FOR
GDK_PIXBUF_DEPRECATED_IN_2_34
GDK_PIXBUF_DEPRECATED_IN_2_34_FOR
GDK_PIXBUF_DEPRECATED_IN_2_36
GDK_PIXBUF_DEPRECATED_IN_2_36_FOR
</SECTION>
<SECTION>
......
......@@ -545,7 +545,8 @@ libgdk_pixbufinclude_HEADERS = \
gdk-pixbuf-enum-types.h \
gdk-pixbuf-marshal.h \
gdk-pixbuf-features.h \
gdk-pixdata.h
gdk-pixdata.h \
gdk-pixbuf-macros.h
noinst_HEADERS = \
gdk-pixbuf-private.h \
......
......@@ -38,7 +38,7 @@ G_BEGIN_DECLS
/**
* GdkPixbufAnimation:
*
*
* An opaque struct representing an animation.
*/
typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
......@@ -46,7 +46,7 @@ typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
/**
* GdkPixbufAnimationIter:
*
*
* An opaque struct representing an iterator which points to a
* certain position in an animation.
*/
......@@ -60,6 +60,7 @@ typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter;
#define GDK_PIXBUF_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIter))
#define GDK_IS_PIXBUF_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER))
GDK_PIXBUF_AVAILABLE_IN_ALL
GType gdk_pixbuf_animation_get_type (void) G_GNUC_CONST;
#ifndef __GTK_DOC_IGNORE__
......@@ -68,38 +69,54 @@ GType gdk_pixbuf_animation_get_type (void) G_GNUC_CONST;
#endif
#endif
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_28
GdkPixbufAnimation *gdk_pixbuf_animation_new_from_stream (GInputStream *stream,
GCancellable *cancellable,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_28
void gdk_pixbuf_animation_new_from_stream_async (GInputStream *stream,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GDK_PIXBUF_AVAILABLE_IN_2_28
GdkPixbufAnimation *gdk_pixbuf_animation_new_from_stream_finish (GAsyncResult*async_result,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_28
GdkPixbufAnimation *gdk_pixbuf_animation_new_from_resource(const char *resource_path,
GError **error);
#ifndef GDK_PIXBUF_DISABLE_DEPRECATED
G_DEPRECATED_FOR(g_object_ref)
GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(g_object_ref)
GdkPixbufAnimation *gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation);
G_DEPRECATED_FOR(g_object_unref)
GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(g_object_unref)
void gdk_pixbuf_animation_unref (GdkPixbufAnimation *animation);
#endif
GDK_PIXBUF_AVAILABLE_IN_ALL
int gdk_pixbuf_animation_get_width (GdkPixbufAnimation *animation);
GDK_PIXBUF_AVAILABLE_IN_ALL
int gdk_pixbuf_animation_get_height (GdkPixbufAnimation *animation);
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean gdk_pixbuf_animation_is_static_image (GdkPixbufAnimation *animation);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_animation_get_static_image (GdkPixbufAnimation *animation);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbufAnimationIter *gdk_pixbuf_animation_get_iter (GdkPixbufAnimation *animation,
const GTimeVal *start_time);
GDK_PIXBUF_AVAILABLE_IN_ALL
GType gdk_pixbuf_animation_iter_get_type (void) G_GNUC_CONST;
GDK_PIXBUF_AVAILABLE_IN_ALL
int gdk_pixbuf_animation_iter_get_delay_time (GdkPixbufAnimationIter *iter);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_animation_iter_get_pixbuf (GdkPixbufAnimationIter *iter);
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean gdk_pixbuf_animation_iter_on_currently_loading_frame (GdkPixbufAnimationIter *iter);
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean gdk_pixbuf_animation_iter_advance (GdkPixbufAnimationIter *iter,
const GTimeVal *current_time);
......@@ -194,7 +211,9 @@ struct _GdkPixbufAnimationIterClass {
};
GDK_PIXBUF_AVAILABLE_IN_ALL
GType gdk_pixbuf_non_anim_get_type (void) G_GNUC_CONST;
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbufAnimation* gdk_pixbuf_non_anim_new (GdkPixbuf *pixbuf);
#endif /* GDK_PIXBUF_ENABLE_BACKEND */
......
......@@ -32,6 +32,8 @@
#include <glib-object.h>
#include <gio/gio.h>
#include <gdk-pixbuf/gdk-pixbuf-macros.h>
G_BEGIN_DECLS
/**
......@@ -213,50 +215,67 @@ typedef enum {
GDK_PIXBUF_ERROR_INCOMPLETE_ANIMATION
} GdkPixbufError;
GDK_PIXBUF_AVAILABLE_IN_ALL
GQuark gdk_pixbuf_error_quark (void);
GDK_PIXBUF_AVAILABLE_IN_ALL
GType gdk_pixbuf_get_type (void) G_GNUC_CONST;
/* Reference counting */
#ifndef GDK_PIXBUF_DISABLE_DEPRECATED
G_DEPRECATED_FOR(g_object_ref)
GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(g_object_ref)
GdkPixbuf *gdk_pixbuf_ref (GdkPixbuf *pixbuf);
G_DEPRECATED_FOR(g_object_unref)
GDK_PIXBUF_DEPRECATED_IN_2_0_FOR(g_object_unref)
void gdk_pixbuf_unref (GdkPixbuf *pixbuf);
#endif
/* GdkPixbuf accessors */
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkColorspace gdk_pixbuf_get_colorspace (const GdkPixbuf *pixbuf);
GDK_PIXBUF_AVAILABLE_IN_ALL
int gdk_pixbuf_get_n_channels (const GdkPixbuf *pixbuf);
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean gdk_pixbuf_get_has_alpha (const GdkPixbuf *pixbuf);
GDK_PIXBUF_AVAILABLE_IN_ALL
int gdk_pixbuf_get_bits_per_sample (const GdkPixbuf *pixbuf);
GDK_PIXBUF_AVAILABLE_IN_ALL
guchar *gdk_pixbuf_get_pixels (const GdkPixbuf *pixbuf);
GDK_PIXBUF_AVAILABLE_IN_ALL
int gdk_pixbuf_get_width (const GdkPixbuf *pixbuf);
GDK_PIXBUF_AVAILABLE_IN_ALL
int gdk_pixbuf_get_height (const GdkPixbuf *pixbuf);
GDK_PIXBUF_AVAILABLE_IN_ALL
int gdk_pixbuf_get_rowstride (const GdkPixbuf *pixbuf);
GDK_PIXBUF_AVAILABLE_IN_2_26
gsize gdk_pixbuf_get_byte_length (const GdkPixbuf *pixbuf);
GDK_PIXBUF_AVAILABLE_IN_2_26
guchar *gdk_pixbuf_get_pixels_with_length (const GdkPixbuf *pixbuf,
guint *length);
GDK_PIXBUF_AVAILABLE_IN_2_32
const guint8* gdk_pixbuf_read_pixels (const GdkPixbuf *pixbuf);
GDK_PIXBUF_AVAILABLE_IN_2_32
GBytes * gdk_pixbuf_read_pixel_bytes (const GdkPixbuf *pixbuf);
/* Create a blank pixbuf with an optimal rowstride and a new buffer */
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_new (GdkColorspace colorspace, gboolean has_alpha, int bits_per_sample,
int width, int height);
/* Copy a pixbuf */
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_copy (const GdkPixbuf *pixbuf);
/* Create a pixbuf which points to the pixels of another pixbuf */
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_new_subpixbuf (GdkPixbuf *src_pixbuf,
int src_x,
int src_y,
......@@ -274,25 +293,31 @@ GdkPixbuf *gdk_pixbuf_new_subpixbuf (GdkPixbuf *src_pixbuf,
#endif
#endif
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_new_from_file (const char *filename,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_4
GdkPixbuf *gdk_pixbuf_new_from_file_at_size (const char *filename,
int width,
int height,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_6
GdkPixbuf *gdk_pixbuf_new_from_file_at_scale (const char *filename,
int width,
int height,
gboolean preserve_aspect_ratio,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_26
GdkPixbuf *gdk_pixbuf_new_from_resource (const char *resource_path,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_26
GdkPixbuf *gdk_pixbuf_new_from_resource_at_scale (const char *resource_path,
int width,
int height,
gboolean preserve_aspect_ratio,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_new_from_data (const guchar *data,
GdkColorspace colorspace,
gboolean has_alpha,
......@@ -302,17 +327,19 @@ GdkPixbuf *gdk_pixbuf_new_from_data (const guchar *data,
GdkPixbufDestroyNotify destroy_fn,
gpointer destroy_fn_data);
GDK_PIXBUF_AVAILABLE_IN_2_32
GdkPixbuf *gdk_pixbuf_new_from_bytes (GBytes *data,
GdkColorspace colorspace,
gboolean has_alpha,
int bits_per_sample,
int width, int height,
int rowstride);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_new_from_xpm_data (const char **data);
#ifndef GDK_PIXBUF_DISABLE_DEPRECATED
G_DEPRECATED
GDK_PIXBUF_DEPRECATED_IN_2_32
GdkPixbuf* gdk_pixbuf_new_from_inline (gint data_length,
const guint8 *data,
gboolean copy_pixels,
......@@ -320,6 +347,7 @@ GdkPixbuf* gdk_pixbuf_new_from_inline (gint data_length,
#endif
/* Mutations */
GDK_PIXBUF_AVAILABLE_IN_ALL
void gdk_pixbuf_fill (GdkPixbuf *pixbuf,
guint32 pixel);
......@@ -333,12 +361,14 @@ void gdk_pixbuf_fill (GdkPixbuf *pixbuf,
#endif
#endif
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean gdk_pixbuf_save (GdkPixbuf *pixbuf,
const char *filename,
const char *type,
GError **error,
...) G_GNUC_NULL_TERMINATED;
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean gdk_pixbuf_savev (GdkPixbuf *pixbuf,
const char *filename,
const char *type,
......@@ -372,6 +402,7 @@ typedef gboolean (*GdkPixbufSaveFunc) (const gchar *buf,
GError **error,
gpointer data);
GDK_PIXBUF_AVAILABLE_IN_2_4
gboolean gdk_pixbuf_save_to_callback (GdkPixbuf *pixbuf,
GdkPixbufSaveFunc save_func,
gpointer user_data,
......@@ -379,6 +410,7 @@ gboolean gdk_pixbuf_save_to_callback (GdkPixbuf *pixbuf,
GError **error,
...) G_GNUC_NULL_TERMINATED;
GDK_PIXBUF_AVAILABLE_IN_2_4
gboolean gdk_pixbuf_save_to_callbackv (GdkPixbuf *pixbuf,
GdkPixbufSaveFunc save_func,
gpointer user_data,
......@@ -389,6 +421,7 @@ gboolean gdk_pixbuf_save_to_callbackv (GdkPixbuf *pixbuf,
/* Saving into a newly allocated char array */
GDK_PIXBUF_AVAILABLE_IN_2_4
gboolean gdk_pixbuf_save_to_buffer (GdkPixbuf *pixbuf,
gchar **buffer,
gsize *buffer_size,
......@@ -396,6 +429,7 @@ gboolean gdk_pixbuf_save_to_buffer (GdkPixbuf *pixbuf,
GError **error,
...) G_GNUC_NULL_TERMINATED;
GDK_PIXBUF_AVAILABLE_IN_2_4
gboolean gdk_pixbuf_save_to_bufferv (GdkPixbuf *pixbuf,
gchar **buffer,
gsize *buffer_size,
......@@ -404,18 +438,22 @@ gboolean gdk_pixbuf_save_to_bufferv (GdkPixbuf *pixbuf,
char **option_values,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_14
GdkPixbuf *gdk_pixbuf_new_from_stream (GInputStream *stream,
GCancellable *cancellable,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_ALL
void gdk_pixbuf_new_from_stream_async (GInputStream *stream,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_new_from_stream_finish (GAsyncResult *async_result,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_14
GdkPixbuf *gdk_pixbuf_new_from_stream_at_scale (GInputStream *stream,
gint width,
gint height,
......@@ -423,6 +461,7 @@ GdkPixbuf *gdk_pixbuf_new_from_stream_at_scale (GInputStream *stream,
GCancellable *cancellable,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_ALL
void gdk_pixbuf_new_from_stream_at_scale_async (GInputStream *stream,
gint width,
gint height,
......@@ -431,6 +470,7 @@ void gdk_pixbuf_new_from_stream_at_scale_async (GInputStream *stream,
GAsyncReadyCallback callback,
gpointer user_data);
GDK_PIXBUF_AVAILABLE_IN_2_14
gboolean gdk_pixbuf_save_to_stream (GdkPixbuf *pixbuf,
GOutputStream *stream,
const char *type,
......@@ -438,6 +478,7 @@ gboolean gdk_pixbuf_save_to_stream (GdkPixbuf *pixbuf,
GError **error,
...);
GDK_PIXBUF_AVAILABLE_IN_ALL
void gdk_pixbuf_save_to_stream_async (GdkPixbuf *pixbuf,
GOutputStream *stream,
const gchar *type,
......@@ -446,9 +487,11 @@ void gdk_pixbuf_save_to_stream_async (GdkPixbuf *pixbuf,
gpointer user_data,
...);
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean gdk_pixbuf_save_to_stream_finish (GAsyncResult *async_result,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_36
void gdk_pixbuf_save_to_streamv_async (GdkPixbuf *pixbuf,
GOutputStream *stream,
const gchar *type,
......@@ -458,6 +501,7 @@ void gdk_pixbuf_save_to_streamv_async (GdkPixbuf *pixbuf,
GAsyncReadyCallback callback,
gpointer user_data);
GDK_PIXBUF_AVAILABLE_IN_2_36
gboolean gdk_pixbuf_save_to_streamv (GdkPixbuf *pixbuf,
GOutputStream *stream,
const char *type,
......@@ -467,10 +511,12 @@ gboolean gdk_pixbuf_save_to_streamv (GdkPixbuf *pixbuf,
GError **error);
/* Adding an alpha channel */
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf *gdk_pixbuf_add_alpha (const GdkPixbuf *pixbuf, gboolean substitute_color,
guchar r, guchar g, guchar b);
/* Copy an area of a pixbuf onto another one */
GDK_PIXBUF_AVAILABLE_IN_ALL
void gdk_pixbuf_copy_area (const GdkPixbuf *src_pixbuf,
int src_x, int src_y,
int width, int height,
......@@ -478,16 +524,20 @@ void gdk_pixbuf_copy_area (const GdkPixbuf *src_pixbuf,
int dest_x, int dest_y);
/* Brighten/darken and optionally make it pixelated-looking */
GDK_PIXBUF_AVAILABLE_IN_ALL
void gdk_pixbuf_saturate_and_pixelate (const GdkPixbuf *src,
GdkPixbuf *dest,
gfloat saturation,
gboolean pixelate);
/* Transform an image to agree with its embedded orientation option / tag */
GDK_PIXBUF_AVAILABLE_IN_2_12
GdkPixbuf *gdk_pixbuf_apply_embedded_orientation (GdkPixbuf *src);
GDK_PIXBUF_AVAILABLE_IN_ALL
const gchar * gdk_pixbuf_get_option (GdkPixbuf *pixbuf,
const gchar *key);
GDK_PIXBUF_AVAILABLE_IN_2_32
GHashTable * gdk_pixbuf_get_options (GdkPixbuf *pixbuf);
......
......@@ -8,6 +8,8 @@
#include <glib-object.h>
#include <gdk-pixbuf/gdk-pixbuf-macros.h>
G_BEGIN_DECLS
/*** END file-header ***/
......@@ -17,6 +19,7 @@ G_BEGIN_DECLS
/*** END file-production ***/
/*** BEGIN value-header ***/
GDK_PIXBUF_AVAILABLE_IN_ALL
GType @enum_name@_get_type (void) G_GNUC_CONST;
#define @ENUMPREFIX@_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
/*** END value-header ***/
......
......@@ -40,34 +40,50 @@
G_BEGIN_DECLS
typedef struct _GdkPixbufFormat GdkPixbufFormat;
GDK_PIXBUF_AVAILABLE_IN_ALL
GType gdk_pixbuf_format_get_type (void) G_GNUC_CONST;
GDK_PIXBUF_AVAILABLE_IN_ALL
GSList *gdk_pixbuf_get_formats (void);
GDK_PIXBUF_AVAILABLE_IN_2_2
gchar *gdk_pixbuf_format_get_name (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_2
gchar *gdk_pixbuf_format_get_description (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_2
gchar **gdk_pixbuf_format_get_mime_types (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_2
gchar **gdk_pixbuf_format_get_extensions (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_2
gboolean gdk_pixbuf_format_is_writable (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_6
gboolean gdk_pixbuf_format_is_scalable (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_6
gboolean gdk_pixbuf_format_is_disabled (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_6
void gdk_pixbuf_format_set_disabled (GdkPixbufFormat *format,
gboolean disabled);
GDK_PIXBUF_AVAILABLE_IN_2_6
gchar *gdk_pixbuf_format_get_license (GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_2_4
GdkPixbufFormat *gdk_pixbuf_get_file_info (const gchar *filename,
gint *width,
gint *height);
GDK_PIXBUF_AVAILABLE_IN_2_32
void gdk_pixbuf_get_file_info_async (const gchar *filename,
GCancellable *cancellable,
GAsyncReadyCallback callback,
gpointer user_data);
GDK_PIXBUF_AVAILABLE_IN_2_32
GdkPixbufFormat *gdk_pixbuf_get_file_info_finish (GAsyncResult *async_result,
gint *width,
gint *height,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbufFormat *gdk_pixbuf_format_copy (const GdkPixbufFormat *format);
GDK_PIXBUF_AVAILABLE_IN_ALL
void gdk_pixbuf_format_free (GdkPixbufFormat *format);
#ifdef GDK_PIXBUF_ENABLE_BACKEND
......@@ -289,6 +305,7 @@ typedef void (* GdkPixbufModuleFillInfoFunc) (GdkPixbufFormat *info);
/* key/value pairs that can be attached by the pixbuf loader */
GDK_PIXBUF_AVAILABLE_IN_2_2
gboolean gdk_pixbuf_set_option (GdkPixbuf *pixbuf,
const gchar *key,
const gchar *value);
......
......@@ -79,26 +79,37 @@ struct _GdkPixbufLoaderClass
void (*closed) (GdkPixbufLoader *loader);
};
GDK_PIXBUF_AVAILABLE_IN_ALL
GType gdk_pixbuf_loader_get_type (void) G_GNUC_CONST;
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbufLoader * gdk_pixbuf_loader_new (void);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbufLoader * gdk_pixbuf_loader_new_with_type (const char *image_type,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_4
GdkPixbufLoader * gdk_pixbuf_loader_new_with_mime_type (const char *mime_type,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_2
void gdk_pixbuf_loader_set_size (GdkPixbufLoader *loader,
int width,
int height);
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean gdk_pixbuf_loader_write (GdkPixbufLoader *loader,
const guchar *buf,
gsize count,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_30
gboolean gdk_pixbuf_loader_write_bytes (GdkPixbufLoader *loader,
GBytes *buffer,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbuf * gdk_pixbuf_loader_get_pixbuf (GdkPixbufLoader *loader);
GDK_PIXBUF_AVAILABLE_IN_ALL
GdkPixbufAnimation * gdk_pixbuf_loader_get_animation (GdkPixbufLoader *loader);
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean gdk_pixbuf_loader_close (GdkPixbufLoader *loader,
GError **error);
GDK_PIXBUF_AVAILABLE_IN_2_2
GdkPixbufFormat *gdk_pixbuf_loader_get_format (GdkPixbufLoader *loader);
G_END_DECLS
......
This diff is collapsed.
......@@ -46,16 +46,22 @@ typedef struct _GdkPixbufSimpleAnimClass GdkPixbufSimpleAnimClass;
#define GDK_IS_PIXBUF_SIMPLE_ANIM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_SIMPLE_ANIM))
#define GDK_PIXBUF_SIMPLE_ANIM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_SIMPLE_ANIM, GdkPixbufSimpleAnimClass))
GDK_PIXBUF_AVAILABLE_IN_ALL
GType gdk_pixbuf_simple_anim_get_type (void) G_GNUC_CONST;
GDK_PIXBUF_AVAILABLE_IN_ALL
GType gdk_pixbuf_simple_anim_iter_get_type (void) G_GNUC_CONST;
GDK_PIXBUF_AVAILABLE_IN_2_8
GdkPixbufSimpleAnim *gdk_pixbuf_simple_anim_new (gint width,
gint height,
gfloat rate);
GDK_PIXBUF_AVAILABLE_IN_2_8
void gdk_pixbuf_simple_anim_add_frame (GdkPixbufSimpleAnim *animation,
GdkPixbuf *pixbuf);
GDK_PIXBUF_AVAILABLE_IN_ALL
void gdk_pixbuf_simple_anim_set_loop (GdkPixbufSimpleAnim *animation,
gboolean loop);
GDK_PIXBUF_AVAILABLE_IN_ALL
gboolean gdk_pixbuf_simple_anim_get_loop (GdkPixbufSimpleAnim *animation);
G_END_DECLS
......
......@@ -92,6 +92,7 @@ typedef enum {
GDK_PIXBUF_ROTATE_CLOCKWISE = 270
} GdkPixbufRotation;
GDK_PIXBUF_AVAILABLE_IN_ALL
void gdk_pixbuf_scale (const GdkPixbuf *src,
GdkPixbuf *dest,
int dest_x,
......@@ -103,6 +104,7 @@ void gdk_pixbuf_scale (const GdkPixbuf *src,
double scale_x,
double scale_y,
GdkInterpType interp_type);
GDK_PIXBUF_AVAILABLE_IN_ALL
void gdk_pixbuf_composite (const GdkPixbuf *src,
GdkPixbuf *dest,