[clutter-gtkmm] Wrap GtkClutterWindow



commit dfc5b53ef384e1a6dfb2c6d9262e452771b6862e
Author: Juan R. GarcĂ­a Blanco <juanrgar gmail com>
Date:   Tue Sep 23 22:37:33 2014 +0200

    Wrap GtkClutterWindow
    
        * configure.ac: Search for gtkmm-3.0 m4 directory path.
        * clutter-gtk/src/Makefile.am: Include search path for class_gtkobject.m4.
        * codegen/m4/convert.m4: Include class_gtkobject.m4.
        * clutter-gtk/src/filelist.am: Add window.hg.
        * clutter-gtk/src/window.[ccg|hg]: New files.

 clutter-gtk/src/Makefile.am |    2 +-
 clutter-gtk/src/filelist.am |    3 +-
 clutter-gtk/src/window.ccg  |   26 ++++++++++++++++++++
 clutter-gtk/src/window.hg   |   54 +++++++++++++++++++++++++++++++++++++++++++
 codegen/m4/convert.m4       |    1 +
 configure.ac                |    1 +
 6 files changed, 85 insertions(+), 2 deletions(-)
---
diff --git a/clutter-gtk/src/Makefile.am b/clutter-gtk/src/Makefile.am
index 1c964c8..b3e47f3 100644
--- a/clutter-gtk/src/Makefile.am
+++ b/clutter-gtk/src/Makefile.am
@@ -17,7 +17,7 @@
 
 binding_name    = clutter-gtkmm
 wrap_init_flags = --namespace=Clutter --namespace=Gtk --parent_dir=clutter-gtkmm
-gmmproc_flags   = -I $(top_srcdir)/codegen/m4 -I "$(CLUTTERMM_GMMPROC_DIR)/m4" --defs $(srcdir)
+gmmproc_flags   = -I $(top_srcdir)/codegen/m4 -I "$(CLUTTERMM_GMMPROC_DIR)/m4" -I "$(GTKMM_GMMPROC_DIR)" 
--defs $(srcdir)
 
 include $(srcdir)/filelist.am
 include $(top_srcdir)/codegen/m4/filelist.am
diff --git a/clutter-gtk/src/filelist.am b/clutter-gtk/src/filelist.am
index 7f3fe29..42a9230 100644
--- a/clutter-gtk/src/filelist.am
+++ b/clutter-gtk/src/filelist.am
@@ -11,5 +11,6 @@ files_defs =                          \
 
 files_hg  = \
        embed.hg \
-       actor.hg
+       actor.hg \
+       window.hg
 files_ccg = $(files_hg:.hg=.ccg)
diff --git a/clutter-gtk/src/window.ccg b/clutter-gtk/src/window.ccg
new file mode 100644
index 0000000..0a91cee
--- /dev/null
+++ b/clutter-gtk/src/window.ccg
@@ -0,0 +1,26 @@
+/* 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-gtk/clutter-gtk.h>
+
+namespace Clutter
+{
+namespace Gtk
+{
+
+} // namespace Gtk
+} // namespace Clutter
diff --git a/clutter-gtk/src/window.hg b/clutter-gtk/src/window.hg
new file mode 100644
index 0000000..d4dec1d
--- /dev/null
+++ b/clutter-gtk/src/window.hg
@@ -0,0 +1,54 @@
+/* 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 <gtkmm/window.h>
+#include <cluttermm/actor.h>
+
+_DEFS(clutter-gtkmm,clutter-gtk)
+_PINCLUDE(gtkmm/private/window_p.h)
+
+
+namespace Clutter
+{
+namespace Gtk
+{
+
+/** A Gtk::Window that embeds its contents onto a stage.
+ *
+ * Clutter::Gtk::Window is a Gtk::Window sub-class that embeds a Clutter stage.
+ *
+ * Clutter::Gtk::Window behaves exactly like a Gtk::Window, except that its
+ * child is automatically embedded inside a Clutter::Gtk::Actor and it is
+ * thus part of the embedded Clutter::Stage.
+ *
+ * Clutter actors can be added to the same stage by calling
+ * get_stage().
+ */
+class Window : public ::Gtk::Window
+{
+  _CLASS_GTKOBJECT(Window, GtkClutterWindow, GTK_CLUTTER_WINDOW, ::Gtk::Window, GtkWindow)
+
+public:
+  _CTOR_DEFAULT
+
+#m4 _CONVERSION(`ClutterActor*',`Glib::RefPtr<Clutter::Actor>',`Glib::wrap($3)')
+  _WRAP_METHOD(Glib::RefPtr<Clutter::Actor> get_stage(), gtk_clutter_window_get_stage, refreturn)
+  _WRAP_METHOD(Glib::RefPtr<const Clutter::Actor> get_stage() const, gtk_clutter_window_get_stage, 
refreturn, constversion)
+};
+
+} // namespace Gtk
+} // namespace Clutter
diff --git a/codegen/m4/convert.m4 b/codegen/m4/convert.m4
index 5c61584..8df1c3f 100644
--- a/codegen/m4/convert.m4
+++ b/codegen/m4/convert.m4
@@ -5,3 +5,4 @@ m4_include(`convert_cairo.m4')
 m4_include(`convert_cogl.m4')
 m4_include(`convert_clutter.m4')
 m4_include(`convert_clutter_gtk.m4')
+m4_include(`class_gtkobject.m4')
diff --git a/configure.ac b/configure.ac
index d274095..66a98f1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -46,6 +46,7 @@ PKG_CHECK_MODULES([CLUTTER_GTKMM], [$CLUTTER_GTKMM_MODULES])
 
 MM_PKG_CONFIG_SUBST([GMMPROC_DIR], [--variable=gmmprocdir glibmm-2.4])
 MM_PKG_CONFIG_SUBST([CLUTTERMM_GMMPROC_DIR], [--variable=gmmprocdir cluttermm-1.0])
+MM_PKG_CONFIG_SUBST([GTKMM_GMMPROC_DIR], [--variable=gmmprocm4dir gtkmm-3.0])
 
 MM_ARG_ENABLE_DOCUMENTATION
 MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]