add deug message
[swfdec.git] / test / swfedit_token.h
blob448f4cb915117324e7a06e7a586c06dcb0732692
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_TOKEN_H__
21 #define __SWFEDIT_TOKEN_H__
23 #include <gtk/gtk.h>
24 #include <libswfdec/swfdec_rect.h>
26 G_BEGIN_DECLS
28 typedef enum {
29 SWFEDIT_TOKEN_OBJECT,
30 SWFEDIT_TOKEN_BINARY,
31 SWFEDIT_TOKEN_BIT,
32 SWFEDIT_TOKEN_UINT8,
33 SWFEDIT_TOKEN_UINT16,
34 SWFEDIT_TOKEN_UINT32,
35 SWFEDIT_TOKEN_STRING,
36 SWFEDIT_TOKEN_RECT,
37 SWFEDIT_TOKEN_RGB,
38 SWFEDIT_TOKEN_RGBA,
39 SWFEDIT_TOKEN_MATRIX,
40 SWFEDIT_TOKEN_CTRANS,
41 SWFEDIT_TOKEN_SCRIPT,
42 SWFEDIT_TOKEN_CLIPEVENTFLAGS,
43 SWFEDIT_N_TOKENS
44 } SwfeditTokenType;
46 typedef enum {
47 SWFEDIT_COLUMN_NAME,
48 SWFEDIT_COLUMN_VALUE_VISIBLE,
49 SWFEDIT_COLUMN_VALUE,
50 SWFEDIT_COLUMN_VALUE_EDITABLE
51 } SwfeditColumn;
53 typedef struct _SwfeditTokenEntry SwfeditTokenEntry;
55 typedef struct _SwfeditToken SwfeditToken;
56 typedef struct _SwfeditTokenClass SwfeditTokenClass;
58 #define SWFEDIT_TYPE_TOKEN (swfedit_token_get_type())
59 #define SWFEDIT_IS_TOKEN(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFEDIT_TYPE_TOKEN))
60 #define SWFEDIT_IS_TOKEN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFEDIT_TYPE_TOKEN))
61 #define SWFEDIT_TOKEN(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFEDIT_TYPE_TOKEN, SwfeditToken))
62 #define SWFEDIT_TOKEN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFEDIT_TYPE_TOKEN, SwfeditTokenClass))
63 #define SWFEDIT_TOKEN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFEDIT_TYPE_TOKEN, SwfeditTokenClass))
65 struct _SwfeditTokenEntry {
66 char * name;
67 SwfeditTokenType type;
68 gpointer value;
69 gboolean visible;
72 struct _SwfeditToken {
73 GObject object;
75 SwfeditToken * parent; /* parent of this token or NULL */
76 gchar * name; /* name of token */
77 GArray * tokens; /* of SwfeditTokenEntry */
80 struct _SwfeditTokenClass {
81 GObjectClass object_class;
83 void (* changed) (SwfeditToken * token,
84 guint id);
87 GType swfedit_token_get_type (void);
89 gpointer swfedit_token_new_token (SwfeditTokenType type);
91 SwfeditToken * swfedit_token_new (void);
92 void swfedit_token_add (SwfeditToken * token,
93 const char * name,
94 SwfeditTokenType type,
95 gpointer value);
96 void swfedit_token_set (SwfeditToken * token,
97 guint i,
98 gpointer value);
99 void swfedit_token_set_iter (SwfeditToken * token,
100 GtkTreeIter * iter,
101 const char * value);
102 void swfedit_token_set_visible (SwfeditToken * token,
103 guint i,
104 gboolean visible);
107 G_END_DECLS
109 #endif