ad functionality to get notified about object add/remove to GC
[swfdec.git] / libswfdec / swfdec_as_debugger.h
blob61aaae688b68b53d634d5be3528ff7ac161580c0
1 /* Swfdec
2 * Copyright (C) 2007 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_AS_DEBUGGER_H_
21 #define _SWFDEC_AS_DEBUGGER_H_
23 #include <libswfdec/swfdec_as_object.h>
24 #include <libswfdec/swfdec_as_types.h>
25 #include <libswfdec/swfdec_script.h>
27 G_BEGIN_DECLS
29 typedef struct _SwfdecAsDebuggerClass SwfdecAsDebuggerClass;
31 #define SWFDEC_TYPE_AS_DEBUGGER (swfdec_as_debugger_get_type())
32 #define SWFDEC_IS_AS_DEBUGGER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_AS_DEBUGGER))
33 #define SWFDEC_IS_AS_DEBUGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_AS_DEBUGGER))
34 #define SWFDEC_AS_DEBUGGER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_AS_DEBUGGER, SwfdecAsDebugger))
35 #define SWFDEC_AS_DEBUGGER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_AS_DEBUGGER, SwfdecAsDebuggerClass))
36 #define SWFDEC_AS_DEBUGGER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_AS_DEBUGGER, SwfdecAsDebuggerClass))
38 struct _SwfdecAsDebugger {
39 /*< private >*/
40 GObject object;
43 struct _SwfdecAsDebuggerClass {
44 GObjectClass object_class;
46 /* a new object was added to the GC */
47 void (* add) (SwfdecAsDebugger * debugger,
48 SwfdecAsContext * context,
49 SwfdecAsObject * object);
50 /* an object was removed from the GC */
51 void (* remove) (SwfdecAsDebugger * debugger,
52 SwfdecAsContext * context,
53 SwfdecAsObject * object);
54 /* called before executing a bytecode */
55 void (* step) (SwfdecAsDebugger * debugger,
56 SwfdecAsContext * context);
57 /* called after adding a frame from the function stack */
58 void (* start_frame) (SwfdecAsDebugger * debugger,
59 SwfdecAsContext * context,
60 SwfdecAsFrame * frame);
61 /* called after removing a frame from the function stack */
62 void (* finish_frame)(SwfdecAsDebugger * debugger,
63 SwfdecAsContext * context,
64 SwfdecAsFrame * frame,
65 const SwfdecAsValue * return_value);
66 /* called before setting a variable */
67 void (* set_variable)(SwfdecAsDebugger * debugger,
68 SwfdecAsContext * context,
69 SwfdecAsObject * object,
70 const char * variable,
71 const SwfdecAsValue * value);
74 GType swfdec_as_debugger_get_type (void);
77 G_END_DECLS
78 #endif