actually set the variable here
[swfdec.git] / swfdec / swfdec_as_script_function.h
blob8d0d3461399025f519e445bb4034f1d2e582b45c
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_SCRIPT_FUNCTION_H_
21 #define _SWFDEC_AS_SCRIPT_FUNCTION_H_
23 #include <swfdec/swfdec_as_function.h>
24 #include <swfdec/swfdec_as_types.h>
25 #include <swfdec/swfdec_sandbox.h>
26 #include <swfdec/swfdec_script.h>
27 #include <swfdec/swfdec_types.h>
29 G_BEGIN_DECLS
31 typedef struct _SwfdecAsScriptFunction SwfdecAsScriptFunction;
32 typedef struct _SwfdecAsScriptFunctionClass SwfdecAsScriptFunctionClass;
34 #define SWFDEC_TYPE_AS_SCRIPT_FUNCTION (swfdec_as_script_function_get_type())
35 #define SWFDEC_IS_AS_SCRIPT_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SWFDEC_TYPE_AS_SCRIPT_FUNCTION))
36 #define SWFDEC_IS_AS_SCRIPT_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), SWFDEC_TYPE_AS_SCRIPT_FUNCTION))
37 #define SWFDEC_AS_SCRIPT_FUNCTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), SWFDEC_TYPE_AS_SCRIPT_FUNCTION, SwfdecAsScriptFunction))
38 #define SWFDEC_AS_SCRIPT_FUNCTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), SWFDEC_TYPE_AS_SCRIPT_FUNCTION, SwfdecAsScriptFunctionClass))
39 #define SWFDEC_AS_SCRIPT_FUNCTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), SWFDEC_TYPE_AS_SCRIPT_FUNCTION, SwfdecAsScriptFunctionClass))
41 /* FIXME: do two obejcts, one for scripts and one for native? */
42 struct _SwfdecAsScriptFunction {
43 SwfdecAsFunction function;
45 /* for script script_functions */
46 SwfdecScript * script; /* script being executed or NULL when native */
47 GSList * scope_chain; /* scope this script_function was defined in */
48 SwfdecMovie * target; /* target this object was defined in or NULL if in init script */
49 SwfdecSandbox * sandbox; /* sandbox this function was defined in or NULL if don't care */
52 struct _SwfdecAsScriptFunctionClass {
53 SwfdecAsFunctionClass function_class;
56 GType swfdec_as_script_function_get_type (void);
58 SwfdecAsFunction * swfdec_as_script_function_new (SwfdecAsContext * context,
59 SwfdecMovie * target,
60 const GSList * scope_chain,
61 SwfdecScript * script);
64 G_END_DECLS
65 #endif