src/animate.c File Reference

Animation tools. More...

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mb_types.h"
#include "mb_redraw_man.h"
#include "mb_timer.h"
#include "mb_animate.h"

Go to the source code of this file.

Classes

struct  _mb_word
 A word is a set of concurrent actions in a program. More...
struct  _mb_progm
 A program describe a series of actions to animate shapes. More...

Defines

#define STEP_INTERVAL   90000
#define ASSERT(x)

Functions

mb_progm_tmb_progm_new (int max_words, redraw_man_t *rdman)
 Create a program object.
void mb_progm_free (mb_progm_t *progm)
mb_word_tmb_progm_next_word (mb_progm_t *progm, const mb_timeval_t *start, const mb_timeval_t *playing)
 Add a new word into a program.
void mb_word_add_action (mb_word_t *word, mb_action_t *act)
static void mb_word_start (mb_word_t *word, const mb_timeval_t *tmo, const mb_timeval_t *now, redraw_man_t *rdman)
static void mb_word_step (mb_word_t *word, const mb_timeval_t *tmo, const mb_timeval_t *now, redraw_man_t *rdman)
static void mb_word_stop (mb_word_t *word, const mb_timeval_t *tmo, const mb_timeval_t *now, redraw_man_t *rdman)
static void mb_progm_step (const mb_timeval_t *tmo, const mb_timeval_t *now, void *arg)
 Time stepping for a program.
void mb_progm_start (mb_progm_t *progm, mb_tman_t *tman, mb_timeval_t *now)
void mb_progm_abort (mb_progm_t *progm)
subject_tmb_progm_get_complete (mb_progm_t *progm)
 Return event subject for completion of a program.


Detailed Description

Animation tools.

See also:
What is Animation?

Definition in file animate.c.


Define Documentation

#define ASSERT (  ) 

Definition at line 78 of file animate.c.

#define STEP_INTERVAL   90000

Definition at line 77 of file animate.c.


Function Documentation

static void mb_progm_step ( const mb_timeval_t tmo,
const mb_timeval_t now,
void *  arg 
) [static]

Time stepping for a program.

Any two actions in concurrent words never change the same attribute. Start time of words in a program are specified in incremental order.

Note:
Program will take a big step at last monent. It is because mb_progm_step() running mb_word_stop() if the word being stop between now and next_tmo. It is not obviously if time stepping small.

Todo:
Leverage aspective programming to prevent problem of unittest.

Definition at line 234 of file animate.c.

static void mb_word_start ( mb_word_t word,
const mb_timeval_t tmo,
const mb_timeval_t now,
redraw_man_t rdman 
) [static]

Definition at line 191 of file animate.c.

static void mb_word_step ( mb_word_t word,
const mb_timeval_t tmo,
const mb_timeval_t now,
redraw_man_t rdman 
) [static]

Definition at line 202 of file animate.c.

static void mb_word_stop ( mb_word_t word,
const mb_timeval_t tmo,
const mb_timeval_t now,
redraw_man_t rdman 
) [static]

Definition at line 213 of file animate.c.

SourceForge.net Logo