git-svn-id: file:///srv/caca.zoy.org/var/lib/svn/libpipi/trunk@2874 92316355-f0b4-4df1-b90c-862c8a59935fremotes/tiles
| @@ -50,4 +50,12 @@ public partial class MainWindow: Gtk.Window | |||||
| { | { | ||||
| Application.Quit (); | Application.Quit (); | ||||
| } | } | ||||
| protected virtual void OnSaveAsActionActivated (object sender, System.EventArgs e) | |||||
| { | |||||
| ThePimp.SaveFile save = new ThePimp.SaveFile(); | |||||
| ThePimp.PictureView view = notebook1.CurrentPageWidget as ThePimp.PictureView; | |||||
| save.Save(view.Picture); | |||||
| save.Destroy(); | |||||
| } | |||||
| } | } | ||||
| @@ -7,6 +7,8 @@ pimp_sources = \ | |||||
| $(srcdir)/gtk-gui/generated.cs \ | $(srcdir)/gtk-gui/generated.cs \ | ||||
| $(srcdir)/OpenFile.cs \ | $(srcdir)/OpenFile.cs \ | ||||
| $(srcdir)/gtk-gui/ThePimp.OpenFile.cs \ | $(srcdir)/gtk-gui/ThePimp.OpenFile.cs \ | ||||
| $(srcdir)/SaveFile.cs \ | |||||
| $(srcdir)/gtk-gui/ThePimp.SaveFile.cs \ | |||||
| $(srcdir)/MainWindow.cs \ | $(srcdir)/MainWindow.cs \ | ||||
| $(srcdir)/gtk-gui/MainWindow.cs | $(srcdir)/gtk-gui/MainWindow.cs | ||||
| @@ -19,10 +21,11 @@ EXTRA_DIST = $(pimp_sources) | |||||
| Pimp.exe: $(pimp_sources) | Pimp.exe: $(pimp_sources) | ||||
| cp ../pipi-sharp/pipi-sharp.dll . | cp ../pipi-sharp/pipi-sharp.dll . | ||||
| cp ../pipi-sharp/pipi-sharp.dll.config . | cp ../pipi-sharp/pipi-sharp.dll.config . | ||||
| gmcs $(pimp_sources) -out:$@ -lib:./ \ | |||||
| cp ../pipi-sharp/pipi-sharp.dll.mdb . | |||||
| gmcs -debug $(pimp_sources) -out:$@ -lib:./ \ | |||||
| -pkg:gtk-sharp-2.0 -r:Mono.Posix -r:pipi-sharp.dll | -pkg:gtk-sharp-2.0 -r:Mono.Posix -r:pipi-sharp.dll | ||||
| clean-local: | clean-local: | ||||
| rm -f pipi-sharp.dll pipi-sharp.dll.config | |||||
| rm -f pipi-sharp.dll.config | |||||
| rm -f *.exe *.dll *.mdb | rm -f *.exe *.dll *.mdb | ||||
| @@ -21,7 +21,6 @@ namespace ThePimp | |||||
| public class PictureArea : Gtk.DrawingArea | public class PictureArea : Gtk.DrawingArea | ||||
| { | { | ||||
| private Pipi.Picture _p; | private Pipi.Picture _p; | ||||
| private Pango.Layout _l; | |||||
| private Adjustment _hadj = null, _vadj = null; | private Adjustment _hadj = null, _vadj = null; | ||||
| void HAdjust(object sender, EventArgs args) | void HAdjust(object sender, EventArgs args) | ||||
| @@ -119,10 +118,13 @@ namespace ThePimp | |||||
| } | } | ||||
| } | } | ||||
| public class PictureView : Gtk.ScrolledWindow | |||||
| public partial class PictureView : Gtk.ScrolledWindow | |||||
| { | { | ||||
| public readonly Picture Picture; | |||||
| public PictureView(Picture p) | public PictureView(Picture p) | ||||
| { | { | ||||
| Picture = p; | |||||
| Add(new PictureArea(p)); | Add(new PictureArea(p)); | ||||
| ShowAll(); | ShowAll(); | ||||
| } | } | ||||
| @@ -0,0 +1,36 @@ | |||||
| // | |||||
| // The Pimp The Pathetic Image Manipulation Program | |||||
| // Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org> | |||||
| // All Rights Reserved | |||||
| // | |||||
| // $Id$ | |||||
| // | |||||
| // This library is free software. It comes without any warranty, to | |||||
| // the extent permitted by applicable law. You can redistribute it | |||||
| // and/or modify it under the terms of the Do What The Fuck You Want | |||||
| // To Public License, Version 2, as published by Sam Hocevar. See | |||||
| // http://sam.zoy.org/wtfpl/COPYING for more details. | |||||
| // | |||||
| using System; | |||||
| using Gtk; | |||||
| namespace ThePimp | |||||
| { | |||||
| public partial class SaveFile : Gtk.Dialog | |||||
| { | |||||
| public SaveFile() | |||||
| { | |||||
| this.Build(); | |||||
| } | |||||
| public void Save(Pipi.Picture p) | |||||
| { | |||||
| ResponseType rsp = (ResponseType)Run(); | |||||
| Hide(); | |||||
| if(rsp != ResponseType.Ok) | |||||
| return; | |||||
| p.Save(filechooserwidget1.Filename); | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -3,6 +3,7 @@ | |||||
| <Configuration name="Debug" ctype="DotNetProjectConfiguration"> | <Configuration name="Debug" ctype="DotNetProjectConfiguration"> | ||||
| <CustomCommands> | <CustomCommands> | ||||
| <Command type="AfterBuild" command="cp ${CombineDir}/pipi-sharp/pipi-sharp.dll.config ${TargetDir}" workingdir="" /> | <Command type="AfterBuild" command="cp ${CombineDir}/pipi-sharp/pipi-sharp.dll.config ${TargetDir}" workingdir="" /> | ||||
| <Command type="AfterBuild" command="cp ${CombineDir}/pipi-sharp/pipi-sharp.mdb ${TargetDir}" /> | |||||
| </CustomCommands> | </CustomCommands> | ||||
| <Output directory="." assemblyKeyFile="." assembly="Pimp" /> | <Output directory="." assemblyKeyFile="." assembly="Pimp" /> | ||||
| <Build debugmode="True" target="Exe" /> | <Build debugmode="True" target="Exe" /> | ||||
| @@ -12,6 +13,7 @@ | |||||
| <Configuration name="Release" ctype="DotNetProjectConfiguration"> | <Configuration name="Release" ctype="DotNetProjectConfiguration"> | ||||
| <CustomCommands> | <CustomCommands> | ||||
| <Command type="AfterBuild" command="cp ${CombineDir}/pipi-sharp/pipi-sharp.dll.config ${TargetDir}" /> | <Command type="AfterBuild" command="cp ${CombineDir}/pipi-sharp/pipi-sharp.dll.config ${TargetDir}" /> | ||||
| <Command type="AfterBuild" command="cp ${CombineDir}/pipi-sharp/pipi-sharp.mdb ${TargetDir}" /> | |||||
| </CustomCommands> | </CustomCommands> | ||||
| <Output directory="." assemblyKeyFile="." assembly="Pimp" /> | <Output directory="." assemblyKeyFile="." assembly="Pimp" /> | ||||
| <Build debugmode="False" target="Exe" /> | <Build debugmode="False" target="Exe" /> | ||||
| @@ -33,6 +35,9 @@ | |||||
| <File name="gtk-gui/ThePimp.OpenFile.cs" subtype="Code" buildaction="Compile" /> | <File name="gtk-gui/ThePimp.OpenFile.cs" subtype="Code" buildaction="Compile" /> | ||||
| <File name="ToolBox.cs" subtype="Code" buildaction="Compile" /> | <File name="ToolBox.cs" subtype="Code" buildaction="Compile" /> | ||||
| <File name="gtk-gui/ThePimp.ToolBox.cs" subtype="Code" buildaction="Compile" /> | <File name="gtk-gui/ThePimp.ToolBox.cs" subtype="Code" buildaction="Compile" /> | ||||
| <File name="gtk-gui/ThePimp.PictureView.cs" subtype="Code" buildaction="Compile" /> | |||||
| <File name="SaveFile.cs" subtype="Code" buildaction="Compile" /> | |||||
| <File name="gtk-gui/ThePimp.SaveFile.cs" subtype="Code" buildaction="Compile" /> | |||||
| </Contents> | </Contents> | ||||
| <References> | <References> | ||||
| <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | <ProjectReference type="Gac" localcopy="True" refto="gtk-sharp, Version=2.12.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" /> | ||||
| @@ -1,18 +1,23 @@ | |||||
| // ToolBox.cs created with MonoDevelop | |||||
| // User: sam at 12:31 05/10/2008 | |||||
| // | // | ||||
| // To change standard headers go to Edit->Preferences->Coding->Standard Headers | |||||
| // The Pimp The Pathetic Image Manipulation Program | |||||
| // Copyright (c) 2004-2008 Sam Hocevar <sam@zoy.org> | |||||
| // All Rights Reserved | |||||
| // | |||||
| // $Id$ | |||||
| // | |||||
| // This library is free software. It comes without any warranty, to | |||||
| // the extent permitted by applicable law. You can redistribute it | |||||
| // and/or modify it under the terms of the Do What The Fuck You Want | |||||
| // To Public License, Version 2, as published by Sam Hocevar. See | |||||
| // http://sam.zoy.org/wtfpl/COPYING for more details. | |||||
| // | // | ||||
| using System; | using System; | ||||
| namespace ThePimp | namespace ThePimp | ||||
| { | { | ||||
| public partial class ToolBox : Gtk.Bin | public partial class ToolBox : Gtk.Bin | ||||
| { | { | ||||
| public ToolBox() | public ToolBox() | ||||
| { | { | ||||
| this.Build(); | this.Build(); | ||||
| @@ -68,6 +68,8 @@ public partial class MainWindow { | |||||
| private Gtk.Action helpAction; | private Gtk.Action helpAction; | ||||
| private Gtk.Action saveAsAction; | |||||
| private Gtk.VBox vbox1; | private Gtk.VBox vbox1; | ||||
| private Gtk.MenuBar menubar1; | private Gtk.MenuBar menubar1; | ||||
| @@ -129,7 +131,6 @@ public partial class MainWindow { | |||||
| this.SaveAction.ShortLabel = Mono.Unix.Catalog.GetString("_Save"); | this.SaveAction.ShortLabel = Mono.Unix.Catalog.GetString("_Save"); | ||||
| w2.Add(this.SaveAction, null); | w2.Add(this.SaveAction, null); | ||||
| this.SaveAsAction = new Gtk.Action("SaveAsAction", Mono.Unix.Catalog.GetString("Save _As"), null, "gtk-save-as"); | this.SaveAsAction = new Gtk.Action("SaveAsAction", Mono.Unix.Catalog.GetString("Save _As"), null, "gtk-save-as"); | ||||
| this.SaveAsAction.Sensitive = false; | |||||
| this.SaveAsAction.ShortLabel = Mono.Unix.Catalog.GetString("Save _As"); | this.SaveAsAction.ShortLabel = Mono.Unix.Catalog.GetString("Save _As"); | ||||
| w2.Add(this.SaveAsAction, null); | w2.Add(this.SaveAsAction, null); | ||||
| this.QuitAction = new Gtk.Action("QuitAction", Mono.Unix.Catalog.GetString("_Quit"), null, "gtk-quit"); | this.QuitAction = new Gtk.Action("QuitAction", Mono.Unix.Catalog.GetString("_Quit"), null, "gtk-quit"); | ||||
| @@ -188,6 +189,8 @@ public partial class MainWindow { | |||||
| this.helpAction = new Gtk.Action("helpAction", null, null, "gtk-help"); | this.helpAction = new Gtk.Action("helpAction", null, null, "gtk-help"); | ||||
| this.helpAction.Sensitive = false; | this.helpAction.Sensitive = false; | ||||
| w2.Add(this.helpAction, null); | w2.Add(this.helpAction, null); | ||||
| this.saveAsAction = new Gtk.Action("saveAsAction", null, null, "gtk-save-as"); | |||||
| w2.Add(this.saveAsAction, null); | |||||
| w1.InsertActionGroup(w2, 0); | w1.InsertActionGroup(w2, 0); | ||||
| this.AddAccelGroup(w1.AccelGroup); | this.AddAccelGroup(w1.AccelGroup); | ||||
| this.Name = "MainWindow"; | this.Name = "MainWindow"; | ||||
| @@ -207,7 +210,7 @@ public partial class MainWindow { | |||||
| w3.Expand = false; | w3.Expand = false; | ||||
| w3.Fill = false; | w3.Fill = false; | ||||
| // Container child vbox1.Gtk.Box+BoxChild | // Container child vbox1.Gtk.Box+BoxChild | ||||
| w1.AddUiFromString("<ui><toolbar name='toolbar1'><toolitem action='newAction'/><toolitem action='openAction'/><toolitem action='saveAction'/><separator/><toolitem action='undoAction'/><toolitem action='redoAction'/><separator/><toolitem action='zoomInAction'/><toolitem action='zoomOutAction'/><toolitem action='zoomFitAction'/><toolitem action='zoom100Action'/><separator/><toolitem action='helpAction'/></toolbar></ui>"); | |||||
| w1.AddUiFromString("<ui><toolbar name='toolbar1'><toolitem action='newAction'/><toolitem action='openAction'/><toolitem action='saveAction'/><toolitem action='saveAsAction'/><separator/><toolitem action='undoAction'/><toolitem action='redoAction'/><separator/><toolitem action='zoomInAction'/><toolitem action='zoomOutAction'/><toolitem action='zoomFitAction'/><toolitem action='zoom100Action'/><separator/><toolitem action='helpAction'/></toolbar></ui>"); | |||||
| this.toolbar1 = ((Gtk.Toolbar)(w1.GetWidget("/toolbar1"))); | this.toolbar1 = ((Gtk.Toolbar)(w1.GetWidget("/toolbar1"))); | ||||
| this.toolbar1.Name = "toolbar1"; | this.toolbar1.Name = "toolbar1"; | ||||
| this.toolbar1.ShowArrow = false; | this.toolbar1.ShowArrow = false; | ||||
| @@ -292,5 +295,6 @@ public partial class MainWindow { | |||||
| this.openAction.Activated += new System.EventHandler(this.OnOpenActionActivated); | this.openAction.Activated += new System.EventHandler(this.OnOpenActionActivated); | ||||
| this.OpenAction.Activated += new System.EventHandler(this.OnOpenActionActivated); | this.OpenAction.Activated += new System.EventHandler(this.OnOpenActionActivated); | ||||
| this.QuitAction.Activated += new System.EventHandler(this.OnQuitActionActivated); | this.QuitAction.Activated += new System.EventHandler(this.OnQuitActionActivated); | ||||
| this.saveAsAction.Activated += new System.EventHandler(this.OnSaveAsActionActivated); | |||||
| } | } | ||||
| } | } | ||||
| @@ -0,0 +1,27 @@ | |||||
| // ------------------------------------------------------------------------------ | |||||
| // <autogenerated> | |||||
| // This code was generated by a tool. | |||||
| // Mono Runtime Version: 2.0.50727.42 | |||||
| // | |||||
| // Changes to this file may cause incorrect behavior and will be lost if | |||||
| // the code is regenerated. | |||||
| // </autogenerated> | |||||
| // ------------------------------------------------------------------------------ | |||||
| namespace ThePimp { | |||||
| public partial class PictureView { | |||||
| protected virtual void Build() { | |||||
| Stetic.Gui.Initialize(this); | |||||
| // Widget ThePimp.PictureView | |||||
| Stetic.BinContainer.Attach(this); | |||||
| this.Name = "ThePimp.PictureView"; | |||||
| if ((this.Child != null)) { | |||||
| this.Child.ShowAll(); | |||||
| } | |||||
| this.Show(); | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -0,0 +1,77 @@ | |||||
| // ------------------------------------------------------------------------------ | |||||
| // <autogenerated> | |||||
| // This code was generated by a tool. | |||||
| // Mono Runtime Version: 2.0.50727.42 | |||||
| // | |||||
| // Changes to this file may cause incorrect behavior and will be lost if | |||||
| // the code is regenerated. | |||||
| // </autogenerated> | |||||
| // ------------------------------------------------------------------------------ | |||||
| namespace ThePimp { | |||||
| public partial class SaveFile { | |||||
| private Gtk.FileChooserWidget filechooserwidget1; | |||||
| private Gtk.Button buttonCancel; | |||||
| private Gtk.Button buttonOk; | |||||
| protected virtual void Build() { | |||||
| Stetic.Gui.Initialize(this); | |||||
| // Widget ThePimp.SaveFile | |||||
| this.Name = "ThePimp.SaveFile"; | |||||
| this.WindowPosition = ((Gtk.WindowPosition)(4)); | |||||
| this.HasSeparator = false; | |||||
| // Internal child ThePimp.SaveFile.VBox | |||||
| Gtk.VBox w1 = this.VBox; | |||||
| w1.Name = "dialog1_VBox"; | |||||
| w1.BorderWidth = ((uint)(2)); | |||||
| // Container child dialog1_VBox.Gtk.Box+BoxChild | |||||
| this.filechooserwidget1 = new Gtk.FileChooserWidget(((Gtk.FileChooserAction)(0))); | |||||
| this.filechooserwidget1.Name = "filechooserwidget1"; | |||||
| w1.Add(this.filechooserwidget1); | |||||
| Gtk.Box.BoxChild w2 = ((Gtk.Box.BoxChild)(w1[this.filechooserwidget1])); | |||||
| w2.Position = 0; | |||||
| // Internal child ThePimp.SaveFile.ActionArea | |||||
| Gtk.HButtonBox w3 = this.ActionArea; | |||||
| w3.Name = "dialog1_ActionArea"; | |||||
| w3.Spacing = 6; | |||||
| w3.BorderWidth = ((uint)(5)); | |||||
| w3.LayoutStyle = ((Gtk.ButtonBoxStyle)(4)); | |||||
| // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild | |||||
| this.buttonCancel = new Gtk.Button(); | |||||
| this.buttonCancel.CanDefault = true; | |||||
| this.buttonCancel.CanFocus = true; | |||||
| this.buttonCancel.Name = "buttonCancel"; | |||||
| this.buttonCancel.UseStock = true; | |||||
| this.buttonCancel.UseUnderline = true; | |||||
| this.buttonCancel.Label = "gtk-cancel"; | |||||
| this.AddActionWidget(this.buttonCancel, -6); | |||||
| Gtk.ButtonBox.ButtonBoxChild w4 = ((Gtk.ButtonBox.ButtonBoxChild)(w3[this.buttonCancel])); | |||||
| w4.Expand = false; | |||||
| w4.Fill = false; | |||||
| // Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild | |||||
| this.buttonOk = new Gtk.Button(); | |||||
| this.buttonOk.CanDefault = true; | |||||
| this.buttonOk.CanFocus = true; | |||||
| this.buttonOk.Name = "buttonOk"; | |||||
| this.buttonOk.UseStock = true; | |||||
| this.buttonOk.UseUnderline = true; | |||||
| this.buttonOk.Label = "gtk-ok"; | |||||
| this.AddActionWidget(this.buttonOk, -5); | |||||
| Gtk.ButtonBox.ButtonBoxChild w5 = ((Gtk.ButtonBox.ButtonBoxChild)(w3[this.buttonOk])); | |||||
| w5.Position = 1; | |||||
| w5.Expand = false; | |||||
| w5.Fill = false; | |||||
| if ((this.Child != null)) { | |||||
| this.Child.ShowAll(); | |||||
| } | |||||
| this.DefaultWidth = 400; | |||||
| this.DefaultHeight = 300; | |||||
| this.Show(); | |||||
| } | |||||
| } | |||||
| } | |||||
| @@ -13,11 +13,205 @@ namespace ThePimp { | |||||
| public partial class ToolBox { | public partial class ToolBox { | ||||
| private Gtk.Table table1; | |||||
| private Gtk.Button button10; | |||||
| private Gtk.Image image5; | |||||
| private Gtk.Button button11; | |||||
| private Gtk.Image image6; | |||||
| private Gtk.Button button12; | |||||
| private Gtk.Image image9; | |||||
| private Gtk.Button button13; | |||||
| private Gtk.Image image8; | |||||
| private Gtk.Button button5; | |||||
| private Gtk.Image image1; | |||||
| private Gtk.Button button6; | |||||
| private Gtk.Image image7; | |||||
| private Gtk.Button button7; | |||||
| private Gtk.Image image3; | |||||
| private Gtk.Button button8; | |||||
| private Gtk.Image image2; | |||||
| private Gtk.Button button9; | |||||
| private Gtk.Image image4; | |||||
| protected virtual void Build() { | protected virtual void Build() { | ||||
| Stetic.Gui.Initialize(this); | Stetic.Gui.Initialize(this); | ||||
| // Widget ThePimp.ToolBox | // Widget ThePimp.ToolBox | ||||
| Stetic.BinContainer.Attach(this); | Stetic.BinContainer.Attach(this); | ||||
| this.Name = "ThePimp.ToolBox"; | this.Name = "ThePimp.ToolBox"; | ||||
| // Container child ThePimp.ToolBox.Gtk.Container+ContainerChild | |||||
| this.table1 = new Gtk.Table(((uint)(3)), ((uint)(3)), false); | |||||
| this.table1.Name = "table1"; | |||||
| this.table1.RowSpacing = ((uint)(6)); | |||||
| this.table1.ColumnSpacing = ((uint)(6)); | |||||
| // Container child table1.Gtk.Table+TableChild | |||||
| this.button10 = new Gtk.Button(); | |||||
| this.button10.CanFocus = true; | |||||
| this.button10.Name = "button10"; | |||||
| // Container child button10.Gtk.Container+ContainerChild | |||||
| this.image5 = new Gtk.Image(); | |||||
| this.image5.Name = "image5"; | |||||
| this.image5.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-rectangle", Gtk.IconSize.Menu, 16); | |||||
| this.button10.Add(this.image5); | |||||
| this.button10.Label = null; | |||||
| this.table1.Add(this.button10); | |||||
| Gtk.Table.TableChild w2 = ((Gtk.Table.TableChild)(this.table1[this.button10])); | |||||
| w2.TopAttach = ((uint)(1)); | |||||
| w2.BottomAttach = ((uint)(2)); | |||||
| w2.LeftAttach = ((uint)(1)); | |||||
| w2.RightAttach = ((uint)(2)); | |||||
| w2.XOptions = ((Gtk.AttachOptions)(4)); | |||||
| w2.YOptions = ((Gtk.AttachOptions)(4)); | |||||
| // Container child table1.Gtk.Table+TableChild | |||||
| this.button11 = new Gtk.Button(); | |||||
| this.button11.CanFocus = true; | |||||
| this.button11.Name = "button11"; | |||||
| // Container child button11.Gtk.Container+ContainerChild | |||||
| this.image6 = new Gtk.Image(); | |||||
| this.image6.Name = "image6"; | |||||
| this.image6.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-ellipse", Gtk.IconSize.Menu, 16); | |||||
| this.button11.Add(this.image6); | |||||
| this.button11.Label = null; | |||||
| this.table1.Add(this.button11); | |||||
| Gtk.Table.TableChild w4 = ((Gtk.Table.TableChild)(this.table1[this.button11])); | |||||
| w4.TopAttach = ((uint)(1)); | |||||
| w4.BottomAttach = ((uint)(2)); | |||||
| w4.LeftAttach = ((uint)(2)); | |||||
| w4.RightAttach = ((uint)(3)); | |||||
| w4.XOptions = ((Gtk.AttachOptions)(4)); | |||||
| w4.YOptions = ((Gtk.AttachOptions)(4)); | |||||
| // Container child table1.Gtk.Table+TableChild | |||||
| this.button12 = new Gtk.Button(); | |||||
| this.button12.CanFocus = true; | |||||
| this.button12.Name = "button12"; | |||||
| // Container child button12.Gtk.Container+ContainerChild | |||||
| this.image9 = new Gtk.Image(); | |||||
| this.image9.Name = "image9"; | |||||
| this.image9.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_3d-color-picker", Gtk.IconSize.Menu, 16); | |||||
| this.button12.Add(this.image9); | |||||
| this.button12.Label = null; | |||||
| this.table1.Add(this.button12); | |||||
| Gtk.Table.TableChild w6 = ((Gtk.Table.TableChild)(this.table1[this.button12])); | |||||
| w6.TopAttach = ((uint)(2)); | |||||
| w6.BottomAttach = ((uint)(3)); | |||||
| w6.LeftAttach = ((uint)(2)); | |||||
| w6.RightAttach = ((uint)(3)); | |||||
| w6.XOptions = ((Gtk.AttachOptions)(4)); | |||||
| w6.YOptions = ((Gtk.AttachOptions)(4)); | |||||
| // Container child table1.Gtk.Table+TableChild | |||||
| this.button13 = new Gtk.Button(); | |||||
| this.button13.CanFocus = true; | |||||
| this.button13.Name = "button13"; | |||||
| // Container child button13.Gtk.Container+ContainerChild | |||||
| this.image8 = new Gtk.Image(); | |||||
| this.image8.Name = "image8"; | |||||
| this.image8.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-text", Gtk.IconSize.Menu, 16); | |||||
| this.button13.Add(this.image8); | |||||
| this.button13.Label = null; | |||||
| this.table1.Add(this.button13); | |||||
| Gtk.Table.TableChild w8 = ((Gtk.Table.TableChild)(this.table1[this.button13])); | |||||
| w8.TopAttach = ((uint)(2)); | |||||
| w8.BottomAttach = ((uint)(3)); | |||||
| w8.LeftAttach = ((uint)(1)); | |||||
| w8.RightAttach = ((uint)(2)); | |||||
| w8.XOptions = ((Gtk.AttachOptions)(4)); | |||||
| w8.YOptions = ((Gtk.AttachOptions)(4)); | |||||
| // Container child table1.Gtk.Table+TableChild | |||||
| this.button5 = new Gtk.Button(); | |||||
| this.button5.CanFocus = true; | |||||
| this.button5.Name = "button5"; | |||||
| // Container child button5.Gtk.Container+ContainerChild | |||||
| this.image1 = new Gtk.Image(); | |||||
| this.image1.Name = "image1"; | |||||
| this.image1.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_show-draw-functions", Gtk.IconSize.Menu, 16); | |||||
| this.button5.Add(this.image1); | |||||
| this.button5.Label = null; | |||||
| this.table1.Add(this.button5); | |||||
| Gtk.Table.TableChild w10 = ((Gtk.Table.TableChild)(this.table1[this.button5])); | |||||
| w10.XOptions = ((Gtk.AttachOptions)(4)); | |||||
| w10.YOptions = ((Gtk.AttachOptions)(4)); | |||||
| // Container child table1.Gtk.Table+TableChild | |||||
| this.button6 = new Gtk.Button(); | |||||
| this.button6.CanFocus = true; | |||||
| this.button6.Name = "button6"; | |||||
| // Container child button6.Gtk.Container+ContainerChild | |||||
| this.image7 = new Gtk.Image(); | |||||
| this.image7.Name = "image7"; | |||||
| this.image7.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-polygon", Gtk.IconSize.Menu, 16); | |||||
| this.button6.Add(this.image7); | |||||
| this.button6.Label = null; | |||||
| this.table1.Add(this.button6); | |||||
| Gtk.Table.TableChild w12 = ((Gtk.Table.TableChild)(this.table1[this.button6])); | |||||
| w12.TopAttach = ((uint)(2)); | |||||
| w12.BottomAttach = ((uint)(3)); | |||||
| w12.XOptions = ((Gtk.AttachOptions)(4)); | |||||
| w12.YOptions = ((Gtk.AttachOptions)(4)); | |||||
| // Container child table1.Gtk.Table+TableChild | |||||
| this.button7 = new Gtk.Button(); | |||||
| this.button7.CanFocus = true; | |||||
| this.button7.Name = "button7"; | |||||
| // Container child button7.Gtk.Container+ContainerChild | |||||
| this.image3 = new Gtk.Image(); | |||||
| this.image3.Name = "image3"; | |||||
| this.image3.Pixbuf = Stetic.IconLoader.LoadIcon(this, "gtk-clear", Gtk.IconSize.Menu, 16); | |||||
| this.button7.Add(this.image3); | |||||
| this.button7.Label = null; | |||||
| this.table1.Add(this.button7); | |||||
| Gtk.Table.TableChild w14 = ((Gtk.Table.TableChild)(this.table1[this.button7])); | |||||
| w14.LeftAttach = ((uint)(2)); | |||||
| w14.RightAttach = ((uint)(3)); | |||||
| w14.XOptions = ((Gtk.AttachOptions)(4)); | |||||
| w14.YOptions = ((Gtk.AttachOptions)(4)); | |||||
| // Container child table1.Gtk.Table+TableChild | |||||
| this.button8 = new Gtk.Button(); | |||||
| this.button8.CanFocus = true; | |||||
| this.button8.Name = "button8"; | |||||
| // Container child button8.Gtk.Container+ContainerChild | |||||
| this.image2 = new Gtk.Image(); | |||||
| this.image2.Name = "image2"; | |||||
| this.image2.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_insert-fields-author", Gtk.IconSize.Menu, 16); | |||||
| this.button8.Add(this.image2); | |||||
| this.button8.Label = null; | |||||
| this.table1.Add(this.button8); | |||||
| Gtk.Table.TableChild w16 = ((Gtk.Table.TableChild)(this.table1[this.button8])); | |||||
| w16.LeftAttach = ((uint)(1)); | |||||
| w16.RightAttach = ((uint)(2)); | |||||
| w16.XOptions = ((Gtk.AttachOptions)(4)); | |||||
| w16.YOptions = ((Gtk.AttachOptions)(4)); | |||||
| // Container child table1.Gtk.Table+TableChild | |||||
| this.button9 = new Gtk.Button(); | |||||
| this.button9.CanFocus = true; | |||||
| this.button9.Name = "button9"; | |||||
| // Container child button9.Gtk.Container+ContainerChild | |||||
| this.image4 = new Gtk.Image(); | |||||
| this.image4.Name = "image4"; | |||||
| this.image4.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_draw-line", Gtk.IconSize.Menu, 16); | |||||
| this.button9.Add(this.image4); | |||||
| this.button9.Label = null; | |||||
| this.table1.Add(this.button9); | |||||
| Gtk.Table.TableChild w18 = ((Gtk.Table.TableChild)(this.table1[this.button9])); | |||||
| w18.TopAttach = ((uint)(1)); | |||||
| w18.BottomAttach = ((uint)(2)); | |||||
| w18.XOptions = ((Gtk.AttachOptions)(4)); | |||||
| w18.YOptions = ((Gtk.AttachOptions)(4)); | |||||
| this.Add(this.table1); | |||||
| if ((this.Child != null)) { | if ((this.Child != null)) { | ||||
| this.Child.ShowAll(); | this.Child.ShowAll(); | ||||
| } | } | ||||
| @@ -75,7 +75,6 @@ | |||||
| <action id="SaveAsAction"> | <action id="SaveAsAction"> | ||||
| <property name="Type">Action</property> | <property name="Type">Action</property> | ||||
| <property name="Label" translatable="yes">Save _As</property> | <property name="Label" translatable="yes">Save _As</property> | ||||
| <property name="Sensitive">False</property> | |||||
| <property name="ShortLabel" translatable="yes">Save _As</property> | <property name="ShortLabel" translatable="yes">Save _As</property> | ||||
| <property name="StockId">gtk-save-as</property> | <property name="StockId">gtk-save-as</property> | ||||
| </action> | </action> | ||||
| @@ -184,6 +183,12 @@ | |||||
| <property name="Sensitive">False</property> | <property name="Sensitive">False</property> | ||||
| <property name="StockId">gtk-help</property> | <property name="StockId">gtk-help</property> | ||||
| </action> | </action> | ||||
| <action id="saveAsAction"> | |||||
| <property name="Type">Action</property> | |||||
| <property name="Label" translatable="yes" /> | |||||
| <property name="StockId">gtk-save-as</property> | |||||
| <signal name="Activated" handler="OnSaveAsActionActivated" /> | |||||
| </action> | |||||
| </action-group> | </action-group> | ||||
| <property name="MemberName" /> | <property name="MemberName" /> | ||||
| <property name="Title" translatable="yes">The Pimp</property> | <property name="Title" translatable="yes">The Pimp</property> | ||||
| @@ -236,6 +241,7 @@ | |||||
| <node type="Toolitem" action="newAction" /> | <node type="Toolitem" action="newAction" /> | ||||
| <node type="Toolitem" action="openAction" /> | <node type="Toolitem" action="openAction" /> | ||||
| <node type="Toolitem" action="saveAction" /> | <node type="Toolitem" action="saveAction" /> | ||||
| <node type="Toolitem" action="saveAsAction" /> | |||||
| <node type="Separator" /> | <node type="Separator" /> | ||||
| <node type="Toolitem" action="undoAction" /> | <node type="Toolitem" action="undoAction" /> | ||||
| <node type="Toolitem" action="redoAction" /> | <node type="Toolitem" action="redoAction" /> | ||||
| @@ -432,7 +438,253 @@ | |||||
| <widget class="Gtk.Bin" id="ThePimp.ToolBox" design-size="300 300"> | <widget class="Gtk.Bin" id="ThePimp.ToolBox" design-size="300 300"> | ||||
| <property name="MemberName" /> | <property name="MemberName" /> | ||||
| <child> | <child> | ||||
| <placeholder /> | |||||
| <widget class="Gtk.Table" id="table1"> | |||||
| <property name="MemberName" /> | |||||
| <property name="NRows">3</property> | |||||
| <property name="NColumns">3</property> | |||||
| <property name="RowSpacing">6</property> | |||||
| <property name="ColumnSpacing">6</property> | |||||
| <child> | |||||
| <widget class="Gtk.Button" id="button10"> | |||||
| <property name="MemberName" /> | |||||
| <property name="CanFocus">True</property> | |||||
| <property name="Type">Custom</property> | |||||
| <child> | |||||
| <widget class="Gtk.Image" id="image5"> | |||||
| <property name="MemberName" /> | |||||
| <property name="Pixbuf">stock:stock_draw-rectangle Menu</property> | |||||
| </widget> | |||||
| </child> | |||||
| </widget> | |||||
| <packing> | |||||
| <property name="TopAttach">1</property> | |||||
| <property name="BottomAttach">2</property> | |||||
| <property name="LeftAttach">1</property> | |||||
| <property name="RightAttach">2</property> | |||||
| <property name="AutoSize">True</property> | |||||
| <property name="XOptions">Fill</property> | |||||
| <property name="YOptions">Fill</property> | |||||
| <property name="XExpand">False</property> | |||||
| <property name="XFill">True</property> | |||||
| <property name="XShrink">False</property> | |||||
| <property name="YExpand">False</property> | |||||
| <property name="YFill">True</property> | |||||
| <property name="YShrink">False</property> | |||||
| </packing> | |||||
| </child> | |||||
| <child> | |||||
| <widget class="Gtk.Button" id="button11"> | |||||
| <property name="MemberName" /> | |||||
| <property name="CanFocus">True</property> | |||||
| <property name="Type">Custom</property> | |||||
| <child> | |||||
| <widget class="Gtk.Image" id="image6"> | |||||
| <property name="MemberName" /> | |||||
| <property name="Pixbuf">stock:stock_draw-ellipse Menu</property> | |||||
| </widget> | |||||
| </child> | |||||
| </widget> | |||||
| <packing> | |||||
| <property name="TopAttach">1</property> | |||||
| <property name="BottomAttach">2</property> | |||||
| <property name="LeftAttach">2</property> | |||||
| <property name="RightAttach">3</property> | |||||
| <property name="AutoSize">True</property> | |||||
| <property name="XOptions">Fill</property> | |||||
| <property name="YOptions">Fill</property> | |||||
| <property name="XExpand">False</property> | |||||
| <property name="XFill">True</property> | |||||
| <property name="XShrink">False</property> | |||||
| <property name="YExpand">False</property> | |||||
| <property name="YFill">True</property> | |||||
| <property name="YShrink">False</property> | |||||
| </packing> | |||||
| </child> | |||||
| <child> | |||||
| <widget class="Gtk.Button" id="button12"> | |||||
| <property name="MemberName" /> | |||||
| <property name="CanFocus">True</property> | |||||
| <property name="Type">Custom</property> | |||||
| <child> | |||||
| <widget class="Gtk.Image" id="image9"> | |||||
| <property name="MemberName" /> | |||||
| <property name="Pixbuf">stock:stock_3d-color-picker Menu</property> | |||||
| </widget> | |||||
| </child> | |||||
| </widget> | |||||
| <packing> | |||||
| <property name="TopAttach">2</property> | |||||
| <property name="BottomAttach">3</property> | |||||
| <property name="LeftAttach">2</property> | |||||
| <property name="RightAttach">3</property> | |||||
| <property name="AutoSize">True</property> | |||||
| <property name="XOptions">Fill</property> | |||||
| <property name="YOptions">Fill</property> | |||||
| <property name="XExpand">False</property> | |||||
| <property name="XFill">True</property> | |||||
| <property name="XShrink">False</property> | |||||
| <property name="YExpand">False</property> | |||||
| <property name="YFill">True</property> | |||||
| <property name="YShrink">False</property> | |||||
| </packing> | |||||
| </child> | |||||
| <child> | |||||
| <widget class="Gtk.Button" id="button13"> | |||||
| <property name="MemberName" /> | |||||
| <property name="CanFocus">True</property> | |||||
| <property name="Type">Custom</property> | |||||
| <child> | |||||
| <widget class="Gtk.Image" id="image8"> | |||||
| <property name="MemberName" /> | |||||
| <property name="Pixbuf">stock:stock_draw-text Menu</property> | |||||
| </widget> | |||||
| </child> | |||||
| </widget> | |||||
| <packing> | |||||
| <property name="TopAttach">2</property> | |||||
| <property name="BottomAttach">3</property> | |||||
| <property name="LeftAttach">1</property> | |||||
| <property name="RightAttach">2</property> | |||||
| <property name="AutoSize">True</property> | |||||
| <property name="XOptions">Fill</property> | |||||
| <property name="YOptions">Fill</property> | |||||
| <property name="XExpand">False</property> | |||||
| <property name="XFill">True</property> | |||||
| <property name="XShrink">False</property> | |||||
| <property name="YExpand">False</property> | |||||
| <property name="YFill">True</property> | |||||
| <property name="YShrink">False</property> | |||||
| </packing> | |||||
| </child> | |||||
| <child> | |||||
| <widget class="Gtk.Button" id="button5"> | |||||
| <property name="MemberName" /> | |||||
| <property name="CanFocus">True</property> | |||||
| <property name="Type">Custom</property> | |||||
| <child> | |||||
| <widget class="Gtk.Image" id="image1"> | |||||
| <property name="MemberName" /> | |||||
| <property name="Pixbuf">stock:stock_show-draw-functions Menu</property> | |||||
| </widget> | |||||
| </child> | |||||
| </widget> | |||||
| <packing> | |||||
| <property name="AutoSize">True</property> | |||||
| <property name="XOptions">Fill</property> | |||||
| <property name="YOptions">Fill</property> | |||||
| <property name="XExpand">False</property> | |||||
| <property name="XFill">True</property> | |||||
| <property name="XShrink">False</property> | |||||
| <property name="YExpand">False</property> | |||||
| <property name="YFill">True</property> | |||||
| <property name="YShrink">False</property> | |||||
| </packing> | |||||
| </child> | |||||
| <child> | |||||
| <widget class="Gtk.Button" id="button6"> | |||||
| <property name="MemberName" /> | |||||
| <property name="CanFocus">True</property> | |||||
| <property name="Type">Custom</property> | |||||
| <child> | |||||
| <widget class="Gtk.Image" id="image7"> | |||||
| <property name="MemberName" /> | |||||
| <property name="Pixbuf">stock:stock_draw-polygon Menu</property> | |||||
| </widget> | |||||
| </child> | |||||
| </widget> | |||||
| <packing> | |||||
| <property name="TopAttach">2</property> | |||||
| <property name="BottomAttach">3</property> | |||||
| <property name="AutoSize">True</property> | |||||
| <property name="XOptions">Fill</property> | |||||
| <property name="YOptions">Fill</property> | |||||
| <property name="XExpand">False</property> | |||||
| <property name="XFill">True</property> | |||||
| <property name="XShrink">False</property> | |||||
| <property name="YExpand">False</property> | |||||
| <property name="YFill">True</property> | |||||
| <property name="YShrink">False</property> | |||||
| </packing> | |||||
| </child> | |||||
| <child> | |||||
| <widget class="Gtk.Button" id="button7"> | |||||
| <property name="MemberName" /> | |||||
| <property name="CanFocus">True</property> | |||||
| <property name="Type">Custom</property> | |||||
| <child> | |||||
| <widget class="Gtk.Image" id="image3"> | |||||
| <property name="MemberName" /> | |||||
| <property name="Pixbuf">stock:gtk-clear Menu</property> | |||||
| </widget> | |||||
| </child> | |||||
| </widget> | |||||
| <packing> | |||||
| <property name="LeftAttach">2</property> | |||||
| <property name="RightAttach">3</property> | |||||
| <property name="AutoSize">True</property> | |||||
| <property name="XOptions">Fill</property> | |||||
| <property name="YOptions">Fill</property> | |||||
| <property name="XExpand">False</property> | |||||
| <property name="XFill">True</property> | |||||
| <property name="XShrink">False</property> | |||||
| <property name="YExpand">False</property> | |||||
| <property name="YFill">True</property> | |||||
| <property name="YShrink">False</property> | |||||
| </packing> | |||||
| </child> | |||||
| <child> | |||||
| <widget class="Gtk.Button" id="button8"> | |||||
| <property name="MemberName" /> | |||||
| <property name="CanFocus">True</property> | |||||
| <property name="Type">Custom</property> | |||||
| <child> | |||||
| <widget class="Gtk.Image" id="image2"> | |||||
| <property name="MemberName" /> | |||||
| <property name="Pixbuf">stock:stock_insert-fields-author Menu</property> | |||||
| </widget> | |||||
| </child> | |||||
| </widget> | |||||
| <packing> | |||||
| <property name="LeftAttach">1</property> | |||||
| <property name="RightAttach">2</property> | |||||
| <property name="AutoSize">True</property> | |||||
| <property name="XOptions">Fill</property> | |||||
| <property name="YOptions">Fill</property> | |||||
| <property name="XExpand">False</property> | |||||
| <property name="XFill">True</property> | |||||
| <property name="XShrink">False</property> | |||||
| <property name="YExpand">False</property> | |||||
| <property name="YFill">True</property> | |||||
| <property name="YShrink">False</property> | |||||
| </packing> | |||||
| </child> | |||||
| <child> | |||||
| <widget class="Gtk.Button" id="button9"> | |||||
| <property name="MemberName" /> | |||||
| <property name="CanFocus">True</property> | |||||
| <property name="Type">Custom</property> | |||||
| <child> | |||||
| <widget class="Gtk.Image" id="image4"> | |||||
| <property name="MemberName" /> | |||||
| <property name="Pixbuf">stock:stock_draw-line Menu</property> | |||||
| </widget> | |||||
| </child> | |||||
| </widget> | |||||
| <packing> | |||||
| <property name="TopAttach">1</property> | |||||
| <property name="BottomAttach">2</property> | |||||
| <property name="AutoSize">True</property> | |||||
| <property name="XOptions">Fill</property> | |||||
| <property name="YOptions">Fill</property> | |||||
| <property name="XExpand">False</property> | |||||
| <property name="XFill">True</property> | |||||
| <property name="XShrink">False</property> | |||||
| <property name="YExpand">False</property> | |||||
| <property name="YFill">True</property> | |||||
| <property name="YShrink">False</property> | |||||
| </packing> | |||||
| </child> | |||||
| </widget> | |||||
| </child> | </child> | ||||
| </widget> | </widget> | ||||
| <widget class="Gtk.Bin" id="ThePimp.PictureView" design-size="300 300"> | <widget class="Gtk.Bin" id="ThePimp.PictureView" design-size="300 300"> | ||||
| @@ -441,4 +693,68 @@ | |||||
| <placeholder /> | <placeholder /> | ||||
| </child> | </child> | ||||
| </widget> | </widget> | ||||
| <widget class="Gtk.Dialog" id="ThePimp.SaveFile" design-size="400 300"> | |||||
| <property name="MemberName" /> | |||||
| <property name="WindowPosition">CenterOnParent</property> | |||||
| <property name="Buttons">2</property> | |||||
| <property name="HelpButton">False</property> | |||||
| <property name="HasSeparator">False</property> | |||||
| <child internal-child="VBox"> | |||||
| <widget class="Gtk.VBox" id="dialog1_VBox"> | |||||
| <property name="MemberName" /> | |||||
| <property name="BorderWidth">2</property> | |||||
| <child> | |||||
| <widget class="Gtk.FileChooserWidget" id="filechooserwidget1"> | |||||
| <property name="MemberName" /> | |||||
| </widget> | |||||
| <packing> | |||||
| <property name="Position">0</property> | |||||
| <property name="AutoSize">True</property> | |||||
| </packing> | |||||
| </child> | |||||
| </widget> | |||||
| </child> | |||||
| <child internal-child="ActionArea"> | |||||
| <widget class="Gtk.HButtonBox" id="dialog1_ActionArea"> | |||||
| <property name="MemberName" /> | |||||
| <property name="Spacing">6</property> | |||||
| <property name="BorderWidth">5</property> | |||||
| <property name="Size">2</property> | |||||
| <property name="LayoutStyle">End</property> | |||||
| <child> | |||||
| <widget class="Gtk.Button" id="buttonCancel"> | |||||
| <property name="MemberName" /> | |||||
| <property name="CanDefault">True</property> | |||||
| <property name="CanFocus">True</property> | |||||
| <property name="UseStock">True</property> | |||||
| <property name="Type">StockItem</property> | |||||
| <property name="StockId">gtk-cancel</property> | |||||
| <property name="ResponseId">-6</property> | |||||
| <property name="label">gtk-cancel</property> | |||||
| </widget> | |||||
| <packing> | |||||
| <property name="Expand">False</property> | |||||
| <property name="Fill">False</property> | |||||
| </packing> | |||||
| </child> | |||||
| <child> | |||||
| <widget class="Gtk.Button" id="buttonOk"> | |||||
| <property name="MemberName" /> | |||||
| <property name="CanDefault">True</property> | |||||
| <property name="CanFocus">True</property> | |||||
| <property name="UseStock">True</property> | |||||
| <property name="Type">StockItem</property> | |||||
| <property name="StockId">gtk-ok</property> | |||||
| <property name="ResponseId">-5</property> | |||||
| <property name="label">gtk-ok</property> | |||||
| </widget> | |||||
| <packing> | |||||
| <property name="Position">1</property> | |||||
| <property name="Expand">False</property> | |||||
| <property name="Fill">False</property> | |||||
| </packing> | |||||
| </child> | |||||
| </widget> | |||||
| </child> | |||||
| </widget> | |||||
| </stetic-interface> | </stetic-interface> | ||||
| @@ -19,10 +19,10 @@ EXTRA_DIST = $(pipi_sources) $(test_sources) \ | |||||
| pipi-sharp.pc.in pipi-sharp.dll.config.in | pipi-sharp.pc.in pipi-sharp.dll.config.in | ||||
| pipi-sharp.dll: $(pipi_sources) | pipi-sharp.dll: $(pipi_sources) | ||||
| gmcs -unsafe $(pipi_sources) -out:$@ -target:library | |||||
| gmcs -debug -unsafe $(pipi_sources) -out:$@ -target:library | |||||
| test.exe: $(test_sources) pipi-sharp.dll | test.exe: $(test_sources) pipi-sharp.dll | ||||
| gmcs $(test_sources) -out:$@ -lib:./ \ | |||||
| gmcs -debug $(test_sources) -out:$@ -lib:./ \ | |||||
| -r:./pipi-sharp.dll | -r:./pipi-sharp.dll | ||||
| clean-local: | clean-local: | ||||
| @@ -43,10 +43,10 @@ namespace Pipi | |||||
| [DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl), | [DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl), | ||||
| SuppressUnmanagedCodeSecurity] | SuppressUnmanagedCodeSecurity] | ||||
| private static extern IntPtr pipi_save(IntPtr p, string s); | |||||
| public void Save(string s) | |||||
| private static extern int pipi_save(IntPtr p, string s); | |||||
| public int Save(string s) | |||||
| { | { | ||||
| _picture = pipi_save(_picture, s); | |||||
| return pipi_save(_picture, s); | |||||
| } | } | ||||
| [DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl), | [DllImport("libpipi.dll", CallingConvention=CallingConvention.Cdecl), | ||||
| @@ -4,13 +4,13 @@ | |||||
| <Output directory="." assembly="pipi-sharp" /> | <Output directory="." assembly="pipi-sharp" /> | ||||
| <Build debugmode="True" target="Library" /> | <Build debugmode="True" target="Library" /> | ||||
| <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" /> | <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" /> | ||||
| <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> | |||||
| <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="True" generateoverflowchecks="True" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> | |||||
| </Configuration> | </Configuration> | ||||
| <Configuration name="Release" ctype="DotNetProjectConfiguration"> | <Configuration name="Release" ctype="DotNetProjectConfiguration"> | ||||
| <Output directory="." assembly="pipi-sharp" /> | <Output directory="." assembly="pipi-sharp" /> | ||||
| <Build debugmode="False" target="Library" /> | <Build debugmode="False" target="Library" /> | ||||
| <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" /> | <Execution runwithwarnings="True" consolepause="False" runtime="MsNet" clr-version="Net_2_0" /> | ||||
| <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> | |||||
| <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" unsafecodeallowed="True" generateoverflowchecks="True" generatexmldocumentation="False" ctype="CSharpCompilerParameters" /> | |||||
| </Configuration> | </Configuration> | ||||
| </Configurations> | </Configurations> | ||||
| <Contents> | <Contents> | ||||
| @@ -21,4 +21,4 @@ | |||||
| <References> | <References> | ||||
| <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> | ||||
| </References> | </References> | ||||
| </Project> | |||||
| </Project> | |||||