implement breakpoint API (breakpoints don't actually trigger yet)
[swfdec.git] / libswfdec / swfdec_graphic.h
blob1fded8889d6560af679a5cedbec44f9efbcd882a
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_GRAPHIC_H_
23 #define _SWFDEC_GRAPHIC_H_
25 #include <glib-object.h>
26 #include <libswfdec/swfdec_character.h>
27 #include <libswfdec/swfdec_rect.h>
28 #include <libswfdec/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, calls this function */
54 SwfdecMovie * (*create_movie) (SwfdecGraphic * graphic);
55 /* optional vfuncs */
56 void (* render) (SwfdecGraphic * graphic,
57 cairo_t * cr,
58 const SwfdecColorTransform * trans,
59 const SwfdecRect * inval,
60 gboolean fill);
61 gboolean (* mouse_in) (SwfdecGraphic * graphic,
62 double x,
63 double y);
66 GType swfdec_graphic_get_type (void);
68 void swfdec_graphic_render (SwfdecGraphic * graphic,
69 cairo_t * cr,
70 const SwfdecColorTransform * trans,
71 const SwfdecRect * inval,
72 gboolean fill);
73 gboolean swfdec_graphic_mouse_in (SwfdecGraphic * graphic,
74 double x,
75 double y);
78 G_END_DECLS
79 #endif