gnomemm r1292 - in cluttermm/trunk: . clutter clutter/cluttermm clutter/cluttermm/private clutter/src tools/extra_defs_gen
- From: jjongsma svn gnome org
- To: svn-commits-list gnome org
- Subject: gnomemm r1292 - in cluttermm/trunk: . clutter clutter/cluttermm clutter/cluttermm/private clutter/src tools/extra_defs_gen
- Date: Sun, 20 Jan 2008 18:04:07 +0000 (GMT)
Author: jjongsma
Date: Sun Jan 20 18:04:07 2008
New Revision: 1292
URL: http://svn.gnome.org/viewvc/gnomemm?rev=1292&view=rev
Log:
* clutter/src/shader.ccg:
* clutter/src/shader.hg:
* clutter/src/Makefile_list_of_hg.am_fragment: add new Shader class
* clutter/cluttermm.h: add score.h and shader.h to main include header
* clutter/src/clutter_signals.defs:
* tools/extra_defs_gen/generate_defs_clutter.cc: generate defs for new
Shader and Score classes
Added:
cluttermm/trunk/clutter/src/shader.ccg
cluttermm/trunk/clutter/src/shader.hg
Modified:
cluttermm/trunk/ChangeLog
cluttermm/trunk/clutter/cluttermm/ (props changed)
cluttermm/trunk/clutter/cluttermm.h
cluttermm/trunk/clutter/cluttermm/private/ (props changed)
cluttermm/trunk/clutter/src/Makefile_list_of_hg.am_fragment
cluttermm/trunk/clutter/src/clutter_signals.defs
cluttermm/trunk/tools/extra_defs_gen/generate_defs_clutter.cc
Modified: cluttermm/trunk/clutter/cluttermm.h
==============================================================================
--- cluttermm/trunk/clutter/cluttermm.h (original)
+++ cluttermm/trunk/clutter/cluttermm.h Sun Jan 20 18:04:07 2008
@@ -48,6 +48,8 @@
#include <cluttermm/stage.h>
#include <cluttermm/texture.h>
#include <cluttermm/timeline.h>
+#include <cluttermm/score.h>
+#include <cluttermm/shader.h>
#include <cluttermm/types.h>
//#include <cluttermm/box.h>
Modified: cluttermm/trunk/clutter/src/Makefile_list_of_hg.am_fragment
==============================================================================
--- cluttermm/trunk/clutter/src/Makefile_list_of_hg.am_fragment (original)
+++ cluttermm/trunk/clutter/src/Makefile_list_of_hg.am_fragment Sun Jan 20 18:04:07 2008
@@ -25,5 +25,6 @@
behaviour-ellipse.hg \
behaviour-rotate.hg \
behaviour-scale.hg \
-score.hg
+score.hg \
+shader.hg
#layout.hg box.hg margin.hg
Modified: cluttermm/trunk/clutter/src/clutter_signals.defs
==============================================================================
--- cluttermm/trunk/clutter/src/clutter_signals.defs (original)
+++ cluttermm/trunk/clutter/src/clutter_signals.defs Sun Jan 20 18:04:07 2008
@@ -1626,24 +1626,6 @@
;; From ClutterMedia
-(define-property uri
- (of-object "ClutterMedia")
- (prop-type "GParamString")
- (docs "The loaded URI.")
- (readable #t)
- (writable #t)
- (construct-only #f)
-)
-
-(define-property buffer-percent
- (of-object "ClutterMedia")
- (prop-type "GParamInt")
- (docs "The percentage the current stream buffer is filled.")
- (readable #t)
- (writable #f)
- (construct-only #f)
-)
-
(define-property playing
(of-object "ClutterMedia")
(prop-type "GParamBoolean")
@@ -1653,21 +1635,21 @@
(construct-only #f)
)
-(define-property volume
+(define-property position
(of-object "ClutterMedia")
- (prop-type "GParamDouble")
- (docs "The audio volume.")
+ (prop-type "GParamInt")
+ (docs "The position in the current stream in seconds.")
(readable #t)
(writable #t)
(construct-only #f)
)
-(define-property position
+(define-property buffer-percent
(of-object "ClutterMedia")
(prop-type "GParamInt")
- (docs "The position in the current stream in seconds.")
+ (docs "The percentage the current stream buffer is filled.")
(readable #t)
- (writable #t)
+ (writable #f)
(construct-only #f)
)
@@ -1689,6 +1671,24 @@
(construct-only #f)
)
+(define-property volume
+ (of-object "ClutterMedia")
+ (prop-type "GParamDouble")
+ (docs "The audio volume.")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property uri
+ (of-object "ClutterMedia")
+ (prop-type "GParamString")
+ (docs "The loaded URI.")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
;; From ClutterRectangle
(define-property name
@@ -1900,40 +1900,40 @@
;; From ClutterScore
-(define-signal completed
+(define-signal timeline-started
(of-object "ClutterScore")
(return-type "void")
(when "last")
+ (parameters
+ '("ClutterTimeline*" "p0")
+ )
)
-(define-signal started
+(define-signal timeline-completed
(of-object "ClutterScore")
(return-type "void")
(when "last")
+ (parameters
+ '("ClutterTimeline*" "p0")
+ )
)
-(define-signal paused
+(define-signal completed
(of-object "ClutterScore")
(return-type "void")
(when "last")
)
-(define-signal timeline-started
+(define-signal started
(of-object "ClutterScore")
(return-type "void")
(when "last")
- (parameters
- '("ClutterTimeline*" "p0")
- )
)
-(define-signal timeline-completed
+(define-signal paused
(of-object "ClutterScore")
(return-type "void")
(when "last")
- (parameters
- '("ClutterTimeline*" "p0")
- )
)
(define-property loop
@@ -2497,31 +2497,31 @@
;; From ClutterTimeline
-(define-signal new-frame
+(define-signal completed
(of-object "ClutterTimeline")
(return-type "void")
(when "last")
- (parameters
- '("gint" "p0")
- )
)
-(define-signal completed
+(define-signal started
(of-object "ClutterTimeline")
(return-type "void")
(when "last")
)
-(define-signal started
+(define-signal paused
(of-object "ClutterTimeline")
(return-type "void")
(when "last")
)
-(define-signal paused
+(define-signal new-frame
(of-object "ClutterTimeline")
(return-type "void")
(when "last")
+ (parameters
+ '("gint" "p0")
+ )
)
(define-property fps
@@ -2578,3 +2578,88 @@
(construct-only #f)
)
+;; From ClutterScore
+
+(define-signal timeline-started
+ (of-object "ClutterScore")
+ (return-type "void")
+ (when "last")
+ (parameters
+ '("ClutterTimeline*" "p0")
+ )
+)
+
+(define-signal timeline-completed
+ (of-object "ClutterScore")
+ (return-type "void")
+ (when "last")
+ (parameters
+ '("ClutterTimeline*" "p0")
+ )
+)
+
+(define-signal completed
+ (of-object "ClutterScore")
+ (return-type "void")
+ (when "last")
+)
+
+(define-signal started
+ (of-object "ClutterScore")
+ (return-type "void")
+ (when "last")
+)
+
+(define-signal paused
+ (of-object "ClutterScore")
+ (return-type "void")
+ (when "last")
+)
+
+(define-property loop
+ (of-object "ClutterScore")
+ (prop-type "GParamBoolean")
+ (docs "Whether the score should restart once finished")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+;; From ClutterShader
+
+(define-property vertex-source
+ (of-object "ClutterShader")
+ (prop-type "GParamString")
+ (docs "Source of vertex shader")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property fragment-source
+ (of-object "ClutterShader")
+ (prop-type "GParamString")
+ (docs "Source of fragment shader")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property bound
+ (of-object "ClutterShader")
+ (prop-type "GParamBoolean")
+ (docs "Whether the shader is bound")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
+(define-property enabled
+ (of-object "ClutterShader")
+ (prop-type "GParamBoolean")
+ (docs "Whether the shader is enabled")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
Added: cluttermm/trunk/clutter/src/shader.ccg
==============================================================================
--- (empty file)
+++ cluttermm/trunk/clutter/src/shader.ccg Sun Jan 20 18:04:07 2008
@@ -0,0 +1,17 @@
+/* Copyright (C) 2007 The cluttermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
Added: cluttermm/trunk/clutter/src/shader.hg
==============================================================================
--- (empty file)
+++ cluttermm/trunk/clutter/src/shader.hg Sun Jan 20 18:04:07 2008
@@ -0,0 +1,58 @@
+/* Copyright (C) 2007 The cluttermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 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
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <glibmm/object.h>
+#include <clutter/clutter-shader.h>
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(glibmm/private/object_p.h)
+
+
+namespace Clutter
+{
+
+class Shader : public Glib::Object
+{
+ _CLASS_GOBJECT(Shader, ClutterShader, CLUTTER_SHADER, Glib::Object, GObject)
+ _DERIVES_INITIALLY_UNOWNED()
+
+protected:
+ _CTOR_DEFAULT()
+
+public:
+ _WRAP_CREATE()
+
+ // TODO: For now I've left this as gchar*, the same as the underlying C API.
+ // Another type might be easier in C++
+ _WRAP_METHOD(void set_vertex_source(const gchar* data, gssize length), clutter_shader_set_vertex_source)
+ _WRAP_METHOD(const gchar* get_vertex_source() const, clutter_shader_get_vertex_source)
+ _WRAP_METHOD(void set_fragment_source(const gchar* data, gssize length), clutter_shader_set_fragment_source)
+ _WRAP_METHOD(const gchar* get_fragment_source() const, clutter_shader_get_fragment_source)
+ _WRAP_METHOD(bool bind(), clutter_shader_bind, errthrow)
+ _WRAP_METHOD(void release(), clutter_shader_release)
+ _WRAP_METHOD(bool is_bound() const, clutter_shader_is_bound)
+ _WRAP_METHOD(void set_is_enabled(bool enabled), clutter_shader_set_is_enabled)
+ _WRAP_METHOD(bool get_is_enabled() const, clutter_shader_get_is_enabled)
+
+ _WRAP_PROPERTY("bound", bool)
+ _WRAP_PROPERTY("enabled", bool)
+ _WRAP_PROPERTY("fragment-source", gchar*)
+ _WRAP_PROPERTY("vertex-source", gchar*)
+};
+
+} // namespace Clutter
+// vim:ts=2,sw=2
Modified: cluttermm/trunk/tools/extra_defs_gen/generate_defs_clutter.cc
==============================================================================
--- cluttermm/trunk/tools/extra_defs_gen/generate_defs_clutter.cc (original)
+++ cluttermm/trunk/tools/extra_defs_gen/generate_defs_clutter.cc Sun Jan 20 18:04:07 2008
@@ -54,7 +54,10 @@
<< get_defs(CLUTTER_TYPE_SCRIPT)
<< get_defs(CLUTTER_TYPE_STAGE)
<< get_defs(CLUTTER_TYPE_TEXTURE)
- << get_defs(CLUTTER_TYPE_TIMELINE);
+ << get_defs(CLUTTER_TYPE_TIMELINE)
+ << get_defs(CLUTTER_TYPE_SCORE)
+ << get_defs(CLUTTER_TYPE_SHADER)
+ ;
// << get_defs(CLUTTER_TYPE_VBOX)
// << get_defs(CLUTTER_TYPE_MARGIN);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]