summaryrefslogtreecommitdiff
path: root/swfdec/swfdec_player_scripting.c
blob: 360509f86d3e60117e1f26242b0e52542bf1054a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/* Swfdec
 * Copyright (C) 2007 Benjamin Otte <otte@gnome.org>
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Lesser General Public
 * License as published by the Free Software Foundation; either
 * version 2.1 of the License, or (at your option) any later version.
 * 
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public
 * License along with this library; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, 
 * Boston, MA  02110-1301  USA
 */

#ifdef HAVE_CONFIG_H
#include "config.h"
#endif

#include "swfdec_player_scripting.h"
#include "swfdec_debug.h"

/*** GTK-DOC ***/

/**
 * SECTION:SwfdecPlayerScripting
 * @title: SwfdecPlayerScripting
 * @short_description: integration with external scripts
 *
 * The @SwfdecPlayerScripting object is used to implement the ExternalInterface
 * object inside Flash. By providing your own custom implementation of this 
 * object using swfdec_player_set_scripting(), you can allow a Flash file to 
 * call your own custom functions. And you can call functions inside the Flash 
 * player.
 *
 * The functions are emitted using a custom XML format. The same format is used
 * to call functions in the Flash player. FIXME: describe the XML format in use. 
 */

/**
 * SwfdecPlayerScripting:
 *
 * The object you have to create.
 */

/**
 * SwfdecPlayerScriptingClass:
 * @js_get_id: optional function. Returns the string by which the scripting 
 *             object can reference itself in calls to the @js_call function.
 * @js_call: optional function. Emits Javascript code that you have to 
 *           interpret. You must also implement the @js_get_id function to make
 *           this function work. The return value must be in the custom XML 
 *           format.
 * @xml_call: optional function. If the Javascript functions aren't implemented,
 *            an xml format is used to encode the function call and the call is
 *            then done using this function. The return value is to be provided
 *            in the same custom XML format.
 *
 * You have to implement the virtual functions in this object to get a working
 * scripting implementation.
 */

/*** SWFDEC_PLAYER_SCRIPTING ***/

G_DEFINE_ABSTRACT_TYPE (SwfdecPlayerScripting, swfdec_player_scripting, G_TYPE_OBJECT)

static void
swfdec_player_scripting_class_init (SwfdecPlayerScriptingClass *klass)
{
}

static void
swfdec_player_scripting_init (SwfdecPlayerScripting *player_scripting)
{
}