Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 
 
 

152 lignes
6.5 KiB

  1. /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */
  2. /* GdkPixbuf library - Animation support
  3. *
  4. * Copyright (C) 1999 The Free Software Foundation
  5. *
  6. * Authors: Mark Crichton <crichton@gimp.org>
  7. * Miguel de Icaza <miguel@gnu.org>
  8. * Federico Mena-Quintero <federico@gimp.org>
  9. * Havoc Pennington <hp@redhat.com>
  10. *
  11. * This library is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU Lesser General Public
  13. * License as published by the Free Software Foundation; either
  14. * version 2 of the License, or (at your option) any later version.
  15. *
  16. * This library is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  19. * Lesser General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU Lesser General Public
  22. * License along with this library; if not, write to the
  23. * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  24. * Boston, MA 02111-1307, USA.
  25. */
  26. #if defined(GDK_PIXBUF_DISABLE_SINGLE_INCLUDES) && !defined (GDK_PIXBUF_H_INSIDE) && !defined (GDK_PIXBUF_COMPILATION)
  27. #error "Only <gdk-pixbuf/gdk-pixbuf.h> can be included directly."
  28. #endif
  29. #ifndef GDK_PIXBUF_ANIMATION_H
  30. #define GDK_PIXBUF_ANIMATION_H
  31. #include <glib-object.h>
  32. #include <gdk-pixbuf/gdk-pixbuf-core.h>
  33. G_BEGIN_DECLS
  34. /* Animation support */
  35. typedef struct _GdkPixbufAnimation GdkPixbufAnimation;
  36. typedef struct _GdkPixbufAnimationIter GdkPixbufAnimationIter;
  37. #define GDK_TYPE_PIXBUF_ANIMATION (gdk_pixbuf_animation_get_type ())
  38. #define GDK_PIXBUF_ANIMATION(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimation))
  39. #define GDK_IS_PIXBUF_ANIMATION(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION))
  40. #define GDK_TYPE_PIXBUF_ANIMATION_ITER (gdk_pixbuf_animation_iter_get_type ())
  41. #define GDK_PIXBUF_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIter))
  42. #define GDK_IS_PIXBUF_ANIMATION_ITER(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), GDK_TYPE_PIXBUF_ANIMATION_ITER))
  43. GType gdk_pixbuf_animation_get_type (void) G_GNUC_CONST;
  44. #ifdef G_OS_WIN32
  45. #define gdk_pixbuf_animation_new_from_file gdk_pixbuf_animation_new_from_file_utf8
  46. #endif
  47. GdkPixbufAnimation *gdk_pixbuf_animation_new_from_file (const char *filename,
  48. GError **error);
  49. #ifndef GDK_PIXBUF_DISABLE_DEPRECATED
  50. GdkPixbufAnimation *gdk_pixbuf_animation_ref (GdkPixbufAnimation *animation);
  51. void gdk_pixbuf_animation_unref (GdkPixbufAnimation *animation);
  52. #endif
  53. int gdk_pixbuf_animation_get_width (GdkPixbufAnimation *animation);
  54. int gdk_pixbuf_animation_get_height (GdkPixbufAnimation *animation);
  55. gboolean gdk_pixbuf_animation_is_static_image (GdkPixbufAnimation *animation);
  56. GdkPixbuf *gdk_pixbuf_animation_get_static_image (GdkPixbufAnimation *animation);
  57. GdkPixbufAnimationIter *gdk_pixbuf_animation_get_iter (GdkPixbufAnimation *animation,
  58. const GTimeVal *start_time);
  59. GType gdk_pixbuf_animation_iter_get_type (void) G_GNUC_CONST;
  60. int gdk_pixbuf_animation_iter_get_delay_time (GdkPixbufAnimationIter *iter);
  61. GdkPixbuf *gdk_pixbuf_animation_iter_get_pixbuf (GdkPixbufAnimationIter *iter);
  62. gboolean gdk_pixbuf_animation_iter_on_currently_loading_frame (GdkPixbufAnimationIter *iter);
  63. gboolean gdk_pixbuf_animation_iter_advance (GdkPixbufAnimationIter *iter,
  64. const GTimeVal *current_time);
  65. #ifdef GDK_PIXBUF_ENABLE_BACKEND
  66. typedef struct _GdkPixbufAnimationClass GdkPixbufAnimationClass;
  67. #define GDK_PIXBUF_ANIMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimationClass))
  68. #define GDK_IS_PIXBUF_ANIMATION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_ANIMATION))
  69. #define GDK_PIXBUF_ANIMATION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_ANIMATION, GdkPixbufAnimationClass))
  70. /* Private part of the GdkPixbufAnimation structure */
  71. struct _GdkPixbufAnimation {
  72. GObject parent_instance;
  73. };
  74. struct _GdkPixbufAnimationClass {
  75. GObjectClass parent_class;
  76. /*< public >*/
  77. gboolean (*is_static_image) (GdkPixbufAnimation *anim);
  78. GdkPixbuf* (*get_static_image) (GdkPixbufAnimation *anim);
  79. void (*get_size) (GdkPixbufAnimation *anim,
  80. int *width,
  81. int *height);
  82. GdkPixbufAnimationIter* (*get_iter) (GdkPixbufAnimation *anim,
  83. const GTimeVal *start_time);
  84. };
  85. typedef struct _GdkPixbufAnimationIterClass GdkPixbufAnimationIterClass;
  86. #define GDK_PIXBUF_ANIMATION_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIterClass))
  87. #define GDK_IS_PIXBUF_ANIMATION_ITER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GDK_TYPE_PIXBUF_ANIMATION_ITER))
  88. #define GDK_PIXBUF_ANIMATION_ITER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GDK_TYPE_PIXBUF_ANIMATION_ITER, GdkPixbufAnimationIterClass))
  89. struct _GdkPixbufAnimationIter {
  90. GObject parent_instance;
  91. };
  92. struct _GdkPixbufAnimationIterClass {
  93. GObjectClass parent_class;
  94. /*< public >*/
  95. int (*get_delay_time) (GdkPixbufAnimationIter *iter);
  96. GdkPixbuf* (*get_pixbuf) (GdkPixbufAnimationIter *iter);
  97. gboolean (*on_currently_loading_frame) (GdkPixbufAnimationIter *iter);
  98. gboolean (*advance) (GdkPixbufAnimationIter *iter,
  99. const GTimeVal *current_time);
  100. };
  101. GType gdk_pixbuf_non_anim_get_type (void) G_GNUC_CONST;
  102. GdkPixbufAnimation* gdk_pixbuf_non_anim_new (GdkPixbuf *pixbuf);
  103. #endif /* GDK_PIXBUF_ENABLE_BACKEND */
  104. G_END_DECLS
  105. #endif /* GDK_PIXBUF_ANIMATION_H */