From e6aaa95d6ee9048de4fdf7327d82eea6a7d4e2c7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Anders=20M=C3=B8rk-Pedersen?= Date: Wed, 11 Feb 2009 15:39:44 +0100 Subject: [PATCH] Initial commit --- AUTHORS | 3 + ChangeLog | 3 + Makefile.am | 6 + Makefile.include | 42 +++ NEWS | 0 README | 10 + autogen.sh | 58 +++ champlain-gtk/AssemblyInfo.cs.in | 7 + champlain-gtk/Makefile.am | 21 ++ champlain-gtk/champlain-gtk-api.raw | 26 ++ .../champlain-gtk-sharp.dll.config.in | 6 + champlain-gtk/champlain-gtk-sharp.pc.in | 11 + champlain-gtk/champlain-gtk-sources.xml | 10 + champlain-gtk/champlain-gtk.metadata | 5 + champlain-sharp.snk | Bin 0 -> 596 bytes champlain/AssemblyInfo.cs.in | 7 + champlain/Makefile.am | 21 ++ champlain/champlain-api.raw | 118 ++++++ champlain/champlain-sharp.dll.config.in | 5 + champlain/champlain-sharp.pc.in | 11 + champlain/champlain-sources.xml | 33 ++ champlain/champlain.metadata | 5 + clutter-sharp.snk | Bin 0 -> 596 bytes configure.ac | 93 +++++ examples/Makefile.am | 27 ++ examples/Makefile.in | 337 ++++++++++++++++++ examples/gtk-test.cs | 22 ++ 27 files changed, 887 insertions(+) create mode 100644 AUTHORS create mode 100644 ChangeLog create mode 100644 Makefile.am create mode 100644 Makefile.include create mode 100644 NEWS create mode 100644 README create mode 100755 autogen.sh create mode 100644 champlain-gtk/AssemblyInfo.cs.in create mode 100644 champlain-gtk/Makefile.am create mode 100644 champlain-gtk/champlain-gtk-api.raw create mode 100644 champlain-gtk/champlain-gtk-sharp.dll.config.in create mode 100644 champlain-gtk/champlain-gtk-sharp.pc.in create mode 100644 champlain-gtk/champlain-gtk-sources.xml create mode 100644 champlain-gtk/champlain-gtk.metadata create mode 100644 champlain-sharp.snk create mode 100644 champlain/AssemblyInfo.cs.in create mode 100644 champlain/Makefile.am create mode 100644 champlain/champlain-api.raw create mode 100644 champlain/champlain-sharp.dll.config.in create mode 100644 champlain/champlain-sharp.pc.in create mode 100644 champlain/champlain-sources.xml create mode 100644 champlain/champlain.metadata create mode 100644 clutter-sharp.snk create mode 100644 configure.ac create mode 100644 examples/Makefile.am create mode 100644 examples/Makefile.in create mode 100644 examples/gtk-test.cs diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 0000000..59ee8a1 --- /dev/null +++ b/AUTHORS @@ -0,0 +1,3 @@ +Thomas Van Machelen +Anders M-Pedersen +Pierre-Luc Beaudoin diff --git a/ChangeLog b/ChangeLog new file mode 100644 index 0000000..5e33a28 --- /dev/null +++ b/ChangeLog @@ -0,0 +1,3 @@ +2009-02-11 Anders M-Pedersen : + + * Initial import of the Champlain-sharp bindings. diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..2a88353 --- /dev/null +++ b/Makefile.am @@ -0,0 +1,6 @@ +SUBDIRS = \ + champlain \ + champlain-gtk \ + examples + +DIST_SUBDIRS = champlain champlain-gtk examples diff --git a/Makefile.include b/Makefile.include new file mode 100644 index 0000000..0eeb96c --- /dev/null +++ b/Makefile.include @@ -0,0 +1,42 @@ +GAPI_PARSER = gapi2-parser +GAPI_CODEGEN = gapi2-codegen +GAPI_FIXUP = gapi2-fixup + +gapidir = $(datadir)/gapi-2.0 +gapi_DATA = $(CHAMPLAIN_FIXED_API) + +assemblydir = $(libdir)/champlain-sharp +assembly_DATA = $(TARGET) +CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb generated-stamp generated/*.cs $(API) $(CHAMPLAIN_FIXED_API) champlain-sharp.snk +DISTCLEANFILES = $(ASSEMBLY).config Makefile.in +EXTRA_DIST = $(RAW_API) $(METADATA) $(customs) $(sources) $(SOURCES_XML) $(CHAMPLAIN_METADATA) $(custom_extradist) + +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = $(ASSEMBLY_NAME).pc + +api_includes = $(GTKSHARP_CFLAGS) $(CLUTTERSHARP_CFLAGS) $(CLUTTER_GTK_CFLAGS) $(custom_api_includes) + +references = $(GTKSHARP_LIBS) $(CLUTTER_SHARP_LIBS) $(CLUTTER_GTK_SHARP_LIBS) $(custom_references) + +$(CHAMPLAIN_FIXED_API): + @if ! [ -e '$(CHAMPLAIN_RAW_API)' ]; then \ + $(GAPI_PARSER) $(SOURCES_XML); \ + fi + cp $(CHAMPLAIN_RAW_API) $(CHAMPLAIN_FIXED_API) + $(GAPI_FIXUP) --api=$(CHAMPLAIN_FIXED_API) --metadata=$(CHAMPLAIN_METADATA) + $(GAPI_CODEGEN) --outdir=./generated --customdir=. $(api_includes) --generate $(CHAMPLAIN_FIXED_API) + +champlain-sharp.snk: + cp $(top_builddir)/champlain-sharp.snk . + +$(ASSEMBLY): $(CHAMPLAIN_FIXED_API) $(sources) champlain-sharp.snk + @rm -f $(ASSEMBLY).mdb + $(MCS) $(CSFLAGS) -out:$@ -pkg:clutter-sharp -pkg:clutter-gtk-sharp -target:library -nowarn:0169 -unsafe $(references) generated/*.cs AssemblyInfo.cs $(sources) + +install-data-local: + echo "$(GACUTIL) /i $(ASSEMBLY) /f /package $(ASSEMBLY_NAME) /gacdir $(DESTDIR)$(libdir)" + $(GACUTIL) /i $(ASSEMBLY) /f /package champlain-sharp /gacdir $(DESTDIR)$(libdir) + +uninstall-local: + echo "$(GACUTIL) /u $(ASSEMBLY_NAME) /package $(ASSEMBLY_NAME) /gacdir $(DESTDIR)$(libdir)" + $(GACUTIL) /u $(ASSEMBLY_NAME) /package champlain-sharp /gacdir $(DESTDIR)$(libdir) diff --git a/NEWS b/NEWS new file mode 100644 index 0000000..e69de29 diff --git a/README b/README new file mode 100644 index 0000000..65b1260 --- /dev/null +++ b/README @@ -0,0 +1,10 @@ +champlain-mono offers C#/Mono bindings to champlain + +About re-parsing the API + To build these bindings from scratch (re-parsing the C-files), you should + have the champlain source in location ../champlain/ and champlain-gtk in + location ../champlain-gtk/ + + libchamplain: http://blog.pierlux.com/projects/libchamplain/en/ + clutter: http://www.clutter-project.com + Mono: http://www.mono-project.com diff --git a/autogen.sh b/autogen.sh new file mode 100755 index 0000000..608d0e8 --- /dev/null +++ b/autogen.sh @@ -0,0 +1,58 @@ +#!/bin/sh +# Run this to generate all the initial makefiles, etc. + +DIE=0 + +PACKAGE=clutter-sharp + +echo "Generating configuration files for $PACKAGE, please wait..." + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have autoconf installed to compile $PACKAGE." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +(libtool --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have libtool installed to compile $PACKAGE." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "You must have automake installed to compile $PACKAGE." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +[ $DIE -eq 1 ] && exit 1; + +echo " libtoolize --copy --force" +libtoolize --copy --force +echo " aclocal $ACLOCAL_FLAGS" +aclocal $ACLOCAL_FLAGS +echo " autoheader" +autoheader +echo " automake --add-missing" +automake --add-missing +echo " autoconf" +autoconf + +if [ -x config.status -a -z "$*" ]; then + ./config.status --recheck +else + if test -z "$*"; then + echo "I am going to run ./configure with no arguments - if you wish" + echo "to pass any to it, please specify them on the $0 command line." + echo "If you do not wish to run ./configure, press Ctrl-C now." + trap 'echo "configure aborted" ; exit 0' 1 2 15 + sleep 1 + fi + ./configure "$@"; +fi diff --git a/champlain-gtk/AssemblyInfo.cs.in b/champlain-gtk/AssemblyInfo.cs.in new file mode 100644 index 0000000..f6f7e71 --- /dev/null +++ b/champlain-gtk/AssemblyInfo.cs.in @@ -0,0 +1,7 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly:AssemblyVersion("@VERSION@")] +[assembly:AssemblyDelaySign(false)] +[assembly:AssemblyKeyFile("@srcdir@/champlain-sharp.snk")] + diff --git a/champlain-gtk/Makefile.am b/champlain-gtk/Makefile.am new file mode 100644 index 0000000..5aa7498 --- /dev/null +++ b/champlain-gtk/Makefile.am @@ -0,0 +1,21 @@ +SOURCES_XML = champlain-gtk-sources.xml +CHAMPLAIN_METADATA = champlain-gtk.metadata +CHAMPLAIN_RAW_API = champlain-gtk-api.raw +CHAMPLAIN_FIXED_API = champlain-gtk-api.xml + +ASSEMBLY_NAME = champlain-gtk-sharp +ASSEMBLY = champlain-gtk-sharp.dll + +TARGET = $(ASSEMBLY) $(ASSEMBLY).config + +custom_extradist= champlain-gtk-sharp.pc.in champlain-gtk-sharp.dll.config.in +custom_api_includes=../champlain/champlain-api.xml +custom_references=-r:../champlain/champlain-sharp.dll + +sources = +# $(srcdir)/Timeout.cs + +customs = + +include ../Makefile.include + diff --git a/champlain-gtk/champlain-gtk-api.raw b/champlain-gtk/champlain-gtk-api.raw new file mode 100644 index 0000000..5ae6ac2 --- /dev/null +++ b/champlain-gtk/champlain-gtk-api.raw @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/champlain-gtk/champlain-gtk-sharp.dll.config.in b/champlain-gtk/champlain-gtk-sharp.dll.config.in new file mode 100644 index 0000000..2608a22 --- /dev/null +++ b/champlain-gtk/champlain-gtk-sharp.dll.config.in @@ -0,0 +1,6 @@ + + + + + + diff --git a/champlain-gtk/champlain-gtk-sharp.pc.in b/champlain-gtk/champlain-gtk-sharp.pc.in new file mode 100644 index 0000000..af3ab13 --- /dev/null +++ b/champlain-gtk/champlain-gtk-sharp.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +gapidir=${prefix}/share/gapi-2.0 + +Name: champlain-gtk-sharp +Description: champlain-sharp - champlain C#/Mono Bindings +Version: @VERSION@ +Libs: -r:${libdir}/mono/champlain-sharp/champlain-gtk-sharp.dll +Cflags: -I:${includedir}/mono/champlain-sharp/champlain-gtk-api.xml diff --git a/champlain-gtk/champlain-gtk-sources.xml b/champlain-gtk/champlain-gtk-sources.xml new file mode 100644 index 0000000..eec4825 --- /dev/null +++ b/champlain-gtk/champlain-gtk-sources.xml @@ -0,0 +1,10 @@ + + + + + ../../champlain-gtk-bleeding/champlain-gtk + + + + + diff --git a/champlain-gtk/champlain-gtk.metadata b/champlain-gtk/champlain-gtk.metadata new file mode 100644 index 0000000..813f2f1 --- /dev/null +++ b/champlain-gtk/champlain-gtk.metadata @@ -0,0 +1,5 @@ + + + + + diff --git a/champlain-sharp.snk b/champlain-sharp.snk new file mode 100644 index 0000000000000000000000000000000000000000..fa971febf8f8589e7cbe3baac581e675273191c4 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONaL00010+qXOi7N`<-ZPw~lwl>kUS-vatziST) zlGll=891D0&WuyUxN>hgXV50oWdkN1l)`f$3ZKnFNEx?CF%z~Bv|}X#$QUv(ZZo0m zCQHpnx=M5oQ}x;}aKi!Ve#swuNktV7JK0Ijc=@kc0&$+5HT+E_pzRk_wKrlMuy2>i zXH$Q-C`6j5wkf*n)8kx1Cv$IWCSLHh0clw{Bz=H3APljJ*_wVd$DkN>0e0-0o9pPiuM#0&QRALgo<$&%l4b@@gIB zxazf0($f~z#Z=V$TslHKH#f#eFtfXPzQUc^U~d&H+1agLop^kG$q!1RU%B@MAHSI4 z$Hztoya|M9bbGxt9a`DQ*+$}tMYufv3H!)4bl_iHSXgZhdDCq_DWQ!;vz|Px==e#+ zA}EoyaRDR}d5M%^$WjzdrYXFkgD#M8MS(R%rLO;VpX(*1LpZ+Xgj?Gg1f(~3x`Abh0t7dOf1Fa@e0V3HRv#b|; z#}t1Xb3P$4L%C`*6P1i}cyh~D+daftEw=_%M>$w@ZsKQ*#;XgKs%fGDvhnWq5Gl^A zaKo?al2)9MRHPZy1DBHTLM_B@Ar$W|-6o2d+r}E|I?tkH=b^uk}{Ba0)xFVaNwsJMXiW0a0 literal 0 HcmV?d00001 diff --git a/champlain/AssemblyInfo.cs.in b/champlain/AssemblyInfo.cs.in new file mode 100644 index 0000000..f6f7e71 --- /dev/null +++ b/champlain/AssemblyInfo.cs.in @@ -0,0 +1,7 @@ +using System.Reflection; +using System.Runtime.CompilerServices; + +[assembly:AssemblyVersion("@VERSION@")] +[assembly:AssemblyDelaySign(false)] +[assembly:AssemblyKeyFile("@srcdir@/champlain-sharp.snk")] + diff --git a/champlain/Makefile.am b/champlain/Makefile.am new file mode 100644 index 0000000..0f0dd9b --- /dev/null +++ b/champlain/Makefile.am @@ -0,0 +1,21 @@ +SOURCES_XML = champlain-sources.xml +CHAMPLAIN_METADATA = champlain.metadata +CHAMPLAIN_RAW_API = champlain-api.raw +CHAMPLAIN_FIXED_API = champlain-api.xml + +ASSEMBLY_NAME = champlain-sharp +ASSEMBLY = champlain-sharp.dll + +TARGET = $(ASSEMBLY) $(ASSEMBLY).config + +custom_extradist= champlain-sharp.pc.in champlain-sharp.dll.config.in +custom_api_includes= +custom_references= + +sources = +# $(srcdir)/Timeout.cs + +customs = + +include ../Makefile.include + diff --git a/champlain/champlain-api.raw b/champlain/champlain-api.raw new file mode 100644 index 0000000..01a2c0c --- /dev/null +++ b/champlain/champlain-api.raw @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/champlain/champlain-sharp.dll.config.in b/champlain/champlain-sharp.dll.config.in new file mode 100644 index 0000000..e162837 --- /dev/null +++ b/champlain/champlain-sharp.dll.config.in @@ -0,0 +1,5 @@ + + + + + diff --git a/champlain/champlain-sharp.pc.in b/champlain/champlain-sharp.pc.in new file mode 100644 index 0000000..91896f0 --- /dev/null +++ b/champlain/champlain-sharp.pc.in @@ -0,0 +1,11 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ +gapidir=${prefix}/share/gapi-2.0 + +Name: champlain-gtk-sharp +Description: champlain-sharp - champlain Mono Bindings +Version: @VERSION@ +Libs: -r:${libdir}/mono/champlain-sharp/champlain-sharp.dll +Cflags: -I:${includedir}/mono/champlain-sharp/champlain-api.xml diff --git a/champlain/champlain-sources.xml b/champlain/champlain-sources.xml new file mode 100644 index 0000000..c7e38eb --- /dev/null +++ b/champlain/champlain-sources.xml @@ -0,0 +1,33 @@ + + + + + ../../champlain-bleeding/champlain/champlain.h + ../../champlain-bleeding/champlain/champlain-view.h + ../../champlain-bleeding/champlain/champlain-defines.h + ../../champlain-bleeding/champlain/champlain-layer.h + ../../champlain-bleeding/champlain/champlain-marker.h + ../../champlain-bleeding/champlain/champlain-debug.c + ../../champlain-bleeding/champlain/champlain-view.c + ../../champlain-bleeding/champlain/champlain-layer.c + ../../champlain-bleeding/champlain/champlain-marker.c + ../../champlain-bleeding/champlain/champlain-map.c + ../../champlain-bleeding/champlain/champlain-zoom-level.c + ../../champlain-bleeding/champlain/champlain-tile.c + ../../champlain-bleeding/champlain/sources/oam.c + ../../champlain-bleeding/champlain/sources/osmmapnik.c + ../../champlain-bleeding/champlain/sources/mffrelief.c + ../../champlain-bleeding/champlain/sources/googlemap.c + ../../champlain-bleeding/champlain/sources/googlesat.c + ../../champlain-bleeding/champlain/sources/googleterrain.c + ../../champlain-bleeding/champlain/sources/debugmap.c + ../../champlain-bleeding/champlain/champlain-marshal.h + ../../champlain-bleeding/champlain/champlain-marshal.c + ../../champlain-bleeding/champlain/champlain-enum-types.h + ../../champlain-bleeding/champlain/champlain-enum-types.c + ../../champlain-bleeding/champlain/stamp-enum-types + + + + + diff --git a/champlain/champlain.metadata b/champlain/champlain.metadata new file mode 100644 index 0000000..813f2f1 --- /dev/null +++ b/champlain/champlain.metadata @@ -0,0 +1,5 @@ + + + + + diff --git a/clutter-sharp.snk b/clutter-sharp.snk new file mode 100644 index 0000000000000000000000000000000000000000..94df36d36b6d9b95a7d487e9bede742427029441 GIT binary patch literal 596 zcmV-a0;~N80ssI2Bme+XQ$aES1ONaL0000@t=mO)*B8vY|Ng1K3vI zbD0%5ADKAtV4eUU-KpF4(sx)5Cp7;ABq3b_h<&NWArpzbAUuCef7u8<0@y7Zs@BpJ9Vw}Td8|SPZaHEQ7A_dvHF`QJ|zB zi^wZW5R){;QngCC;oDvSi#z_f z9BO;Zf$ul72#za6b*4U-$*~=2s$CbGpb9a%F1do{aSU;UfX@uXm-+nSFUFjq+Yu;^ z=O4)A-XI##RJA+@W*l?)hcJsn3dE)vlf_roz%WlV`2i@nk0~^+>bBDf4X$b_DuTB4 z*dS}h=r)}Ze&KrU5DMfVwMlkvMI;3@E+3u literal 0 HcmV?d00001 diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..294647b --- /dev/null +++ b/configure.ac @@ -0,0 +1,93 @@ +AC_INIT(README) +AC_CANONICAL_SYSTEM + +AM_INIT_AUTOMAKE(champlain-sharp, 0.3) + +AM_MAINTAINER_MODE + +AC_PATH_PROG(MONO, mono, no) +if test "x$MONO" = "xno"; then + AC_MSG_ERROR([Cannot find the "mono" runtime in your PATH]) +fi + +AC_PATH_PROG(MCS, gmcs, no) +if test "x$MCS" = "xno"; then + AC_MSG_ERROR([Cannot find the "gmcs" compiler in your PATH]) +fi + +AC_PATH_PROG(GACUTIL, gacutil, no) +if test "x$GACUTIL" = "xno"; then + AC_MSG_ERROR([Cannot find the "gacutil" program in your PATH]) +fi + +AC_PATH_PROG(PKG_CONFIG, pkg-config, no) +if test "x$PKG_CONFIG" = "xno"; then + AC_MSG_ERROR([Cannot find the "pkg-config" program in your PATH]) +fi + +AC_ARG_ENABLE(docs, + AC_HELP_STRING([--disable-docs], + [Do not build Monodoc documentation]), + with_docs=no, with_docs=yes) + +if test "x$with_docs" = "xyes"; then + AC_PATH_PROG(MONODOCER, monodocer, no) + if test "x$MONODOCER" = "xno"; then + AC_MSG_ERROR([You need to install monodoc]) + fi + + AC_PATH_PROG(MDASSEMBLER, mdassembler, no) + if test "x$MDASSEMBLER" = "xno"; then + AC_MSG_ERROR([You need to install mdassembler]) + fi + + DOCDIR=`$PKG_CONFIG monodoc --variable=sourcesdir` + AC_SUBST(DOCDIR) + + AM_CONDITIONAL(BUILD_DOCS, true) +else + AC_MSG_NOTICE([not building API documentation]) + AM_CONDITIONAL(BUILD_DOCS, false) +fi + +PKG_CHECK_MODULES(GAPI, gapi-2.0 >= 2.12.1) +AC_PATH_PROG(GAPI_PARSER, gapi2-parser, no) +AC_SUBST(GAPI_PARSER) +AC_PATH_PROG(GAPI_CODEGEN, gapi2-codegen, no) +AC_SUBST(GAPI_CODEGEN) +AC_PATH_PROG(GAPI_FIXUP, gapi2-fixup, no) +AC_SUBST(GAPI_FIXUP) + +PKG_CHECK_MODULES(GTKSHARP, gtk-sharp-2.0 > 2.3.92) +AC_SUBST(GTKSHARP_LIBS) + +PKG_CHECK_MODULES(CLUTTERSHARP, clutter-sharp >= 0.8.0) +AC_SUBST(CLUTTER_SHARP_LIBS) + +PKG_CHECK_MODULES(CLUTTER_GTK_SHARP, clutter-gtk-sharp >= 0.8.0) +AC_SUBST(CLUTTER_GTK_SHARP_LIBS) + +PKG_CHECK_MODULES(CHAMPLAIN, champlain-0.3 >= 0.3) + +CHAMPLAIN_APIVERSION=$(pkg-config --variable apiversion champlain-0.3) + +CHAMPLAIN_GTK_REQUIRED_VERSION=0.3 +PKG_CHECK_MODULES(CHAMPLAIN_GTK, champlain-gtk-0.3 >= $CHAMPLAIN_GTK_REQUIRED_VERSION, enable_gtk=yes, enable_gtk=no) + +AM_CONDITIONAL(ENABLE_GTK, test "x$enable_gtk" = "xyes") + +AC_SUBST(CHAMPLAIN_APIVERSION) + +AC_OUTPUT([ + Makefile + champlain/champlain-sharp.pc + champlain/Makefile + champlain/AssemblyInfo.cs + champlain/champlain-sharp.dll.config + champlain-gtk/champlain-gtk-sharp.pc + champlain-gtk/Makefile + champlain-gtk/AssemblyInfo.cs + champlain-gtk/champlain-gtk-sharp.dll.config + examples/Makefile +]) + diff --git a/examples/Makefile.am b/examples/Makefile.am new file mode 100644 index 0000000..9b610ae --- /dev/null +++ b/examples/Makefile.am @@ -0,0 +1,27 @@ +if ENABLE_GTK +GTK_ASSEMBLY=champlain-gtk-sharp.dll +GTK_REF=-r:champlain-gtk-sharp.dll +GTK_EXAMPLES=gtk-test.cs +else +GTK_ASSEMBLY= +GTK_REF= +GTK_EXAMPLES= +endif + +SAMPLES= $(GTK_EXAMPLES) +MCSFLAGS= -debug -nologo -pkg:clutter-sharp -pkg:clutter-gtk-sharp -r:champlain-sharp.dll $(GTK_REF) + +assemblies=champlain-sharp.dll $(GTK_ASSEMBLY) + +noinst_SCRIPTS=$(SAMPLES:.cs=.exe) +%.exe: %.cs $(assemblies) + $(MCS) $(MCSFLAGS) $(GTKSHARP_LIBS) -out:$@ $< + +champlain-sharp.dll: $(top_builddir)/champlain/champlain-sharp.dll + cp $(top_builddir)/champlain/champlain-sharp.dll* . + +champlain-gtk-sharp.dll: $(top_builddir)/champlain-gtk/champlain-gtk-sharp.dll + cp $(top_builddir)/champlain-gtk/champlain-gtk-sharp.dll* . + +EXTRA_DIST=$(SAMPLES) +CLEANFILES= *.exe *.mdb *.pdb *.dll *.config diff --git a/examples/Makefile.in b/examples/Makefile.in new file mode 100644 index 0000000..16fbcca --- /dev/null +++ b/examples/Makefile.in @@ -0,0 +1,337 @@ +# Makefile.in generated by automake 1.10.1 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +target_triplet = @target@ +subdir = examples +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_CLEAN_FILES = +SCRIPTS = $(noinst_SCRIPTS) +SOURCES = +DIST_SOURCES = +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CHAMPLAIN_APIVERSION = @CHAMPLAIN_APIVERSION@ +CHAMPLAIN_CFLAGS = @CHAMPLAIN_CFLAGS@ +CHAMPLAIN_GTK_CFLAGS = @CHAMPLAIN_GTK_CFLAGS@ +CHAMPLAIN_GTK_LIBS = @CHAMPLAIN_GTK_LIBS@ +CHAMPLAIN_LIBS = @CHAMPLAIN_LIBS@ +CLUTTERSHARP_CFLAGS = @CLUTTERSHARP_CFLAGS@ +CLUTTERSHARP_LIBS = @CLUTTERSHARP_LIBS@ +CLUTTER_GTK_SHARP_CFLAGS = @CLUTTER_GTK_SHARP_CFLAGS@ +CLUTTER_GTK_SHARP_LIBS = @CLUTTER_GTK_SHARP_LIBS@ +CLUTTER_SHARP_LIBS = @CLUTTER_SHARP_LIBS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DOCDIR = @DOCDIR@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +GACUTIL = @GACUTIL@ +GAPI_CFLAGS = @GAPI_CFLAGS@ +GAPI_CODEGEN = @GAPI_CODEGEN@ +GAPI_FIXUP = @GAPI_FIXUP@ +GAPI_LIBS = @GAPI_LIBS@ +GAPI_PARSER = @GAPI_PARSER@ +GTKSHARP_CFLAGS = @GTKSHARP_CFLAGS@ +GTKSHARP_LIBS = @GTKSHARP_LIBS@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAKEINFO = @MAKEINFO@ +MCS = @MCS@ +MDASSEMBLER = @MDASSEMBLER@ +MKDIR_P = @MKDIR_P@ +MONO = @MONO@ +MONODOCER = @MONODOCER@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +VERSION = @VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +am__leading_dot = @am__leading_dot@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target = @target@ +target_alias = @target_alias@ +target_cpu = @target_cpu@ +target_os = @target_os@ +target_vendor = @target_vendor@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +@ENABLE_GTK_FALSE@GTK_ASSEMBLY = +@ENABLE_GTK_TRUE@GTK_ASSEMBLY = champlain-gtk-sharp.dll +@ENABLE_GTK_FALSE@GTK_REF = +@ENABLE_GTK_TRUE@GTK_REF = -r:champlain-gtk-sharp.dll +@ENABLE_GTK_FALSE@GTK_EXAMPLES = +@ENABLE_GTK_TRUE@GTK_EXAMPLES = gtk-test.cs +SAMPLES = $(GTK_EXAMPLES) +MCSFLAGS = -debug -nologo -pkg:clutter-sharp -pkg:clutter-gtk-sharp -r:champlain-sharp.dll $(GTK_REF) +assemblies = champlain-sharp.dll $(GTK_ASSEMBLY) +noinst_SCRIPTS = $(SAMPLES:.cs=.exe) +EXTRA_DIST = $(SAMPLES) +CLEANFILES = *.exe *.mdb *.pdb *.dll +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu examples/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu examples/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +tags: TAGS +TAGS: + +ctags: CTAGS +CTAGS: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(SCRIPTS) +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-exec-am: + +install-html: install-html-am + +install-info: install-info-am + +install-man: + +install-pdf: install-pdf-am + +install-ps: install-ps-am + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic distclean \ + distclean-generic distdir dvi dvi-am html html-am info info-am \ + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic pdf pdf-am ps ps-am uninstall uninstall-am + +%.exe: %.cs $(assemblies) + $(MCS) $(MCSFLAGS) $(GTKSHARP_LIBS) -out:$@ $< + +champlain-sharp.dll: $(top_builddir)/champlain/champlain-sharp.dll + cp $(top_builddir)/champlain/champlain-sharp.dll* . + +champlain-gtk-sharp.dll: $(top_builddir)/champlain-gtk/champlain-gtk-sharp.dll + cp $(top_builddir)/champlain-gtk/champlain-gtk-sharp.dll* . +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/examples/gtk-test.cs b/examples/gtk-test.cs new file mode 100644 index 0000000..14e2465 --- /dev/null +++ b/examples/gtk-test.cs @@ -0,0 +1,22 @@ + using System; + using Gtk; + using Champlain; + + public class ChamplainHelloWorld { + + public static void Main() { + Clutter.ClutterRun.Init(); + Application.Init(); + + Window mainWin = new Window("Hello World!"); + mainWin.Resize(200,200); + + Champlain.View view = new Champlain.View(); + Widget mapWidget = new ViewEmbed(view); + + mainWin.Add(mapWidget); + mainWin.ShowAll(); + + Application.Run(); + } + } -- 2.39.5