GnomeAnimator

Name

GnomeAnimator — one line description goes here.

Synopsis


#include <gnome.h>


struct      GnomeAnimator
enum        GnomeAnimatorStatus
enum        GnomeAnimatorLoopType
struct      GnomeAnimatorFrame
struct      GnomeAnimatorPrivate
GtkWidget*  gnome_animator_new_with_size    (guint width,
                                             guint height);
void        gnome_animator_set_loop_type    (GnomeAnimator *animator,
                                             GnomeAnimatorLoopType loop_type);
GnomeAnimatorLoopType gnome_animator_get_loop_type
                                            (GnomeAnimator *animator);
void        gnome_animator_set_playback_direction
                                            (GnomeAnimator *animator,
                                             gint playback_direction);
gint        gnome_animator_get_playback_direction
                                            (GnomeAnimator *animator);
gboolean    gnome_animator_append_frame_from_imlib_at_size
                                            (GnomeAnimator *animator,
                                             GdkImlibImage *image,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval,
                                             guint width,
                                             guint height);
gboolean    gnome_animator_append_frame_from_imlib
                                            (GnomeAnimator *animator,
                                             GdkImlibImage *image,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval);
gboolean    gnome_animator_append_frame_from_file_at_size
                                            (GnomeAnimator *animator,
                                             const gchar *name,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval,
                                             guint width,
                                             guint height);
gboolean    gnome_animator_append_frame_from_file
                                            (GnomeAnimator *animator,
                                             const gchar *name,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval);
gboolean    gnome_animator_append_frames_from_imlib_at_size
                                            (GnomeAnimator *animator,
                                             GdkImlibImage *image,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval,
                                             gint x_unit,
                                             guint width,
                                             guint height);
gboolean    gnome_animator_append_frames_from_imlib
                                            (GnomeAnimator *animator,
                                             GdkImlibImage *image,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval,
                                             gint x_unit);
gboolean    gnome_animator_append_frames_from_file_at_size
                                            (GnomeAnimator *animator,
                                             const gchar *name,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval,
                                             gint x_unit,
                                             guint width,
                                             guint height);
gboolean    gnome_animator_append_frames_from_file
                                            (GnomeAnimator *animator,
                                             const gchar *name,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval,
                                             gint x_unit);
gboolean    gnome_animator_append_frame_from_gnome_pixmap
                                            (GnomeAnimator *animator,
                                             GnomePixmap *pixmap,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval);
void        gnome_animator_start            (GnomeAnimator *animator);
void        gnome_animator_stop             (GnomeAnimator *animator);
gboolean    gnome_animator_advance          (GnomeAnimator *animator,
                                             gint num);
void        gnome_animator_goto_frame       (GnomeAnimator *animator,
                                             guint num_frame);
guint       gnome_animator_get_current_frame_number
                                            (GnomeAnimator *animator);
GnomeAnimatorStatus gnome_animator_get_status
                                            (GnomeAnimator *animator);
void        gnome_animator_set_playback_speed
                                            (GnomeAnimator *animator,
                                             gdouble speed);
gdouble     gnome_animator_get_playback_speed
                                            (GnomeAnimator *animator);

Object Hierarchy


  GtkObject
   +----GtkWidget
         +----GnomeAnimator

Description

Details


GnomeAnimator

struct GnomeAnimator;


GnomeAnimatorStatus

typedef enum
{
    GNOME_ANIMATOR_STATUS_STOPPED,
    GNOME_ANIMATOR_STATUS_RUNNING
} GnomeAnimatorStatus;


GnomeAnimatorLoopType

typedef enum
{
    /* No loop: after the last (first) frame is played, the animation
       is stopped.  */
    GNOME_ANIMATOR_LOOP_NONE,

    /* After the last (first) frame is played, restart from the first
       (last) frame.  */
    GNOME_ANIMATOR_LOOP_RESTART,

    /* After the last (first) frame is played, the playback direction
       is reversed.  */
    GNOME_ANIMATOR_LOOP_PING_PONG
} GnomeAnimatorLoopType;


GnomeAnimatorFrame

struct GnomeAnimatorFrame;


GnomeAnimatorPrivate

struct GnomeAnimatorPrivate;


gnome_animator_new_with_size()

GtkWidget*  gnome_animator_new_with_size    (guint width,
                                             guint height);

Creates a new animator widget of the specified size.

width : pixel width of animator widgetheight : pixel height of animator widgetReturns : Pointer to new animator widget


gnome_animator_set_loop_type()

void        gnome_animator_set_loop_type    (GnomeAnimator *animator,
                                             GnomeAnimatorLoopType loop_type);

Sets desired animation loop type. Available loop types are GNOME_ANIMATOR_LOOP_NONE (play anim once only), GNOME_ANIMATOR_LOOP_RESTART (play anim over and over again), and GNOME_ANIMATOR_LOOP_PING_PONG (plan anim first -> last frame, then reverse direction and play anim from last -> first frame. repeat.)

animator : Animator widget to be updatedloop_type : Type of animation loop desired


gnome_animator_get_loop_type()

GnomeAnimatorLoopType gnome_animator_get_loop_type
                                            (GnomeAnimator *animator);

Obtains current animator loop type. Available loop types are GNOME_ANIMATOR_LOOP_NONE (play anim once only), GNOME_ANIMATOR_LOOP_RESTART (play anim over and over again), and GNOME_ANIMATOR_LOOP_PING_PONG (plan anim first -> last frame, then reverse direction and play anim from last -> first frame. repeat.)

animator : Animator widget to be queriedReturns : Loop type.


gnome_animator_set_playback_direction()

void        gnome_animator_set_playback_direction
                                            (GnomeAnimator *animator,
                                             gint playback_direction);

Sets direction (forwards or backwards) the animation is to be played. If playback_direction is a positive number, the animation is played from the first -> last frame. If playback_direction is negative, the animation is played from last -> first frame.

animator : Animator widget to be updatedplayback_direction : Direction animation should be played.


gnome_animator_get_playback_direction()

gint        gnome_animator_get_playback_direction
                                            (GnomeAnimator *animator);

Obtains direction (forwards or backwards) the animation is to be played. If the return value is a positive number, the animation is played from the first -> last frame. If the return value is negative, the animation is played from last -> first frame.

animator : Animator widget to be updatedReturns : Positive or negative number indicating direction.


gnome_animator_append_frame_from_imlib_at_size()

gboolean    gnome_animator_append_frame_from_imlib_at_size
                                            (GnomeAnimator *animator,
                                             GdkImlibImage *image,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval,
                                             guint width,
                                             guint height);

Adds frame contained within a &GdkImlibImage image to the end of the current animation. If width and height are different from the actual image size, the image is scaled proportionally. The frame display interval is interval is divided by playback_speed.

animator : Animator widget to be updatedimage : Image to be added to animatorx_offset : horizontal offset of frame within animator widgety_offset : vertical offset of frame within animator widgetinterval : Number of milliseconds to delay before showing next framewidth : pixel width of frameheight : pixel height of frameReturns : TRUE if append succeeded.


gnome_animator_append_frame_from_imlib()

gboolean    gnome_animator_append_frame_from_imlib
                                            (GnomeAnimator *animator,
                                             GdkImlibImage *image,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval);

Adds frame contained within a &GdkImlibImage image to the end of the current animation. The frame display interval is interval is divided by playback_speed.

animator : Animator widget to be updatedimage : Image to be added to animatorx_offset : horizontal offset of frame within animator widgety_offset : vertical offset of frame within animator widgetinterval : Number of milliseconds to delay before showing next frameReturns : TRUE if append succeeded.


gnome_animator_append_frame_from_file_at_size()

gboolean    gnome_animator_append_frame_from_file_at_size
                                            (GnomeAnimator *animator,
                                             const gchar *name,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval,
                                             guint width,
                                             guint height);

Adds frame from the given file to the end of the current animation. If width and height are different from the actual image size, the image is scaled proportionally. The frame display interval is interval is divided by playback_speed.

animator : Animator widget to be updatedname : File path of image to be added to animatorx_offset : horizontal offset of frame within animator widgety_offset : vertical offset of frame within animator widgetinterval : Number of milliseconds to delay before showing next framewidth : pixel width of frameheight : pixel height of frameReturns : TRUE if append succeeded.


gnome_animator_append_frame_from_file()

gboolean    gnome_animator_append_frame_from_file
                                            (GnomeAnimator *animator,
                                             const gchar *name,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval);

Adds frame from the given file to the end of the current animation. The frame display interval is interval is divided by playback_speed.

animator : Animator widget to be updatedname : File path of image to be added to animatorx_offset : horizontal offset of frame within animator widgety_offset : vertical offset of frame within animator widgetinterval : Number of milliseconds to delay before showing next frameReturns : TRUE if append succeeded.


gnome_animator_append_frames_from_imlib_at_size()

gboolean    gnome_animator_append_frames_from_imlib_at_size
                                            (GnomeAnimator *animator,
                                             GdkImlibImage *image,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval,
                                             gint x_unit,
                                             guint width,
                                             guint height);

Adds multiple frames contained within a &GdkImlibImage image to the end of the current animation. Each frame within the image should be next to one another in a single, horizontal row. If width and height are different from the actual frame size, the image is scaled proportionally. The frame display interval is interval is divided by playback_speed.

animator : Animator widget to be updatedimage : Image containing frames to be added to animatorx_offset : horizontal offset of a frame within animator widgety_offset : vertical offset of a frame within animator widgetinterval : Number of milliseconds to delay before showing next framex_unit : pixel width of a single framewidth : pixel width of frameheight : pixel height of frameReturns : TRUE if append succeeded.


gnome_animator_append_frames_from_imlib()

gboolean    gnome_animator_append_frames_from_imlib
                                            (GnomeAnimator *animator,
                                             GdkImlibImage *image,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval,
                                             gint x_unit);

Adds multiple frames contained within a &GdkImlibImage image to the end of the current animation. Each frame within the image should be next to one another in a single, horizontal row. The frame display interval is interval is divided by playback_speed.

animator : Animator widget to be updatedimage : Image containing frames to be added to animatorx_offset : horizontal offset of a frame within animator widgety_offset : vertical offset of a frame within animator widgetinterval : Number of milliseconds to delay before showing next framex_unit : pixel width of a single frameReturns : TRUE if append succeeded.


gnome_animator_append_frames_from_file_at_size()

gboolean    gnome_animator_append_frames_from_file_at_size
                                            (GnomeAnimator *animator,
                                             const gchar *name,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval,
                                             gint x_unit,
                                             guint width,
                                             guint height);

Adds multiple frames contained within a single image file to the end of the current animation. Each frame within the image should be next to one another in a single, horizontal row. If width and height are different from the actual frame size, the image is scaled proportionally. The frame display interval is interval is divided by playback_speed.

animator : Animator widget to be updatedname : x_offset : horizontal offset of a frame within animator widgety_offset : vertical offset of a frame within animator widgetinterval : Number of milliseconds to delay before showing next framex_unit : pixel width of a single framewidth : pixel width of frameheight : pixel height of frameReturns : TRUE if append succeeded.


gnome_animator_append_frames_from_file()

gboolean    gnome_animator_append_frames_from_file
                                            (GnomeAnimator *animator,
                                             const gchar *name,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval,
                                             gint x_unit);

Adds multiple frames contained within a single image file to the end of the current animation. Each frame within the image should be next to one another in a single, horizontal row. The frame display interval is interval is divided by playback_speed.

animator : Animator widget to be updatedname : x_offset : horizontal offset of a frame within animator widgety_offset : vertical offset of a frame within animator widgetinterval : Number of milliseconds to delay before showing next framex_unit : pixel width of a single frameReturns : TRUE if append succeeded.


gnome_animator_append_frame_from_gnome_pixmap()

gboolean    gnome_animator_append_frame_from_gnome_pixmap
                                            (GnomeAnimator *animator,
                                             GnomePixmap *pixmap,
                                             gint x_offset,
                                             gint y_offset,
                                             guint32 interval);

Adds frame contained within a &GnomePixmap image to the end of the current animation. The frame display interval is interval is divided by playback_speed.

animator : Animator widget to be updatedpixmap : GNOME pixmap to be added to animatorx_offset : horizontal offset of frame within animator widgety_offset : vertical offset of frame within animator widgetinterval : Number of milliseconds to delay before showing next frameReturns : TRUE if append succeeded.


gnome_animator_start()

void        gnome_animator_start            (GnomeAnimator *animator);

Initiate display of animated frames.

animator : Animator widget to be started


gnome_animator_stop()

void        gnome_animator_stop             (GnomeAnimator *animator);

Halts display of animated frames. The current frame in the animation will remain in the animator widget.

animator : Animator widget to be stopped


gnome_animator_advance()

gboolean    gnome_animator_advance          (GnomeAnimator *animator,
                                             gint num);

Advance the animator num frames. If num is positive, use the specified playback_direction; if it is negative, go in the opposite direction. After the call, the animator is in the same state it would be if it had actually executed the specified number of iterations.

animator : Animator widget to be updatednum : Number of frames to advance byReturns : TRUE if the animator is now stopped.


gnome_animator_goto_frame()

void        gnome_animator_goto_frame       (GnomeAnimator *animator,
                                             guint num_frame);

Jump to the specified frame_number and display it.

animator : Animator widget to be updatednum_frame : 


gnome_animator_get_current_frame_number()

guint       gnome_animator_get_current_frame_number
                                            (GnomeAnimator *animator);

Obtains current frame number from animator widget.

animator : Animator widget to be queriedReturns : Current frame number.


gnome_animator_get_status()

GnomeAnimatorStatus gnome_animator_get_status
                                            (GnomeAnimator *animator);

Obtains current status from animator widget. Possible return values include GNOME_ANIMATOR_STATUS_STOPPED and GNOME_ANIMATOR_STATUS_RUNNING.

animator : Animator widget to be queriedReturns : Status constant.


gnome_animator_set_playback_speed()

void        gnome_animator_set_playback_speed
                                            (GnomeAnimator *animator,
                                             gdouble speed);

Sets the rate at which the animation proceeds. The actual delay between each frame is set via the interval arg passed to the gnome_animator_append_* functions. Playback speed is determined by the formula "rate = interval / ( speed + 0.5 )". Higher speed values give higher playback speeds. Default is 1.0.

animator : Animator widget to be updatedspeed : Rate multiplier for playback speed


gnome_animator_get_playback_speed()

gdouble     gnome_animator_get_playback_speed
                                            (GnomeAnimator *animator);

Queries the rate at which the animation proceeds. The actual delay between each frame is set via the interval arg passed to the gnome_animator_append_* functions. Playback speed is determined by the formula "rate = interval / ( speed + 0.5 )". speed is the value from this formula which gnome_animator_get_playback_speed returns. Higher speed values give higher playback speeds. Default is 1.0.

animator : Animator widget to be queriedReturns : &double indicating playback rate.