[libchamplainmm] Create new subproject champlain-gtk
- From: Juan R. Garcia Blanco <juanrgar src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libchamplainmm] Create new subproject champlain-gtk
- Date: Sat, 31 May 2014 11:07:25 +0000 (UTC)
commit e6159f3a1d38abe22b775cab70a9ce3c88aa90c9
Author: Juan R. García Blanco <juanrgar gmail com>
Date: Sat May 31 13:06:06 2014 +0200
Create new subproject champlain-gtk
.gitignore | 5 ++-
Makefile.am | 12 ++++-
champlain-gtk/champlainmm-gtk-uninstalled.pc.in | 10 ++++
champlain-gtk/champlainmm-gtk.h | 26 ++++++++++
champlain-gtk/champlainmm-gtk.pc.in | 19 ++++++++
champlain-gtk/champlainmm-gtk/.gitignore | 3 +
champlain-gtk/champlainmm-gtk/Makefile.am | 31 ++++++++++++
champlain-gtk/champlainmm-gtk/filelist.am | 8 +++
champlain-gtk/champlainmm-gtk/wrap_init.h | 24 ++++++++++
champlain-gtk/champlainmmgtkconfig.h.in | 10 ++++
champlain-gtk/src/Makefile.am | 24 ++++++++++
champlain-gtk/src/champlain-gtk.defs | 3 +
champlain-gtk/src/champlain-gtk_docs.xml | 34 ++++++++++++++
champlain-gtk/src/champlain-gtk_docs_override.xml | 2 +
champlain-gtk/src/champlain-gtk_methods.defs | 44 ++++++++++++++++++
champlain-gtk/src/champlain-gtk_signals.defs | 11 ++++
champlain-gtk/src/embed.ccg | 23 +++++++++
champlain-gtk/src/embed.hg | 49 ++++++++++++++++++++
champlain-gtk/src/filelist.am | 13 +++++
configure.ac | 16 ++++++-
tools/Makefile.am | 13 +++--
.../generate_extra_defs_libchamplain-gtk.cc | 33 +++++++++++++
tools/gen_scripts/champlain_generate_extra_defs.sh | 2 +-
tools/gen_scripts/champlain_generate_methods.sh | 2 +-
tools/gen_scripts/champlain_gtk_generate_docs.sh | 20 ++++++++
.../champlain_gtk_generate_extra_defs.sh | 38 +++++++++++++++
.../gen_scripts/champlain_gtk_generate_methods.sh | 16 ++++++
tools/m4/convert.m4 | 1 +
28 files changed, 479 insertions(+), 13 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 0053ea8..cd14b3d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -26,9 +26,12 @@ stamp-h?
# champlain
champlain/champlainmm-*.pc
champlain/champlainmmconfig.h
+champlain-gtk/champlainmm-gtk-*.pc
+champlain-gtk/champlainmmgtkconfig.h
# tools
-tools/extradefs/generate_extra_defs
+tools/extradefs/generate_extra_defs_libchamplain
+tools/extradefs/generate_extra_defs_libchamplain-gtk
# docs
/docs/doc-install.pl
diff --git a/Makefile.am b/Makefile.am
index 033545a..b98dcf2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -19,7 +19,7 @@ ACLOCAL_AMFLAGS = -I build ${ACLOCAL_FLAGS}
DISTCHECK_CONFIGURE_FLAGS = --enable-warnings=fatal
if MAINTAINER_MODE
-src_subdirs = tools champlain/src
+src_subdirs = tools champlain/src champlain-gtk/src
else
src_subdirs =
endif
@@ -28,7 +28,7 @@ doc_subdirs = docs
else
doc_subdirs =
endif
-SUBDIRS = $(src_subdirs) champlain/champlainmm $(doc_subdirs)
+SUBDIRS = $(src_subdirs) champlain/champlainmm champlain-gtk/champlainmm-gtk $(doc_subdirs)
champlainmm_includedir = $(includedir)/$(CHAMPLAINMM_MODULE_NAME)
champlainmm_include_HEADERS = champlain/champlainmm.h
@@ -36,8 +36,14 @@ champlainmm_include_HEADERS = champlain/champlainmm.h
champlainmm_libincludedir = $(libdir)/$(CHAMPLAINMM_MODULE_NAME)/include
nodist_champlainmm_libinclude_HEADERS = champlain/champlainmmconfig.h
+champlainmm_gtk_includedir = $(includedir)/$(CHAMPLAINMM_GTK_MODULE_NAME)
+champlainmm_gtk_include_HEADERS = champlain-gtk/champlainmm-gtk.h
+
+champlainmm_gtk_libincludedir = $(libdir)/$(CHAMPLAINMM_GTK_MODULE_NAME)/include
+nodist_champlainmm_gtk_libinclude_HEADERS = champlain-gtk/champlainmmgtkconfig.h
+
pkgconfigdir = $(libdir)/pkgconfig
-pkgconfig_DATA = champlain/$(CHAMPLAINMM_MODULE_NAME).pc
+pkgconfig_DATA = champlain/$(CHAMPLAINMM_MODULE_NAME).pc champlain-gtk/$(CHAMPLAINMM_GTK_MODULE_NAME).pc
dist_noinst_SCRIPTS = autogen.sh
diff --git a/champlain-gtk/champlainmm-gtk-uninstalled.pc.in b/champlain-gtk/champlainmm-gtk-uninstalled.pc.in
new file mode 100644
index 0000000..c91823f
--- /dev/null
+++ b/champlain-gtk/champlainmm-gtk-uninstalled.pc.in
@@ -0,0 +1,10 @@
+doxytagfile=${pc_top_builddir}/doc/reference/@CHAMPLAINMM_GTK_MODULE_NAME tag
+htmlrefpub=http://library.gnome.org/@PACKAGE_TARNAME@/unstable/
+
+Name: libchamplainmmgtk
+Description: C++ bindings for libchamplain-gtk, not installed
+Version: @CHAMPLAINMM_GTK_VERSION@
+URL: http://www.gtkmm.org/
+Requires: @CHAMPLAINMM_GTK_MODULES@
+Libs: ${pc_top_builddir}/${pcfiledir}/champlainmm-gtk/champlainmm-gtk- CHAMPLAINMM_GTK_API_VERSION@.la
+Cflags: -I${pc_top_builddir}/${pcfiledir} -I${pc_top_builddir}/${pcfiledir}/@srcdir@
diff --git a/champlain-gtk/champlainmm-gtk.h b/champlain-gtk/champlainmm-gtk.h
new file mode 100644
index 0000000..c67ae12
--- /dev/null
+++ b/champlain-gtk/champlainmm-gtk.h
@@ -0,0 +1,26 @@
+/* Copyright (c) 2014 Juan R. García Blanco <juanrgar gmail com>
+ *
+ * This file is part of libchamplainmm.
+ *
+ * libchamplainmm 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.
+ *
+ * libchamplainmm 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 program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef CHAMPLAINMMGTK_H_INCLUDED
+#define CHAMPLAINMMGTK_H_INCLUDED
+
+#include <champlainmmgtkconfig.h>
+
+#include <champlainmm-gtk/embed.h>
+
+#endif /* !CHAMPLAINMMGTK_H_INCLUDED */
diff --git a/champlain-gtk/champlainmm-gtk.pc.in b/champlain-gtk/champlainmm-gtk.pc.in
new file mode 100644
index 0000000..b403014
--- /dev/null
+++ b/champlain-gtk/champlainmm-gtk.pc.in
@@ -0,0 +1,19 @@
+prefix= prefix@
+exec_prefix= exec_prefix@
+libdir= libdir@
+datarootdir= datarootdir@
+datadir= datadir@
+includedir= includedir@
+
+docdir=${datarootdir}/doc/@CHAMPLAINMM_GTK_MODULE_NAME@
+doxytagfile=${docdir}/reference/@CHAMPLAINMM_GTK_MODULE_NAME tag
+htmlrefdir=${docdir}/reference/html
+htmlrefpub=http://library.gnome.org/@PACKAGE_TARNAME@/unstable/
+
+Name: libchamplainmm-gtk
+Description: C++ bindings for libchamplain-gtk
+Version: @CHAMPLAINMM_GTK_VERSION@
+URL: http://www.gtkmm.org/
+Requires: @CHAMPLAINMM_GTK_MODULES@
+Libs: -L${libdir} -lchamplainmm-gtk- CHAMPLAINMM_GTK_API_VERSION@
+Cflags: -I${includedir}/@CHAMPLAINMM_GTK_MODULE_NAME@ -I${libdir}/@CHAMPLAINMM_GTK_MODULE_NAME@/include
diff --git a/champlain-gtk/champlainmm-gtk/.gitignore b/champlain-gtk/champlainmm-gtk/.gitignore
new file mode 100644
index 0000000..e4426ba
--- /dev/null
+++ b/champlain-gtk/champlainmm-gtk/.gitignore
@@ -0,0 +1,3 @@
+embed.*
+wrap_init.cc
+private
diff --git a/champlain-gtk/champlainmm-gtk/Makefile.am b/champlain-gtk/champlainmm-gtk/Makefile.am
new file mode 100644
index 0000000..c2eb7f6
--- /dev/null
+++ b/champlain-gtk/champlainmm-gtk/Makefile.am
@@ -0,0 +1,31 @@
+## Copyright (c) 2014 Juan R. García Blanco <juanrgar gmail com>
+##
+## This file is part of libchamplainmm.
+##
+## libchamplainmm 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.
+##
+## libchamplainmm 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 program. If not, see <http://www.gnu.org/licenses/>.
+
+lib_LTLIBRARIES = libchamplainmm-gtk- CHAMPLAINMM_GTK_API_VERSION@.la
+
+include $(srcdir)/../src/filelist.am
+include $(srcdir)/filelist.am
+include $(top_srcdir)/build/compile-binding.am
+
+local_cppflags = $(binding_includes) $(binding_cppflags) -I$(top_srcdir)/champlain/ -DCHAMPLAINMM_GTK_BUILD=1
+
+AM_CPPFLAGS = $(local_cppflags) $(GTHREAD_CFLAGS) $(CHAMPLAINMM_GTK_CFLAGS)
+AM_CXXFLAGS = $(CHAMPLAINMM_GTK_WXXFLAGS)
+
+libchamplainmm_gtk_ CHAMPLAINMM_GTK_API_VERSION@_la_SOURCES = $(binding_sources)
+libchamplainmm_gtk_ CHAMPLAINMM_GTK_API_VERSION@_la_LDFLAGS = -no-undefined -version-info
$(CHAMPLAINMM_GTK_SO_VERSION)
+libchamplainmm_gtk_ CHAMPLAINMM_GTK_API_VERSION@_la_LIBADD = $(CHAMPLAINMM_GTK_LIBS)
diff --git a/champlain-gtk/champlainmm-gtk/filelist.am b/champlain-gtk/champlainmm-gtk/filelist.am
new file mode 100644
index 0000000..c0e5b33
--- /dev/null
+++ b/champlain-gtk/champlainmm-gtk/filelist.am
@@ -0,0 +1,8 @@
+## This file is part of libchamplainmm.
+
+files_built_cc = $(files_hg:.hg=.cc) wrap_init.cc
+files_built_h = $(files_hg:.hg=.h)
+files_built_ph = $(patsubst %.hg,private/%_p.h,$(files_hg))
+files_extra_cc =
+files_extra_h = wrap_init.h
+files_extra_ph =
diff --git a/champlain-gtk/champlainmm-gtk/wrap_init.h b/champlain-gtk/champlainmm-gtk/wrap_init.h
new file mode 100644
index 0000000..d715425
--- /dev/null
+++ b/champlain-gtk/champlainmm-gtk/wrap_init.h
@@ -0,0 +1,24 @@
+/* Copyright (c) 2014 Juan R. García Blanco <juanrgar gmail com>
+ *
+ * This file is part of libchamplainmm.
+ *
+ * libchamplainmm 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.
+ *
+ * libchamplainmm 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 program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#ifndef LIBCHAMPLAINMMGTK_WRAP_INIT_H_INCLUDED
+#define LIBCHAMPLAINMMGTK_WRAP_INIT_H_INCLUDED
+
+namespace Gtk { void wrap_init(); }
+
+#endif /* !LIBCHAMPLAINMMGTK_WRAP_INIT_H_INCLUDED */
diff --git a/champlain-gtk/champlainmmgtkconfig.h.in b/champlain-gtk/champlainmmgtkconfig.h.in
new file mode 100644
index 0000000..9990692
--- /dev/null
+++ b/champlain-gtk/champlainmmgtkconfig.h.in
@@ -0,0 +1,10 @@
+/* This file is part of libchamplainmm. */
+
+/* Major version number of libchamplainmm. */
+#undef CHAMPLAINMM_GTK_MAJOR_VERSION
+
+/* Micro version number of libchamplainmm. */
+#undef CHAMPLAINMM_GTK_MICRO_VERSION
+
+/* Minor version number of libchamplainmm. */
+#undef CHAMPLAINMM_GTK_MINOR_VERSION
diff --git a/champlain-gtk/src/Makefile.am b/champlain-gtk/src/Makefile.am
new file mode 100644
index 0000000..fae245f
--- /dev/null
+++ b/champlain-gtk/src/Makefile.am
@@ -0,0 +1,24 @@
+## Copyright (c) 2009 Debarshi Ray <debarshir src gnome org>
+##
+## This file is part of libchamplainmm.
+##
+## libchamplainmm 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.
+##
+## libchamplainmm 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 program. If not, see <http://www.gnu.org/licenses/>.
+
+binding_name = champlainmm-gtk
+wrap_init_flags = --namespace=Gtk --parent_dir=champlainmm-gtk
+codegen_srcdir = $(top_srcdir)/tools
+
+include $(srcdir)/filelist.am
+include $(top_srcdir)/tools/m4/filelist.am
+include $(top_srcdir)/build/generate-binding.am
diff --git a/champlain-gtk/src/champlain-gtk.defs b/champlain-gtk/src/champlain-gtk.defs
new file mode 100644
index 0000000..b8d03c6
--- /dev/null
+++ b/champlain-gtk/src/champlain-gtk.defs
@@ -0,0 +1,3 @@
+;; Include generated API definition files
+(include champlain-gtk_methods.defs)
+(include champlain-gtk_signals.defs)
diff --git a/champlain-gtk/src/champlain-gtk_docs.xml b/champlain-gtk/src/champlain-gtk_docs.xml
new file mode 100644
index 0000000..465811e
--- /dev/null
+++ b/champlain-gtk/src/champlain-gtk_docs.xml
@@ -0,0 +1,34 @@
+<root>
+<function name="gtk_champlain_embed_get_view">
+<description>
+Gets a #ChamplainView from the #GtkChamplainEmbed object.
+
+Since: 0.4
+
+</description>
+<parameters>
+<parameter name="embed">
+<parameter_description> a #ChamplainView, the map view to embed
+</parameter_description>
+</parameter>
+</parameters>
+<return> a #ChamplainView ready to be used
+
+</return>
+</function>
+
+<function name="gtk_champlain_embed_new">
+<description>
+Creates an instance of #GtkChamplainEmbed.
+
+Since: 0.4
+
+</description>
+<parameters>
+</parameters>
+<return> a new #GtkChamplainEmbed ready to be used as a #GtkWidget.
+
+</return>
+</function>
+
+</root>
diff --git a/champlain-gtk/src/champlain-gtk_docs_override.xml
b/champlain-gtk/src/champlain-gtk_docs_override.xml
new file mode 100644
index 0000000..093d936
--- /dev/null
+++ b/champlain-gtk/src/champlain-gtk_docs_override.xml
@@ -0,0 +1,2 @@
+<root>
+</root>
diff --git a/champlain-gtk/src/champlain-gtk_methods.defs b/champlain-gtk/src/champlain-gtk_methods.defs
new file mode 100644
index 0000000..0fc6732
--- /dev/null
+++ b/champlain-gtk/src/champlain-gtk_methods.defs
@@ -0,0 +1,44 @@
+;; -*- scheme -*-
+; object definitions ...
+(define-object ChamplainEmbed
+ (in-module "Gtk")
+ (parent "GtkAlignment")
+ (c-name "GtkChamplainEmbed")
+ (gtype-id "GTK_TYPE_CHAMPLAIN_EMBED")
+)
+
+;; Enumerations and flags ...
+
+
+;; From champlain-gtk-enum-types.h
+
+
+
+;; From champlain-gtk.h
+
+
+
+;; From champlain-gtk-marshal.h
+
+
+
+;; From gtk-champlain-embed.h
+
+(define-function gtk_champlain_embed_get_type
+ (c-name "gtk_champlain_embed_get_type")
+ (return-type "GType")
+)
+
+(define-function gtk_champlain_embed_new
+ (c-name "gtk_champlain_embed_new")
+ (is-constructor-of "GtkChamplainEmbed")
+ (return-type "GtkWidget*")
+)
+
+(define-method get_view
+ (of-object "GtkChamplainEmbed")
+ (c-name "gtk_champlain_embed_get_view")
+ (return-type "ChamplainView*")
+)
+
+
diff --git a/champlain-gtk/src/champlain-gtk_signals.defs b/champlain-gtk/src/champlain-gtk_signals.defs
new file mode 100644
index 0000000..0e5ad89
--- /dev/null
+++ b/champlain-gtk/src/champlain-gtk_signals.defs
@@ -0,0 +1,11 @@
+;; From GtkChamplainEmbed
+
+(define-property champlain-view
+ (of-object "GtkChamplainEmbed")
+ (prop-type "GParamObject")
+ (docs "The ChamplainView to embed into the Gtk+ widget")
+ (readable #t)
+ (writable #f)
+ (construct-only #f)
+)
+
diff --git a/champlain-gtk/src/champlain-gtk_signals.defs.patch
b/champlain-gtk/src/champlain-gtk_signals.defs.patch
new file mode 100644
index 0000000..e69de29
diff --git a/champlain-gtk/src/embed.ccg b/champlain-gtk/src/embed.ccg
new file mode 100644
index 0000000..07bb35d
--- /dev/null
+++ b/champlain-gtk/src/embed.ccg
@@ -0,0 +1,23 @@
+/* Copyright (c) 2014 Juan R. García Blanco <juanrgar gmail com>
+ *
+ * This file is part of libchamplainmm.
+ *
+ * libchamplainmm 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.
+ *
+ * libchamplainmm 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 program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <champlain-gtk/champlain-gtk.h>
+
+namespace Gtk
+{
+} // namespace Gtk
diff --git a/champlain-gtk/src/embed.hg b/champlain-gtk/src/embed.hg
new file mode 100644
index 0000000..3612143
--- /dev/null
+++ b/champlain-gtk/src/embed.hg
@@ -0,0 +1,49 @@
+/* Copyright (c) 2014 Juan R. García Blanco <juanrgar gmail com>
+ *
+ * This file is part of libchamplainmm.
+ *
+ * libchamplainmm 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.
+ *
+ * libchamplainmm 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 program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <gtkmm/alignment.h>
+#include <champlainmm/view.h>
+
+_DEFS(champlainmm-gtk,champlain-gtk)
+_PINCLUDE(gtkmm/private/alignment_p.h)
+
+namespace Gtk
+{
+
+/** A Gtk+ Widget that embeds a Champlain::View.
+ *
+ * Since Champlain::View is a Clutter::Actor, you cannot embed it directly
+ * into a Gtk+ application. This widget solves this problem. It creates
+ * the Champlain::View for you, you can get it with get_view().
+ *
+ * newin{0,4}
+ */
+class ChamplainEmbed : public Gtk::Alignment
+{
+ _CLASS_GTKOBJECT(ChamplainEmbed, GtkChamplainEmbed, GTK_CHAMPLAIN_EMBED, Gtk::Alignment, GtkAlignment)
+
+public:
+ _CTOR_DEFAULT
+
+#m4 _CONVERSION(`ChamplainView*', `Glib::RefPtr<Champlain::View>', `Glib::wrap($3)')
+ _WRAP_METHOD(Glib::RefPtr<Champlain::View> get_view(), gtk_champlain_embed_get_view)
+ _WRAP_METHOD(Glib::RefPtr<const Champlain::View> get_view() const, gtk_champlain_embed_get_view,
constversion)
+
+ _WRAP_PROPERTY("champlain-view", Glib::RefPtr<Champlain::View>)
+};
+} // namespace Gtk
diff --git a/champlain-gtk/src/filelist.am b/champlain-gtk/src/filelist.am
new file mode 100644
index 0000000..5e218aa
--- /dev/null
+++ b/champlain-gtk/src/filelist.am
@@ -0,0 +1,13 @@
+## This file is part of libchamplainmm.
+
+files_defs = \
+ champlain-gtk.defs \
+ champlain-gtk_methods.defs \
+ champlain-gtk_signals.defs \
+ champlain-gtk_docs.xml \
+ champlain-gtk_docs_override.xml
+
+files_hg = \
+ embed.hg
+
+files_ccg = $(files_hg:.hg=.ccg)
diff --git a/configure.ac b/configure.ac
index dab0b57..c481b43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -21,7 +21,7 @@ AC_PREREQ([2.59])
AC_CONFIG_SRCDIR([champlain/champlainmm.h])
AC_CONFIG_AUX_DIR([build])
AC_CONFIG_MACRO_DIR([build])
-AC_CONFIG_HEADERS([build/config.h champlain/champlainmmconfig.h])
+AC_CONFIG_HEADERS([build/config.h champlain/champlainmmconfig.h champlain-gtk/champlainmmgtkconfig.h])
AM_INIT_AUTOMAKE([1.9 -Wno-portability check-news dist-bzip2 no-define nostdinc tar-ustar])
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES])
@@ -30,6 +30,7 @@ AC_ARG_VAR([ACLOCAL_FLAGS], [aclocal flags, e.g. -I <macro dir>])
MM_PREREQ([0.8])
MM_INIT_MODULE([champlainmm-0.12])
+MM_INIT_MODULE([champlainmm-gtk-0.12])
# Copy the mm-common .pl scripts into docs/,
# and use them from there,
@@ -38,6 +39,7 @@ MM_CONFIG_DOCTOOL_DIR([docs])
# http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
AC_SUBST([CHAMPLAINMM_SO_VERSION], [1:0:0])
+AC_SUBST([CHAMPLAINMM_GTK_SO_VERSION], [0:0:0])
AC_PROG_CXX
AC_DISABLE_STATIC
@@ -46,10 +48,12 @@ AC_PROG_LIBTOOL
AC_SUBST([CHAMPLAINMM_MODULES], ['champlain-0.12 cluttermm-1.0 glibmm-2.4 >= 2.16'])
PKG_CHECK_MODULES([CHAMPLAINMM], [$CHAMPLAINMM_MODULES])
+AC_SUBST([CHAMPLAINMM_GTK_MODULES], ['champlain-gtk-0.12 cluttermm-1.0 gtkmm-3.0 glibmm-2.4 >= 2.16'])
+PKG_CHECK_MODULES([CHAMPLAINMM_GTK], [$CHAMPLAINMM_GTK_MODULES])
MM_PKG_CONFIG_SUBST([GTHREAD_CFLAGS], [--cflags-only-other gthread-2.0])
MM_PKG_CONFIG_SUBST([GMMPROC_DIR], [--variable=gmmprocdir glibmm-2.4])
-MM_PKG_CONFIG_SUBST([GMMPROC_EXTRA_M4_DIR], [--variable=gmmprocm4dir pangomm-1.4])
+MM_PKG_CONFIG_SUBST([GMMPROC_EXTRA_M4_DIR], [--variable=gmmprocm4dir pangomm-1.4 gtkmm-3.0])
MM_ARG_ENABLE_DOCUMENTATION
MM_ARG_WITH_TAGFILE_DOC([libstdc++.tag], [mm-common-libstdc++])
@@ -61,6 +65,10 @@ MM_ARG_ENABLE_WARNINGS([CHAMPLAINMM_WXXFLAGS],
[-Wall],
[-pedantic -Wall -Wextra],
[G LIBCHAMPLAIN])
+MM_ARG_ENABLE_WARNINGS([CHAMPLAINMM_GTK_WXXFLAGS],
+ [-Wall],
+ [-pedantic -Wall -Wextra],
+ [G LIBCHAMPLAIN])
AC_CONFIG_FILES([Makefile
tools/Makefile
@@ -68,6 +76,10 @@ AC_CONFIG_FILES([Makefile
champlain/${CHAMPLAINMM_MODULE_NAME}-uninstalled.pc:champlain/champlainmm-uninstalled.pc.in
champlain/src/Makefile
champlain/champlainmm/Makefile
+ champlain-gtk/${CHAMPLAINMM_GTK_MODULE_NAME}.pc:champlain-gtk/champlainmm-gtk.pc.in
+
champlain-gtk/${CHAMPLAINMM_GTK_MODULE_NAME}-uninstalled.pc:champlain-gtk/champlainmm-gtk-uninstalled.pc.in
+ champlain-gtk/src/Makefile
+ champlain-gtk/champlainmm-gtk/Makefile
docs/Makefile
docs/reference/Doxyfile])
AC_OUTPUT
diff --git a/tools/Makefile.am b/tools/Makefile.am
index 0c7bdfe..22a75c5 100644
--- a/tools/Makefile.am
+++ b/tools/Makefile.am
@@ -20,13 +20,16 @@ AUTOMAKE_OPTIONS = subdir-objects
include $(srcdir)/m4/filelist.am
dist_noinst_DATA = $(addprefix m4/,$(files_codegen_m4))
-noinst_PROGRAMS = extradefs/generate_extra_defs
+noinst_PROGRAMS = extradefs/generate_extra_defs_libchamplain extradefs/generate_extra_defs_libchamplain-gtk
-extradefs_generate_extra_defs_SOURCES = extradefs/generate_extra_defs_libchamplain.cc
-extradefs_generate_extra_defs_LDADD = $(CHAMPLAINMM_LIBS) -lglibmm_generate_extra_defs-2.4
+extradefs_generate_extra_defs_libchamplain_SOURCES = extradefs/generate_extra_defs_libchamplain.cc
+extradefs_generate_extra_defs_libchamplain_LDADD = $(CHAMPLAINMM_LIBS) -lglibmm_generate_extra_defs-2.4
-AM_CPPFLAGS = -I$(top_builddir) $(GTHREAD_CFLAGS) $(CHAMPLAINMM_CFLAGS)
-AM_CXXFLAGS = $(CHAMPLAINMM_WXXFLAGS)
+extradefs_generate_extra_defs_libchamplain_gtk_SOURCES = extradefs/generate_extra_defs_libchamplain-gtk.cc
+extradefs_generate_extra_defs_libchamplain_gtk_LDADD = $(CHAMPLAINMM_GTK_LIBS)
-lglibmm_generate_extra_defs-2.4
+
+AM_CPPFLAGS = -I$(top_builddir) $(GTHREAD_CFLAGS) $(CHAMPLAINMM_CFLAGS) $(CHAMPLAINMM_GTK_CFLAGS)
+AM_CXXFLAGS = $(CHAMPLAINMM_WXXFLAGS) $(CHAMPLAINMM_GTK_WXXFLAGS)
# Instruct GNU make to delete the targets of a rule after it failed, in
# order to avoid the complication of handling that situation manually.
diff --git a/tools/extradefs/generate_extra_defs_libchamplain-gtk.cc
b/tools/extradefs/generate_extra_defs_libchamplain-gtk.cc
new file mode 100644
index 0000000..f25d962
--- /dev/null
+++ b/tools/extradefs/generate_extra_defs_libchamplain-gtk.cc
@@ -0,0 +1,33 @@
+/* Copyright (c) 2014 Juan R. García Blanco <juanrgar gmail com>
+ *
+ * This file is part of libchamplainmm.
+ *
+ * libchamplainmm 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.
+ *
+ * libchamplainmm 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 program. If not, see <http://www.gnu.org/licenses/>.
+ */
+
+#include <iostream>
+
+#include <glibmm_generate_extra_defs/generate_extra_defs.h>
+#include <champlain-gtk/champlain-gtk.h>
+
+int
+main(int argc, char *argv[])
+{
+ clutter_init(&argc, &argv);
+
+ std::cout << get_defs(GTK_CHAMPLAIN_TYPE_EMBED)
+ ;
+
+ return 0;
+}
diff --git a/tools/gen_scripts/champlain_generate_extra_defs.sh
b/tools/gen_scripts/champlain_generate_extra_defs.sh
index ded203d..9ae5793 100755
--- a/tools/gen_scripts/champlain_generate_extra_defs.sh
+++ b/tools/gen_scripts/champlain_generate_extra_defs.sh
@@ -25,7 +25,7 @@ OUT_DEFS_FILE="$OUT_DIR"/champlain_signals.defs
if [ $# -eq 0 ]
then
# Without LC_ALL=C documentation (docs "xxx") may be translated in the .defs file.
- LC_ALL=C "$GEN_DIR"/generate_extra_defs > "$OUT_DEFS_FILE"
+ LC_ALL=C "$GEN_DIR"/generate_extra_defs_libchamplain > "$OUT_DEFS_FILE"
PATCH_OPTIONS="--backup --version-control=simple --suffix=.orig"
patch $PATCH_OPTIONS "$OUT_DEFS_FILE" "$OUT_DEFS_FILE".patch
elif [ "$1" = "--make-patch" ]
diff --git a/tools/gen_scripts/champlain_generate_methods.sh b/tools/gen_scripts/champlain_generate_methods.sh
index ac79bf5..9f8ae47 100755
--- a/tools/gen_scripts/champlain_generate_methods.sh
+++ b/tools/gen_scripts/champlain_generate_methods.sh
@@ -13,4 +13,4 @@ ROOT_DIR="$(dirname "$0")/../.."
OUT_DIR="$ROOT_DIR/champlain/src"
H2DEF_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/h2def.py"
-$H2DEF_PY "$JHBUILD_SOURCES"/champlain/champlain/*.h > "$OUT_DIR"/champlain_methods.defs
+$H2DEF_PY "$JHBUILD_SOURCES"/libchamplain/champlain/*.h > "$OUT_DIR"/champlain_methods.defs
diff --git a/tools/gen_scripts/champlain_gtk_generate_docs.sh
b/tools/gen_scripts/champlain_gtk_generate_docs.sh
new file mode 100755
index 0000000..e6e209b
--- /dev/null
+++ b/tools/gen_scripts/champlain_gtk_generate_docs.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+# Note that JHBUILD_SOURCES should be defined to contain the path to the root
+# of the jhbuild sources. The script assumes that it resides in the
+# tools/gen_scripts/ directory and the XML file will be placed in champlain-gtk/src.
+
+if [ -z "$JHBUILD_SOURCES" ]; then
+ echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources."
+ exit 1;
+fi
+
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/champlain-gtk/src"
+
+for dir in "$JHBUILD_SOURCES"/libchamplain/champlain-gtk; do
+ PARAMS="$PARAMS -s $dir"
+done
+
+DOCEXTRACT_TO_XML_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/docextract_to_xml.py"
+$DOCEXTRACT_TO_XML_PY $PARAMS > "$OUT_DIR/champlain-gtk_docs.xml"
diff --git a/tools/gen_scripts/champlain_gtk_generate_extra_defs.sh
b/tools/gen_scripts/champlain_gtk_generate_extra_defs.sh
new file mode 100755
index 0000000..abc75ec
--- /dev/null
+++ b/tools/gen_scripts/champlain_gtk_generate_extra_defs.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# The script assumes that it resides in the tools/gen_scripts directory
+# and the defs files will be placed in champlain/src.
+# It shall be executed from the tools/gen_scripts directory.
+
+# To update the champlain-gtk_signals.defs file:
+# 1. ./champlain_gtk_generate_extra_defs.sh
+# Generates champlain-gtk/src/champlain-gtk_signals.defs.orig and
champlain-gtk/src/champlain-gtk_signals.defs.
+# If any hunks from the patch file fail to apply, apply them manually to the
+# champlain-gtk_signals.defs file, if required.
+# 2. Optional: Remove champlain-gtk/src/champlain-gtk_signals.defs.orig.
+
+# To update the champlain-gtk_signals.defs file and the patch file:
+# 1. Like step 1 when updating only the champlain-gtk_signals.defs file.
+# 2. Apply new patches manually to the champlain-gtk_signals.defs file.
+# 3. ./champlain-gtk_generate_extra_defs.sh --make-patch
+# 4. Like step 2 when updating only the champlain-gtk_signals.defs file.
+
+ROOT_DIR="$(dirname "$0")/../.."
+GEN_DIR="$ROOT_DIR/tools/extradefs"
+OUT_DIR="$ROOT_DIR/champlain-gtk/src"
+OUT_DEFS_FILE="$OUT_DIR"/champlain-gtk_signals.defs
+
+if [ $# -eq 0 ]
+then
+ # Without LC_ALL=C documentation (docs "xxx") may be translated in the .defs file.
+ LC_ALL=C "$GEN_DIR"/generate_extra_defs_libchamplain-gtk > "$OUT_DEFS_FILE"
+ PATCH_OPTIONS="--backup --version-control=simple --suffix=.orig"
+ patch $PATCH_OPTIONS "$OUT_DEFS_FILE" "$OUT_DEFS_FILE".patch
+elif [ "$1" = "--make-patch" ]
+then
+ diff --unified=10 "$OUT_DEFS_FILE".orig "$OUT_DEFS_FILE" > "$OUT_DEFS_FILE".patch
+else
+ echo "Usage: $0 [--make-patch]"
+ exit 1
+fi
+
diff --git a/tools/gen_scripts/champlain_gtk_generate_methods.sh
b/tools/gen_scripts/champlain_gtk_generate_methods.sh
new file mode 100755
index 0000000..592a8fd
--- /dev/null
+++ b/tools/gen_scripts/champlain_gtk_generate_methods.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# Note that JHBUILD_SOURCES should be defined to contain the path to the root
+# of the jhbuild sources. The script assumes that it resides in the
+# tools/gen_scripts/ directory and the defs file will be placed in gtk/src.
+
+if [ -z "$JHBUILD_SOURCES" ]; then
+ echo -e "JHBUILD_SOURCES must contain the path to the jhbuild sources."
+ exit 1;
+fi
+
+ROOT_DIR="$(dirname "$0")/../.."
+OUT_DIR="$ROOT_DIR/champlain-gtk/src"
+
+H2DEF_PY="$JHBUILD_SOURCES/glibmm/tools/defs_gen/h2def.py"
+$H2DEF_PY "$JHBUILD_SOURCES"/libchamplain/champlain-gtk/*.h > "$OUT_DIR"/champlain-gtk_methods.defs
diff --git a/tools/m4/convert.m4 b/tools/m4/convert.m4
index d58bfe6..aac5f4c 100644
--- a/tools/m4/convert.m4
+++ b/tools/m4/convert.m4
@@ -3,3 +3,4 @@ m4_include(`convert_base.m4')
m4_include(`convert_glib.m4')
m4_include(`convert_pango.m4')
m4_include(`convert_libchamplain.m4')
+m4_include(`class_gtkobject.m4')
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]