[cluttermm] Add GridLayout
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cluttermm] Add GridLayout
- Date: Thu, 10 Apr 2014 18:19:34 +0000 (UTC)
commit 26c59eebe22c4bfcc5f2ed9c1d23e85b7155b50c
Author: Ian Martin <martin_id vodafone co nz>
Date: Thu Apr 10 19:57:19 2014 +0200
Add GridLayout
This is based on changes in this patch:
https://bugzilla.gnome.org/show_bug.cgi?id=725125#c7
clutter/cluttermm.h | 1 +
clutter/src/filelist.am | 1 +
clutter/src/grid-layout.ccg | 23 +++++++++++++
clutter/src/grid-layout.hg | 72 +++++++++++++++++++++++++++++++++++++++++
codegen/m4/convert_clutter.m4 | 1 +
5 files changed, 98 insertions(+), 0 deletions(-)
---
diff --git a/clutter/cluttermm.h b/clutter/cluttermm.h
index 8fb8f54..695e7e9 100644
--- a/clutter/cluttermm.h
+++ b/clutter/cluttermm.h
@@ -92,6 +92,7 @@
#include <cluttermm/fixed-layout.h>
#include <cluttermm/flow-layout.h>
#include <cluttermm/frame-source.h>
+#include <cluttermm/grid-layout.h>
#include <cluttermm/group.h>
#include <cluttermm/image.h>
#include <cluttermm/init.h>
diff --git a/clutter/src/filelist.am b/clutter/src/filelist.am
index 81a9839..b4789c1 100644
--- a/clutter/src/filelist.am
+++ b/clutter/src/filelist.am
@@ -50,6 +50,7 @@ files_hg = \
effect.hg \
fixed-layout.hg \
flow-layout.hg \
+ grid-layout.hg \
group.hg \
image.hg \
input-device.hg \
diff --git a/clutter/src/grid-layout.ccg b/clutter/src/grid-layout.ccg
new file mode 100644
index 0000000..66c2098
--- /dev/null
+++ b/clutter/src/grid-layout.ccg
@@ -0,0 +1,23 @@
+/* Copyright (C) 2014 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/grid-layout.hg b/clutter/src/grid-layout.hg
new file mode 100644
index 0000000..29e579b
--- /dev/null
+++ b/clutter/src/grid-layout.hg
@@ -0,0 +1,72 @@
+/* Copyright (C) 2014 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>
+#include <cluttermm/types.h>
+
+_DEFS(cluttermm,clutter)
+_PINCLUDE(cluttermm/private/layout-manager_p.h)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Clutter
+{
+
+class Actor;
+
+_WRAP_ENUM(GridPosition, ClutterGridPosition)
+
+class GridLayout :
+ public LayoutManager
+{
+ _CLASS_GOBJECT(GridLayout, ClutterGridLayout, CLUTTER_GRID_LAYOUT, LayoutManager, ClutterLayoutManager)
+ _DERIVES_INITIALLY_UNOWNED()
+
+protected:
+ _WRAP_CTOR(GridLayout(), clutter_grid_layout_new)
+
+public:
+ _WRAP_CREATE()
+
+ _WRAP_METHOD(void attach(const Glib::RefPtr<Actor>& child, int left, int top, int width, int height),
clutter_grid_layout_attach)
+ _WRAP_METHOD(void attach_next_to(const Glib::RefPtr<Actor>& child, const Glib::RefPtr<Actor>& sibling,
GridPosition side, int width, int height), clutter_grid_layout_attach_next_to)
+
+ _WRAP_METHOD(Glib::RefPtr<Actor> get_child_at(int left, int top), clutter_grid_layout_get_child_at,
refreturn)
+ _WRAP_METHOD(Glib::RefPtr<const Actor> get_child_at(int left, int top) const,
clutter_grid_layout_get_child_at, refreturn, constversion)
+
+ _WRAP_METHOD(void insert_column(int position), clutter_grid_layout_insert_column)
+ _WRAP_METHOD(void insert_row(int position), clutter_grid_layout_insert_row)
+ _WRAP_METHOD(void insert_next_to(const Glib::RefPtr<Actor>& sibling, GridPosition side),
clutter_grid_layout_insert_next_to )
+ _WRAP_METHOD(void set_orientation(Orientation orientation), clutter_grid_layout_set_orientation)
+ _WRAP_METHOD(Orientation get_orientation() const, clutter_grid_layout_get_orientation)
+ _WRAP_METHOD(void set_column_homogeneous(bool homogeneous = true),
clutter_grid_layout_set_column_homogeneous)
+ _WRAP_METHOD(bool get_column_homogeneous() const, clutter_grid_layout_get_column_homogeneous)
+ _WRAP_METHOD(void set_row_homogeneous(bool homogeneous = true), clutter_grid_layout_set_row_homogeneous)
+ _WRAP_METHOD(bool get_row_homogeneous() const, clutter_grid_layout_get_row_homogeneous)
+ _WRAP_METHOD(void set_column_spacing(guint spacing), clutter_grid_layout_set_column_spacing)
+ _WRAP_METHOD(guint get_column_spacing() const, clutter_grid_layout_get_column_spacing)
+ _WRAP_METHOD(void set_row_spacing(guint spacing), clutter_grid_layout_set_row_spacing)
+ _WRAP_METHOD(guint get_row_spacing() const, clutter_grid_layout_get_row_spacing)
+
+ _WRAP_PROPERTY("column-homogeneous", bool)
+ _WRAP_PROPERTY("column-spacing", guint)
+ _WRAP_PROPERTY("row-homogeneous", bool)
+ _WRAP_PROPERTY("row-spacing", guint)
+ _WRAP_PROPERTY("orientation", Orientation)
+
+};
+
+} // namespace Clutter
diff --git a/codegen/m4/convert_clutter.m4 b/codegen/m4/convert_clutter.m4
index 77d20ce..3af297a 100644
--- a/codegen/m4/convert_clutter.m4
+++ b/codegen/m4/convert_clutter.m4
@@ -190,6 +190,7 @@ _CONV_ENUM(Clutter,ContentGravity)
_CONV_ENUM(Clutter,ContentRepeat)
_CONV_ENUM(Clutter,FlowOrientation)
_CONV_ENUM(Clutter,Gravity)
+_CONV_ENUM(Clutter,GridPosition)
_CONV_ENUM(Clutter,InputDeviceType)
_CONV_ENUM(Clutter,Interpolation)
_CONV_ENUM(Clutter,LayoutFlags)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]