fix build for --disable-gtk-doc
[swfdec.git] / swfdec / swfdec_player_scripting.c
blob360509f86d3e60117e1f26242b0e52542bf1054a
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 #ifdef HAVE_CONFIG_H
21 #include "config.h"
22 #endif
24 #include "swfdec_player_scripting.h"
25 #include "swfdec_debug.h"
27 /*** GTK-DOC ***/
29 /**
30 * SECTION:SwfdecPlayerScripting
31 * @title: SwfdecPlayerScripting
32 * @short_description: integration with external scripts
34 * The @SwfdecPlayerScripting object is used to implement the ExternalInterface
35 * object inside Flash. By providing your own custom implementation of this
36 * object using swfdec_player_set_scripting(), you can allow a Flash file to
37 * call your own custom functions. And you can call functions inside the Flash
38 * player.
40 * The functions are emitted using a custom XML format. The same format is used
41 * to call functions in the Flash player. FIXME: describe the XML format in use.
44 /**
45 * SwfdecPlayerScripting:
47 * The object you have to create.
50 /**
51 * SwfdecPlayerScriptingClass:
52 * @js_get_id: optional function. Returns the string by which the scripting
53 * object can reference itself in calls to the @js_call function.
54 * @js_call: optional function. Emits Javascript code that you have to
55 * interpret. You must also implement the @js_get_id function to make
56 * this function work. The return value must be in the custom XML
57 * format.
58 * @xml_call: optional function. If the Javascript functions aren't implemented,
59 * an xml format is used to encode the function call and the call is
60 * then done using this function. The return value is to be provided
61 * in the same custom XML format.
63 * You have to implement the virtual functions in this object to get a working
64 * scripting implementation.
67 /*** SWFDEC_PLAYER_SCRIPTING ***/
69 G_DEFINE_ABSTRACT_TYPE (SwfdecPlayerScripting, swfdec_player_scripting, G_TYPE_OBJECT)
71 static void
72 swfdec_player_scripting_class_init (SwfdecPlayerScriptingClass *klass)
76 static void
77 swfdec_player_scripting_init (SwfdecPlayerScripting *player_scripting)