From 625a4481cc0ce7dbdbae5603e29321894a467ebf Mon Sep 17 00:00:00 2001 From: John Luke Date: Sat, 17 Jan 2004 22:47:35 +0000 Subject: [PATCH] 2004-01-17 John Luke * configure.in: detect and compile vte-sharp (require vte-0.11.10) * vte/*: * sources/makefile: * sources/gtk-sharp-sources.xml: add vte * samples/VteTest.cs: add incomplete test/sample * samples/Makefile.in: add vte-test.exe target svn path=/trunk/gtk-sharp/; revision=22213 --- ChangeLog | 9 + configure.in | 10 + sample/Makefile.in | 13 +- sample/VteTest.cs | 51 ++++ vte/.cvsignore | 4 + vte/Makefile.in | 41 +++ vte/Vte.metadata | 3 + vte/vte-api.xml | 644 +++++++++++++++++++++++++++++++++++++++++++++ 8 files changed, 772 insertions(+), 3 deletions(-) create mode 100644 sample/VteTest.cs create mode 100644 vte/.cvsignore create mode 100644 vte/Makefile.in create mode 100644 vte/Vte.metadata create mode 100644 vte/vte-api.xml diff --git a/ChangeLog b/ChangeLog index a91c6ff14..334dd3bc3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-01-17 John Luke + + * configure.in: detect and compile vte-sharp (require vte-0.11.10) + * vte/*: + * sources/makefile: + * sources/gtk-sharp-sources.xml: add vte + * samples/VteTest.cs: add incomplete test/sample + * samples/Makefile.in: add vte-test.exe target + 2004-01-15 Martin Willemoes Hansen * generator/Method.cs: Methods which returns void and has a single out parameter diff --git a/configure.in b/configure.in index bab3a037a..c25f97f84 100644 --- a/configure.in +++ b/configure.in @@ -106,6 +106,13 @@ if test "x$enable_gtkhtml" = "xyes"; then BASE_DEPENDENCIES_LIBS="$BASE_DEPENDENCIES_LIBS $GTKHTML_DEPENDENCIES_LIBS" fi +VTE_REQUIRED_VERSION=0.11.10 +PKG_CHECK_MODULES(VTE_DEPENDENCIES, vte >= $VTE_REQUIRED_VERSION, enable_vte=yes, enable_vte=no) +if test "x$enable_vte" = "xyes"; then + BASE_DEPENDENCIES_CFLAGS="$BASE_DEPENDENCIES_CFLAGS $VTE_DEPENDENCIES_CFLAGS" + BASE_DEPENDENCIES_LIBS="$BASE_DEPENDENCIES_LIBS $VTE_DEPENDENCIES_LIBS" +fi + AC_SUBST(BASE_DEPENDENCIES_CFLAGS) AC_SUBST(BASE_DEPENDENCIES_LIBS) @@ -115,6 +122,7 @@ AM_CONDITIONAL(ENABLE_GDA, test "x$enable_gda" = "xyes") AM_CONDITIONAL(ENABLE_GNOMEDB, test "x$enable_gnomedb" = "xyes") AM_CONDITIONAL(ENABLE_RSVG, test "x$enable_rsvg" = "xyes") AM_CONDITIONAL(ENABLE_GTKHTML, test "x$enable_gtkhtml" = "xyes") +AM_CONDITIONAL(ENABLE_VTE, test "x$enable_vte" = "xyes") AC_SUBST(CFLAGS) @@ -141,6 +149,7 @@ gconf/tools/Makefile gst/Makefile gtkhtml/Makefile rsvg/Makefile +vte/Makefile sample/Makefile sample/rsvg/Makefile gtk-sharp.pc @@ -162,6 +171,7 @@ echo " * gda-sharp.dll: $enable_gda" echo " * gnomedb-sharp.dll: $enable_gnomedb" echo " * rsvg-sharp.dll: $enable_rsvg " echo " * gtkhtml-sharp.dll: $enable_gtkhtml " +echo " * vte-sharp.dll: $enable_vte " echo "" echo " NOTE: if any of the above say 'no' you may install the" echo " corresponding development packages for them, rerun" diff --git a/sample/Makefile.in b/sample/Makefile.in index f9eeecce9..179e14eaa 100755 --- a/sample/Makefile.in +++ b/sample/Makefile.in @@ -8,8 +8,12 @@ MCS=mcs @ENABLE_GLADE_TRUE@ GLADE_ASSEMBLY=-r glade-sharp.dll @ENABLE_GLADE_TRUE@ GLADE_TARGETS=glade-viewer.exe glade-test.exe -local_paths=-L ../glib -L ../pango -L ../atk -L ../gdk -L ../gtk $(GNOME_PATH) $(GLADE_PATH) -all_assemblies=-r glib-sharp.dll -r pango-sharp.dll -r atk-sharp.dll -r gdk-sharp.dll -r gtk-sharp.dll $(GNOME_ASSEMBLY) $(GLADE_ASSEMBLY) -r System.Drawing +@ENABLE_VTE_TRUE@ VTE_PATH=-L ../vte +@ENABLE_VTE_TRUE@ VTE_ASSEMBLY=-r vte-sharp.dll +@ENABLE_VTE_TRUE@ VTE_TARGETS=vte-example.exe + +local_paths=-L ../glib -L ../pango -L ../atk -L ../gdk -L ../gtk $(GNOME_PATH) $(GLADE_PATH) $(VTE_PATH) +all_assemblies=-r glib-sharp.dll -r pango-sharp.dll -r atk-sharp.dll -r gdk-sharp.dll -r gtk-sharp.dll $(GNOME_ASSEMBLY) $(GLADE_ASSEMBLY) $(VTE_ASSEMBLY) -r System.Drawing all: linux @@ -18,7 +22,7 @@ windows: $(CSC) /unsafe /out:gtk-hello-world.exe /r:../glib/glib-sharp.dll /r:../gtk/gtk-sharp.dll /r:../gdk/gdk-sharp.dll HelloWorld.cs $(CSC) /unsafe /out:button.exe /r:../glib/glib-sharp.dll /r:../gtk/gtk-sharp.dll ButtonApp.cs -linux: gtk-hello-world.exe button.exe calendar.exe subclass.exe menu.exe size.exe scribble.exe treeviewdemo.exe managedtreeviewdemo.exe testdnd.exe $(GNOME_TARGETS) $(GLADE_TARGETS) +linux: gtk-hello-world.exe button.exe calendar.exe subclass.exe menu.exe size.exe scribble.exe treeviewdemo.exe managedtreeviewdemo.exe testdnd.exe $(GNOME_TARGETS) $(GLADE_TARGETS) $(VTE_TARGETS) @ENABLE_GNOME_TRUE@ $(MAKE) -C gconf @ENABLE_GNOME_TRUE@ $(MAKE) -C rsvg @@ -70,6 +74,9 @@ glade-test.exe: GladeTest.cs test.glade testdnd.exe: TestDnd.cs $(MCS) -g --unsafe -o testdnd.exe $(local_paths) $(all_assemblies) TestDnd.cs +vte-example.exe: VteTest.cs + $(MCS) -g --unsafe -o vte-example.exe $(local_paths) $(all_assemblies) VteTest.cs + clean: rm -f *.exe @ENABLE_GNOME_TRUE@ $(MAKE) -C gconf clean diff --git a/sample/VteTest.cs b/sample/VteTest.cs new file mode 100644 index 000000000..e6bf354e8 --- /dev/null +++ b/sample/VteTest.cs @@ -0,0 +1,51 @@ +using System; +using Gtk; +using GtkSharp; +using Gnome; +using GnomeSharp; +using Vte; +using VteSharp; + +class T +{ + Program program; + + static void Main (string[] args) + { + new T (args); + } + + T (string[] args) + { + program = new Program ("test", "0.0", Modules.UI, args); + App app = new App ("test", "Test for vte widget"); + app.SetDefaultSize (600, 450); + app.DeleteEvent += new DeleteEventHandler (OnAppDelete); + + ScrolledWindow sw = new ScrolledWindow (); + Terminal term = new Terminal (); + term.CursorBlinks = true; + term.ScrollOnOutput = true; + //term.BackgroundTransparent = true; + term.Encoding = "UTF-8"; + + Console.WriteLine (term.UsingXft); + Console.WriteLine (term.Encoding); + Console.WriteLine (term.StatusLine); + + sw.AddWithViewport (term); + + app.Contents = sw; + app.ShowAll (); + program.Run (); + } + + private void OnTextInserted (object o, EventArgs args) + { + } + + private void OnAppDelete (object o, DeleteEventArgs args) + { + program.Quit (); + } +} diff --git a/vte/.cvsignore b/vte/.cvsignore new file mode 100644 index 000000000..05f4a1b59 --- /dev/null +++ b/vte/.cvsignore @@ -0,0 +1,4 @@ +vte-sharp.dll +generated +generated-stamp +Makefile diff --git a/vte/Makefile.in b/vte/Makefile.in new file mode 100644 index 000000000..320f56840 --- /dev/null +++ b/vte/Makefile.in @@ -0,0 +1,41 @@ +APIS = vte-api.xml + +INCLUDE_APIS = \ + ../gdk/gdk-api.xml \ + ../gtk/gtk-api.xml \ + ../atk/atk-api.xml + +RUNTIME=mono +MCS=mcs +ASSEMBLY=vte-sharp.dll + +@ENABLE_VTE_TRUE@ all: $(ASSEMBLY) +@ENABLE_VTE_FALSE@ all: + +generated-stamp: vte-api.xml + gapi-fixup --api=$(APIS) --metadata=Vte.metadata && \ + gapi-codegen --generate $(APIS) --include $(INCLUDE_APIS) --outdir=generated --customdir=. --assembly-name=vte-sharp && touch generated-stamp + +vte-sharp.dll: generated-stamp + $(MCS) --unsafe --target library -L $(GTKSHARP_PREFIX)/lib \ + -r glib-sharp.dll -r gtk-sharp.dll -r gdk-sharp.dll \ + /r:atk-sharp.dll \ + --recurse '@srcdir@/*.cs' -o vte-sharp.dll + +clean: + rm -f $(ASSEMBLY) + rm -f generated-stamp + rm -rf generated + +prefix=@prefix@ +DESTDIR= +apidir=$(DESTDIR)$(prefix)/share/gapi +libdir=$(DESTDIR)$(prefix)/lib + +install: all +@ENABLE_VTE_TRUE@ ../mkinstalldirs $(libdir) && \ +@ENABLE_VTE_TRUE@ ../mkinstalldirs $(apidir) && \ +@ENABLE_VTE_TRUE@ for i in $(APIS); do \ +@ENABLE_VTE_TRUE@ cp $$i $(apidir) || true; \ +@ENABLE_VTE_TRUE@ done && \ +@ENABLE_VTE_TRUE@ cp $(ASSEMBLY) $(libdir) diff --git a/vte/Vte.metadata b/vte/Vte.metadata new file mode 100644 index 000000000..2004dbfad --- /dev/null +++ b/vte/Vte.metadata @@ -0,0 +1,3 @@ + + 1 + diff --git a/vte/vte-api.xml b/vte/vte-api.xml new file mode 100644 index 000000000..b238a6cd4 --- /dev/null +++ b/vte/vte-api.xml @@ -0,0 +1,644 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +