remove SWFDEC_IS_AS_VALUE check
[swfdec.git] / swfdec / swfdec_graphic.h
blob99d08928087a232fd135323c4294babc20a467d5
1 /* Swfdec
2 * Copyright (C) 2003-2006 David Schleef <ds@schleef.org>
3 * 2005-2006 Eric Anholt <eric@anholt.net>
4 * 2006-2008 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_GRAPHIC_H_
23 #define _SWFDEC_GRAPHIC_H_
25 #include <glib-object.h>
26 #include <swfdec/swfdec_character.h>
27 #include <swfdec/swfdec_player.h>
28 #include <swfdec/swfdec_types.h>
30 G_BEGIN_DECLS
33 typedef struct _SwfdecGraphicClass SwfdecGraphicClass;
35 #define SWFDEC_TYPE_GRAPHIC (swfdec_graphic_get_type())
36 #define SWFDEC_IS_GRAPHIC(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_GRAPHIC))
37 #define SWFDEC_IS_GRAPHIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_GRAPHIC))
38 #define SWFDEC_GRAPHIC(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_GRAPHIC, SwfdecGraphic))
39 #define SWFDEC_GRAPHIC_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_GRAPHIC, SwfdecGraphicClass))
40 #define SWFDEC_GRAPHIC_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_GRAPHIC, SwfdecGraphicClass))
42 struct _SwfdecGraphic
44 SwfdecCharacter character;
46 SwfdecRect extents; /* bounding box that encloses this graphic */
49 struct _SwfdecGraphicClass
51 SwfdecCharacterClass character_class;
53 /* when creating a movie for this graphic, use this type. Must be a SWFDEC_TYPE_MOVIE */
54 GType movie_type;
55 /* optional vfuncs */
56 void (* render) (SwfdecGraphic * graphic,
57 cairo_t * cr,
58 const SwfdecColorTransform * trans);
59 gboolean (* mouse_in) (SwfdecGraphic * graphic,
60 double x,
61 double y);
64 GType swfdec_graphic_get_type (void);
66 void swfdec_graphic_render (SwfdecGraphic * graphic,
67 cairo_t * cr,
68 const SwfdecColorTransform * trans);
69 gboolean swfdec_graphic_mouse_in (SwfdecGraphic * graphic,
70 double x,
71 double y);
74 G_END_DECLS
75 #endif