fix jsut committed crasher by rewriting startDrag action
[swfdec.git] / libswfdec / swfdec_event.h
blob6c5be7fcdde713c27189ac2e5e6432baf0c34da0
1 /* Swfdec
2 * Copyright (C) 2006 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 #include <libswfdec/swfdec_bits.h>
21 #include <libswfdec/swfdec_as_types.h>
22 #include <libswfdec/swfdec_player.h>
23 #include <libswfdec/swfdec_types.h>
25 #ifndef _SWFDEC_EVENT_H_
26 #define _SWFDEC_EVENT_H_
28 G_BEGIN_DECLS
30 typedef enum _SwfdecEventType {
31 SWFDEC_EVENT_LOAD = (1 << 0),
32 SWFDEC_EVENT_ENTER = (1 << 1),
33 SWFDEC_EVENT_UNLOAD = (1 << 2),
34 SWFDEC_EVENT_MOUSE_MOVE = (1 << 3),
35 SWFDEC_EVENT_MOUSE_DOWN = (1 << 4),
36 SWFDEC_EVENT_MOUSE_UP = (1 << 5),
37 SWFDEC_EVENT_KEY_UP = (1 << 6),
38 SWFDEC_EVENT_KEY_DOWN = (1 << 7),
39 SWFDEC_EVENT_DATA = (1 << 8),
40 SWFDEC_EVENT_INITIALIZE = (1 << 9),
41 SWFDEC_EVENT_PRESS = (1 << 10),
42 SWFDEC_EVENT_RELEASE = (1 << 11),
43 SWFDEC_EVENT_RELEASE_OUTSIDE = (1 << 12),
44 SWFDEC_EVENT_ROLL_OVER = (1 << 13),
45 SWFDEC_EVENT_ROLL_OUT = (1 << 14),
46 SWFDEC_EVENT_DRAG_OVER = (1 << 15),
47 SWFDEC_EVENT_DRAG_OUT = (1 << 16),
48 SWFDEC_EVENT_KEY_PRESS = (1 << 17),
49 SWFDEC_EVENT_CONSTRUCT = (1 << 18)
50 } SwfdecEventType;
52 const char * swfdec_event_type_get_name (SwfdecEventType type);
54 SwfdecEventList * swfdec_event_list_new (SwfdecPlayer * player);
55 SwfdecEventList * swfdec_event_list_copy (SwfdecEventList * list);
56 void swfdec_event_list_free (SwfdecEventList * list);
58 void swfdec_event_list_parse (SwfdecEventList * list,
59 SwfdecBits * bits,
60 int version,
61 guint conditions,
62 guint8 key,
63 const char * description);
64 void swfdec_event_list_execute (SwfdecEventList * list,
65 SwfdecAsObject * object,
66 guint condition,
67 guint8 key);
68 gboolean swfdec_event_list_has_conditions(SwfdecEventList * list,
69 SwfdecAsObject * object,
70 guint conditions,
71 guint8 key);
74 G_END_DECLS
76 #endif