diff --git a/ChangeLog b/ChangeLog index 988886a6a..63f11b498 100644 --- a/ChangeLog +++ b/ChangeLog @@ -83,6 +83,21 @@ * sources/Gdk.metadata: Make Colormap.AllocColor GdkColor parameter be a `ref' parameter. +2003-02-27 Charles Iliya Krempeaux + + * sample/rsvg : Created place to put sample program + that uses Rsvg#. + * sample/Makefile.in : Edited it to make it "make" + the stuff in "sample/rsvg". + * sample/rsvg/Makefile.in : Added it to "make" the + Rsvg# sample program. + * sample/rsvg/svghelloworld.cs : Added it. It's + the sample Rsvg# program. + * sample/rsvg/sample.cvs : Added it. It's a + sample SVG file that the program displays. + * configure.in : Modified it so it will create + sample/rsvg/Makefile from sample/rsvg/Makefile.in. + 2003-02-27 Charles Iliya Krempeaux * sources/makefile : Updated the "make get-source-code" diff --git a/configure.in b/configure.in index a94185954..dfda03afc 100644 --- a/configure.in +++ b/configure.in @@ -129,6 +129,7 @@ gconf/tools/Makefile gst/Makefile rsvg/Makefile sample/Makefile +sample/rsvg/Makefile ]) echo "---" diff --git a/sample/Makefile.in b/sample/Makefile.in index 508d8999e..d6890ac5d 100755 --- a/sample/Makefile.in +++ b/sample/Makefile.in @@ -20,6 +20,7 @@ windows: linux: gtk-hello-world.exe button.exe subclass.exe menu.exe size.exe scribble.exe treeviewdemo.exe $(GNOME_TARGETS) $(GLADE_TARGETS) @ENABLE_GNOME_TRUE@ $(MAKE) -C gconf +@ENABLE_GNOME_TRUE@ $(MAKE) -C rsvg gtk-hello-world.exe: HelloWorld.cs $(MCS) --unsafe -o gtk-hello-world.exe $(local_paths) $(all_assemblies) HelloWorld.cs diff --git a/sample/rsvg/Makefile.in b/sample/rsvg/Makefile.in new file mode 100644 index 000000000..a9944de14 --- /dev/null +++ b/sample/rsvg/Makefile.in @@ -0,0 +1,10 @@ +all: +@ENABLE_RSVG_TRUE@ mcs svghelloworld.cs \ +@ENABLE_RSVG_TRUE@ -r ../../gnome/gnome-sharp.dll \ +@ENABLE_RSVG_TRUE@ -r ../../gtk/gtk-sharp.dll \ +@ENABLE_RSVG_TRUE@ -r ../../gdk/gdk-sharp.dll \ +@ENABLE_RSVG_TRUE@ -r ../../rsvg/rsvg-sharp.dll \ + + +clean: + rm -f *.exe diff --git a/sample/rsvg/sample.svg b/sample/rsvg/sample.svg new file mode 100644 index 000000000..4193feaff --- /dev/null +++ b/sample/rsvg/sample.svg @@ -0,0 +1,2211 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/sample/rsvg/svghelloworld.cs b/sample/rsvg/svghelloworld.cs new file mode 100644 index 000000000..bd0b093db --- /dev/null +++ b/sample/rsvg/svghelloworld.cs @@ -0,0 +1,51 @@ +// +// samples/rsvg/svghelloworkd.cs +// +// Author: Charles Iliya Krempeaux +// + + class SvgHelloWorld + { + static void Main(string[] args) + { + Gnome.Program program = + new Gnome.Program("Hello World", "1.0", Gnome.Modules.UI, args); + + MyMainWindow app = new MyMainWindow(program); + app.Show(); + + program.Run(); + } + } + + + + class MyMainWindow + : Gnome.App + { + Gnome.Program program; + + public MyMainWindow(Gnome.Program gnome_program) + : base("SVG Hello World", "SVG Hello World") + { + this.program = gnome_program; + + this.DeleteEvent += new GtkSharp.DeleteEventHandler(delete_event); + + + string svg_file_name = "sample.svg"; + Gdk.Pixbuf pixbuf = Rsvg.Tool.PixbufFromFile(svg_file_name); + + Gtk.Image image = new Gtk.Image(); + image.Pixbuf = pixbuf; + + this.Contents = image; + } + + private void delete_event(object obj, GtkSharp.DeleteEventArgs args) + { + this.program.Quit(); + } + } + +