00001
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef IMGLIST_H
00028 #define IMGLIST_H
00029
00030 extern "C"{
00031 #include "image.h"
00032 #include "jpeg.h"
00033 }
00034 #include "frame.h"
00035
00036 void setMessage(char* m);
00037
00041 typedef struct ImgNode{
00042 struct ImgNode *next, *prev;
00043 int delay;
00044 int time_stamp;
00045 int frame_number;
00046 int frame_pos;
00047 int frame_duration;
00048 Frame *frame;
00049 } ImgNode;
00050
00054 typedef struct ImgList{
00055 char *first_frame_image_file;
00056 ImgNode *head, *current;
00057 Boolean insert_on;
00058 int totFrames ,
00059 totRealFrames; ;
00060 } ImgList;
00061
00062
00063
00064 ImgNode *imgnode_alloc( Frame *f, int delay, int frame_duration );
00065 void imgnode_dispose( ImgNode *i );
00066
00067
00068
00069 ImgList *imglist_alloc( void );
00070
00071 void insert_first_frame(ImgList *imgl);
00072 void insert_frame_from_imagefile(ImgList *imgl, char *fname);
00073 void insert_frame_from_jpgfile(ImgList *imgl, char *fname);
00074 Frame* get_empty_frame();
00075 Frame* get_frame_from_rasfile(char* image_path);
00076
00077 Image *imglist_peek_current_img( ImgList *q );
00078
00079 int imglist_isempty( ImgList *q );
00080 void imglist_insert( ImgList *q, ImgNode *i );
00081 void imglist_overwrite( ImgList *q, ImgNode *i );
00082 void imglist_addimg( ImgList *q,ImgNode *i );
00083
00084 void imglist_removeInRange( ImgList *q, int begin, int end );
00085 void imglist_clear( ImgList *q );
00086
00087 void imglist_dispose( ImgList *q );
00088 void imglist_step( ImgList *q, int step);
00089 void imglist_step_foward( ImgList *q );
00090 void imglist_step_backward( ImgList *q );
00091 void imglist_rew( ImgList *q );
00092 void imglist_go_to_end( ImgList *q );
00093 void imglist_update_frames( ImgList *q );
00094 void imglist_go_to_frame( ImgList *q, int frameNumber );
00095 void imglist_insert_at(ImgList *q, ImgNode *i);
00096 int imglist_getTotalFrames(ImgList *q);
00097 int imglist_getTotalRealFrames(ImgList *q);
00098 void imglist_setFrameDuration(ImgList *q, int begin, int end, int duration);
00099
00100
00101 #endif