add deug message
[swfdec.git] / test / swfedit_tag.h
blob2f1d231db957d6f1a08a056dd54efd6f1aed2b74
1 /* Swfedit
2 * Copyright (C) 2007 Benjamin Otte <otte@gnome.org>
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301 USA
20 #ifndef __SWFEDIT_TAG_H__
21 #define __SWFEDIT_TAG_H__
23 #include <libswfdec/swfdec_buffer.h>
24 #include <libswfdec/swfdec_bits.h>
25 #include "swfdec_out.h"
26 #include "swfedit_token.h"
28 G_BEGIN_DECLS
30 typedef struct _SwfeditTag SwfeditTag;
31 typedef struct _SwfeditTagClass SwfeditTagClass;
32 typedef struct _SwfeditTagDefinition SwfeditTagDefinition;
34 struct _SwfeditTagDefinition {
35 const char * name; /* name to use for this field */
36 SwfeditTokenType type; /* type of this field */
37 guint n_items; /* 1-indexed field to look at for item count (or 0 to use 1 item) */
38 gconstpointer hint; /* hint to pass to field when creating */
41 #define SWFEDIT_TYPE_TAG (swfedit_tag_get_type())
42 #define SWFEDIT_IS_TAG(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFEDIT_TYPE_TAG))
43 #define SWFEDIT_IS_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFEDIT_TYPE_TAG))
44 #define SWFEDIT_TAG(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFEDIT_TYPE_TAG, SwfeditTag))
45 #define SWFEDIT_TAG_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFEDIT_TYPE_TAG, SwfeditTagClass))
46 #define SWFEDIT_TAG_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFEDIT_TYPE_TAG, SwfeditTagClass))
48 struct _SwfeditTag {
49 SwfeditToken token;
51 guint tag; /* tag type */
54 struct _SwfeditTagClass {
55 SwfeditTokenClass token_class;
58 GType swfedit_tag_get_type (void);
60 SwfeditTag * swfedit_tag_new (SwfeditToken * parent,
61 guint tag,
62 SwfdecBuffer * buffer);
64 SwfdecBuffer * swfedit_tag_write (SwfeditToken * token);
65 void swfedit_tag_write_token (SwfeditToken * token,
66 SwfdecOut * out,
67 guint i);
68 void swfedit_tag_add_token (SwfeditToken * token,
69 const char * name,
70 SwfeditTokenType type,
71 gconstpointer hint);
72 void swfedit_tag_read_token (SwfeditToken * token,
73 SwfdecBits * bits,
74 const char * name,
75 SwfeditTokenType type,
76 gconstpointer hint);
77 void swfedit_tag_read_tag (SwfeditToken * token,
78 SwfdecBits * bits,
79 const SwfeditTagDefinition *def);
81 G_END_DECLS
83 #endif