Bug 22803 - Make header conform to implementation
[swfdec.git] / swfdec / swfdec_actor.h
blob65283222e984d7556a5f17c78fafc3f72a6e2162
1 /* Swfdec
2 * Copyright (C) 2006-2008 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 _SWFDEC_ACTOR_H_
21 #define _SWFDEC_ACTOR_H_
23 #include <swfdec/swfdec_movie.h>
24 #include <swfdec/swfdec_sound_matrix.h>
26 G_BEGIN_DECLS
29 //typedef struct _SwfdecActor SwfdecActor;
30 typedef struct _SwfdecActorClass SwfdecActorClass;
32 #define SWFDEC_TYPE_ACTOR (swfdec_actor_get_type())
33 #define SWFDEC_IS_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_ACTOR))
34 #define SWFDEC_IS_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_ACTOR))
35 #define SWFDEC_ACTOR(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_ACTOR, SwfdecActor))
36 #define SWFDEC_ACTOR_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_ACTOR, SwfdecActorClass))
37 #define SWFDEC_ACTOR_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_ACTOR, SwfdecActorClass))
39 struct _SwfdecActor
41 SwfdecMovie movie;
43 /* static properties (set by PlaceObject tags) */
44 SwfdecEventList * events; /* events queued on this movie */
46 SwfdecFlashBool focusrect; /* if we should draw a focus rectangle or not */
47 guint needs_matrix; /* number of movies contained that need matrix updates */
49 /* sound */
50 SwfdecSoundMatrix sound_matrix; /* movie's sound matrix */
53 struct _SwfdecActorClass
55 SwfdecMovieClass movie_class;
57 /* matrix updates go here */
58 void (* update_matrix) (SwfdecActor * actor);
60 /* iterating */
61 void (* iterate_start) (SwfdecActor * actor);
62 gboolean (* iterate_end) (SwfdecActor * actor);
64 /* mouse handling */
65 gboolean (* mouse_events) (SwfdecActor * movie);
66 SwfdecMouseCursor (* mouse_cursor) (SwfdecActor * movie);
67 void (* mouse_in) (SwfdecActor * movie);
68 void (* mouse_out) (SwfdecActor * movie);
69 void (* mouse_press) (SwfdecActor * movie,
70 guint button);
71 void (* mouse_release) (SwfdecActor * movie,
72 guint button);
73 void (* mouse_move) (SwfdecActor * movie,
74 double x,
75 double y);
77 /* keyboard handling */
78 void (* focus_in) (SwfdecActor * movie);
79 void (* focus_out) (SwfdecActor * movie);
80 void (* key_press) (SwfdecActor * movie,
81 guint keycode,
82 guint character);
83 void (* key_release) (SwfdecActor * movie,
84 guint keycode,
85 guint character);
88 GType swfdec_actor_get_type (void);
90 void swfdec_actor_execute (SwfdecActor * actor,
91 SwfdecEventType condition,
92 guint8 key);
93 void swfdec_actor_queue_script_with_key (SwfdecActor * actor,
94 SwfdecEventType condition,
95 guint8 key);
96 void swfdec_actor_queue_script (SwfdecActor * actor,
97 SwfdecEventType condition);
99 gboolean swfdec_actor_get_mouse_events (SwfdecActor * actor);
100 gboolean swfdec_actor_has_focusrect (SwfdecActor * actor);
103 G_END_DECLS
104 #endif