OSDN Git Service

Once more, Allow building with either giflib 4.2 or 5.0.
[swfed/swfed.git] / src / swf_action.h
1 /*
2   +----------------------------------------------------------------------+
3   | Author: yoya@awm.jp                                                  |
4   +----------------------------------------------------------------------+
5 */
6
7 #ifndef __SWF_ACTION_H__
8 #define __SWF_ACTION_H__
9
10 #include "bitstream.h"
11 #include "y_keyvalue.h"
12
13 typedef struct swf_action_ {
14     unsigned char  action_id;
15     unsigned short action_length;
16     unsigned char *action_data;
17     struct swf_action_ *next; // self reference structure
18 } swf_action_t;
19
20 typedef struct swf_action_list_ {
21     swf_action_t *head, *tail;
22 } swf_action_list_t;
23
24 typedef struct swf_action_info_ {
25     int id;
26     char *name;
27 } swf_action_info_t;
28
29 extern swf_action_info_t *get_swf_action_info(int action_id);
30
31 extern int swf_action_parse(bitstream_t *bs, swf_action_t *act);
32 extern int swf_action_build(bitstream_t *bs, swf_action_t *act);
33 extern int swf_action_print(swf_action_t *act, int indent_depth);
34
35 extern swf_action_list_t *swf_action_list_create(void);
36 extern int swf_action_list_parse(bitstream_t *bs, swf_action_list_t *list);
37 extern int swf_action_list_build(bitstream_t *bs, swf_action_list_t *list);
38 extern void swf_action_list_destroy(swf_action_list_t *act_list);
39 extern void swf_action_list_print(swf_action_list_t *act_list,
40                                   int indent_depth);
41
42 extern int swf_action_data_print(unsigned char *action_data,
43                                  unsigned short action_data_len);
44 extern int swf_action_list_replace_strings(swf_action_list_t *action_list,
45                                            int *modified, y_keyvalue_t *kv);
46
47 extern int swf_action_list_append_top(swf_action_list_t *list,
48                                       int action_id,
49                                       unsigned char *action_data,
50                                       int action_data_length);
51
52 #endif /* __SWF_ACTION_H__ */