HexAnimation

Name

HexAnimation -- An Animated HexTile

Synopsis


#include <hexmap.h>



struct      HexAnimation;
struct      HexAnimationClass;


HexAnimation* hex_animation_new             (HexData **images,
                                             guint nimages,
                                             guint timeout,
                                             gboolean start);
void        hex_animation_set_timeout       (HexAnimation *anim,
                                             guint timeout);
guint       hex_animation_get_timeout       (HexAnimation *anim);
void        hex_animation_start             (HexAnimation *anim);
void        hex_animation_stop              (HexAnimation *anim);

Object Hierarchy


  GObject
   +----HexTile
         +----HexAnimation

Description

A HexAnimation is an example of a derived class of HexTile. Instead of displaying a single image, it cycles through a slideshow of images.

Details

struct HexAnimation

struct HexAnimation;

An animated HexTile


struct HexAnimationClass

struct HexAnimationClass;

The class structure for HexAnimation


hex_animation_new ()

HexAnimation* hex_animation_new             (HexData **images,
                                             guint nimages,
                                             guint timeout,
                                             gboolean start);

create a new HexAnimation

images :

an array of HexData, the images to animate

nimages :

the number of images

timeout :

the time per frame, in milliseconds

start :

TRUE to start the animation immediately

Returns :

the newly created HexAnimation


hex_animation_set_timeout ()

void        hex_animation_set_timeout       (HexAnimation *anim,
                                             guint timeout);

set the time per frame in a HexAnimation

anim :

a HexAnimation

timeout :

the time per frame, in milliseconds


hex_animation_get_timeout ()

guint       hex_animation_get_timeout       (HexAnimation *anim);

get the time per frame in a HexAnimation

anim :

a HexAnimation

Returns :

the time per frame, in milliseconds


hex_animation_start ()

void        hex_animation_start             (HexAnimation *anim);

Start a HexAnimation running. If the animation is already running, this function has no effect.

anim :

a HexAnimation


hex_animation_stop ()

void        hex_animation_stop              (HexAnimation *anim);

Stop a HexAnimation running. If the animation is not currently running, this function has no effect.

anim :

a HexAnimation