[Swfdec-commits] 8 commits - doc/Makefile.am doc/swfdec-docs.sgml doc/swfdec-sections.txt doc/swfdec.types swfdec-gtk/swfdec_gtk_loader.c swfdec/swfdec_loader.h swfdec/swfdec_player_scripting.c swfdec/swfdec_player_scripting.h swfdec/swfdec_socket.h swfdec/swfdec_stream.h
Benjamin Otte
company at kemper.freedesktop.org
Mon Jan 28 06:16:37 PST 2008
doc/Makefile.am | 1
doc/swfdec-docs.sgml | 12 +++-
doc/swfdec-sections.txt | 111 ++++++++++++++++++++++++++++++++-------
doc/swfdec.types | 11 +++
swfdec-gtk/swfdec_gtk_loader.c | 22 +++----
swfdec/swfdec_loader.h | 2
swfdec/swfdec_player_scripting.c | 41 ++++++++++++++
swfdec/swfdec_player_scripting.h | 2
swfdec/swfdec_socket.h | 2
swfdec/swfdec_stream.h | 2
10 files changed, 171 insertions(+), 35 deletions(-)
New commits:
commit ca9dcd49651ed21fb1dd36143b403e88a4439816
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Jan 28 14:49:49 2008 +0100
seems I deleted a line too much
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index 5c88517..53fbb61 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -97,6 +97,7 @@ SWFDEC_TYPE_PLAYER_SCRIPTING
swfdec_player_scripting_get_type
</SECTION>
+<SECTION>
<FILE>SwfdecURL</FILE>
<TITLE>SwfdecURL</TITLE>
SwfdecURL
commit 03e17dd99fcd29e5dde77696e60df0411ed87294
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Jan 28 14:18:40 2008 +0100
remove duplicate types (oops)
diff --git a/doc/swfdec.types b/doc/swfdec.types
index c417bfd..5b2ea54 100644
--- a/doc/swfdec.types
+++ b/doc/swfdec.types
@@ -10,10 +10,6 @@ swfdec_as_native_function_get_type
swfdec_as_object_get_type
swfdec_audio_get_type
swfdec_file_loader_get_type
-swfdec_gtk_loader_get_type
-swfdec_gtk_player_get_type
-swfdec_gtk_socket_get_type
-swfdec_gtk_widget_get_type
swfdec_loader_get_type
swfdec_player_get_type
swfdec_player_scripting_get_type
commit 476138ac59dde1bb94bcc5c143c33932ac056162
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Jan 28 14:00:17 2008 +0100
add include headers
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index 3995d1d..5c88517 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -1,3 +1,5 @@
+<INCLUDE>swfdec/swfdec.h</INCLUDE>
+
<SECTION>
<FILE>SwfdecAudio</FILE>
<TITLE>SwfdecAudio</TITLE>
@@ -253,6 +255,7 @@ swfdec_rectangle_get_type
<SECTION>
<FILE>SwfdecGtkPlayer</FILE>
<TITLE>SwfdecGtkPlayer</TITLE>
+<INCLUDE>swfdec/swfdec-gtk.h</INCLUDE>
SwfdecGtkPlayer
swfdec_gtk_player_new
swfdec_gtk_player_get_playing
@@ -276,6 +279,7 @@ SWFDEC_TYPE_GTK_PLAYER
<SECTION>
<FILE>SwfdecGtkWidget</FILE>
<TITLE>SwfdecGtkWidget</TITLE>
+<INCLUDE>swfdec/swfdec-gtk.h</INCLUDE>
SwfdecGtkWidget
swfdec_gtk_widget_new
swfdec_gtk_widget_get_player
@@ -301,6 +305,7 @@ SWFDEC_TYPE_GTK_WIDGET
<SECTION>
<FILE>GtkExtensions</FILE>
<TITLE>Gtk extension objects</TITLE>
+<INCLUDE>swfdec/swfdec-gtk.h</INCLUDE>
SwfdecGtkLoader
SwfdecGtkSocket
<SUBSECTION Standard>
commit 2c516c4a4394348e3dad0c42756921c6ed030123
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Jan 28 14:00:11 2008 +0100
update types files
diff --git a/doc/swfdec.types b/doc/swfdec.types
index 4ef3276..c417bfd 100644
--- a/doc/swfdec.types
+++ b/doc/swfdec.types
@@ -1,16 +1,27 @@
#include <swfdec/swfdec.h>
#include <swfdec-gtk/swfdec-gtk.h>
+swfdec_as_array_get_type
swfdec_as_context_get_type
-swfdec_as_object_get_type
+swfdec_as_debugger_get_type
swfdec_as_frame_get_type
swfdec_as_function_get_type
+swfdec_as_native_function_get_type
+swfdec_as_object_get_type
swfdec_audio_get_type
+swfdec_file_loader_get_type
+swfdec_gtk_loader_get_type
+swfdec_gtk_player_get_type
+swfdec_gtk_socket_get_type
+swfdec_gtk_widget_get_type
swfdec_loader_get_type
swfdec_player_get_type
swfdec_player_scripting_get_type
+swfdec_socket_get_type
+swfdec_stream_get_type
swfdec_system_get_type
+
swfdec_gtk_loader_get_type
swfdec_gtk_player_get_type
+swfdec_gtk_socket_get_type
swfdec_gtk_widget_get_type
-
commit 7a1794ce99016dcec8a4db70fd3545078bf7f91b
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Jan 28 13:58:24 2008 +0100
update documentation
diff --git a/swfdec/swfdec_loader.h b/swfdec/swfdec_loader.h
index 6f15477..0622770 100644
--- a/swfdec/swfdec_loader.h
+++ b/swfdec/swfdec_loader.h
@@ -67,8 +67,10 @@ struct _SwfdecLoader
struct _SwfdecLoaderClass
{
+ /*< private >*/
SwfdecStreamClass stream_class;
+ /*< public >*/
void (* load) (SwfdecLoader * loader,
SwfdecPlayer * player,
const char * url,
diff --git a/swfdec/swfdec_socket.h b/swfdec/swfdec_socket.h
index 6b43f22..8a4eb2c 100644
--- a/swfdec/swfdec_socket.h
+++ b/swfdec/swfdec_socket.h
@@ -43,8 +43,10 @@ struct _SwfdecSocket
struct _SwfdecSocketClass
{
+ /*< private >*/
SwfdecStreamClass stream_class;
+ /*< public >*/
void (* connect) (SwfdecSocket * socket,
SwfdecPlayer * player,
const char * hostname,
diff --git a/swfdec/swfdec_stream.h b/swfdec/swfdec_stream.h
index 973863d..063fd48 100644
--- a/swfdec/swfdec_stream.h
+++ b/swfdec/swfdec_stream.h
@@ -46,8 +46,10 @@ struct _SwfdecStream
struct _SwfdecStreamClass
{
+ /*< private >*/
GObjectClass object_class;
+ /*< public >*/
/* get a nice description string */
const char * (* describe) (SwfdecStream * stream);
/* close the stream. */
commit a373f686984a0ee14276616f0e179cb6b6423d30
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Jan 28 13:58:00 2008 +0100
fix documentation for extensions
diff --git a/swfdec-gtk/swfdec_gtk_loader.c b/swfdec-gtk/swfdec_gtk_loader.c
index ec6d78f..42bbb76 100644
--- a/swfdec-gtk/swfdec_gtk_loader.c
+++ b/swfdec-gtk/swfdec_gtk_loader.c
@@ -30,23 +30,23 @@
/*** GTK-DOC ***/
/**
- * SECTION:SwfdecGtkLoader
- * @title: SwfdecGtkLoader
- * @short_description: advanced loader able to load network ressources
- * @see_also: #SwfdecLoader
+ * SECTION:GtkExtensions
+ * @title: Gtk extensions
+ * @short_description: extension objects for @SwfdecGtkPlayer
*
- * #SwfdecGtkLoader is a #SwfdecLoader that is intended as an easy way to be
- * access ressources that are not stored in files, such as HTTP. It can
- * however be compiled with varying support for different protocols, so don't
- * rely on support for a particular protocol being available. If you need this,
- * code your own SwfdecLoader subclass.
+ * Swfdec-Gtk provides some objects that implement the various extensions
+ * provided by the @SwfdecPlayer object. They are used by default in the
+ * #SwfdecGtkPlayer object, but you can use them outside of it, too.
+ * However, they require certain Gtk functionality, such as a running glib
+ * main loop.
*/
/**
* SwfdecGtkLoader:
*
- * This is the object used to represent a loader. Since it may use varying
- * backends, it is completely private.
+ * #SwfdecGtkLoader is a #SwfdecLoader that is intended as an easy way to be
+ * access ressources that are not stored in files, such as HTTP. It is a
+ * private object.
*/
struct _SwfdecGtkLoader
commit 47db6e612a33280fd05b2e8a3c7386f26f1c17c3
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Jan 28 13:36:46 2008 +0100
document SwfdecPlayerScripting
diff --git a/swfdec/swfdec_player_scripting.c b/swfdec/swfdec_player_scripting.c
index 0063a62..360509f 100644
--- a/swfdec/swfdec_player_scripting.c
+++ b/swfdec/swfdec_player_scripting.c
@@ -24,6 +24,47 @@
#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)
diff --git a/swfdec/swfdec_player_scripting.h b/swfdec/swfdec_player_scripting.h
index 03dbbae..7c6674e 100644
--- a/swfdec/swfdec_player_scripting.h
+++ b/swfdec/swfdec_player_scripting.h
@@ -43,8 +43,10 @@ struct _SwfdecPlayerScripting
struct _SwfdecPlayerScriptingClass
{
+ /*< private >*/
GObjectClass object_class;
+ /*< public >*/
char * (* js_get_id) (SwfdecPlayerScripting *scripting,
SwfdecPlayer * player);
char * (* js_call) (SwfdecPlayerScripting *scripting,
commit 4d603977d30d5c00056643f695239aaf2db19f9c
Author: Benjamin Otte <otte at gnome.org>
Date: Mon Jan 28 13:36:37 2008 +0100
rework the documentation
diff --git a/doc/Makefile.am b/doc/Makefile.am
index 65a4d34..371c562 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -149,6 +149,7 @@ EXTRA_HFILES = \
../swfdec-gtk/swfdec_gtk_keys.h \
../swfdec-gtk/swfdec_gtk_loader.h \
../swfdec-gtk/swfdec_gtk_player.h \
+ ../swfdec-gtk/swfdec_gtk_socket.h \
../swfdec-gtk/swfdec_gtk_widget.h
else
EXTRA_HFILES =
diff --git a/doc/swfdec-docs.sgml b/doc/swfdec-docs.sgml
index 948da8e..04f9744 100644
--- a/doc/swfdec-docs.sgml
+++ b/doc/swfdec-docs.sgml
@@ -10,18 +10,24 @@
<title>Swfdec Gtk library</title>
<xi:include href="xml/SwfdecGtkPlayer.xml"/>
<xi:include href="xml/SwfdecGtkWidget.xml"/>
- <xi:include href="xml/SwfdecGtkLoader.xml"/>
+ <xi:include href="xml/GtkExtensions.xml"/>
</chapter>
<chapter>
<title>Swfdec library</title>
<xi:include href="xml/Enumerations.xml"/>
<xi:include href="xml/SwfdecRectangle.xml"/>
+ <xi:include href="xml/SwfdecBuffer.xml"/>
+ <xi:include href="xml/SwfdecURL.xml"/>
<xi:include href="xml/SwfdecPlayer.xml"/>
<xi:include href="xml/SwfdecSystem.xml"/>
<xi:include href="xml/SwfdecAudio.xml"/>
- <xi:include href="xml/SwfdecBuffer.xml"/>
+ </chapter>
+ <chapter>
+ <title>extending SwfdecPlayer</title>
+ <xi:include href="xml/SwfdecPlayerScripting.xml"/>
+ <xi:include href="xml/SwfdecStream.xml"/>
<xi:include href="xml/SwfdecLoader.xml"/>
- <xi:include href="xml/SwfdecURL.xml"/>
+ <xi:include href="xml/SwfdecSocket.xml"/>
</chapter>
<chapter>
<title>Actionscript interpreter</title>
diff --git a/doc/swfdec-sections.txt b/doc/swfdec-sections.txt
index 09d067e..3995d1d 100644
--- a/doc/swfdec-sections.txt
+++ b/doc/swfdec-sections.txt
@@ -15,23 +15,39 @@ SWFDEC_AUDIO_GET_CLASS
</SECTION>
<SECTION>
+<FILE>SwfdecStream</FILE>
+<TITLE>SwfdecStream</TITLE>
+SwfdecStream
+SwfdecStreamClass
+swfdec_stream_open
+swfdec_stream_push
+swfdec_stream_eof
+swfdec_stream_error
+swfdec_stream_errorv
+<SUBSECTION Standard>
+SwfdecStreamPrivate
+SWFDEC_STREAM
+SWFDEC_IS_STREAM
+SWFDEC_TYPE_STREAM
+swfdec_stream_get_type
+SWFDEC_STREAM_CLASS
+SWFDEC_IS_STREAM_CLASS
+SWFDEC_STREAM_GET_CLASS
+</SECTION>
+
+<SECTION>
<FILE>SwfdecLoader</FILE>
<TITLE>SwfdecLoader</TITLE>
SwfdecLoader
SwfdecFileLoader
-swfdec_file_loader_new
-swfdec_loader_open
-swfdec_loader_push
-swfdec_loader_eof
-swfdec_loader_error
+SwfdecLoaderClass
+swfdec_loader_set_url
swfdec_loader_get_url
swfdec_loader_set_size
swfdec_loader_get_size
swfdec_loader_get_loaded
-swfdec_loader_get_filename
swfdec_loader_get_data_type
<SUBSECTION Standard>
-SwfdecLoaderClass
SWFDEC_LOADER
SWFDEC_IS_LOADER
SWFDEC_TYPE_LOADER
@@ -50,20 +66,58 @@ swfdec_file_loader_get_type
</SECTION>
<SECTION>
+<FILE>SwfdecSocket</FILE>
+<TITLE>SwfdecSocket</TITLE>
+SwfdecSocket
+SwfdecSocketClass
+<SUBSECTION Standard>
+SWFDEC_SOCKET
+SWFDEC_IS_SOCKET
+SWFDEC_TYPE_SOCKET
+swfdec_socket_get_type
+SWFDEC_SOCKET_CLASS
+SWFDEC_IS_SOCKET_CLASS
+SWFDEC_SOCKET_GET_CLASS
+</SECTION>
+
+<SECTION>
+<FILE>SwfdecPlayerScripting</FILE>
+<TITLE>SwfdecPlayerScripting</TITLE>
+SwfdecPlayerScripting
+SwfdecPlayerScriptingClass
+<SUBSECTION Standard>
+SWFDEC_IS_PLAYER_SCRIPTING
+SWFDEC_IS_PLAYER_SCRIPTING_CLASS
+SWFDEC_PLAYER_SCRIPTING
+SWFDEC_PLAYER_SCRIPTING_CLASS
+SWFDEC_PLAYER_SCRIPTING_GET_CLASS
+SWFDEC_TYPE_PLAYER_SCRIPTING
+swfdec_player_scripting_get_type
+</SECTION>
+
<FILE>SwfdecURL</FILE>
<TITLE>SwfdecURL</TITLE>
SwfdecURL
+swfdec_url_new
+swfdec_url_new_from_input
+swfdec_url_new_components
+swfdec_url_new_relative
+swfdec_url_new_parent
swfdec_url_copy
swfdec_url_free
-swfdec_url_get_host
-swfdec_url_get_path
swfdec_url_get_protocol
swfdec_url_has_protocol
+swfdec_url_get_host
+swfdec_url_get_port
+swfdec_url_get_path
swfdec_url_get_query
swfdec_url_get_url
swfdec_url_is_local
-swfdec_url_new
-swfdec_url_new_relative
+swfdec_url_is_parent
+swfdec_url_format_for_display
+swfdec_url_equal
+swfdec_url_hash
+swfdec_url_path_is_relative
<SUBSECTION Standard>
SWFDEC_TYPE_URL
swfdec_url_get_type
@@ -75,10 +129,13 @@ swfdec_url_get_type
SwfdecPlayer
swfdec_init
swfdec_player_new
-swfdec_player_new_from_file
-swfdec_player_set_loader
-swfdec_player_set_loader_with_variables
swfdec_player_is_initialized
+swfdec_player_get_url
+swfdec_player_set_url
+swfdec_player_get_base_url
+swfdec_player_set_base_url
+swfdec_player_get_variables
+swfdec_player_set_variables
swfdec_player_get_rate
swfdec_player_get_default_size
swfdec_player_get_size
@@ -90,6 +147,8 @@ swfdec_player_get_scale_mode
swfdec_player_set_scale_mode
swfdec_player_get_alignment
swfdec_player_set_alignment
+swfdec_player_get_scripting
+swfdec_player_set_scripting
swfdec_player_render
swfdec_player_advance
swfdec_player_mouse_move
@@ -196,7 +255,6 @@ swfdec_rectangle_get_type
<TITLE>SwfdecGtkPlayer</TITLE>
SwfdecGtkPlayer
swfdec_gtk_player_new
-swfdec_gtk_player_new_from_uri
swfdec_gtk_player_get_playing
swfdec_gtk_player_set_playing
swfdec_gtk_player_get_speed
@@ -204,6 +262,7 @@ swfdec_gtk_player_set_speed
swfdec_gtk_player_get_audio_enabled
swfdec_gtk_player_set_audio_enabled
<SUBSECTION Standard>
+SwfdecGtkPlayerPrivate
SwfdecGtkPlayerClass
swfdec_gtk_player_get_type
SWFDEC_GTK_PLAYER
@@ -240,10 +299,10 @@ SWFDEC_TYPE_GTK_WIDGET
</SECTION>
<SECTION>
-<FILE>SwfdecGtkLoader</FILE>
-<TITLE>SwfdecGtkLoader</TITLE>
+<FILE>GtkExtensions</FILE>
+<TITLE>Gtk extension objects</TITLE>
SwfdecGtkLoader
-swfdec_gtk_loader_new
+SwfdecGtkSocket
<SUBSECTION Standard>
swfdec_gtk_loader_get_type
SwfdecGtkLoaderClass
@@ -253,6 +312,14 @@ SWFDEC_GTK_LOADER_GET_CLASS
SWFDEC_IS_GTK_LOADER
SWFDEC_IS_GTK_LOADER_CLASS
SWFDEC_TYPE_GTK_LOADER
+SwfdecGtkSocketClass
+swfdec_gtk_socket_get_type
+SWFDEC_GTK_SOCKET
+SWFDEC_GTK_SOCKET_CLASS
+SWFDEC_GTK_SOCKET_GET_CLASS
+SWFDEC_IS_GTK_SOCKET
+SWFDEC_IS_GTK_SOCKET_CLASS
+SWFDEC_TYPE_GTK_SOCKET
</SECTION>
<SECTION>
@@ -286,6 +353,7 @@ swfdec_as_value_to_object
SWFDEC_AS_VALUE_SET_OBJECT
swfdec_as_value_to_primitive
swfdec_as_value_to_debug
+swfdec_as_double_to_integer
swfdec_as_double_to_string
swfdec_as_integer_to_string
swfdec_as_str_concat
@@ -353,7 +421,6 @@ swfdec_as_object_delete_variable
swfdec_as_object_delete_all_variables
SwfdecAsVariableForeach
swfdec_as_object_foreach
-swfdec_as_object_has_function
swfdec_as_object_run
swfdec_as_object_call
swfdec_as_object_add_function
More information about the Swfdec-commits
mailing list