mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2024-12-23 03:25:36 +00:00
Flatten the bootstrap and remove glade-sharp
2010-11-21 Mike Kestner <mkestner@novell.com> * 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.
This commit is contained in:
parent
cc18369e73
commit
fe2d4c311a
30
.gitignore
vendored
Normal file
30
.gitignore
vendored
Normal file
|
@ -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
|
|
@ -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 \
|
||||
|
|
1
atk/.gitignore
vendored
Normal file
1
atk/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.snk
|
114
autogen.sh
114
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
|
||||
|
|
|
@ -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."
|
|
@ -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 <<EOF
|
||||
#!/bin/sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
sed -e "s/@GTK_SHARP_VERSION@/$GTK_SHARP_VERSION/" \
|
||||
-e "s/@GTK_REQUIRED_VERSION@/$GTK_REQUIRED_VERSION/" \
|
||||
-e "s/@GLIB_REQUIRED_VERSION@/$GLIB_REQUIRED_VERSION/" \
|
||||
-e "s/@MONO_REQUIRED_VERSION@/$MONO_REQUIRED_VERSION/" \
|
||||
-e "s/@VERSIONCSDEFINES@/$VERSIONCSDEFINES/" \
|
||||
-e "s/@VERSIONCFLAGS@/$VERSIONCFLAGS/" \
|
||||
-e "s/@POLICY_VERSIONS@/$POLICY_VERSIONS/" \
|
||||
-e "s/@ASSEMBLY_VERSION@/$ASSEMBLY_VERSION/" $srcdir/configure.in.in > $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
|
|
@ -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 ""
|
1
doc/.gitignore
vendored
Normal file
1
doc/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
gtk-sharp-docs.*
|
|
@ -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")]
|
|
@ -1,94 +0,0 @@
|
|||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// 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);
|
||||
}
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
<configuration>
|
||||
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.so.0" os="!windows" />
|
||||
<dllmap dll="libgobject-2.0-0.dll" target="libgobject-2.0.0.dylib" os="osx" />
|
||||
</configuration>
|
|
@ -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
|
||||
|
1
gdk/.gitignore
vendored
Normal file
1
gdk/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.snk
|
|
@ -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
|
||||
|
||||
|
|
1
generator/.gitignore
vendored
Normal file
1
generator/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
gapi3-codegen
|
1
gio/.gitignore
vendored
Normal file
1
gio/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.snk
|
|
@ -1,9 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<metadata>
|
||||
<attr path="/api/namespace/callback[@cname='GladeXMLCustomWidgetHandler']/*/*[@type='gchar*']" name="type">const-gchar*</attr>
|
||||
<attr path="/api/namespace/class[@name='Global']/method[@name='ModuleCheckVersion']/return-type" name="type">const-gchar*</attr>
|
||||
<attr path="/api/namespace/class[@name='Global']/method[@name='SetCustomHandler']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/object[@cname='GladeXML']/method[@name='GetWidgetPrefix']" name="hidden">1</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GladeInterface']" name="opaque">false</attr>
|
||||
<attr path="/api/namespace/struct[@cname='GladeInterface']/field[@cname='toplevels']" name="access">private</attr>
|
||||
</metadata>
|
|
@ -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;
|
||||
}
|
|
@ -1,114 +0,0 @@
|
|||
// HandlerNotFoundException.cs
|
||||
//
|
||||
// Author: Ricardo Fernández Pascual <ric@users.sourceforge.net>
|
||||
//
|
||||
// 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;
|
||||
|
||||
/// <summary>
|
||||
/// Exception thrown when signal autoconnection fails.
|
||||
/// </summary>
|
||||
[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);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
// Interface.custom
|
||||
//
|
||||
// Author: Mike Kestner <mkestner@novell.com>
|
||||
//
|
||||
// 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;
|
||||
}
|
||||
}
|
|
@ -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
|
||||
|
|
@ -1,52 +0,0 @@
|
|||
// WidgetAttribute.cs
|
||||
//
|
||||
// Author: Rachel Hestilow <hestilow@ximian.com>
|
||||
//
|
||||
// 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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
436
glade/XML.custom
436
glade/XML.custom
|
@ -1,436 +0,0 @@
|
|||
// WARNING: This file is in UTF8 format due to the use of ã
|
||||
// XML.custom
|
||||
//
|
||||
// Author: Ricardo Fernández Pascual <ric@users.sourceforge.net>
|
||||
//
|
||||
// Copyright (c) 2002 Ricardo Fernández Pascual
|
||||
//
|
||||
// Field binding code by Rachel Hestilow <hestilow@ximian.com>
|
||||
// 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;
|
||||
}
|
|
@ -1,381 +0,0 @@
|
|||
<?xml version="1.0"?>
|
||||
<api parser_version="2">
|
||||
<!--
|
||||
|
||||
This file was automatically generated.
|
||||
Please DO NOT MODIFY THIS FILE, modify .metadata files instead.
|
||||
|
||||
-->
|
||||
<namespace name="Glade" library="libglade-2.0-0.dll">
|
||||
<callback name="ApplyCustomPropFunc" cname="GladeApplyCustomPropFunc">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="GladeXML*" name="xml" />
|
||||
<parameter type="GtkWidget*" name="widget" />
|
||||
<parameter type="const-gchar*" name="propname" />
|
||||
<parameter type="const-gchar*" name="value" />
|
||||
</parameters>
|
||||
</callback>
|
||||
<callback name="BuildChildrenFunc" cname="GladeBuildChildrenFunc">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="GladeXML*" name="xml" />
|
||||
<parameter type="GtkWidget*" name="parent" />
|
||||
<parameter type="GladeWidgetInfo*" name="info" />
|
||||
</parameters>
|
||||
</callback>
|
||||
<callback name="FindInternalChildFunc" cname="GladeFindInternalChildFunc">
|
||||
<return-type type="GtkWidget*" />
|
||||
<parameters>
|
||||
<parameter type="GladeXML*" name="xml" />
|
||||
<parameter type="GtkWidget*" name="parent" />
|
||||
<parameter type="const-gchar*" name="childname" />
|
||||
</parameters>
|
||||
</callback>
|
||||
<callback name="NewFunc" cname="GladeNewFunc">
|
||||
<return-type type="GtkWidget*" />
|
||||
<parameters>
|
||||
<parameter type="GladeXML*" name="xml" />
|
||||
<parameter type="GType" name="widget_type" />
|
||||
<parameter type="GladeWidgetInfo*" name="info" />
|
||||
</parameters>
|
||||
</callback>
|
||||
<callback name="XMLConnectFunc" cname="GladeXMLConnectFunc">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="const-gchar*" name="handler_name" />
|
||||
<parameter type="GObject*" name="object" />
|
||||
<parameter type="const-gchar*" name="signal_name" />
|
||||
<parameter type="const-gchar*" name="signal_data" />
|
||||
<parameter type="GObject*" name="connect_object" />
|
||||
<parameter type="gboolean" name="after" />
|
||||
<parameter type="gpointer" name="user_data" />
|
||||
</parameters>
|
||||
</callback>
|
||||
<callback name="XMLCustomWidgetHandler" cname="GladeXMLCustomWidgetHandler">
|
||||
<return-type type="GtkWidget*" />
|
||||
<parameters>
|
||||
<parameter type="GladeXML*" name="xml" />
|
||||
<parameter type="gchar*" name="func_name" />
|
||||
<parameter type="gchar*" name="name" />
|
||||
<parameter type="gchar*" name="string1" />
|
||||
<parameter type="gchar*" name="string2" />
|
||||
<parameter type="gint" name="int1" />
|
||||
<parameter type="gint" name="int2" />
|
||||
<parameter type="gpointer" name="user_data" />
|
||||
</parameters>
|
||||
</callback>
|
||||
<object name="XML" cname="GladeXML" parent="GObject">
|
||||
<class_struct cname="GladeXMLClass">
|
||||
<field name="ParentClass" cname="parent_class" type="GObjectClass" />
|
||||
<method vm="lookup_type" />
|
||||
</class_struct>
|
||||
<field name="Filename" cname="filename" type="char*" />
|
||||
<field name="Priv" cname="priv" type="GladeXMLPrivate*" />
|
||||
<virtual_method name="LookupType" cname="lookup_type">
|
||||
<return-type type="GType" />
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="gtypename" />
|
||||
</parameters>
|
||||
</virtual_method>
|
||||
<method name="BuildWidget" cname="glade_xml_build_widget">
|
||||
<return-type type="GtkWidget*" />
|
||||
<parameters>
|
||||
<parameter type="GladeWidgetInfo*" name="info" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="Construct" cname="glade_xml_construct">
|
||||
<return-type type="gboolean" />
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="fname" />
|
||||
<parameter type="const-char*" name="root" />
|
||||
<parameter type="const-char*" name="domain" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="ConstructFromBuffer" cname="glade_xml_construct_from_buffer">
|
||||
<return-type type="gboolean" />
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="buffer" />
|
||||
<parameter type="int" name="size" />
|
||||
<parameter type="const-char*" name="root" />
|
||||
<parameter type="const-char*" name="domain" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="EnsureAccel" cname="glade_xml_ensure_accel">
|
||||
<return-type type="GtkAccelGroup*" />
|
||||
</method>
|
||||
<method name="GetType" cname="glade_xml_get_type" shared="true">
|
||||
<return-type type="GType" />
|
||||
</method>
|
||||
<method name="GetWidget" cname="glade_xml_get_widget">
|
||||
<return-type type="GtkWidget*" />
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="name" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="GetWidgetPrefix" cname="glade_xml_get_widget_prefix">
|
||||
<return-type type="GList*" />
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="name" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="HandleInternalChild" cname="glade_xml_handle_internal_child">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="GtkWidget*" name="parent" />
|
||||
<parameter type="GladeChildInfo*" name="child_info" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="HandleWidgetProp" cname="glade_xml_handle_widget_prop">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="GtkWidget*" name="widget" />
|
||||
<parameter type="const-gchar*" name="prop_name" />
|
||||
<parameter type="const-gchar*" name="value_name" />
|
||||
</parameters>
|
||||
</method>
|
||||
<constructor cname="glade_xml_new">
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="fname" />
|
||||
<parameter type="const-char*" name="root" />
|
||||
<parameter type="const-char*" name="domain" />
|
||||
</parameters>
|
||||
</constructor>
|
||||
<constructor cname="glade_xml_new_from_buffer">
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="buffer" />
|
||||
<parameter type="int" name="size" />
|
||||
<parameter type="const-char*" name="root" />
|
||||
<parameter type="const-char*" name="domain" />
|
||||
</parameters>
|
||||
</constructor>
|
||||
<method name="RelativeFile" cname="glade_xml_relative_file">
|
||||
<return-type type="gchar*" />
|
||||
<parameters>
|
||||
<parameter type="const-gchar*" name="filename" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SetCommonParams" cname="glade_xml_set_common_params">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="GtkWidget*" name="widget" />
|
||||
<parameter type="GladeWidgetInfo*" name="info" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SetPackingProperty" cname="glade_xml_set_packing_property">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="GtkWidget*" name="parent" />
|
||||
<parameter type="GtkWidget*" name="child" />
|
||||
<parameter type="const-char*" name="name" />
|
||||
<parameter type="const-char*" name="value" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SetToplevel" cname="glade_xml_set_toplevel">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="GtkWindow*" name="window" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SetValueFromString" cname="glade_xml_set_value_from_string">
|
||||
<return-type type="gboolean" />
|
||||
<parameters>
|
||||
<parameter type="GParamSpec*" name="pspec" />
|
||||
<parameter type="const-gchar*" name="string" />
|
||||
<parameter type="GValue*" name="value" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SignalAutoconnect" cname="glade_xml_signal_autoconnect">
|
||||
<return-type type="void" />
|
||||
</method>
|
||||
<method name="SignalAutoconnectFull" cname="glade_xml_signal_autoconnect_full">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="GladeXMLConnectFunc" name="func" />
|
||||
<parameter type="gpointer" name="user_data" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SignalConnect" cname="glade_xml_signal_connect">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="handlername" />
|
||||
<parameter type="GCallback" name="func" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SignalConnectData" cname="glade_xml_signal_connect_data">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="const-char*" name="handlername" />
|
||||
<parameter type="GCallback" name="func" />
|
||||
<parameter type="gpointer" name="user_data" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SignalConnectFull" cname="glade_xml_signal_connect_full">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="const-gchar*" name="handler_name" />
|
||||
<parameter type="GladeXMLConnectFunc" name="func" />
|
||||
<parameter type="gpointer" name="user_data" />
|
||||
</parameters>
|
||||
</method>
|
||||
</object>
|
||||
<struct name="AccelInfo" cname="GladeAccelInfo">
|
||||
<field name="Key" cname="key" type="guint" />
|
||||
<field name="Modifiers" cname="modifiers" type="GdkModifierType" />
|
||||
<field name="Signal" cname="signal" type="gchar*" />
|
||||
</struct>
|
||||
<struct name="AtkActionInfo" cname="GladeAtkActionInfo">
|
||||
<field name="ActionName" cname="action_name" type="gchar*" />
|
||||
<field name="Description" cname="description" type="gchar*" />
|
||||
</struct>
|
||||
<struct name="AtkRelationInfo" cname="GladeAtkRelationInfo">
|
||||
<field name="Target" cname="target" type="gchar*" />
|
||||
<field name="Type" cname="type" type="gchar*" />
|
||||
</struct>
|
||||
<struct name="ChildInfo" cname="GladeChildInfo">
|
||||
<field name="Properties" cname="properties" type="GladeProperty*" />
|
||||
<field name="NProperties" cname="n_properties" type="guint" />
|
||||
<field name="Child" cname="child" type="GladeWidgetInfo*" />
|
||||
<field name="InternalChild" cname="internal_child" type="gchar*" />
|
||||
</struct>
|
||||
<struct name="Interface" cname="GladeInterface" opaque="true">
|
||||
<field name="Requires" cname="requires" type="gchar**" access="public" writeable="true" />
|
||||
<field name="NRequires" cname="n_requires" type="guint" access="public" writeable="true" />
|
||||
<field name="Toplevels" cname="toplevels" type="GladeWidgetInfo**" access="public" writeable="true" />
|
||||
<field name="NToplevels" cname="n_toplevels" type="guint" access="public" writeable="true" />
|
||||
<field name="Names" cname="names" type="GHashTable*" access="public" writeable="true" />
|
||||
<field name="Strings" cname="strings" type="GHashTable*" access="public" writeable="true" />
|
||||
<method name="Destroy" cname="glade_interface_destroy">
|
||||
<return-type type="void" />
|
||||
</method>
|
||||
<method name="Dump" cname="glade_interface_dump">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="const-gchar*" name="filename" />
|
||||
</parameters>
|
||||
</method>
|
||||
</struct>
|
||||
<struct name="Property" cname="GladeProperty">
|
||||
<field name="Name" cname="name" type="gchar*" />
|
||||
<field name="Value" cname="value" type="gchar*" />
|
||||
</struct>
|
||||
<struct name="SignalInfo" cname="GladeSignalInfo">
|
||||
<field name="Name" cname="name" type="gchar*" />
|
||||
<field name="Handler" cname="handler" type="gchar*" />
|
||||
<field name="Object" cname="object" type="gchar*" />
|
||||
<field name="After" cname="after" bits="1" type="guint" />
|
||||
</struct>
|
||||
<struct name="WidgetInfo" cname="GladeWidgetInfo">
|
||||
<field name="Parent" cname="parent" type="GladeWidgetInfo*" />
|
||||
<field name="Classname" cname="classname" type="gchar*" />
|
||||
<field name="Name" cname="name" type="gchar*" />
|
||||
<field name="Properties" cname="properties" type="GladeProperty*" />
|
||||
<field name="NProperties" cname="n_properties" type="guint" />
|
||||
<field name="AtkProps" cname="atk_props" type="GladeProperty*" />
|
||||
<field name="NAtkProps" cname="n_atk_props" type="guint" />
|
||||
<field name="Signals" cname="signals" type="GladeSignalInfo*" />
|
||||
<field name="NSignals" cname="n_signals" type="guint" />
|
||||
<field name="AtkActions" cname="atk_actions" type="GladeAtkActionInfo*" />
|
||||
<field name="NAtkActions" cname="n_atk_actions" type="guint" />
|
||||
<field name="Relations" cname="relations" type="GladeAtkRelationInfo*" />
|
||||
<field name="NRelations" cname="n_relations" type="guint" />
|
||||
<field name="Accels" cname="accels" type="GladeAccelInfo*" />
|
||||
<field name="NAccels" cname="n_accels" type="guint" />
|
||||
<field name="Children" cname="children" type="GladeChildInfo*" />
|
||||
<field name="NChildren" cname="n_children" type="guint" />
|
||||
</struct>
|
||||
<class name="Global" cname="GladeGlobal">
|
||||
<method name="EnumFromString" cname="glade_enum_from_string" shared="true">
|
||||
<return-type type="gint" />
|
||||
<parameters>
|
||||
<parameter type="GType" name="type" />
|
||||
<parameter type="const-char*" name="string" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="FlagsFromString" cname="glade_flags_from_string" shared="true">
|
||||
<return-type type="guint" />
|
||||
<parameters>
|
||||
<parameter type="GType" name="type" />
|
||||
<parameter type="const-char*" name="string" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="GetWidgetName" cname="glade_get_widget_name" shared="true">
|
||||
<return-type type="const-char*" />
|
||||
<parameters>
|
||||
<parameter type="GtkWidget*" name="widget" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="GetWidgetTree" cname="glade_get_widget_tree" shared="true">
|
||||
<return-type type="GladeXML*" />
|
||||
<parameters>
|
||||
<parameter type="GtkWidget*" name="widget" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="ModuleCheckVersion" cname="glade_module_check_version" shared="true">
|
||||
<return-type type="gchar*" />
|
||||
<parameters>
|
||||
<parameter type="gint" name="version" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="RegisterCustomProp" cname="glade_register_custom_prop" shared="true">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="GType" name="type" />
|
||||
<parameter type="const-gchar*" name="prop_name" />
|
||||
<parameter type="GladeApplyCustomPropFunc" name="apply_prop" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="RegisterWidget" cname="glade_register_widget" shared="true">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="GType" name="type" />
|
||||
<parameter type="GladeNewFunc" name="new_func" />
|
||||
<parameter type="GladeBuildChildrenFunc" name="build_children" />
|
||||
<parameter type="GladeFindInternalChildFunc" name="find_internal_child" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="SetCustomHandler" cname="glade_set_custom_handler" shared="true">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="GladeXMLCustomWidgetHandler" name="handler" />
|
||||
<parameter type="gpointer" name="user_data" />
|
||||
</parameters>
|
||||
</method>
|
||||
</class>
|
||||
<class name="Parser" cname="GladeParser_">
|
||||
<method name="ParseBuffer" cname="glade_parser_parse_buffer" shared="true">
|
||||
<return-type type="GladeInterface*" />
|
||||
<parameters>
|
||||
<parameter type="const-gchar*" name="buffer" />
|
||||
<parameter type="gint" name="len" />
|
||||
<parameter type="const-gchar*" name="domain" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="ParseFile" cname="glade_parser_parse_file" shared="true">
|
||||
<return-type type="GladeInterface*" />
|
||||
<parameters>
|
||||
<parameter type="const-gchar*" name="file" />
|
||||
<parameter type="const-gchar*" name="domain" />
|
||||
</parameters>
|
||||
</method>
|
||||
</class>
|
||||
<class name="Standard" cname="GladeStandard_">
|
||||
<method name="BuildChildren" cname="glade_standard_build_children" shared="true">
|
||||
<return-type type="void" />
|
||||
<parameters>
|
||||
<parameter type="GladeXML*" name="self" />
|
||||
<parameter type="GtkWidget*" name="parent" />
|
||||
<parameter type="GladeWidgetInfo*" name="info" />
|
||||
</parameters>
|
||||
</method>
|
||||
<method name="BuildWidget" cname="glade_standard_build_widget" shared="true">
|
||||
<return-type type="GtkWidget*" />
|
||||
<parameters>
|
||||
<parameter type="GladeXML*" name="xml" />
|
||||
<parameter type="GType" name="widget_type" />
|
||||
<parameter type="GladeWidgetInfo*" name="info" />
|
||||
</parameters>
|
||||
</method>
|
||||
</class>
|
||||
</namespace>
|
||||
</api>
|
|
@ -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
|
|
@ -1,3 +0,0 @@
|
|||
<configuration>
|
||||
<dllmap dll="libglade-2.0-0.dll" target="libglade-2.0@LIB_PREFIX@.0@LIB_SUFFIX@"/>
|
||||
</configuration>
|
|
@ -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
|
|
@ -1,32 +0,0 @@
|
|||
/* gladexml.c : Glue to access GladeXML fields
|
||||
*
|
||||
* Author: Ricardo Fernández Pascual <ric@users.sourceforge.net>
|
||||
*
|
||||
* 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 <glade/glade.h>
|
||||
|
||||
const gchar * gtksharp_glade_xml_get_filename (GladeXML *gxml);
|
||||
|
||||
|
||||
const gchar *
|
||||
gtksharp_glade_xml_get_filename (GladeXML *gxml)
|
||||
{
|
||||
return gxml->filename;
|
||||
}
|
||||
|
|
@ -1,16 +0,0 @@
|
|||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
#include <stdio.h>
|
||||
|
||||
BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/*
|
||||
BOOL APIENTRY DllMainCRTStartup (HINSTANCE hInst, DWORD reason, LPVOID reserved)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
*/
|
1
glib/.gitignore
vendored
Normal file
1
glib/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.snk
|
|
@ -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
|
||||
|
|
1
gtk/.gitignore
vendored
Normal file
1
gtk/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.snk
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
1
gtkdotnet/.gitignore
vendored
Normal file
1
gtkdotnet/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.snk
|
|
@ -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 = \
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
all:
|
||||
# makefile.win32 is no longer supported. Use configure && make for the autotools build.
|
1
pango/.gitignore
vendored
Normal file
1
pango/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
*.snk
|
2
parser/.gitignore
vendored
Normal file
2
parser/.gitignore
vendored
Normal file
|
@ -0,0 +1,2 @@
|
|||
gapi3-fixup
|
||||
gapi3-parser
|
|
@ -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
|
||||
|
||||
|
|
1
sample/valtest/.gitignore
vendored
Normal file
1
sample/valtest/.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
Valobj.cs
|
Loading…
Reference in a new issue