+2006-06-22 Emmanuele Bassi <ebassi@openedhand.com>
+
+ * clutter/clutter-timeline.h:
+ * clutter/clutter-timeline.c: Add a "started" and a "paused"
+ signals; add more sanity checks on the public functions.
+
+ (clutter_timeline_get_loop): Add a getter function for the
+ loop property.
+
+ * clutter/clutter-marshal.list: Add marshallers.
+
+ * clutter/clutter-timeline.h:
+ * clutter/clutter-actor.h: Add padding for future expansion
+ without breaking ABI.
+
2006-06-22 Iain Holmes <iain@openedhand.com>
* clutter/clutter-util.c: And more
2006-06-22 Emmanuele Bassi <ebassi@openedhand.com>
* python/Makefile.am:
+ * python/clutter.override:
+ * python/clutter-base.defs:
+ * python/clutter-base-types.defs: Bind updated clutter.Timeline API;
+ bind clutter.Media interface and clutter.VideoTexture.
+
+2006-06-22 Emmanuele Bassi <ebassi@openedhand.com>
+
+ * python/Makefile.am:
* python/pyclutter.pc.in: Add a pkgconfig file in order to
check for bindings existence.
--register $(PYGTK_DEFSDIR)/gdk-types.defs \
--register $(PYGTK_DEFSDIR)/gtk-types.defs \
--register $(PYGTK_DEFSDIR)/pango-types.defs \
- --register clutter-types.defs \
+ --register clutter-types.defs \
--override $(top_srcdir)/bindings/python/$(CLUTTER_OVERRIDES) \
--prefix clutter \
clutter.defs > gen-$@ && \
EXTRA_DIST += pyclutter.pc.in
-INCLUDES = $(PYTHON_CFLAGS) $(PYGTK_CFLAGS) -I$(top_srcdir) $(CLUTTER_CFLAGS)
+INCLUDES = $(PYTHON_CFLAGS) $(PYGTK_CFLAGS) -I$(top_srcdir) $(GST_CFLAGS) $(CLUTTER_CFLAGS)
clutter_la_SOURCES = clutter-pyglue.c cluttermodule.c
clutter_la_LIBADD = $(PYTHON_LIBS) $(PYGTK_LIBS) \
+ $(GST_LIBS) \
+ $(CLUTTER_LIBS) \
$(top_builddir)/clutter/libclutter-@CLUTTER_MAJORMINOR@.la
clutter_la_LDFLAGS = -module avoid-version -export-symbols-regex initclutter
$(PYTHON) $(PYGTK_CODEGENDIR)/h2def.py -v \
$(top_srcdir)/clutter/clutter-keysyms.h \
$(top_srcdir)/clutter/clutter-timeline.h \
+ $(top_srcdir)/clutter/clutter-media.h \
$(top_srcdir)/clutter/clutter-main.h \
$(top_srcdir)/clutter/clutter-event.h \
$(top_srcdir)/clutter/clutter-actor.h \
$(top_srcdir)/clutter/clutter-rectangle.h \
$(top_srcdir)/clutter/clutter-texture.h \
+ $(top_srcdir)/clutter/clutter-video-texture.h \
$(top_srcdir)/clutter/clutter-color.h \
$(top_srcdir)/clutter/clutter-clone-texture.h \
$(top_srcdir)/clutter/clutter-label.h \
)
)
+;; Interfaces
+
+(define-interface Media
+ (in-module "Clutter")
+ (c-name "ClutterMedia")
+ (gtype-id "CLUTTER_TYPE_MEDIA")
+ (vtable "ClutterMediaInterface")
+)
+
;; Objects
(define-object CloneTexture
(gtype-id "CLUTTER_TYPE_TIMELINE")
)
+(define-object VideoTexture
+ (in-module "Clutter")
+ (parent "ClutterTexture")
+ (implements "ClutterMedia")
+ (c-name "ClutterVideoTexture")
+ (gtype-id "CLUTTER_TYPE_VIDEO_TEXTURE")
+)
+
+
;; Pointers
)
)
+(define-method get_loop
+ (of-object "ClutterTimeline")
+ (c-name "clutter_timeline_get_loop")
+ (return-type "gboolean")
+)
+
(define-method rewind
(of-object "ClutterTimeline")
(c-name "clutter_timeline_rewind")
+;; From ../../clutter/clutter-media.h
+
+(define-function clutter_media_get_type
+ (c-name "clutter_media_get_type")
+ (return-type "GType")
+)
+
+(define-method set_uri
+ (of-object "ClutterMedia")
+ (c-name "clutter_media_set_uri")
+ (return-type "none")
+ (parameters
+ '("const-char*" "uri")
+ )
+)
+
+(define-method get_uri
+ (of-object "ClutterMedia")
+ (c-name "clutter_media_get_uri")
+ (return-type "const-char*")
+)
+
+(define-method set_playing
+ (of-object "ClutterMedia")
+ (c-name "clutter_media_set_playing")
+ (return-type "none")
+ (parameters
+ '("gboolean" "playing")
+ )
+)
+
+(define-method get_playing
+ (of-object "ClutterMedia")
+ (c-name "clutter_media_get_playing")
+ (return-type "gboolean")
+)
+
+(define-method set_position
+ (of-object "ClutterMedia")
+ (c-name "clutter_media_set_position")
+ (return-type "none")
+ (parameters
+ '("int" "position")
+ )
+)
+
+(define-method get_position
+ (of-object "ClutterMedia")
+ (c-name "clutter_media_get_position")
+ (return-type "int")
+)
+
+(define-method set_volume
+ (of-object "ClutterMedia")
+ (c-name "clutter_media_set_volume")
+ (return-type "none")
+ (parameters
+ '("double" "volume")
+ )
+)
+
+(define-method get_volume
+ (of-object "ClutterMedia")
+ (c-name "clutter_media_get_volume")
+ (return-type "double")
+)
+
+(define-method get_can_seek
+ (of-object "ClutterMedia")
+ (c-name "clutter_media_get_can_seek")
+ (return-type "gboolean")
+)
+
+(define-method get_buffer_percent
+ (of-object "ClutterMedia")
+ (c-name "clutter_media_get_buffer_percent")
+ (return-type "int")
+)
+
+(define-method get_duration
+ (of-object "ClutterMedia")
+ (c-name "clutter_media_get_duration")
+ (return-type "int")
+)
+
+(define-method set_filename
+ (of-object "ClutterMedia")
+ (c-name "clutter_media_set_filename")
+ (return-type "none")
+ (parameters
+ '("const-gchar*" "filename")
+ )
+)
+
+
+
;; From ../../clutter/clutter-event.h
(define-function clutter_event_new
+;; From ../../clutter/clutter-video-texture.h
+
+(define-function clutter_video_texture_get_type
+ (c-name "clutter_video_texture_get_type")
+ (return-type "GType")
+)
+
+(define-function clutter_video_texture_new
+ (c-name "clutter_video_texture_new")
+ (is-constructor-of "ClutterVideoTexture")
+ (return-type "ClutterActor*")
+)
+
+
+
;; From ../../clutter/clutter-color.h
(define-function clutter_color_get_type
#include "pygobject.h"
#include <clutter/clutter-keysyms.h>
#include <clutter/clutter-event.h>
+#include <clutter/clutter-media.h>
#include <clutter/clutter-main.h>
#include <clutter/clutter-timeline.h>
#include <clutter/clutter-stage.h>
#include <clutter/clutter-rectangle.h>
#include <clutter/clutter-group.h>
#include <clutter/clutter-texture.h>
+#include <clutter/clutter-video-texture.h>
#include <clutter/clutter-clone-texture.h>
#include <clutter/clutter-label.h>
#include <clutter/clutter-util.h>
void (* show_all) (ClutterActor *actor);
void (* hide_all) (ClutterActor *actor);
void (* queue_redraw) (ClutterActor *actor);
+
+ /* padding for future expansion */
+ void (*_clutter_actor_1) (void);
+ void (*_clutter_actor_2) (void);
+ void (*_clutter_actor_3) (void);
+ void (*_clutter_actor_4) (void);
+ void (*_clutter_actor_5) (void);
+ void (*_clutter_actor_6) (void);
};
GType clutter_actor_get_type (void);
* Remove a child #ClutterActor from the #ClutterGroup.
**/
void
-clutter_group_remove (ClutterGroup *self,
+clutter_group_remove (ClutterGroup *self,
ClutterActor *actor)
{
ClutterActor *parent;
void (*remove) (ClutterGroup *group,
ClutterActor *child);
+ /* padding for future expansion */
void (*_clutter_group_1) (void);
void (*_clutter_group_2) (void);
void (*_clutter_group_3) (void);
clutter_group_get_children (ClutterGroup *self);
void
-clutter_group_foreach (ClutterGroup *self,
- ClutterCallback callback,
- gpointer user_data);
+clutter_group_foreach (ClutterGroup *self,
+ ClutterCallback callback,
+ gpointer user_data);
void
-clutter_group_add (ClutterGroup *group, ClutterActor *actor);
+clutter_group_add (ClutterGroup *self,
+ ClutterActor *actor);
void
-clutter_group_add_many_valist (ClutterGroup *group,
+clutter_group_add_many_valist (ClutterGroup *self,
ClutterActor *first_actor,
- va_list args);
+ va_list args);
void
-clutter_group_add_many (ClutterGroup *group,
+clutter_group_add_many (ClutterGroup *self,
ClutterActor *first_actor,
...) G_GNUC_NULL_TERMINATED;
void
-clutter_group_remove (ClutterGroup *group,
+clutter_group_remove (ClutterGroup *self,
ClutterActor *actor);
void
VOID:INT64,INT64,FLOAT,BOOLEAN
VOID:STRING,BOOLEAN,BOOLEAN
+VOID:INT
VOID:INT,INT
VOID:BOXED
VOID:OBJECT
+VOID:VOID
#include "clutter-timeline.h"
#include "clutter-main.h"
#include "clutter-private.h" /* for DBG */
+#include "clutter-marshal.h"
G_DEFINE_TYPE (ClutterTimeline, clutter_timeline, G_TYPE_OBJECT);
guint current_frame_num;
gulong last_frame_msecs;
gulong start_frame_secs;
- gboolean loop;
+
+ guint loop : 1;
};
enum
enum
{
SIGNAL_NEW_FRAME,
+ SIGNAL_STARTED,
+ SIGNAL_PAUSED,
SIGNAL_COMPLETED,
LAST_SIGNAL
};
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTimelineClass, new_frame),
NULL, NULL,
- g_cclosure_marshal_VOID__INT,
+ clutter_marshal_VOID__INT,
G_TYPE_NONE,
1, G_TYPE_INT);
-
timeline_signals[SIGNAL_COMPLETED] =
g_signal_new ("completed",
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterTimelineClass, completed),
NULL, NULL,
- g_cclosure_marshal_VOID__VOID,
+ clutter_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+ timeline_signals[SIGNAL_STARTED] =
+ g_signal_new ("started",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ClutterTimelineClass, started),
+ NULL, NULL,
+ clutter_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
+ timeline_signals[SIGNAL_PAUSED] =
+ g_signal_new ("paused",
+ G_TYPE_FROM_CLASS (object_class),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (ClutterTimelineClass, paused),
+ NULL, NULL,
+ clutter_marshal_VOID__VOID,
G_TYPE_NONE, 0);
-
}
static void
{
ClutterTimelinePrivate *priv;
+ g_return_if_fail (CLUTTER_IS_TIMELINE (timeline));
+
priv = timeline->priv;
if (!priv->timeout_id)
priv->timeout_id = g_timeout_add (FPS_TO_INTERVAL(priv->fps),
timeline_timeout_func,
(gpointer)timeline);
+
+ g_signal_emit (timeline, timeline_signals[SIGNAL_STARTED], 0);
}
/**
timeline->priv->timeout_id = 0;
timeline->priv->last_frame_msecs = 0;
+
+ g_signal_emit (timeline, timeline_signals[SIGNAL_PAUSED], 0);
}
/**
clutter_timeline_rewind (timeline);
}
+/**
+ * clutter_timeline_set_loop:
+ * @timeline: a #ClutterTimeline
+ * @loop: %TRUE for enable looping
+ *
+ * Sets whether @timeline should loop.
+ */
void
-clutter_timeline_set_loop (ClutterTimeline *timeline, gboolean loop)
+clutter_timeline_set_loop (ClutterTimeline *timeline,
+ gboolean loop)
{
- timeline->priv->loop = loop;
+ g_return_if_fail (CLUTTER_IS_TIMELINE (timeline));
+
+ if (timeline->priv->loop != loop)
+ {
+ timeline->priv->loop = loop;
+
+ g_object_notify (G_OBJECT (timeline), "loop");
+ }
+}
+
+/**
+ * clutter_timeline_get_loop:
+ * @timeline: a #ClutterTimeline
+ *
+ * Gets whether @timeline is looping
+ *
+ * Return value: %TRUE if the timeline is looping
+ */
+gboolean
+clutter_timeline_get_loop (ClutterTimeline *timeline)
+{
+ g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), FALSE);
+
+ return timeline->priv->loop;
}
/**
void
clutter_timeline_rewind (ClutterTimeline *timeline)
{
+ g_return_if_fail (CLUTTER_IS_TIMELINE (timeline));
+
clutter_timeline_advance (timeline, 0);
}
gboolean
clutter_timeline_is_playing (ClutterTimeline *timeline)
{
+ g_return_val_if_fail (CLUTTER_IS_TIMELINE (timeline), FALSE);
+
return (timeline->priv->timeout_id != 0);
}
{
GObjectClass parent_class;
- void (*new_frame) (ClutterTimeline *timeline, gint frame_num);
+ void (*started) (ClutterTimeline *timeline);
void (*completed) (ClutterTimeline *timeline);
+ void (*paused) (ClutterTimeline *timeline);
+
+ void (*new_frame) (ClutterTimeline *timeline,
+ gint frame_num);
+
+ void (*_clutter_timeline_1) (void);
+ void (*_clutter_timeline_2) (void);
+ void (*_clutter_timeline_3) (void);
+ void (*_clutter_timeline_4) (void);
+ void (*_clutter_timeline_5) (void);
};
GType clutter_timeline_get_type (void);
void
clutter_timeline_set_loop (ClutterTimeline *timeline, gboolean loop);
+gboolean
+clutter_timeline_get_loop (ClutterTimeline *timeline);
+
void
clutter_timeline_rewind (ClutterTimeline *timeline);
2006-06-22 Emmanuele Bassi <ebassi@openedhand.com>
+ * clutter-sections.txt: Add clutter_timeline_get_loop().
+
+ * Makefile.am: Add clutter-marshal.h to the ignored header
+ files.
+
+2006-06-22 Emmanuele Bassi <ebassi@openedhand.com>
+
* clutter-docs.sgml: Fix typos.
2006-06-22 Ross Burton <ross@openedhand.com>
# Header files to ignore when scanning.
# e.g. IGNORE_HFILES=gtkdebug.h gtkintl.h
-IGNORE_HFILES=clutter-private.h stamp-clutter-enum-types.h clutter-keysyms.h
+IGNORE_HFILES=\
+ clutter-private.h \
+ clutter-marshal.h \
+ clutter-keysyms.h \
+ stamp-clutter-enum-types.h
# Images to copy into HTML directory.
# e.g. HTML_IMAGES=$(top_srcdir)/gtk/stock-icons/stock_about_24.png
clutter_timeline_pause
clutter_timeline_stop
clutter_timeline_set_loop
+clutter_timeline_get_loop
clutter_timeline_rewind
clutter_timeline_skip
clutter_timeline_advance
</para>
-@group:
+@self:
@first_actor:
@args:
@a...:
@a...:
@a...:
+@a...:
+@a...:
+@a...:
+@a...:
+@a...:
@a...:
<!-- ##### SECTION Stability_Level ##### -->
-<!-- ##### FUNCTION clutter_marshal_VOID__INT64_INT64_FLOAT_BOOLEAN ##### -->
-<para>
-
-</para>
-
-@closure:
-@return_value:
-@n_param_values:
-@param_values:
-@invocation_hint:
-@marshal_data:
-
-
-<!-- ##### FUNCTION clutter_marshal_VOID__STRING_BOOLEAN_BOOLEAN ##### -->
-<para>
-
-</para>
-
-@closure:
-@return_value:
-@n_param_values:
-@param_values:
-@invocation_hint:
-@marshal_data:
-
-
-<!-- ##### FUNCTION clutter_marshal_VOID__INT_INT ##### -->
-<para>
-
-</para>
-
-@closure:
-@return_value:
-@n_param_values:
-@param_values:
-@invocation_hint:
-@marshal_data:
-
-
-<!-- ##### MACRO clutter_marshal_VOID__BOXED ##### -->
-<para>
-
-</para>
-
-
-
-<!-- ##### MACRO clutter_marshal_VOID__OBJECT ##### -->
-<para>
-
-</para>
-
-
-
@cluttertimeline: the object which received the signal.
@arg1:
+<!-- ##### SIGNAL ClutterTimeline::paused ##### -->
+<para>
+
+</para>
+
+@cluttertimeline: the object which received the signal.
+
+<!-- ##### SIGNAL ClutterTimeline::started ##### -->
+<para>
+
+</para>
+
+@cluttertimeline: the object which received the signal.
+
<!-- ##### ARG ClutterTimeline:fps ##### -->
<para>
@loop:
+<!-- ##### FUNCTION clutter_timeline_get_loop ##### -->
+<para>
+
+</para>
+
+@timeline:
+@Returns:
+
+
<!-- ##### FUNCTION clutter_timeline_rewind ##### -->
<para>