From fe2d4c311afaff9096e5b1aa7682db6233705bae Mon Sep 17 00:00:00 2001 From: Mike Kestner Date: Sun, 21 Nov 2010 21:18:06 -0600 Subject: [PATCH] Flatten the bootstrap and remove glade-sharp 2010-11-21 Mike Kestner * removed the glade dir from the build since libglade is no longer supported in gnome3. removed the gapi2-compat stuff since it doesn't make much sense now. Removed the bootstrap mechanism since we are unlikely to be releasing multiple API versions from the same tree going forward. The build is now a straight autogen.sh like most autotools projects. --- .gitignore | 30 ++ Makefile.am | 3 +- atk/.gitignore | 1 + atk/{atk-api-2.14.raw => atk-api.raw} | 0 autogen.sh | 114 ++++- bootstrap-for-the-insane | 47 --- bootstrap-generic | 140 ------- configure.in.in => configure.ac | 47 +-- doc/.gitignore | 1 + gapi/AssemblyInfo.cs | 6 - gapi/GTypeExtensions.cs | 94 ----- gapi/Makefile.am | 44 -- gapi/gapi-2.0-compat.dll.config | 4 - gapi/gapi-2.0-compat.pc.in | 10 - gdk/.gitignore | 1 + gdk/EventGrabBroken.cs | 2 - gdk/{gdk-api-2.14.raw => gdk-api.raw} | 0 generator/.gitignore | 1 + gio/.gitignore | 1 + glade/Glade.metadata | 9 - glade/Global.custom | 21 - glade/HandlerNotFoundExeception.cs | 114 ----- glade/Interface.custom | 37 -- glade/Makefile.am | 29 -- glade/WidgetAttribute.cs | 52 --- glade/XML.custom | 436 -------------------- glade/glade-api-2.14.raw | 381 ----------------- glade/glade-sharp-3.0.pc.in | 12 - glade/glade-sharp.dll.config.in | 3 - glade/glue/Makefile.am | 25 -- glade/glue/gladexml.c | 32 -- glade/glue/win32dll.c | 16 - glib/.gitignore | 1 + glib/InitiallyUnowned.cs | 3 - gtk/.gitignore | 1 + gtk/IconView.custom | 4 - gtk/TextBuffer.custom | 13 - gtk/{gtk-api-2.14.raw => gtk-api.raw} | 0 gtkdotnet/.gitignore | 1 + gtkdotnet/Makefile.am | 2 +- makefile.win32 | 2 - pango/.gitignore | 1 + pango/{pango-api-2.14.raw => pango-api.raw} | 0 parser/.gitignore | 2 + sample/Makefile.am | 19 +- sample/valtest/.gitignore | 1 + 46 files changed, 163 insertions(+), 1600 deletions(-) create mode 100644 .gitignore create mode 100644 atk/.gitignore rename atk/{atk-api-2.14.raw => atk-api.raw} (100%) delete mode 100755 bootstrap-for-the-insane delete mode 100755 bootstrap-generic rename configure.in.in => configure.ac (82%) create mode 100644 doc/.gitignore delete mode 100644 gapi/AssemblyInfo.cs delete mode 100644 gapi/GTypeExtensions.cs delete mode 100644 gapi/Makefile.am delete mode 100644 gapi/gapi-2.0-compat.dll.config delete mode 100644 gapi/gapi-2.0-compat.pc.in create mode 100644 gdk/.gitignore rename gdk/{gdk-api-2.14.raw => gdk-api.raw} (100%) create mode 100644 generator/.gitignore create mode 100644 gio/.gitignore delete mode 100644 glade/Glade.metadata delete mode 100644 glade/Global.custom delete mode 100644 glade/HandlerNotFoundExeception.cs delete mode 100644 glade/Interface.custom delete mode 100644 glade/Makefile.am delete mode 100644 glade/WidgetAttribute.cs delete mode 100644 glade/XML.custom delete mode 100644 glade/glade-api-2.14.raw delete mode 100644 glade/glade-sharp-3.0.pc.in delete mode 100644 glade/glade-sharp.dll.config.in delete mode 100644 glade/glue/Makefile.am delete mode 100644 glade/glue/gladexml.c delete mode 100755 glade/glue/win32dll.c create mode 100644 glib/.gitignore create mode 100644 gtk/.gitignore rename gtk/{gtk-api-2.14.raw => gtk-api.raw} (100%) create mode 100644 gtkdotnet/.gitignore delete mode 100755 makefile.win32 create mode 100644 pango/.gitignore rename pango/{pango-api-2.14.raw => pango-api.raw} (100%) create mode 100644 parser/.gitignore create mode 100644 sample/valtest/.gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..6b05ece4d --- /dev/null +++ b/.gitignore @@ -0,0 +1,30 @@ +.deps +.libs +*-api.xml +*.dll +*.dll.config +*.exe +*.exe.config +*.la +*.lo +*.mdb +*.o +*.pc +*.wxs +aclocal.m4 +autom4te.cache +config.* +configure +depcomp +generated +generated.c +generated-stamp +install-sh +libtool +ltmain.sh +missing +policy.config +stamp-h1 +AssemblyInfo.cs +Makefile +Makefile.in diff --git a/Makefile.am b/Makefile.am index c4efb6d74..c6dca227f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -1,9 +1,8 @@ -SUBDIRS = sources generator parser gapi glib gio cairo pango atk gdk gtk glade gtkdotnet sample doc +SUBDIRS = sources generator parser glib gio cairo pango atk gdk gtk gtkdotnet sample doc EXTRA_DIST = \ mono.snk \ gtk-sharp.snk \ - makefile.win32 \ policy.config.in \ AssemblyInfo.cs.in \ ChangeLog \ diff --git a/atk/.gitignore b/atk/.gitignore new file mode 100644 index 000000000..322d15dd6 --- /dev/null +++ b/atk/.gitignore @@ -0,0 +1 @@ +*.snk diff --git a/atk/atk-api-2.14.raw b/atk/atk-api.raw similarity index 100% rename from atk/atk-api-2.14.raw rename to atk/atk-api.raw diff --git a/autogen.sh b/autogen.sh index 9f6099b1f..49e48d322 100755 --- a/autogen.sh +++ b/autogen.sh @@ -1,4 +1,110 @@ -echo -echo "**Error**: autogen.sh has been replaced by bootstrap for the 2.5.x release." -echo "To bootstrap a 1.9.x build run bootstrap-2.4." -DIE=1 +#!/bin/sh + +srcdir=`dirname $0` +test -z "$srcdir" && srcdir=. + +DIE=0 + +(autoconf --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`autoconf' installed to compile Gtk#." + echo "Download the appropriate package for your distribution," + echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" + DIE=1 +} + +if [ -z "$LIBTOOL" ]; then + LIBTOOL=`which glibtool 2>/dev/null` + if [ ! -x "$LIBTOOL" ]; then + LIBTOOL=`which libtool` + fi +fi + +(grep "^AM_PROG_LIBTOOL" $srcdir/configure.ac >/dev/null) && { + ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`libtool' installed to compile Gtk#." + echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + } +} + +(automake --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: You must have \`automake' installed to compile Gtk#." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 + NO_AUTOMAKE=yes +} + + +# if no automake, don't bother testing for aclocal +test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { + echo + echo "**Error**: Missing \`aclocal'. The version of \`automake'" + echo "installed doesn't appear recent enough." + echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" + echo "(or a newer version if it is available)" + DIE=1 +} + +if test "$DIE" -eq 1; then + exit 1 +fi + +if test -z "$*"; then + echo "**Warning**: I am going to run \`configure' with no arguments." + echo "If you wish to pass any to it, please specify them on the" + echo \`$0\'" command line." + echo +fi + +case $CC in +xlc ) + am_opt=--include-deps;; +esac + + +LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} + +if grep "^AM_PROG_LIBTOOL" configure.ac >/dev/null; then + if test -z "$NO_LIBTOOLIZE" ; then + echo "Running $LIBTOOLIZE..." + $LIBTOOLIZE --force --copy + fi +fi + +echo "Running aclocal $ACLOCAL_FLAGS ..." +aclocal $ACLOCAL_FLAGS || { + echo + echo "**Error**: aclocal failed. This may mean that you have not" + echo "installed all of the packages you need, or you may need to" + echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" + echo "for the prefix where you installed the packages whose" + echo "macros were not found" + exit 1 +} + +if grep "^AM_CONFIG_HEADER" configure.ac >/dev/null; then + echo "Running autoheader..." + autoheader || { echo "**Error**: autoheader failed."; exit 1; } +fi + +echo "Running automake --foreign $am_opt ..." +automake --add-missing --foreign $am_opt || + { echo "**Error**: automake failed."; exit 1; } +echo "Running autoconf ..." +autoconf || { echo "**Error**: autoconf failed."; exit 1; } + + +conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c + +if test x$NOCONFIGURE = x; then + echo Running $srcdir/configure $conf_flags "$@" ... + $srcdir/configure $conf_flags "$@" \ + && echo Now type \`make\' to compile gtk-sharp || exit 1 +else + echo Skipping configure process. +fi diff --git a/bootstrap-for-the-insane b/bootstrap-for-the-insane deleted file mode 100755 index 2299d596a..000000000 --- a/bootstrap-for-the-insane +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -# Run this to set configure.in up for an API version. - -GTK_SHARP_VERSION=2.90.0 -ASSEMBLY_VERSION=3.0.0.0 -POLICY_VERSIONS= -GTK_REQUIRED_VERSION=2.14.3 -GLIB_REQUIRED_VERSION=2.18.1 -MONO_REQUIRED_VERSION=2.4 -VERSIONCSDEFINES="-define:GTK_SHARP_2_6 -define:GTK_SHARP_2_8 -define:GTK_SHARP_2_10 -define:GTK_SHARP_2_12 -define:GTK_SHARP_2_14" -VERSIONCFLAGS="-DGTK_SHARP_2_6 -DGTK_SHARP_2_8 -DGTK_SHARP_2_10 -DGTK_SHARP_2_12 -DGTK_SHARP_2_14" -GTK_API_TAG=2.14 - -. ./bootstrap-generic "$@" - -echo "" -echo " uuuuuuu" -echo " uu\$\$\$\$\$\$\$\$\$\$\$uu" -echo " uu\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$uu" -echo " u\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$u" -echo " u\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$u" -echo " u\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$u" -echo " u\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$u" -echo " u\$\$\$\$\$\$\" \"\$\$\$\" \"\$\$\$\$\$\$u" -echo " \"\$\$\$\$\" u\$u \$\$\$\$\"" -echo " \$\$\$u u\$u u\$\$\$" -echo " \$\$\$u u\$\$\$u u\$\$\$" -echo " \"\$\$\$\$uu\$\$\$ \$\$\$uu\$\$\$\$\"" -echo " \"\$\$\$\$\$\$\$\" \"\$\$\$\$\$\$\$\"" -echo " u\$\$\$\$\$\$\$u\$\$\$\$\$\$\$u" -echo " u\$\"\$\"\$\"\$\"\$\"\$\"\$u" -echo " uuu \$\$u\$ \$ \$ \$ \$u\$\$ uuu" -echo " u\$\$\$\$ \$\$\$\$\$u\$u\$u\$\$\$ u\$\$\$\$" -echo " \$\$\$\$\$uu \"\$\$\$\$\$\$\$\$\$\" uu\$\$\$\$\$\$ " -echo " u\$\$\$\$\$\$\$\$\$\$\$uu \"\"\"\"\" uuuu\$\$\$\$\$\$\$\$\$\$" -echo " \$\$\$\$\"\"\"\$\$\$\$\$\$\$\$\$\$uuu uu\$\$\$\$\$\$\$\$\$\"\"\"\$\$\$\"" -echo " \"\"\" \"\"\$\$\$\$\$\$\$\$\$\$\$uu \"\"\$\"\"\"" -echo " uuuu \"\"\$\$\$\$\$\$\$\$\$\$uuu\"" -echo " u\$\$\$uuu\$\$\$\$\$\$\$\$\$uu \"\"\$\$\$\$\$\$\$\$\$\$\$uuu\$\$\$" -echo " \$\$\$\$\$\$\$\$\$\$\"\"\"\" \"\"\$\$\$\$\$\$\$\$\$\$\$\"" -echo " \"\$\$\$\$\$\" \"\"\$\$\$\$\"\"" -echo " \$\$\$\" \$\$\$\$\"" -echo "" -echo "*** WARNING *** ***WARNING ***" -echo "This bootstrap is UNSUPPORTED and may be UNSTABLE" -echo "with NO SCHEDULED RELEASE DATE!" -echo "You most likely want to build branches/gtk-sharp-2-12-branch instead." diff --git a/bootstrap-generic b/bootstrap-generic deleted file mode 100755 index bdb953a99..000000000 --- a/bootstrap-generic +++ /dev/null @@ -1,140 +0,0 @@ -#!/bin/sh -# Run this to set configure.in up for an API version. - -if [ x"$GTK_SHARP_VERSION" = x ] ; then - echo "error: this script should not be run directly; use bootstrap instead" 1>&2 - exit 1 -fi - -srcdir=`dirname $0` -test -z "$srcdir" && srcdir=. - -cat >bootstrap.status < $srcdir/configure.in - -ln -f $srcdir/pango/pango-api-$GTK_API_TAG.raw $srcdir/pango/pango-api.raw -ln -f $srcdir/atk/atk-api-$GTK_API_TAG.raw $srcdir/atk/atk-api.raw -ln -f $srcdir/gdk/gdk-api-$GTK_API_TAG.raw $srcdir/gdk/gdk-api.raw -ln -f $srcdir/gtk/gtk-api-$GTK_API_TAG.raw $srcdir/gtk/gtk-api.raw -ln -f $srcdir/glade/glade-api-$GTK_API_TAG.raw $srcdir/glade/glade-api.raw -EOF - -chmod +x bootstrap.status -./bootstrap.status - -DIE=0 - -(autoconf --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`autoconf' installed to compile Gtk#." - echo "Download the appropriate package for your distribution," - echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" - DIE=1 -} - -if [ -z "$LIBTOOL" ]; then - LIBTOOL=`which glibtool 2>/dev/null` - if [ ! -x "$LIBTOOL" ]; then - LIBTOOL=`which libtool` - fi -fi - -(grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { - ($LIBTOOL --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`libtool' installed to compile Gtk#." - echo "Get ftp://ftp.gnu.org/pub/gnu/libtool-1.2d.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - } -} - -(automake --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: You must have \`automake' installed to compile Gtk#." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 - NO_AUTOMAKE=yes -} - - -# if no automake, don't bother testing for aclocal -test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { - echo - echo "**Error**: Missing \`aclocal'. The version of \`automake'" - echo "installed doesn't appear recent enough." - echo "Get ftp://ftp.gnu.org/pub/gnu/automake-1.3.tar.gz" - echo "(or a newer version if it is available)" - DIE=1 -} - -if test "$DIE" -eq 1; then - exit 1 -fi - -if test -z "$*"; then - echo "**Warning**: I am going to run \`configure' with no arguments." - echo "If you wish to pass any to it, please specify them on the" - echo \`$0\'" command line." - echo -fi - -case $CC in -xlc ) - am_opt=--include-deps;; -esac - - -LIBTOOLIZE=${LIBTOOLIZE:-libtoolize} - -if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then - if test -z "$NO_LIBTOOLIZE" ; then - echo "Running $LIBTOOLIZE..." - $LIBTOOLIZE --force --copy - fi -fi - -echo "Running aclocal $ACLOCAL_FLAGS ..." -aclocal $ACLOCAL_FLAGS || { - echo - echo "**Error**: aclocal failed. This may mean that you have not" - echo "installed all of the packages you need, or you may need to" - echo "set ACLOCAL_FLAGS to include \"-I \$prefix/share/aclocal\"" - echo "for the prefix where you installed the packages whose" - echo "macros were not found" - exit 1 -} - -if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then - echo "Running autoheader..." - autoheader || { echo "**Error**: autoheader failed."; exit 1; } -fi - -echo "Running automake --foreign $am_opt ..." -automake --add-missing --foreign $am_opt || - { echo "**Error**: automake failed."; exit 1; } -echo "Running autoconf ..." -autoconf || { echo "**Error**: autoconf failed."; exit 1; } - - -conf_flags="--enable-maintainer-mode --enable-compile-warnings" #--enable-iso-c - -if test x$NOCONFIGURE = x; then - echo Running $srcdir/configure $conf_flags "$@" ... - $srcdir/configure $conf_flags "$@" \ - && echo Now type \`make\' to compile $PKG_NAME || exit 1 -else - echo Skipping configure process. -fi diff --git a/configure.in.in b/configure.ac similarity index 82% rename from configure.in.in rename to configure.ac index 43e22afe2..bfd26afc2 100644 --- a/configure.in.in +++ b/configure.ac @@ -2,12 +2,12 @@ AC_INIT(README) AC_CANONICAL_SYSTEM AM_CONFIG_HEADER(config.h) -AM_INIT_AUTOMAKE(gtk-sharp, @GTK_SHARP_VERSION@) +AM_INIT_AUTOMAKE(gtk-sharp, 2.91.0) AM_MAINTAINER_MODE -API_VERSION=@ASSEMBLY_VERSION@ +API_VERSION=3.0.0.0 AC_SUBST(API_VERSION) -POLICY_VERSIONS="@POLICY_VERSIONS@" +POLICY_VERSIONS="" AC_SUBST(POLICY_VERSIONS) PACKAGE_VERSION=gtk-sharp-3.0 @@ -80,13 +80,9 @@ AC_ARG_ENABLE(debug, [ --enable-debug Build debugger (.mdb) files for ) fi -CSDEFINES='@VERSIONCSDEFINES@' -CSFLAGS="$DEBUG_FLAGS $CSDEFINES $WIN64DEFINES" +CSFLAGS="$DEBUG_FLAGS $WIN64DEFINES" AC_SUBST(CSFLAGS) -GTK_SHARP_VERSION_CFLAGS='@VERSIONCFLAGS@' -AC_SUBST(GTK_SHARP_VERSION_CFLAGS) - AC_PATH_PROG(PKG_CONFIG, pkg-config, no) if test "x$PKG_CONFIG" = "xno"; then AC_MSG_ERROR([You need to install pkg-config]) @@ -102,11 +98,8 @@ AC_CHECK_SIZEOF(off_t) OFF_T_FLAGS="-define:OFF_T_$ac_cv_sizeof_off_t" AC_SUBST(OFF_T_FLAGS) -MONO_REQUIRED_VERSION=@MONO_REQUIRED_VERSION@ +MONO_REQUIRED_VERSION=2.8 PKG_CHECK_MODULES(MONO_DEPENDENCY, mono >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false) -if test "x$has_mono" = "xfalse" ; then - PKG_CHECK_MODULES(MONO_DEPENDENCY, mono-2 >= $MONO_REQUIRED_VERSION, has_mono=true, has_mono=false) -fi AC_PATH_PROG(GACUTIL, gacutil, no) if test "x$GACUTIL" = "xno" ; then @@ -173,11 +166,8 @@ AC_SUBST(GENERATED_SOURCES) PKG_CHECK_MODULES(MONO_CAIRO, mono-cairo >= $MONO_REQUIRED_VERSION, enable_mono_cairo=no, enable_mono_cairo=yes) AC_SUBST(MONO_CAIRO_LIBS) -PKG_CHECK_MODULES(GLIBSHARP2, glib-sharp-2.0, enable_glib2_compat=yes, enable_glib2_compat=no) -AC_SUBST(GLIBSHARP2_LIBS) - -GTK_REQUIRED_VERSION=@GTK_REQUIRED_VERSION@ -GLIB_REQUIRED_VERSION=@GLIB_REQUIRED_VERSION@ +GTK_REQUIRED_VERSION=2.14.0 +GLIB_REQUIRED_VERSION=2.14.0 PKG_CHECK_MODULES(GLIB, gobject-2.0 >= $GLIB_REQUIRED_VERSION) AC_SUBST(GLIB_CFLAGS) @@ -199,15 +189,6 @@ PKG_CHECK_MODULES(GTK, gtk+-2.0 >= $GTK_REQUIRED_VERSION) AC_SUBST(GTK_CFLAGS) AC_SUBST(GTK_LIBS) -GLADE_REQUIRED_VERSION=2.3.6 -enable_glade=no -AC_ARG_ENABLE(glade-sharp, AC_HELP_STRING([--disable-glade-sharp], [Disable glade-sharp bindings])) -if test "x$enable_glade_sharp" != "xno"; then - PKG_CHECK_MODULES(GLADE, libglade-2.0 >= $GLADE_REQUIRED_VERSION, enable_glade=yes, enable_glade=no) - AC_SUBST(GLADE_CFLAGS) - AC_SUBST(GLADE_LIBS) -fi - GDK_BACKEND=`pkg-config --variable=target gtk+-2.0` AC_SUBST(GDK_BACKEND) @@ -222,11 +203,8 @@ fi AC_SUBST(MDOC) AM_CONDITIONAL(ENABLE_MONO_CAIRO, test "x$enable_mono_cairo" = "xyes") -AM_CONDITIONAL(ENABLE_GLADE, test "x$enable_glade" = "xyes") AM_CONDITIONAL(ENABLE_DOTNET, test "x$enable_dotnet" = "xyes") AM_CONDITIONAL(ENABLE_MONODOC, test "x$enable_monodoc" = "xyes") -AM_CONDITIONAL(ENABLE_MONOGETOPTIONS, test "x$has_mono" = "xtrue") -AM_CONDITIONAL(ENABLE_GLIBSHARP2_COMPAT, test "x$enable_glib2_compat" = "xyes") AC_SUBST(CFLAGS) @@ -241,8 +219,6 @@ parser/Makefile parser/gapi-3.0.pc parser/gapi3-fixup parser/gapi3-parser -gapi/Makefile -gapi/gapi-2.0-compat.pc generator/Makefile generator/gapi3-codegen glib/Makefile @@ -267,10 +243,6 @@ gtk/Makefile gtk/gtk-sharp-3.0.pc gtk/gtk-sharp.dll.config gtk/glue/Makefile -glade/Makefile -glade/glade-sharp.dll.config -glade/glade-sharp-3.0.pc -glade/glue/Makefile gtkdotnet/Makefile gtkdotnet/gtk-dotnet.dll.config gtkdotnet/gtk-dotnet-3.0.pc @@ -306,11 +278,6 @@ echo " * $CS compiler: $CSC $CSFLAGS" echo "" echo " Optional assemblies included in the build:" echo "" -if test "x$enable_glade_sharp" = "xno"; then -echo " * glade-sharp.dll: disabled" -else -echo " * glade-sharp.dll: $enable_glade" -fi echo " * gtk-dotnet.dll: $enable_dotnet" echo " * Mono.Cairo.dll: $cairo_comment" echo "" diff --git a/doc/.gitignore b/doc/.gitignore new file mode 100644 index 000000000..989c00c64 --- /dev/null +++ b/doc/.gitignore @@ -0,0 +1 @@ +gtk-sharp-docs.* diff --git a/gapi/AssemblyInfo.cs b/gapi/AssemblyInfo.cs deleted file mode 100644 index c24cc0ff0..000000000 --- a/gapi/AssemblyInfo.cs +++ /dev/null @@ -1,6 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -[assembly:AssemblyVersion("3.0.0.0")] -[assembly:AssemblyDelaySign(false)] -[assembly:AssemblyKeyFile("gtk-sharp.snk")] diff --git a/gapi/GTypeExtensions.cs b/gapi/GTypeExtensions.cs deleted file mode 100644 index dc3825b63..000000000 --- a/gapi/GTypeExtensions.cs +++ /dev/null @@ -1,94 +0,0 @@ -// Author: Mike Kestner -// -// Copyright (c) 2009 Novell, Inc. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of version 2 of the Lesser GNU General -// Public License as published by the Free Software Foundation. -// -// This program 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, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. - - -using System; -using System.Runtime.InteropServices; - -namespace Gapi { - - public static class GTypeExtensions { - - [DllImport("libgobject-2.0-0.dll")] - static extern IntPtr g_type_class_peek (IntPtr gtype); - - [DllImport("libgobject-2.0-0.dll")] - static extern IntPtr g_type_class_ref (IntPtr gtype); - - public static IntPtr GetClassPtr (this GLib.GType gtype) - { - IntPtr klass = g_type_class_peek (gtype.Val); - if (klass == IntPtr.Zero) - klass = g_type_class_ref (gtype.Val); - return klass; - } - - [DllImport("libgobject-2.0-0.dll")] - static extern IntPtr g_type_parent (IntPtr type); - - public static GLib.GType GetBaseType (this GLib.GType gtype) - { - IntPtr parent = g_type_parent (gtype.Val); - return parent == IntPtr.Zero ? GLib.GType.None : new GLib.GType (parent); - } - - public static GLib.GType GetThresholdType (this GLib.GType gtype) - { - GLib.GType curr = gtype; - while (curr.ToString ().StartsWith ("__gtksharp_")) - curr = GetBaseType (curr); - return curr; - } - - struct GTypeQuery { - public IntPtr type; - public IntPtr type_name; - public uint class_size; - public uint instance_size; - } - - [DllImport("libgobject-2.0-0.dll")] - static extern void g_type_query (IntPtr type, out GTypeQuery query); - - public static uint GetClassSize (this GLib.GType gtype) - { - GTypeQuery query; - g_type_query (gtype.Val, out query); - return query.class_size; - } - - static IntPtr ValFromInstancePtr (IntPtr handle) - { - if (handle == IntPtr.Zero) - return IntPtr.Zero; - - // First field of instance is a GTypeClass*. - IntPtr klass = Marshal.ReadIntPtr (handle); - // First field of GTypeClass is a GType. - return Marshal.ReadIntPtr (klass); - } - - [DllImport("libgobject-2.0-0.dll")] - static extern bool g_type_is_a (IntPtr type, IntPtr is_a_type); - - public static bool IsInstance (this GLib.GType gtype, IntPtr raw) - { - return g_type_is_a (ValFromInstancePtr (raw), gtype.Val); - } - } -} diff --git a/gapi/Makefile.am b/gapi/Makefile.am deleted file mode 100644 index d1e043d02..000000000 --- a/gapi/Makefile.am +++ /dev/null @@ -1,44 +0,0 @@ -if ENABLE_GLIBSHARP2_COMPAT -TARGET = $(ASSEMBLY) -else -TARGET = -endif - -ASSEMBLY = $(ASSEMBLY_NAME).dll -ASSEMBLY_NAME = gapi-2.0-compat -noinst_DATA = $(TARGET) - -CLEANFILES = $(ASSEMBLY) $(ASSEMBLY).mdb gtk-sharp.snk - -references = $(GLIBSHARP2_LIBS) - -sources = \ - AssemblyInfo.cs \ - GTypeExtensions.cs - -build_sources = $(addprefix $(srcdir)/, $(sources)) -dist_sources = $(sources) - -EXTRA_DIST = \ - $(dist_sources) \ - $(ASSEMBLY).config - -gtk-sharp.snk: $(top_srcdir)/gtk-sharp.snk - cp $(top_srcdir)/gtk-sharp.snk . - -$(ASSEMBLY): $(build_sources) gtk-sharp.snk - @rm -f $(ASSEMBLY).mdb - $(CSC) $(CSFLAGS) -unsafe -nowarn:0169,0612,0618 -out:$(ASSEMBLY) -target:library $(references) $(build_sources) - -install-data-local: - @if test -n '$(TARGET)'; then \ - echo "$(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS)"; \ - $(GACUTIL) /i $(ASSEMBLY) /f $(GACUTIL_FLAGS) || exit 1; \ - fi - -uninstall-local: - @if test -n '$(TARGET)'; then \ - echo "$(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS)"; \ - $(GACUTIL) /u $(ASSEMBLY_NAME) $(GACUTIL_FLAGS) || exit 1; \ - fi - diff --git a/gapi/gapi-2.0-compat.dll.config b/gapi/gapi-2.0-compat.dll.config deleted file mode 100644 index bc5271299..000000000 --- a/gapi/gapi-2.0-compat.dll.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/gapi/gapi-2.0-compat.pc.in b/gapi/gapi-2.0-compat.pc.in deleted file mode 100644 index b7bd9d2c9..000000000 --- a/gapi/gapi-2.0-compat.pc.in +++ /dev/null @@ -1,10 +0,0 @@ -prefix=${pcfiledir}/../.. -exec_prefix=${prefix} -libdir=${exec_prefix}/lib - -Name: GAPI 2.0 Compatibility library -Description: Provides extensions necessary for using gapi 3.0 with glib 2.0. -Version: @VERSION@ -Libs: -r:${libdir}/mono/@PACKAGE_VERSION@/gapi-2.0-compat.dll -Requires: glib-sharp-2.0 - diff --git a/gdk/.gitignore b/gdk/.gitignore new file mode 100644 index 000000000..322d15dd6 --- /dev/null +++ b/gdk/.gitignore @@ -0,0 +1 @@ +*.snk diff --git a/gdk/EventGrabBroken.cs b/gdk/EventGrabBroken.cs index 66892e4b3..fcc6b6e59 100644 --- a/gdk/EventGrabBroken.cs +++ b/gdk/EventGrabBroken.cs @@ -19,7 +19,6 @@ // Boston, MA 02111-1307, USA. -#if GTK_SHARP_2_8 namespace Gdk { using System; @@ -71,5 +70,4 @@ namespace Gdk { } } } -#endif diff --git a/gdk/gdk-api-2.14.raw b/gdk/gdk-api.raw similarity index 100% rename from gdk/gdk-api-2.14.raw rename to gdk/gdk-api.raw diff --git a/generator/.gitignore b/generator/.gitignore new file mode 100644 index 000000000..cf1601894 --- /dev/null +++ b/generator/.gitignore @@ -0,0 +1 @@ +gapi3-codegen diff --git a/gio/.gitignore b/gio/.gitignore new file mode 100644 index 000000000..322d15dd6 --- /dev/null +++ b/gio/.gitignore @@ -0,0 +1 @@ +*.snk diff --git a/glade/Glade.metadata b/glade/Glade.metadata deleted file mode 100644 index 09fb56c46..000000000 --- a/glade/Glade.metadata +++ /dev/null @@ -1,9 +0,0 @@ - - - const-gchar* - const-gchar* - 1 - 1 - false - private - diff --git a/glade/Global.custom b/glade/Global.custom deleted file mode 100644 index 209612ee6..000000000 --- a/glade/Global.custom +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2005 Novell, Inc. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of version 2 of the Lesser GNU General -// Public License as published by the Free Software Foundation. -// -// This program 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, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. - -[Obsolete ("Replaced by Glade.XML.CustomHandler static property.")] -public static void SetCustomHandler (Glade.XMLCustomWidgetHandler handler) -{ - XML.CustomHandler = handler; -} diff --git a/glade/HandlerNotFoundExeception.cs b/glade/HandlerNotFoundExeception.cs deleted file mode 100644 index 528453510..000000000 --- a/glade/HandlerNotFoundExeception.cs +++ /dev/null @@ -1,114 +0,0 @@ -// HandlerNotFoundException.cs -// -// Author: Ricardo Fernández Pascual -// -// Copyright (c) 2002 Ricardo Fernández Pascual -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of version 2 of the Lesser GNU General -// Public License as published by the Free Software Foundation. -// -// This program 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, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. - -namespace Glade { - - using System; - using System.Reflection; - using System.Runtime.Serialization; - - /// - /// Exception thrown when signal autoconnection fails. - /// - [Serializable] - public class HandlerNotFoundException : SystemException - { - string handler_name; - string signal_name; - EventInfo evnt; - Type delegate_type; - - public HandlerNotFoundException (string handler_name, string signal_name, - EventInfo evnt, Type delegate_type) - : this (handler_name, signal_name, evnt, delegate_type, null) - { - } - - public HandlerNotFoundException (string handler_name, string signal_name, - EventInfo evnt, Type delegate_type, Exception inner) - : base ("No handler " + handler_name + " found for signal " + signal_name, - inner) - { - this.handler_name = handler_name; - this.signal_name = signal_name; - this.evnt = evnt; - this.delegate_type = delegate_type; - } - - public HandlerNotFoundException (string message, string handler_name, string signal_name, - EventInfo evnt, Type delegate_type) - : base ((message != null) ? message : "No handler " + handler_name + " found for signal " + signal_name, - null) - { - this.handler_name = handler_name; - this.signal_name = signal_name; - this.evnt = evnt; - this.delegate_type = delegate_type; - } - - protected HandlerNotFoundException (SerializationInfo info, StreamingContext context) - : base (info, context) - { - handler_name = info.GetString ("HandlerName"); - signal_name = info.GetString ("SignalName"); - evnt = info.GetValue ("Event", typeof (EventInfo)) as EventInfo; - delegate_type = info.GetValue ("DelegateType", typeof (Type)) as Type; - } - - public string HandlerName - { - get { - return handler_name; - } - } - - public string SignalName - { - get { - return signal_name; - } - } - - public EventInfo Event - { - get { - return evnt; - } - } - - public Type DelegateType - { - get { - return delegate_type; - } - } - - public override void GetObjectData (SerializationInfo info, StreamingContext context) - { - base.GetObjectData (info, context); - info.AddValue ("HandlerName", handler_name); - info.AddValue ("SignalName", signal_name); - info.AddValue ("Event", evnt); - info.AddValue ("DelegateType", delegate_type); - } - } - -} - diff --git a/glade/Interface.custom b/glade/Interface.custom deleted file mode 100644 index 32f4f8ed3..000000000 --- a/glade/Interface.custom +++ /dev/null @@ -1,37 +0,0 @@ -// Interface.custom -// -// Author: Mike Kestner -// -// Copyright (c) 2005 Novell, Inc. -// -// This code is inserted after the automatically generated code. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of version 2 of the Lesser GNU General -// Public License as published by the Free Software Foundation. -// -// This program 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, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. - - [Obsolete ("Replaced by Toplevels property")] - public Glade.WidgetInfo toplevels { - get { - return Glade.WidgetInfo.New (_toplevels); - } - } - - public WidgetInfo[] Toplevels { - get { - WidgetInfo[] result = new WidgetInfo [NToplevels]; - for (int i = 0; i < NToplevels; i++) - result [i] = WidgetInfo.New (Marshal.ReadIntPtr (_toplevels, i * IntPtr.Size)); - return result; - } - } diff --git a/glade/Makefile.am b/glade/Makefile.am deleted file mode 100644 index 32ed7a8be..000000000 --- a/glade/Makefile.am +++ /dev/null @@ -1,29 +0,0 @@ -SUBDIRS = . glue - -if ENABLE_GLADE -pkg = glade -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = glade-sharp-3.0.pc -else -pkg = -endif - -INCLUDE_API = ../pango/pango-api.xml ../atk/atk-api.xml ../gdk/gdk-api.xml ../gtk/gtk-api.xml -METADATA = Glade.metadata -SYMBOLS = -references = ../glib/glib-sharp.dll ../pango/pango-sharp.dll ../atk/atk-sharp.dll ../gdk/gdk-sharp.dll ../gtk/gtk-sharp.dll -glue_includes = glade/glade.h,glade/glade-parser.h - -sources = \ - HandlerNotFoundExeception.cs \ - WidgetAttribute.cs - -customs = \ - Global.custom \ - Interface.custom \ - XML.custom - -add_dist = glade-sharp-3.0.pc.in - -include ../Makefile.include - diff --git a/glade/WidgetAttribute.cs b/glade/WidgetAttribute.cs deleted file mode 100644 index d6f5f6bea..000000000 --- a/glade/WidgetAttribute.cs +++ /dev/null @@ -1,52 +0,0 @@ -// WidgetAttribute.cs -// -// Author: Rachel Hestilow -// -// Copyright (c) 2003 Rachel Hestilow -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of version 2 of the Lesser GNU General -// Public License as published by the Free Software Foundation. -// -// This program 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, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. - -namespace Glade { - using System; - - [AttributeUsage (AttributeTargets.Field)] - public class WidgetAttribute : Attribute - { - private string name; - private bool specified; - - public WidgetAttribute (string name) - { - specified = true; - this.name = name; - } - - public WidgetAttribute () - { - specified = false; - } - - public string Name - { - get { return name; } - } - - public bool Specified - { - get { return specified; } - } - } -} - diff --git a/glade/XML.custom b/glade/XML.custom deleted file mode 100644 index 526a173a7..000000000 --- a/glade/XML.custom +++ /dev/null @@ -1,436 +0,0 @@ -// WARNING: This file is in UTF8 format due to the use of ã -// XML.custom -// -// Author: Ricardo Fernández Pascual -// -// Copyright (c) 2002 Ricardo Fernández Pascual -// -// Field binding code by Rachel Hestilow -// Copyright (c) 2003 Rachel Hestilow -// -// This code is inserted after the automatically generated code. -// -// This program is free software; you can redistribute it and/or -// modify it under the terms of version 2 of the Lesser GNU General -// Public License as published by the Free Software Foundation. -// -// This program 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, write to the -// Free Software Foundation, Inc., 59 Temple Place - Suite 330, -// Boston, MA 02111-1307, USA. - - // keep this around so it doesn't get GC'd - static GladeSharp.XMLCustomWidgetHandlerWrapper callback_wrapper = null; - - [DllImport ("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern void glade_set_custom_handler (GladeSharp.XMLCustomWidgetHandlerNative handler, IntPtr user_data); - - public static Glade.XMLCustomWidgetHandler CustomHandler { - set { - callback_wrapper = new GladeSharp.XMLCustomWidgetHandlerWrapper (value); - glade_set_custom_handler(callback_wrapper.NativeDelegate, IntPtr.Zero); - } - } - - [Obsolete ("Replaced by CustomHandler property.")] - static public void SetCustomHandler (Glade.XMLCustomWidgetHandler handler) - { - CustomHandler = handler; - } - - [DllImport("gladesharpglue-3")] - static extern IntPtr gtksharp_glade_xml_get_filename (IntPtr raw); - - public string Filename { - get { - string ret; - IntPtr ptr = gtksharp_glade_xml_get_filename (Handle); - if (ptr == IntPtr.Zero) - { - // from resource - ret = System.Reflection.Assembly.GetCallingAssembly ().Location; - } - else - { - ret = GLib.Marshaller.Utf8PtrToString (ptr); - } - return ret; - } - } - - public Gtk.Widget this [string name] { - get { - return GetWidget (name); - } - } - - [DllImport ("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr glade_get_widget_name (IntPtr widget); - - static public string GetWidgetName (Gtk.Widget w) { - string ret; - IntPtr ptr = glade_get_widget_name (w.Handle); - if (ptr == IntPtr.Zero) - ret = ""; - else - ret = GLib.Marshaller.Utf8PtrToString (ptr); - return ret; - } - - [DllImport ("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr glade_get_widget_tree (IntPtr widget); - - static public Glade.XML GetWidgetTree (Gtk.Widget w) { - IntPtr ret_raw = glade_get_widget_tree (w.Handle); - Glade.XML ret = GLib.Object.GetObject (ret_raw, false) as Glade.XML; - return ret; - } - - /* a constructor that reads the XML from a Stream */ - - [DllImport ("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr glade_xml_new_from_buffer(byte[] buffer, int size, IntPtr root, IntPtr domain); - - public XML (System.IO.Stream s, string root, string domain) : base (IntPtr.Zero) - { - if (GetType() != typeof (XML)) - throw new InvalidOperationException ("Can't chain to this constructor from subclasses."); - - if (s == null) - throw new ArgumentNullException ("s"); - - int size = (int) s.Length; - byte[] buffer = new byte[size]; - s.Read (buffer, 0, size); - IntPtr nroot = GLib.Marshaller.StringToPtrGStrdup (root); - IntPtr ndomain = GLib.Marshaller.StringToPtrGStrdup (domain); - Raw = glade_xml_new_from_buffer(buffer, size, nroot, ndomain); - GLib.Marshaller.Free (nroot); - GLib.Marshaller.Free (ndomain); - } - - public XML (string resource_name, string root) : this (System.Reflection.Assembly.GetEntryAssembly (), resource_name, root, null) - { - } - - public XML (System.Reflection.Assembly assembly, string resource_name, string root, string domain) : base (IntPtr.Zero) - { - if (GetType() != typeof (XML)) - throw new InvalidOperationException ("Cannot chain to this constructor from subclasses."); - - if (assembly == null) - assembly = System.Reflection.Assembly.GetCallingAssembly (); - - System.IO.Stream s = assembly.GetManifestResourceStream (resource_name); - if (s == null) - throw new ArgumentException ("Cannot get resource file '" + resource_name + "'", - "resource_name"); - - int size = (int) s.Length; - byte[] buffer = new byte[size]; - s.Read (buffer, 0, size); - s.Close (); - IntPtr nroot = GLib.Marshaller.StringToPtrGStrdup (root); - IntPtr ndomain = GLib.Marshaller.StringToPtrGStrdup (domain); - Raw = glade_xml_new_from_buffer(buffer, size, nroot, ndomain); - GLib.Marshaller.Free (nroot); - GLib.Marshaller.Free (ndomain); - } - - /* signal autoconnection using reflection */ - public void Autoconnect (object handler) - { - BindFields (handler); - SignalConnector sc = new SignalConnector (this, handler); - sc.Autoconnect (); - } - - public void Autoconnect (Type handler_class) - { - BindFields (handler_class); - SignalConnector sc = new SignalConnector (this, handler_class); - sc.Autoconnect (); - } - - class SignalConnector - { - /* the Glade.XML object whose signals we want to connect */ - XML gxml; - - /* the object to look for handlers */ - object handler_object; - - /* the type to look for handlers if no object has been specified */ - Type handler_type; - - public SignalConnector (XML gxml, object handler) - { - this.gxml = gxml; - this.handler_object = handler; - this.handler_type = handler.GetType (); - } - - public SignalConnector (XML gxml, Type type) - { - this.gxml = gxml; - this.handler_object = null; - this.handler_type = type; - } - - [UnmanagedFunctionPointer (CallingConvention.Cdecl)] - delegate void RawXMLConnectFunc (IntPtr handler_name, IntPtr objekt, - IntPtr signal_name, IntPtr signal_data, - IntPtr connect_object, int after, IntPtr user_data); - - [DllImport ("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern void glade_xml_signal_autoconnect_full (IntPtr raw, RawXMLConnectFunc func, - IntPtr user_data); - - public void Autoconnect () { - RawXMLConnectFunc cf = new RawXMLConnectFunc (ConnectFunc); - glade_xml_signal_autoconnect_full (gxml.Handle, cf, IntPtr.Zero); - } - - void ConnectFunc (IntPtr native_handler_name, IntPtr objekt_ptr, - IntPtr native_signal_name, IntPtr native_signal_data, - IntPtr connect_object_ptr, int after, IntPtr user_data) { - - GLib.Object objekt = GLib.Object.GetObject (objekt_ptr, false); - - string handler_name = GLib.Marshaller.Utf8PtrToString (native_handler_name); - string signal_name = GLib.Marshaller.Utf8PtrToString (native_signal_name); - //string signal_data = GLib.Marshaller.Utf8PtrToString (native_signal_data); - - /* if an connect_object_ptr is provided, use that as handler */ - object connect_object = - connect_object_ptr == IntPtr.Zero - ? handler_object - : GLib.Object.GetObject (connect_object_ptr, false); - - /* search for the event to connect */ - System.Reflection.MemberInfo[] evnts = objekt.GetType (). - FindMembers (System.Reflection.MemberTypes.Event, - System.Reflection.BindingFlags.Instance - | System.Reflection.BindingFlags.Static - | System.Reflection.BindingFlags.Public - | System.Reflection.BindingFlags.NonPublic, - signalFilter, signal_name); - foreach (System.Reflection.EventInfo ei in evnts) - { - bool connected = false; - System.Reflection.MethodInfo add = ei.GetAddMethod (); - System.Reflection.ParameterInfo[] addpi = add.GetParameters (); - if (addpi.Length == 1) - { /* this should be always true, unless there's something broken */ - Type delegate_type = addpi[0].ParameterType; - - /* look for an instance method */ - if (connect_object != null) try - { - Delegate d = Delegate.CreateDelegate - (delegate_type, connect_object, handler_name); - add.Invoke (objekt, new object[] { d } ); - connected = true; - } - catch (ArgumentException) - { - /* ignore if there is not such instance method */ - } - - /* look for a static method if no instance method has been found */ - if (!connected && handler_type != null) try - { - Delegate d = Delegate.CreateDelegate - (delegate_type, handler_type, handler_name); - add.Invoke (objekt, new object[] { d } ); - connected = true; - } - catch (ArgumentException) - { - /* ignore if there is not such static method */ - } - - if (!connected) - { - string msg = ExplainError (ei.Name, delegate_type, handler_type, handler_name); - throw new HandlerNotFoundException (msg, handler_name, signal_name, ei, delegate_type); - } - } - } - - } - - static string GetSignature (System.Reflection.MethodInfo method) - { - if (method == null) - return null; - - System.Reflection.ParameterInfo [] parameters = method.GetParameters (); - System.Text.StringBuilder sb = new System.Text.StringBuilder (); - sb.Append ('('); - foreach (System.Reflection.ParameterInfo info in parameters) { - sb.Append (info.ParameterType.ToString ()); - sb.Append (','); - } - if (sb.Length != 0) - sb.Length--; - - sb.Append (')'); - return sb.ToString (); - } - - static string GetSignature (Type delegate_type) - { - System.Reflection.MethodInfo method = delegate_type.GetMethod ("Invoke"); - return GetSignature (method); - } - - const System.Reflection.BindingFlags flags = System.Reflection.BindingFlags.NonPublic | - System.Reflection.BindingFlags.Public | - System.Reflection.BindingFlags.Static | - System.Reflection.BindingFlags.Instance; - static string GetSignature (Type klass, string method_name) - { - try { - System.Reflection.MethodInfo method = klass.GetMethod (method_name, flags); - return GetSignature (method); - } catch { - // May be more than one method with that name and none matches - return null; - } - } - - static string ExplainError (string event_name, Type deleg, Type klass, string method) - { - if (deleg == null || klass == null || method == null) - return null; - - System.Text.StringBuilder sb = new System.Text.StringBuilder (); - string expected = GetSignature (deleg); - string actual = GetSignature (klass, method); - if (actual == null) - return null; - sb.AppendFormat ("The handler for the event {0} should take '{1}', " + - "but the signature of the provided handler ('{2}') is '{3}'\n", - event_name, expected, method, actual); - return sb.ToString (); - } - - System.Reflection.MemberFilter signalFilter = new System.Reflection.MemberFilter (SignalFilter); - - /* matches events to GLib signal names */ - static bool SignalFilter (System.Reflection.MemberInfo m, object filterCriteria) - { - string signame = (filterCriteria as string); - object[] attrs = m.GetCustomAttributes (typeof (GLib.SignalAttribute), false); - if (attrs.Length > 0) - { - foreach (GLib.SignalAttribute a in attrs) - { - if (signame == a.CName) - { - return true; - } - } - return false; - } - else - { - /* this tries to match the names when no attibutes are present. - It is only a fallback. */ - signame = signame.ToLower ().Replace ("_", ""); - string evname = m.Name.ToLower (); - return signame == evname; - } - } - } - - private void BindFields (object target, Type type) - { - System.Reflection.BindingFlags flags = System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.DeclaredOnly; - if (target != null) - flags |= System.Reflection.BindingFlags.Instance; - else - flags |= System.Reflection.BindingFlags.Static; - - do { - System.Reflection.FieldInfo[] fields = type.GetFields (flags); - if (fields == null) - return; - - foreach (System.Reflection.FieldInfo field in fields) - { - object[] attrs = field.GetCustomAttributes (typeof (WidgetAttribute), false); - if (attrs == null || attrs.Length == 0) - continue; - // The widget to field binding must be 1:1, so only check - // the first attribute. - WidgetAttribute attr = (WidgetAttribute) attrs[0]; - Gtk.Widget widget; - if (attr.Specified) - widget = GetWidget (attr.Name); - else - widget = GetWidget (field.Name); - - if (widget != null) - try { - field.SetValue (target, widget, flags, null, null); - } catch (Exception e) { - Console.WriteLine ("Unable to set value for field " + field.Name); - throw e; - } - } - type = type.BaseType; - } - while (type != typeof(object) && type != null); - } - - public void BindFields (object target) - { - BindFields (target, target.GetType ()); - } - - public void BindFields (Type type) - { - BindFields (null, type); - } - - public static Glade.XML FromStream (System.IO.Stream stream, string root, string domain) - { - return new Glade.XML (stream, root, domain); - } - - public static Glade.XML FromAssembly ( - System.Reflection.Assembly assembly, string resource_name, string root, string domain) - { - return new Glade.XML (assembly, resource_name, root, domain); - } - - public static Glade.XML FromAssembly (string resource_name, string root, string domain) - { - return new Glade.XML ( - System.Reflection.Assembly.GetCallingAssembly (), resource_name, root, domain); - } - - [DllImport ("libglade-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr glade_xml_get_widget_prefix(IntPtr raw, IntPtr name); - - public Gtk.Widget[] GetWidgetPrefix(string name) - { - IntPtr native = GLib.Marshaller.StringToPtrGStrdup (name); - IntPtr raw_ret = glade_xml_get_widget_prefix(Handle, native); - GLib.Marshaller.Free (native); - if (raw_ret == IntPtr.Zero) - return new Gtk.Widget [0]; - GLib.List list = new GLib.List (raw_ret); - Gtk.Widget[] result = new Gtk.Widget [list.Count]; - int i = 0; - foreach (Gtk.Widget w in list) - result [i++] = w; - return result; - } diff --git a/glade/glade-api-2.14.raw b/glade/glade-api-2.14.raw deleted file mode 100644 index 467027799..000000000 --- a/glade/glade-api-2.14.raw +++ /dev/null @@ -1,381 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/glade/glade-sharp-3.0.pc.in b/glade/glade-sharp-3.0.pc.in deleted file mode 100644 index 24f8c1ee5..000000000 --- a/glade/glade-sharp-3.0.pc.in +++ /dev/null @@ -1,12 +0,0 @@ -prefix=${pcfiledir}/../.. -exec_prefix=${prefix} -libdir=${exec_prefix}/lib -gapidir=${prefix}/share/gapi-3.0 - - -Name: Glade# -Description: Glade# - Glade .NET Binding -Version: @VERSION@ -Requires: gtk-sharp-3.0 -Cflags: -I:${gapidir}/glade-api.xml -Libs: -r:${libdir}/mono/@PACKAGE_VERSION@/glade-sharp.dll diff --git a/glade/glade-sharp.dll.config.in b/glade/glade-sharp.dll.config.in deleted file mode 100644 index bde08bda6..000000000 --- a/glade/glade-sharp.dll.config.in +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/glade/glue/Makefile.am b/glade/glue/Makefile.am deleted file mode 100644 index 9a995909e..000000000 --- a/glade/glue/Makefile.am +++ /dev/null @@ -1,25 +0,0 @@ -lib_LTLIBRARIES = $(TARGET) - -if ENABLE_GLADE -TARGET = libgladesharpglue-3.la -else -TARGET = -endif - -libgladesharpglue_3_la_LDFLAGS = -module -avoid-version -no-undefined - -libgladesharpglue_3_la_SOURCES = \ - gladexml.c - -nodist_libgladesharpglue_3_la_SOURCES = generated.c - -libgladesharpglue_3_la_LIBADD = $(GLADE_LIBS) - -INCLUDES = $(GLADE_CFLAGS) $(GTK_SHARP_VERSION_CFLAGS) -I$(top_srcdir) - -libgladesharpglue.dll: $(libgladesharpglue_3_la_OBJECTS) libgladesharpglue.rc libgladesharpglue.def - ./build-dll libgladesharpglue-3 $(VERSION) - -CLEANFILES = lib*.a lib*.dll - -EXTRA_DIST = win32dll.c diff --git a/glade/glue/gladexml.c b/glade/glue/gladexml.c deleted file mode 100644 index 24a68927b..000000000 --- a/glade/glue/gladexml.c +++ /dev/null @@ -1,32 +0,0 @@ -/* gladexml.c : Glue to access GladeXML fields - * - * Author: Ricardo Fernández Pascual - * - * Copyright (c) 2002 Ricardo Fernández Pascual - * - * This program is free software; you can redistribute it and/or - * modify it under the terms of version 2 of the Lesser GNU General - * Public License as published by the Free Software Foundation. - * - * This program 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, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. - */ - -#include - -const gchar * gtksharp_glade_xml_get_filename (GladeXML *gxml); - - -const gchar * -gtksharp_glade_xml_get_filename (GladeXML *gxml) -{ - return gxml->filename; -} - diff --git a/glade/glue/win32dll.c b/glade/glue/win32dll.c deleted file mode 100755 index a57c07683..000000000 --- a/glade/glue/win32dll.c +++ /dev/null @@ -1,16 +0,0 @@ -#define WIN32_LEAN_AND_MEAN -#include -#undef WIN32_LEAN_AND_MEAN -#include - -BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) -{ - return TRUE; -} - -/* -BOOL APIENTRY DllMainCRTStartup (HINSTANCE hInst, DWORD reason, LPVOID reserved) -{ - return TRUE; -} -*/ diff --git a/glib/.gitignore b/glib/.gitignore new file mode 100644 index 000000000..322d15dd6 --- /dev/null +++ b/glib/.gitignore @@ -0,0 +1 @@ +*.snk diff --git a/glib/InitiallyUnowned.cs b/glib/InitiallyUnowned.cs index 726e9ea80..fcd5e5821 100644 --- a/glib/InitiallyUnowned.cs +++ b/glib/InitiallyUnowned.cs @@ -18,8 +18,6 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. -#if GTK_SHARP_2_10 - namespace GLib { using System; @@ -40,4 +38,3 @@ namespace GLib { } } -#endif diff --git a/gtk/.gitignore b/gtk/.gitignore new file mode 100644 index 000000000..322d15dd6 --- /dev/null +++ b/gtk/.gitignore @@ -0,0 +1 @@ +*.snk diff --git a/gtk/IconView.custom b/gtk/IconView.custom index dbcc0fd48..2e4f7c4e9 100644 --- a/gtk/IconView.custom +++ b/gtk/IconView.custom @@ -18,8 +18,6 @@ // Free Software Foundation, Inc., 59 Temple Place - Suite 330, // Boston, MA 02111-1307, USA. -#if GTK_SHARP_2_8 - public void SetAttributes (CellRenderer cell, params object[] attrs) { if (attrs.Length % 2 != 0) @@ -44,5 +42,3 @@ gtk_icon_view_scroll_to_path(Handle, path == null ? IntPtr.Zero : path.Handle, true, row_align, col_align); } -#endif - diff --git a/gtk/TextBuffer.custom b/gtk/TextBuffer.custom index df74f2536..67f981bca 100644 --- a/gtk/TextBuffer.custom +++ b/gtk/TextBuffer.custom @@ -22,19 +22,6 @@ [DllImport ("libgtk-win32-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] static extern void gtk_text_buffer_set_text (IntPtr raw, IntPtr text, int len); -#if !GTK_SHARP_2_8 -public string Text { - get { - return GetText (StartIter, EndIter, false); - } - set { - IntPtr native = GLib.Marshaller.StringToPtrGStrdup (value); - gtk_text_buffer_set_text (Handle, native, -1); - GLib.Marshaller.Free (native); - } -} -#endif - public void Clear () { Gtk.TextIter start = StartIter, end = EndIter; diff --git a/gtk/gtk-api-2.14.raw b/gtk/gtk-api.raw similarity index 100% rename from gtk/gtk-api-2.14.raw rename to gtk/gtk-api.raw diff --git a/gtkdotnet/.gitignore b/gtkdotnet/.gitignore new file mode 100644 index 000000000..322d15dd6 --- /dev/null +++ b/gtkdotnet/.gitignore @@ -0,0 +1 @@ +*.snk diff --git a/gtkdotnet/Makefile.am b/gtkdotnet/Makefile.am index 4188ebb5e..b774c7782 100644 --- a/gtkdotnet/Makefile.am +++ b/gtkdotnet/Makefile.am @@ -15,7 +15,7 @@ DISTCLEANFILES = $(ASSEMBLY).config POLICY_ASSEMBLIES = $(addsuffix .$(ASSEMBLY), $(addprefix policy., $(POLICY_VERSIONS))) POLICY_CONFIGS = $(addsuffix .config, $(addprefix policy., $(POLICY_VERSIONS))) -references = ../glib/glib-sharp.dll ../pango/pango-sharp.dll ../gdk/gdk-sharp.dll +references = ../glib/glib-sharp.dll ../gio/gio-sharp.dll ../pango/pango-sharp.dll ../gdk/gdk-sharp.dll build_references = $(addprefix -r:, $(references)) -r:System.Drawing.dll sources = \ diff --git a/makefile.win32 b/makefile.win32 deleted file mode 100755 index 029066542..000000000 --- a/makefile.win32 +++ /dev/null @@ -1,2 +0,0 @@ -all: - # makefile.win32 is no longer supported. Use configure && make for the autotools build. diff --git a/pango/.gitignore b/pango/.gitignore new file mode 100644 index 000000000..322d15dd6 --- /dev/null +++ b/pango/.gitignore @@ -0,0 +1 @@ +*.snk diff --git a/pango/pango-api-2.14.raw b/pango/pango-api.raw similarity index 100% rename from pango/pango-api-2.14.raw rename to pango/pango-api.raw diff --git a/parser/.gitignore b/parser/.gitignore new file mode 100644 index 000000000..c7e41295f --- /dev/null +++ b/parser/.gitignore @@ -0,0 +1,2 @@ +gapi3-fixup +gapi3-parser diff --git a/sample/Makefile.am b/sample/Makefile.am index 19fba686c..239804708 100755 --- a/sample/Makefile.am +++ b/sample/Makefile.am @@ -6,14 +6,6 @@ else cairo_ref=-r:Mono.Cairo endif -if ENABLE_GLADE -GLADE_TARGETS=glade-viewer.exe glade-test.exe -GLADE_ASSEMBLY=../glade/glade-sharp.dll -else -GLADE_TARGETS= -GLADE_ASSEMBLY= -endif - if ENABLE_DOTNET DOTNET_TARGETS=drawing-sample.exe DOTNET_ASSEMBLY=../gtkdotnet/gtk-dotnet.dll @@ -22,7 +14,7 @@ DOTNET_TARGETS= DOTNET_ASSEMBLY= endif -TARGETS = polarfixed.exe custom-widget.exe custom-cellrenderer.exe gtk-hello-world.exe button.exe calendar.exe subclass.exe menu.exe size.exe scribble.exe scribble-xinput.exe treeviewdemo.exe managedtreeviewdemo.exe nodeviewdemo.exe treemodeldemo.exe testdnd.exe actions.exe spawn.exe assistant.exe registerprop.exe gexceptiontest.exe cairo-sample.exe native-instantiation.exe $(GLADE_TARGETS) $(DOTNET_TARGETS) +TARGETS = polarfixed.exe custom-widget.exe custom-cellrenderer.exe gtk-hello-world.exe button.exe calendar.exe subclass.exe menu.exe size.exe scribble.exe scribble-xinput.exe treeviewdemo.exe managedtreeviewdemo.exe nodeviewdemo.exe treemodeldemo.exe testdnd.exe actions.exe spawn.exe assistant.exe registerprop.exe gexceptiontest.exe cairo-sample.exe native-instantiation.exe $(DOTNET_TARGETS) DEBUGS = $(addsuffix .mdb, $(TARGETS)) @@ -32,8 +24,7 @@ assemblies = \ $(top_builddir)/pango/pango-sharp.dll \ $(top_builddir)/atk/atk-sharp.dll \ $(top_builddir)/gdk/gdk-sharp.dll \ - $(top_builddir)/gtk/gtk-sharp.dll \ - $(GLADE_ASSEMBLY) + $(top_builddir)/gtk/gtk-sharp.dll references=$(addprefix -r:, $(assemblies)) @@ -79,12 +70,6 @@ nodeviewdemo.exe: $(srcdir)/NodeViewDemo.cs $(assemblies) treemodeldemo.exe: $(srcdir)/TreeModelDemo.cs $(assemblies) $(CSC) $(CSFLAGS) -out:treemodeldemo.exe $(references) $(srcdir)/TreeModelDemo.cs -glade-viewer.exe: $(srcdir)/GladeViewer.cs $(assemblies) - $(CSC) $(CSFLAGS) -out:glade-viewer.exe $(references) $(srcdir)/GladeViewer.cs - -glade-test.exe: $(srcdir)/GladeTest.cs $(srcdir)/test.glade $(assemblies) - $(CSC) $(CSFLAGS) -resource:$(srcdir)/test.glade -out:glade-test.exe $(references) $(srcdir)/GladeTest.cs - cairo-sample.exe: $(srcdir)/CairoSample.cs $(assemblies) $(CSC) $(CSFLAGS) -out:cairo-sample.exe $(references) $(cairo_ref) $(srcdir)/CairoSample.cs diff --git a/sample/valtest/.gitignore b/sample/valtest/.gitignore new file mode 100644 index 000000000..e6ce547e8 --- /dev/null +++ b/sample/valtest/.gitignore @@ -0,0 +1 @@ +Valobj.cs