back to development
[swfdec.git] / swfdec / swfdec_character.h
blobe8848872e5622f52b2bfe305d0ac9372a964a4c5
1 /* Swfdec
2 * Copyright (C) 2003-2006 David Schleef <ds@schleef.org>
3 * 2005-2006 Eric Anholt <eric@anholt.net>
4 * 2006 Benjamin Otte <otte@gnome.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
22 #ifndef _SWFDEC_CHARACTER_H_
23 #define _SWFDEC_CHARACTER_H_
25 #include <glib-object.h>
26 #include <swfdec/swfdec_types.h>
27 #include <swfdec/swfdec_rect.h>
29 G_BEGIN_DECLS
30 //typedef struct _SwfdecCharacter SwfdecCharacter;
31 typedef struct _SwfdecCharacterClass SwfdecCharacterClass;
33 #define SWFDEC_TYPE_CHARACTER (swfdec_character_get_type())
34 #define SWFDEC_IS_CHARACTER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_CHARACTER))
35 #define SWFDEC_IS_CHARACTER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_CHARACTER))
36 #define SWFDEC_CHARACTER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_CHARACTER, SwfdecCharacter))
37 #define SWFDEC_CHARACTER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_CHARACTER, SwfdecCharacterClass))
38 #define SWFDEC_CHARACTER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_CHARACTER, SwfdecCharacterClass))
40 struct _SwfdecCharacter
42 GObject object;
44 int id; /* id of this character in the character list */
47 struct _SwfdecCharacterClass
49 GObjectClass object_class;
52 GType swfdec_character_get_type (void);
53 gpointer swfdec_character_new (SwfdecDecoder *dec, GType type);
55 gboolean swfdec_character_mouse_in (SwfdecCharacter *character,
56 double x, double y, int button);
57 void swfdec_character_render (SwfdecCharacter *character, cairo_t *cr,
58 const SwfdecColorTransform *color, const SwfdecRect *inval, gboolean fill);
61 G_END_DECLS
62 #endif