[cluttermm/cluttermm-1.2] Initial wrapping of ClutterBinLayout.
- From: Chris Kühl <chriskuehl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cluttermm/cluttermm-1.2] Initial wrapping of ClutterBinLayout.
- Date: Thu, 3 Feb 2011 14:31:06 +0000 (UTC)
commit 5eea0aa253c9ba24b5210ce4dcdfd6beb60d1ae0
Author: Chris Kühl <chrisk openismus com>
Date: Thu Jan 13 01:08:03 2011 +0100
Initial wrapping of ClutterBinLayout.
* clutter/cluttermm.h: Added header file for new class.
* clutter/src/bin-layout.[hg|ccg]: Initial wrapping of ClutterBinLayout.
* clutter/src/clutter_signals.defs: Added properties for new class.
* clutter/src/filelist.am: Added new classes to files_hg list.
* codegen/extradefs/generate_extra_defs_clutter.cc: Added new class.
* codegen/m4/convert_clutter.m4: Added enum conversion for BinAlignment.
ChangeLog | 11 +++++
clutter/cluttermm.h | 1 +
clutter/src/bin-layout.ccg | 24 +++++++++++
clutter/src/bin-layout.hg | 48 ++++++++++++++++++++++
clutter/src/clutter_signals.defs | 20 +++++++++
clutter/src/filelist.am | 1 +
codegen/extradefs/generate_extra_defs_clutter.cc | 1 +
codegen/m4/convert_clutter.m4 | 1 +
8 files changed, 107 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 504f68c..864efca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2010-01-13 Chris Kühl <chrisk openismus com>
+
+ Initial wrapping of ClutterBinLayout.
+
+ * clutter/cluttermm.h: Added header file for new class.
+ * clutter/src/bin-layout.[hg|ccg]: Initial wrapping of ClutterBinLayout.
+ * clutter/src/clutter_signals.defs: Added properties for new class.
+ * clutter/src/filelist.am: Added new classes to files_hg list.
+ * codegen/extradefs/generate_extra_defs_clutter.cc: Added new class.
+ * codegen/m4/convert_clutter.m4: Added enum conversion for BinAlignment.
+
2011-01-12 Chris Kühl <chrisk openismus com>
Initial wrapping of ClutterFixedLayout class.
diff --git a/clutter/cluttermm.h b/clutter/cluttermm.h
index 90107d6..117450f 100644
--- a/clutter/cluttermm.h
+++ b/clutter/cluttermm.h
@@ -63,6 +63,7 @@
#include <cluttermm/behaviour-opacity.h>
#include <cluttermm/behaviour-path.h>
#include <cluttermm/behaviour-rotate.h>
+#include <cluttermm/bin-layout.h>
#include <cluttermm/behaviour-scale.h>
#include <cluttermm/box.h>
#include <cluttermm/cairo-texture.h>
diff --git a/clutter/src/bin-layout.ccg b/clutter/src/bin-layout.ccg
new file mode 100644
index 0000000..9200f72
--- /dev/null
+++ b/clutter/src/bin-layout.ccg
@@ -0,0 +1,24 @@
+/* Copyright (C) 2011 The cluttermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <clutter/clutter.h>
+
+namespace Clutter
+{
+
+} //namespace Clutter
+
diff --git a/clutter/src/bin-layout.hg b/clutter/src/bin-layout.hg
new file mode 100644
index 0000000..04629f8
--- /dev/null
+++ b/clutter/src/bin-layout.hg
@@ -0,0 +1,48 @@
+/* Copyright (C) 2011 The cluttermm Development Team
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <cluttermm/layout-manager.h>
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(cluttermm/private/layout-manager_p.h)
+
+namespace Clutter
+{
+
+_WRAP_ENUM(BinAlignment, ClutterBinAlignment)
+
+class BinLayout :
+ public LayoutManager
+{
+ _CLASS_GOBJECT(BinLayout, ClutterBinLayout, CLUTTER_BIN_LAYOUT, LayoutManager, ClutterLayoutManager)
+
+protected:
+ _WRAP_CTOR(BinLayout(BinAlignment x_align, BinAlignment y_align), clutter_bin_layout_new)
+
+public:
+ _WRAP_CREATE(BinAlignment x_align, BinAlignment y_align)
+
+ _WRAP_METHOD(void set_alignment(const Glib::RefPtr<Actor>& child, BinAlignment x_align, BinAlignment y_align), clutter_bin_layout_set_alignment)
+ // _WRAP_METHOD(void get_alignment(const Glib::RefPtr<Actor>& child, BinAlignment &x_align, BinAlignment &y_align), clutter_bin_layout_get_alignment)
+ _WRAP_METHOD(void add(const Glib::RefPtr<Actor>& child, BinAlignment x_align, BinAlignment y_align), clutter_bin_layout_add)
+
+ _WRAP_PROPERTY("x-align", BinAlignment)
+ _WRAP_PROPERTY("y-align", BinAlignment)
+};
+
+} // namespace Clutter
+
diff --git a/clutter/src/clutter_signals.defs b/clutter/src/clutter_signals.defs
index 37f9444..49fa57e 100644
--- a/clutter/src/clutter_signals.defs
+++ b/clutter/src/clutter_signals.defs
@@ -1064,6 +1064,26 @@
(construct-only #t)
)
+;; From ClutterBinLayout
+
+(define-property x-align
+ (of-object "ClutterBinLayout")
+ (prop-type "GParamEnum")
+ (docs "Default horizontal alignment for the actors inside the layout manager")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
+(define-property y-align
+ (of-object "ClutterBinLayout")
+ (prop-type "GParamEnum")
+ (docs "Default vertical alignment for the actors inside the layout manager")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
;; From ClutterCairoTexture
(define-property name
diff --git a/clutter/src/filelist.am b/clutter/src/filelist.am
index 45e1d5a..e4044c0 100644
--- a/clutter/src/filelist.am
+++ b/clutter/src/filelist.am
@@ -22,6 +22,7 @@ files_hg = \
behaviour-path.hg \
behaviour-rotate.hg \
behaviour-scale.hg \
+ bin-layout.hg \
box.hg \
cairo-texture.hg \
childmeta.hg \
diff --git a/codegen/extradefs/generate_extra_defs_clutter.cc b/codegen/extradefs/generate_extra_defs_clutter.cc
index 26c9bb1..e5ee4f3 100644
--- a/codegen/extradefs/generate_extra_defs_clutter.cc
+++ b/codegen/extradefs/generate_extra_defs_clutter.cc
@@ -36,6 +36,7 @@ int main(int argc, char** argv)
<< get_defs(CLUTTER_TYPE_BEHAVIOUR_PATH)
<< get_defs(CLUTTER_TYPE_BEHAVIOUR_ROTATE)
<< get_defs(CLUTTER_TYPE_BEHAVIOUR_SCALE)
+ << get_defs(CLUTTER_TYPE_BIN_LAYOUT)
<< get_defs(CLUTTER_TYPE_BOX)
<< get_defs(CLUTTER_TYPE_CAIRO_TEXTURE)
<< get_defs(CLUTTER_TYPE_CHILD_META)
diff --git a/codegen/m4/convert_clutter.m4 b/codegen/m4/convert_clutter.m4
index 169ba01..1a1d708 100644
--- a/codegen/m4/convert_clutter.m4
+++ b/codegen/m4/convert_clutter.m4
@@ -117,6 +117,7 @@ _EQUAL(ClutterCrossingEvent*,CrossingEvent*)
_CONV_ENUM(Clutter,ActorFlags)
_CONV_ENUM(Clutter,AllocationFlags)
_CONV_ENUM(Clutter,AnimationMode)
+_CONV_ENUM(Clutter,BinAlignment)
_CONV_ENUM(Clutter,LayoutFlags)
_CONV_ENUM(Clutter,PackType)
_CONV_ENUM(Clutter,PickMode)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]