[Swfdec-commits] Branch '0.6' - 2 commits - swfdec/Makefile.am swfdec/swfdec_amf.h swfdec/swfdec_bits.h swfdec/swfdec_buffer.h swfdec/swfdec_codec_audio.h swfdec/swfdec_codec_video.h swfdec/swfdec_color.h swfdec/swfdec_debug.h swfdec/swfdec_player.c swfdec/swfdec_rectangle.h swfdec/swfdec_rect.h swfdec/swfdec_tag.h swfdec/swfdec_types.h swfdec/swfdec_utils.h
Benjamin Otte
company at kemper.freedesktop.org
Fri Jul 4 07:52:36 PDT 2008
swfdec/Makefile.am | 2 ++
swfdec/swfdec_amf.h | 4 ++++
swfdec/swfdec_bits.h | 3 +++
swfdec/swfdec_buffer.h | 4 ++++
swfdec/swfdec_codec_audio.h | 2 ++
swfdec/swfdec_codec_video.h | 2 ++
swfdec/swfdec_color.h | 3 +++
swfdec/swfdec_debug.h | 3 +++
swfdec/swfdec_player.c | 8 ++++----
swfdec/swfdec_rect.h | 3 +++
swfdec/swfdec_rectangle.h | 3 +++
swfdec/swfdec_tag.h | 9 +++++++--
swfdec/swfdec_types.h | 3 +++
swfdec/swfdec_utils.h | 5 +++--
14 files changed, 46 insertions(+), 8 deletions(-)
New commits:
commit 53e0452131528fad363d0a97c7b2dc6832ab730f
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Jul 4 16:10:34 2008 +0200
update documentation
diff --git a/swfdec/swfdec_player.c b/swfdec/swfdec_player.c
index 5a50c52..d508647 100644
--- a/swfdec/swfdec_player.c
+++ b/swfdec/swfdec_player.c
@@ -2471,12 +2471,12 @@ swfdec_player_mouse_release (SwfdecPlayer *player, double x, double y,
/**
* swfdec_player_key_press:
* @player: a #SwfdecPlayer
- * @keycode: the key that was pressed
+ * @keycode: the key that was pressed, must be smaller than 256.
* @character: UCS4 of the character that was inserted or 0 if none
*
- * Call this function to make the @player react to a key press. Be sure to
- * check that keycode transformations are done correctly. For a list of
- * keycodes see FIXME.
+ * Call this function to make the @player react to a key press. A list of
+ * defined key codes is defined by #SwfdecKey. You will likely need to
+ * translate from your keyboard API to the Flash key codes.
*
* Returns: %TRUE if the key press was handled by the @player, %FALSE if it
* should be propagated further
commit cb5c6a66895e72b6d1ed01967a62353c01ebd276
Author: Benjamin Otte <otte at gnome.org>
Date: Fri Jul 4 16:07:34 2008 +0200
fix all missing G_BEGIN_DECLS G_END_DECLS for inclusion from C++
diff --git a/swfdec/Makefile.am b/swfdec/Makefile.am
index d05145e..6de3b0e 100644
--- a/swfdec/Makefile.am
+++ b/swfdec/Makefile.am
@@ -364,10 +364,12 @@ swfdec_as_strings.h: swfdec_as_strings.c
( cd $(srcdir) && echo "/* This is a generated file. See swfdec_as_strings.c for details. */" \
&& echo "#ifndef _SWFDEC_AS_STRINGS_H_" \
&& echo "#define _SWFDEC_AS_STRINGS_H_" \
+ && echo "G_BEGIN_DECLS" \
&& echo "extern const char swfdec_as_strings[];" \
&& grep " SWFDEC_AS_CONSTANT_STRING" swfdec_as_strings.c \
| sed "s/.*(\"\(.*\)\").*/\1/" \
| LC_ALL="C" $(AWK) '{ if ($$0 == "") name = "EMPTY"; else if ($$0 == ",") name = "COMMA"; else if ($$0 == "/") name = "SLASH"; else name = $$0; gsub("[^a-zA-Z0-9]","_",name); print "#define SWFDEC_AS_STR_" name " &swfdec_as_strings[" x + 1 "]"; x = x + length ($$0) + 2 }' \
+ && echo "G_END_DECLS" \
&& echo "#endif" ) > xgen-sas \
&& (cmp -s xgen-sas swfdec_as_strings.h || cp xgen-sas swfdec_as_strings.h ) \
&& rm -f xgen-sas
diff --git a/swfdec/swfdec_amf.h b/swfdec/swfdec_amf.h
index 2b493dd..06dde8a 100644
--- a/swfdec/swfdec_amf.h
+++ b/swfdec/swfdec_amf.h
@@ -23,6 +23,8 @@
#include <swfdec/swfdec_as_context.h>
#include <swfdec/swfdec_bits.h>
+G_BEGIN_DECLS
+
typedef enum {
SWFDEC_AMF_NUMBER = 0,
SWFDEC_AMF_BOOLEAN = 1,
@@ -56,4 +58,6 @@ guint swfdec_amf_parse (SwfdecAsContext * context,
...);
+G_END_DECLS
+
#endif
diff --git a/swfdec/swfdec_bits.h b/swfdec/swfdec_bits.h
index 36e9a6a..891b284 100644
--- a/swfdec/swfdec_bits.h
+++ b/swfdec/swfdec_bits.h
@@ -26,6 +26,8 @@
#include <swfdec/swfdec_color.h>
#include <swfdec/swfdec_buffer.h>
+G_BEGIN_DECLS
+
typedef struct _SwfdecBits SwfdecBits;
struct _SwfdecBits
@@ -72,4 +74,5 @@ SwfdecBuffer *swfdec_bits_decompress (SwfdecBits *bits, int compressed,
int decompressed);
+G_END_DECLS
#endif
diff --git a/swfdec/swfdec_buffer.h b/swfdec/swfdec_buffer.h
index 37e6da4..99befd4 100644
--- a/swfdec/swfdec_buffer.h
+++ b/swfdec/swfdec_buffer.h
@@ -25,6 +25,8 @@
#include <glib.h>
#include <glib-object.h>
+G_BEGIN_DECLS
+
typedef struct _SwfdecBuffer SwfdecBuffer;
typedef struct _SwfdecBufferQueue SwfdecBufferQueue;
@@ -85,5 +87,7 @@ SwfdecBuffer *swfdec_buffer_queue_peek (SwfdecBufferQueue * queue, gsize length)
SwfdecBuffer *swfdec_buffer_queue_peek_buffer (SwfdecBufferQueue * queue);
SwfdecBufferQueue *swfdec_buffer_queue_ref (SwfdecBufferQueue * queue);
void swfdec_buffer_queue_unref (SwfdecBufferQueue * queue);
+
+G_END_DECLS
#endif
diff --git a/swfdec/swfdec_codec_audio.h b/swfdec/swfdec_codec_audio.h
index d3fb74d..3b9572d 100644
--- a/swfdec/swfdec_codec_audio.h
+++ b/swfdec/swfdec_codec_audio.h
@@ -24,6 +24,8 @@
#include <swfdec/swfdec_audio_internal.h>
#include <swfdec/swfdec_buffer.h>
+G_BEGIN_DECLS
+
typedef struct _SwfdecAudioDecoder SwfdecAudioDecoder;
#define SWFDEC_AUDIO_CODEC_UNDEFINED 0
diff --git a/swfdec/swfdec_codec_video.h b/swfdec/swfdec_codec_video.h
index eb6e3ab..31edd47 100644
--- a/swfdec/swfdec_codec_video.h
+++ b/swfdec/swfdec_codec_video.h
@@ -24,6 +24,8 @@
#include <cairo.h>
#include <swfdec/swfdec_buffer.h>
+G_BEGIN_DECLS
+
#define SWFDEC_VIDEO_CODEC_UNDEFINED 0
#define SWFDEC_VIDEO_CODEC_H263 2
#define SWFDEC_VIDEO_CODEC_SCREEN 3
diff --git a/swfdec/swfdec_color.h b/swfdec/swfdec_color.h
index 188e6dd..7a74a0e 100644
--- a/swfdec/swfdec_color.h
+++ b/swfdec/swfdec_color.h
@@ -24,6 +24,8 @@
#include <swfdec/swfdec_types.h>
+G_BEGIN_DECLS
+
struct _SwfdecColorTransform {
gboolean mask; /* TRUE if this is a mask - masks are always black */
/* naming here is taken from ActionScript, where ?a is the multiplier and ?b the offset */
@@ -72,4 +74,5 @@ void swfdec_matrix_morph (cairo_matrix_t *dest, const cairo_matrix_t *start,
const cairo_matrix_t *end, guint ratio);
+G_END_DECLS
#endif
diff --git a/swfdec/swfdec_debug.h b/swfdec/swfdec_debug.h
index e6821e9..9d0963b 100644
--- a/swfdec/swfdec_debug.h
+++ b/swfdec/swfdec_debug.h
@@ -24,6 +24,8 @@
#include <glib.h>
+G_BEGIN_DECLS
+
enum {
SWFDEC_LEVEL_NONE = 0,
SWFDEC_LEVEL_ERROR,
@@ -62,4 +64,5 @@ void swfdec_debug_log (guint level, const char *file, const char *function,
void swfdec_debug_set_level (guint level);
int swfdec_debug_get_level (void);
+G_END_DECLS
#endif
diff --git a/swfdec/swfdec_rect.h b/swfdec/swfdec_rect.h
index 6833b8c..9871321 100644
--- a/swfdec/swfdec_rect.h
+++ b/swfdec/swfdec_rect.h
@@ -25,6 +25,8 @@
#include <swfdec/swfdec_types.h>
#include <swfdec/swfdec_rectangle.h>
+G_BEGIN_DECLS
+
struct _SwfdecRect
{
double x0;
@@ -48,4 +50,5 @@ void swfdec_rect_transform (SwfdecRect *dest, const SwfdecRect *src, const cairo
void swfdec_rectangle_init_rect (SwfdecRectangle *rectangle, const SwfdecRect *rect);
+G_END_DECLS
#endif
diff --git a/swfdec/swfdec_rectangle.h b/swfdec/swfdec_rectangle.h
index 4d34ae6..b1ddc38 100644
--- a/swfdec/swfdec_rectangle.h
+++ b/swfdec/swfdec_rectangle.h
@@ -22,6 +22,8 @@
#include <glib-object.h>
+G_BEGIN_DECLS
+
#define SWFDEC_TYPE_RECTANGLE swfdec_rectangle_get_type ()
typedef struct _SwfdecRectangle SwfdecRectangle;
@@ -52,4 +54,5 @@ gboolean swfdec_rectangle_contains_point (const SwfdecRectangle * rectangle,
int y);
+G_END_DECLS
#endif
diff --git a/swfdec/swfdec_tag.h b/swfdec/swfdec_tag.h
index cee23ce..a269fa3 100644
--- a/swfdec/swfdec_tag.h
+++ b/swfdec/swfdec_tag.h
@@ -19,8 +19,12 @@
* Boston, MA 02110-1301 USA
*/
-#ifndef __LIBSWFDEC_TAGS_H__
-#define __LIBSWFDEC_TAGS_H__
+#ifndef __SWFDEC_TAGS_H__
+#define __SWFDEC_TAGS_H__
+
+#include <glib.h>
+
+G_BEGIN_DECLS
typedef enum {
SWFDEC_TAG_END = 0,
@@ -118,4 +122,5 @@ typedef enum {
SWFDEC_TAG_FIRST_ONLY = (1 << 1)
} SwfdecTagFlag;
+G_END_DECLS
#endif
diff --git a/swfdec/swfdec_types.h b/swfdec/swfdec_types.h
index d484396..8024b19 100644
--- a/swfdec/swfdec_types.h
+++ b/swfdec/swfdec_types.h
@@ -5,6 +5,8 @@
#include <glib-object.h>
#include <cairo.h>
+G_BEGIN_DECLS
+
/* Pixel value in the same colorspace as cairo - endian-dependant ARGB.
* The alpha pixel must be present */
typedef guint SwfdecColor;
@@ -60,4 +62,5 @@ typedef struct _SwfdecSpriteMovie SwfdecSpriteMovie;
typedef struct _SwfdecSwfDecoder SwfdecSwfDecoder;
typedef struct _SwfdecText SwfdecText;
+G_END_DECLS
#endif
diff --git a/swfdec/swfdec_utils.h b/swfdec/swfdec_utils.h
index fc57a5d..3c2afa6 100644
--- a/swfdec/swfdec_utils.h
+++ b/swfdec/swfdec_utils.h
@@ -17,11 +17,12 @@
* Boston, MA 02110-1301 USA
*/
-#include <glib.h>
-
#ifndef _SWFDEC_UTILS_H_
#define _SWFDEC_UTILS_H_
+#include <glib.h>
+
+G_BEGIN_DECLS
gboolean swfdec_str_case_equal (gconstpointer v1,
gconstpointer v2);
More information about the Swfdec-commits
mailing list