From 543a29569ba9b889b4c33a95343c9a56b1d34655 Mon Sep 17 00:00:00 2001 From: cra0zy Date: Wed, 17 Jan 2018 21:31:39 +0100 Subject: [PATCH] Replace DllImport with a better multiplatform solution --- CakeScripts/GAssembly.cs | 43 - CakeScripts/Settings.cs | 26 +- Source/Libs/AtkSharp/AtkSharp.csproj | 7 +- Source/Libs/AtkSharp/AtkSharp.dll.config | 3 - Source/Libs/AtkSharp/Global.cs | 9 +- .../AtkSharp/linux-arm/libatk-1.0-0.dll.so | Bin 5008 -> 0 bytes .../AtkSharp/linux-x64/libatk-1.0-0.dll.so | Bin 7240 -> 0 bytes .../AtkSharp/linux-x86/libatk-1.0-0.dll.so | Bin 6508 -> 0 bytes Source/Libs/CairoSharp/CairoSharp.csproj | 7 +- Source/Libs/CairoSharp/CairoSharp.dll.config | 3 - Source/Libs/CairoSharp/ImageSurface.cs | 2 +- Source/Libs/CairoSharp/NativeMethods.cs | 1097 ++++++++--------- .../CairoSharp/linux-arm/libcairo-2.dll.so | Bin 5008 -> 0 bytes .../CairoSharp/linux-x64/libcairo-2.dll.so | Bin 7240 -> 0 bytes .../CairoSharp/linux-x86/libcairo-2.dll.so | Bin 6508 -> 0 bytes Source/Libs/GLibSharp/Bytes.cs | 48 +- Source/Libs/GLibSharp/Cond.cs | 24 +- Source/Libs/GLibSharp/Date.cs | 196 +-- Source/Libs/GLibSharp/DateTime.cs | 192 +-- Source/Libs/GLibSharp/FileUtils.cs | 8 +- Source/Libs/GLibSharp/GException.cs | 4 +- Source/Libs/GLibSharp/GLibSharp-api.xml | 2 +- Source/Libs/GLibSharp/GLibSharp.csproj | 7 +- Source/Libs/GLibSharp/GLibSharp.dll.config | 5 - Source/Libs/GLibSharp/GString.cs | 8 +- Source/Libs/GLibSharp/GType.cs | 44 +- Source/Libs/GLibSharp/Global.cs | 24 +- Source/Libs/GLibSharp/IOChannel.cs | 132 +- Source/Libs/GLibSharp/Idle.cs | 8 +- Source/Libs/GLibSharp/InitiallyUnowned.cs | 16 +- Source/Libs/GLibSharp/KeyFile.cs | 160 +-- Source/Libs/GLibSharp/List.cs | 24 +- Source/Libs/GLibSharp/ListBase.cs | 4 +- Source/Libs/GLibSharp/Log.cs | 36 +- Source/Libs/GLibSharp/MainContext.cs | 44 +- Source/Libs/GLibSharp/MainLoop.cs | 24 +- Source/Libs/GLibSharp/ManagedValue.cs | 4 +- Source/Libs/GLibSharp/Markup.cs | 4 +- Source/Libs/GLibSharp/Marshaller.cs | 55 +- Source/Libs/GLibSharp/Mutex.cs | 20 +- Source/Libs/GLibSharp/NotifyHandler.cs | 4 +- Source/Libs/GLibSharp/Object.cs | 60 +- Source/Libs/GLibSharp/ObjectManager.cs | 4 +- Source/Libs/GLibSharp/ParamSpec.cs | 76 +- Source/Libs/GLibSharp/PollFD.cs | 4 +- Source/Libs/GLibSharp/PtrArray.cs | 32 +- Source/Libs/GLibSharp/RecMutex.cs | 20 +- Source/Libs/GLibSharp/SList.cs | 24 +- Source/Libs/GLibSharp/Signal.cs | 38 +- Source/Libs/GLibSharp/SignalAttribute.cs | 4 +- Source/Libs/GLibSharp/SignalClosure.cs | 28 +- Source/Libs/GLibSharp/Source.cs | 128 +- Source/Libs/GLibSharp/Spawn.cs | 44 +- Source/Libs/GLibSharp/TimeVal.cs | 12 +- Source/Libs/GLibSharp/TimeZone.cs | 46 +- Source/Libs/GLibSharp/Timeout.cs | 12 +- Source/Libs/GLibSharp/ToggleRef.cs | 16 +- Source/Libs/GLibSharp/Value.cs | 192 +-- Source/Libs/GLibSharp/ValueArray.cs | 36 +- Source/Libs/GLibSharp/Variant.cs | 128 +- Source/Libs/GLibSharp/VariantType.cs | 104 +- .../GLibSharp/linux-arm/libglib-2.0-0.dll.so | Bin 5008 -> 0 bytes .../linux-arm/libgobject-2.0-0.dll.so | Bin 5012 -> 0 bytes .../linux-arm/libgthread-2.0-0.dll.so | Bin 5012 -> 0 bytes .../GLibSharp/linux-x64/libglib-2.0-0.dll.so | Bin 7240 -> 0 bytes .../linux-x64/libgobject-2.0-0.dll.so | Bin 7240 -> 0 bytes .../linux-x64/libgthread-2.0-0.dll.so | Bin 7240 -> 0 bytes .../GLibSharp/linux-x86/libglib-2.0-0.dll.so | Bin 6508 -> 0 bytes .../linux-x86/libgobject-2.0-0.dll.so | Bin 6508 -> 0 bytes .../linux-x86/libgthread-2.0-0.dll.so | Bin 6508 -> 0 bytes Source/Libs/GdkSharp/Color.cs | 4 +- Source/Libs/GdkSharp/Device.cs | 8 +- Source/Libs/GdkSharp/Display.cs | 14 +- Source/Libs/GdkSharp/DisplayManager.cs | 4 +- Source/Libs/GdkSharp/Event.cs | 4 +- Source/Libs/GdkSharp/GdkSharp.csproj | 7 +- Source/Libs/GdkSharp/GdkSharp.dll.config | 4 - Source/Libs/GdkSharp/Global.cs | 22 +- Source/Libs/GdkSharp/Keymap.cs | 8 +- Source/Libs/GdkSharp/Pixbuf.cs | 44 +- Source/Libs/GdkSharp/PixbufLoader.cs | 4 +- Source/Libs/GdkSharp/Pixdata.cs | 4 +- Source/Libs/GdkSharp/Property.cs | 10 +- Source/Libs/GdkSharp/Rectangle.cs | 12 +- Source/Libs/GdkSharp/Screen.cs | 16 +- Source/Libs/GdkSharp/TextProperty.cs | 4 +- Source/Libs/GdkSharp/Window.cs | 40 +- .../Libs/GdkSharp/linux-arm/libgdk-3-0.dll.so | Bin 5008 -> 0 bytes .../linux-arm/libgdk_pixbuf-2.0-0.dll.so | Bin 5016 -> 0 bytes .../Libs/GdkSharp/linux-x64/libgdk-3-0.dll.so | Bin 7240 -> 0 bytes .../linux-x64/libgdk_pixbuf-2.0-0.dll.so | Bin 7240 -> 0 bytes .../Libs/GdkSharp/linux-x86/libgdk-3-0.dll.so | Bin 6508 -> 0 bytes .../linux-x86/libgdk_pixbuf-2.0-0.dll.so | Bin 6508 -> 0 bytes Source/Libs/GioSharp/AppInfoAdapter.cs | 4 +- Source/Libs/GioSharp/Application.cs | 4 +- Source/Libs/GioSharp/FileAdapter.cs | 4 +- Source/Libs/GioSharp/FileFactory.cs | 12 +- Source/Libs/GioSharp/GioGlobal.cs | 29 - Source/Libs/GioSharp/GioSharp.csproj | 7 +- Source/Libs/GioSharp/GioSharp.dll.config | 3 - .../GioSharp/linux-arm/libgio-2.0-0.dll.so | Bin 5008 -> 0 bytes .../GioSharp/linux-x64/libgio-2.0-0.dll.so | Bin 7240 -> 0 bytes .../GioSharp/linux-x86/libgio-2.0-0.dll.so | Bin 6508 -> 0 bytes Source/Libs/GtkSharp.sln | 12 + Source/Libs/GtkSharp/Accel.cs | 44 +- Source/Libs/GtkSharp/Action.cs | 4 +- Source/Libs/GtkSharp/ActionGroup.cs | 4 +- Source/Libs/GtkSharp/Adjustment.cs | 12 +- Source/Libs/GtkSharp/Application.cs | 45 +- Source/Libs/GtkSharp/Bin.cs | 4 +- Source/Libs/GtkSharp/Builder.cs | 4 +- Source/Libs/GtkSharp/Button.cs | 4 +- Source/Libs/GtkSharp/CellRenderer.cs | 10 +- Source/Libs/GtkSharp/CheckMenuItem.cs | 4 +- Source/Libs/GtkSharp/Clipboard.cs | 16 +- Source/Libs/GtkSharp/ColorSelection.cs | 16 +- Source/Libs/GtkSharp/Container.cs | 16 +- Source/Libs/GtkSharp/Dialog.cs | 4 +- Source/Libs/GtkSharp/Drag.cs | 4 +- Source/Libs/GtkSharp/FileChooserDialog.cs | 4 +- Source/Libs/GtkSharp/FileChooserNative.cs | 20 +- Source/Libs/GtkSharp/GtkSharp.csproj | 7 +- Source/Libs/GtkSharp/GtkSharp.dll.config | 3 - Source/Libs/GtkSharp/HScale.cs | 4 +- Source/Libs/GtkSharp/IconFactory.cs | 4 +- Source/Libs/GtkSharp/IconSet.cs | 5 +- Source/Libs/GtkSharp/IconTheme.cs | 24 +- Source/Libs/GtkSharp/IconView.cs | 4 +- Source/Libs/GtkSharp/Image.cs | 8 +- Source/Libs/GtkSharp/ImageMenuItem.cs | 4 +- Source/Libs/GtkSharp/Key.cs | 8 +- Source/Libs/GtkSharp/ListStore.cs | 22 +- Source/Libs/GtkSharp/Menu.cs | 8 +- Source/Libs/GtkSharp/MenuItem.cs | 4 +- Source/Libs/GtkSharp/MessageDialog.cs | 8 +- Source/Libs/GtkSharp/NativeDialog.cs | 44 +- Source/Libs/GtkSharp/Notebook.cs | 4 +- Source/Libs/GtkSharp/Plug.cs | 8 +- Source/Libs/GtkSharp/Printer.cs | 4 +- Source/Libs/GtkSharp/RadioAction.cs | 8 +- Source/Libs/GtkSharp/RadioButton.cs | 12 +- Source/Libs/GtkSharp/RadioMenuItem.cs | 12 +- Source/Libs/GtkSharp/RadioToolButton.cs | 16 +- Source/Libs/GtkSharp/SelectionData.cs | 16 +- Source/Libs/GtkSharp/SpinButton.cs | 4 +- Source/Libs/GtkSharp/StatusIcon.cs | 8 +- Source/Libs/GtkSharp/Stock.cs | 8 +- Source/Libs/GtkSharp/StockManager.cs | 18 +- Source/Libs/GtkSharp/Style.cs | 200 --- Source/Libs/GtkSharp/Target.cs | 4 +- Source/Libs/GtkSharp/TargetList.cs | 4 +- Source/Libs/GtkSharp/TextBuffer.cs | 32 +- Source/Libs/GtkSharp/TextChildAnchor.cs | 4 +- Source/Libs/GtkSharp/TextIter.cs | 16 +- Source/Libs/GtkSharp/TextView.cs | 4 +- Source/Libs/GtkSharp/TreeModelAdapter.cs | 12 +- Source/Libs/GtkSharp/TreeModelFilter.cs | 20 +- Source/Libs/GtkSharp/TreeModelSort.cs | 12 +- Source/Libs/GtkSharp/TreePath.cs | 4 +- Source/Libs/GtkSharp/TreeSelection.cs | 10 +- Source/Libs/GtkSharp/TreeStore.cs | 76 +- Source/Libs/GtkSharp/TreeView.cs | 20 +- Source/Libs/GtkSharp/UIManager.cs | 12 +- Source/Libs/GtkSharp/VScale.cs | 4 +- Source/Libs/GtkSharp/Widget.cs | 36 +- Source/Libs/GtkSharp/Window.cs | 16 +- .../Libs/GtkSharp/linux-arm/libgtk-3-0.dll.so | Bin 5008 -> 0 bytes .../Libs/GtkSharp/linux-x64/libgtk-3-0.dll.so | Bin 7240 -> 0 bytes .../Libs/GtkSharp/linux-x86/libgtk-3-0.dll.so | Bin 6508 -> 0 bytes Source/Libs/PangoSharp/AttrBackground.cs | 4 +- Source/Libs/PangoSharp/AttrFallback.cs | 4 +- Source/Libs/PangoSharp/AttrFamily.cs | 4 +- Source/Libs/PangoSharp/AttrFontDesc.cs | 8 +- Source/Libs/PangoSharp/AttrForeground.cs | 4 +- Source/Libs/PangoSharp/AttrGravity.cs | 4 +- Source/Libs/PangoSharp/AttrGravityHint.cs | 4 +- Source/Libs/PangoSharp/AttrIterator.cs | 8 +- Source/Libs/PangoSharp/AttrLanguage.cs | 4 +- Source/Libs/PangoSharp/AttrLetterSpacing.cs | 4 +- Source/Libs/PangoSharp/AttrList.cs | 12 +- Source/Libs/PangoSharp/AttrRise.cs | 4 +- Source/Libs/PangoSharp/AttrScale.cs | 4 +- Source/Libs/PangoSharp/AttrShape.cs | 4 +- Source/Libs/PangoSharp/AttrSize.cs | 8 +- Source/Libs/PangoSharp/AttrStretch.cs | 4 +- Source/Libs/PangoSharp/AttrStrikethrough.cs | 4 +- .../Libs/PangoSharp/AttrStrikethroughColor.cs | 4 +- Source/Libs/PangoSharp/AttrStyle.cs | 4 +- Source/Libs/PangoSharp/AttrUnderline.cs | 4 +- Source/Libs/PangoSharp/AttrUnderlineColor.cs | 4 +- Source/Libs/PangoSharp/AttrVariant.cs | 4 +- Source/Libs/PangoSharp/AttrWeight.cs | 4 +- Source/Libs/PangoSharp/Attribute.cs | 12 +- Source/Libs/PangoSharp/Context.cs | 10 +- Source/Libs/PangoSharp/Coverage.cs | 4 +- Source/Libs/PangoSharp/FontFamily.cs | 10 +- Source/Libs/PangoSharp/FontMap.cs | 10 +- Source/Libs/PangoSharp/Global.cs | 11 +- Source/Libs/PangoSharp/GlyphItem.cs | 4 +- Source/Libs/PangoSharp/Layout.cs | 20 +- Source/Libs/PangoSharp/LayoutLine.cs | 4 +- Source/Libs/PangoSharp/PangoSharp.csproj | 7 +- Source/Libs/PangoSharp/PangoSharp.dll.config | 3 - Source/Libs/PangoSharp/ScriptIter.cs | 20 +- Source/Libs/PangoSharp/TabArray.cs | 4 +- .../linux-arm/libpango-1.0-0.dll.so | Bin 5012 -> 0 bytes .../linux-x64/libpango-1.0-0.dll.so | Bin 7240 -> 0 bytes .../linux-x86/libpango-1.0-0.dll.so | Bin 6508 -> 0 bytes Source/Libs/Shared/FuncLoader.cs | 144 +++ Source/Tools/GapiCodegen/CodeGenerator.cs | 2 + Source/Tools/GapiCodegen/Ctor.cs | 6 +- Source/Tools/GapiCodegen/EnumGen.cs | 5 +- Source/Tools/GapiCodegen/Method.cs | 9 +- Source/Tools/GapiCodegen/OpaqueGen.cs | 4 +- build.cake | 13 - 215 files changed, 2366 insertions(+), 2610 deletions(-) delete mode 100644 Source/Libs/AtkSharp/AtkSharp.dll.config delete mode 100755 Source/Libs/AtkSharp/linux-arm/libatk-1.0-0.dll.so delete mode 100755 Source/Libs/AtkSharp/linux-x64/libatk-1.0-0.dll.so delete mode 100755 Source/Libs/AtkSharp/linux-x86/libatk-1.0-0.dll.so delete mode 100644 Source/Libs/CairoSharp/CairoSharp.dll.config delete mode 100755 Source/Libs/CairoSharp/linux-arm/libcairo-2.dll.so delete mode 100755 Source/Libs/CairoSharp/linux-x64/libcairo-2.dll.so delete mode 100755 Source/Libs/CairoSharp/linux-x86/libcairo-2.dll.so delete mode 100644 Source/Libs/GLibSharp/GLibSharp.dll.config delete mode 100755 Source/Libs/GLibSharp/linux-arm/libglib-2.0-0.dll.so delete mode 100755 Source/Libs/GLibSharp/linux-arm/libgobject-2.0-0.dll.so delete mode 100755 Source/Libs/GLibSharp/linux-arm/libgthread-2.0-0.dll.so delete mode 100755 Source/Libs/GLibSharp/linux-x64/libglib-2.0-0.dll.so delete mode 100755 Source/Libs/GLibSharp/linux-x64/libgobject-2.0-0.dll.so delete mode 100755 Source/Libs/GLibSharp/linux-x64/libgthread-2.0-0.dll.so delete mode 100755 Source/Libs/GLibSharp/linux-x86/libglib-2.0-0.dll.so delete mode 100755 Source/Libs/GLibSharp/linux-x86/libgobject-2.0-0.dll.so delete mode 100755 Source/Libs/GLibSharp/linux-x86/libgthread-2.0-0.dll.so delete mode 100644 Source/Libs/GdkSharp/GdkSharp.dll.config delete mode 100755 Source/Libs/GdkSharp/linux-arm/libgdk-3-0.dll.so delete mode 100755 Source/Libs/GdkSharp/linux-arm/libgdk_pixbuf-2.0-0.dll.so delete mode 100755 Source/Libs/GdkSharp/linux-x64/libgdk-3-0.dll.so delete mode 100755 Source/Libs/GdkSharp/linux-x64/libgdk_pixbuf-2.0-0.dll.so delete mode 100755 Source/Libs/GdkSharp/linux-x86/libgdk-3-0.dll.so delete mode 100755 Source/Libs/GdkSharp/linux-x86/libgdk_pixbuf-2.0-0.dll.so delete mode 100755 Source/Libs/GioSharp/GioGlobal.cs delete mode 100644 Source/Libs/GioSharp/GioSharp.dll.config delete mode 100755 Source/Libs/GioSharp/linux-arm/libgio-2.0-0.dll.so delete mode 100755 Source/Libs/GioSharp/linux-x64/libgio-2.0-0.dll.so delete mode 100755 Source/Libs/GioSharp/linux-x86/libgio-2.0-0.dll.so delete mode 100644 Source/Libs/GtkSharp/GtkSharp.dll.config delete mode 100755 Source/Libs/GtkSharp/Style.cs delete mode 100755 Source/Libs/GtkSharp/linux-arm/libgtk-3-0.dll.so delete mode 100755 Source/Libs/GtkSharp/linux-x64/libgtk-3-0.dll.so delete mode 100755 Source/Libs/GtkSharp/linux-x86/libgtk-3-0.dll.so delete mode 100644 Source/Libs/PangoSharp/PangoSharp.dll.config delete mode 100755 Source/Libs/PangoSharp/linux-arm/libpango-1.0-0.dll.so delete mode 100755 Source/Libs/PangoSharp/linux-x64/libpango-1.0-0.dll.so delete mode 100755 Source/Libs/PangoSharp/linux-x86/libpango-1.0-0.dll.so create mode 100644 Source/Libs/Shared/FuncLoader.cs diff --git a/CakeScripts/GAssembly.cs b/CakeScripts/GAssembly.cs index 29c6a4eb0..f8c667301 100755 --- a/CakeScripts/GAssembly.cs +++ b/CakeScripts/GAssembly.cs @@ -15,7 +15,6 @@ public class GAssembly public string Metadata { get; private set; } public string[] Deps { get; set; } - public string[] NativeDeps { get; set; } public string ExtraArgs { get; set; } public GAssembly(string name) @@ -78,46 +77,4 @@ public class GAssembly if (Cake.DirectoryExists(GDir)) Cake.DeleteDirectory(GDir, new DeleteDirectorySettings { Recursive = true, Force = true }); } - - public void GenerateLinuxStubs() - { - var basedir = P.Combine("..", "..", Dir); - var lines = new List(); - - if (Cake.DirectoryExists(P.Combine(basedir, "linux-x86"))) - Cake.DeleteDirectory(P.Combine(basedir, "linux-x86"), new DeleteDirectorySettings { Recursive = true, Force = true }); - Cake.CreateDirectory(P.Combine(basedir, "linux-x86")); - - if (Cake.DirectoryExists(P.Combine(basedir, "linux-x64"))) - Cake.DeleteDirectory(P.Combine(basedir, "linux-x64"), new DeleteDirectorySettings { Recursive = true, Force = true }); - Cake.CreateDirectory(P.Combine(basedir, "linux-x64")); - - if (Cake.DirectoryExists(P.Combine(basedir, "linux-arm"))) - Cake.DeleteDirectory(P.Combine(basedir, "linux-arm"), new DeleteDirectorySettings { Recursive = true, Force = true }); - Cake.CreateDirectory(P.Combine(basedir, "linux-arm")); - - lines.Add(""); - for (int i = 0; i < NativeDeps.Length; i += 2) - { - lines.Add(" "); - - // Generate x86 stubs - Cake.CreateDirectory(P.Combine(basedir, "linux-x86")); - Cake.StartProcess("gcc", "-m32 -shared -o " + NativeDeps[i] + " empty.c"); - Cake.StartProcess("gcc", "-m32 -Wl,--no-as-needed -shared -o " + P.Combine(basedir, "linux-x86", NativeDeps[i + 1] + ".so") + " -fPIC -L. -l:" + NativeDeps[i] + ""); - - // Generate x64 stubs - Cake.CreateDirectory(P.Combine(basedir, "linux-x64")); - Cake.StartProcess("gcc", "-shared -o " + NativeDeps[i] + " empty.c"); - Cake.StartProcess("gcc", "-Wl,--no-as-needed -shared -o " + P.Combine(basedir, "linux-x64", NativeDeps[i + 1] + ".so") + " -fPIC -L. -l:" + NativeDeps[i] + ""); - - // Generate arm stubs - Cake.CreateDirectory(P.Combine(basedir, "linux-arm")); - Cake.StartProcess("arm-none-eabi-gcc", "-shared -o " + NativeDeps[i] + " empty.c"); - Cake.StartProcess("arm-none-eabi-gcc", "-Wl,--no-as-needed -shared -o " + P.Combine(basedir, "linux-arm", NativeDeps[i + 1] + ".so") + " -fPIC -L. -l:" + NativeDeps[i] + ""); - } - lines.Add(""); - - F.WriteAllLines(P.Combine(basedir, Name + ".dll.config"), lines.ToArray()); - } } diff --git a/CakeScripts/Settings.cs b/CakeScripts/Settings.cs index bd183fea8..419f5b3ee 100755 --- a/CakeScripts/Settings.cs +++ b/CakeScripts/Settings.cs @@ -11,46 +11,28 @@ class Settings { AssemblyList = new List() { - new GAssembly("GLibSharp") - { - NativeDeps = new[] { - "libglib-2.0.so.0", "libglib-2.0-0.dll", - "libgobject-2.0.so.0", "libgobject-2.0-0.dll", - "libgthread-2.0.so.0", "libgthread-2.0-0.dll" - } - }, + new GAssembly("GLibSharp"), new GAssembly("GioSharp") { Deps = new[] { "GLibSharp" }, - NativeDeps = new[] { "libgio-2.0.so.0", "libgio-2.0-0.dll" } }, new GAssembly("AtkSharp") { Deps = new[] { "GLibSharp" }, - NativeDeps = new[] { "libatk-1.0.so.0", "libatk-1.0-0.dll" }, ExtraArgs = "--abi-cs-usings=Atk,GLib" }, - new GAssembly("CairoSharp") - { - NativeDeps = new[] { "libcairo.so.2", "libcairo-2.dll" } - }, + new GAssembly("CairoSharp"), new GAssembly("PangoSharp") { - Deps = new[] { "GLibSharp", "CairoSharp" }, - NativeDeps = new[] { "libpango-1.0.so.0", "libpango-1.0-0.dll" } + Deps = new[] { "GLibSharp", "CairoSharp" } }, new GAssembly("GdkSharp") { - Deps = new[] { "GLibSharp", "GioSharp", "CairoSharp", "PangoSharp" }, - NativeDeps = new[] { - "libgdk-3.so.0", "libgdk-3-0.dll", - "libgdk_pixbuf-2.0.so.0", "libgdk_pixbuf-2.0-0.dll" - } + Deps = new[] { "GLibSharp", "GioSharp", "CairoSharp", "PangoSharp" } }, new GAssembly("GtkSharp") { Deps = new[] { "GLibSharp", "GioSharp", "AtkSharp", "CairoSharp", "PangoSharp", "GdkSharp" }, - NativeDeps = new[] { "libgtk-3.so.0", "libgtk-3-0.dll" }, ExtraArgs = "--abi-cs-usings=Gtk,GLib" } }; diff --git a/Source/Libs/AtkSharp/AtkSharp.csproj b/Source/Libs/AtkSharp/AtkSharp.csproj index dd84e0cfc..be81b8e01 100755 --- a/Source/Libs/AtkSharp/AtkSharp.csproj +++ b/Source/Libs/AtkSharp/AtkSharp.csproj @@ -20,11 +20,6 @@ - - - - - PreserveNewest - + diff --git a/Source/Libs/AtkSharp/AtkSharp.dll.config b/Source/Libs/AtkSharp/AtkSharp.dll.config deleted file mode 100644 index 7378241a8..000000000 --- a/Source/Libs/AtkSharp/AtkSharp.dll.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Source/Libs/AtkSharp/Global.cs b/Source/Libs/AtkSharp/Global.cs index 0424c87d7..ca3ae3f68 100755 --- a/Source/Libs/AtkSharp/Global.cs +++ b/Source/Libs/AtkSharp/Global.cs @@ -27,11 +27,12 @@ namespace Atk { using System.Runtime.InteropServices; public partial class Global { - - [DllImport ("libatk-1.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern uint atk_add_global_event_listener (GLib.Signal.EmissionHookNative hook, IntPtr event_type); - public static uint AddGlobalEventListener (GLib.Signal.EmissionHook hook, string event_type) + delegate uint d_atk_add_global_event_listener(GLib.Signal.EmissionHookNative hook, IntPtr event_type); + static d_atk_add_global_event_listener atk_add_global_event_listener = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Atk), "atk_add_global_event_listener")); + + + public static uint AddGlobalEventListener (GLib.Signal.EmissionHook hook, string event_type) { IntPtr native_event_type = GLib.Marshaller.StringToPtrGStrdup (event_type); uint id = atk_add_global_event_listener (new GLib.Signal.EmissionHookMarshaler (hook).Callback, native_event_type); diff --git a/Source/Libs/AtkSharp/linux-arm/libatk-1.0-0.dll.so b/Source/Libs/AtkSharp/linux-arm/libatk-1.0-0.dll.so deleted file mode 100755 index a98e0f4e0896121ba094e4f1dfee2fe54d71bf5e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5008 zcma)AU2I!L7M^Q6G${))p+5n-iz^kWh~~zytXkL=YMQ2~BB3Y^4~U1$jeXOY+HttP z*-f61(4t)lBzV}L2bN8=;sHTHe&|Dm3W`MO1L{Ngk*ENPIF3atDr6862(8xpeKYsO zgOx&$a_*UL=FFLyGe74zPmhcqaU4epCDmRtED_f~K(_y%30)K17-z&C?`71#Zo;GC0|f|;YK;9R(Fx=5%eF5C#Y z1H1*y`Syc1qYE?wO2(_dw8eNY39E0QzPsDtG_3p^_)6SP{1`jN#5w#P%zY!JF*EiQ z`+cx~Mz@#`^~EQw$$(FR?eSKDZF|oF3uRFF8f?$!A!&r9{gWMd-ohD_e+1j((O2hU z2luHSH4ZF9d$R%{GvF`5?eWtpfd$+4CeSX#{!eMZ9pn7^)TfZ*?=))e&@JYZq3{Yb zg-Cf*5X$rNK^UAURH7jCrb53IpmnN@`b}#~eqm;KeByZIhtb@uDg~uV5Gg+j=4sI@ z7AAAry61PqD2PO51?%>T&`IY1%urpx7%s#2bcI;uQxvQlA>F!DU~B?@Np zx~$D}+Oc_HKRP*Zx0`h4gsXyaP@!mWi%QLY&8%y3{ zwqJ?mUs0dHML11~3wR29n!qKkQeq=cQ{wWSp~U$=ONooSOo{EefHS@WeOD-9=VMA- zsEd@i%%4-@0x* z>4O88lLwb-yI8M|*ZbAt_Ij&zo0DCttL(W(`rzAoesYG_v3}7-e~10k>BUA`EjHF$ zt*=C%N3)4FQ-3|SeKEV(m0Ve>sZ4LJSM}BLE^hsxxx3Cf=e4o5t=Xm8CxY)EUi-`{ ze;Ah&sQ*aH_YJSLvhUVge|Wc^$|kX{lG4pwWt-Xx$ zf55oeT=u4PwS8azU+ZbiLDP#kPorSs_rZMo`8M(mE;``70@i!P@c@HFG6W=q&A+C(Eg7jmn zRi^E0CB{dgb=bWcQ)lQdeEh(lEGTC;id{qFWBVr#j~!LlCAys+r!Te5+3xI2_B*$> zjk04*Tt6wPy=c~NFjs5*Vz7yrT&KaN!1WtUFScWo#6HfQl+;nv?3cl2?hnGre7%<3PlHXQ=lf)^iG1R_q++x-`)1miF|=a?V=+nYX;SZ^uF{_*cGGrP zN`2G16D<;Zd0L2N{tENo*Y1wlgi%jf2pmCOY&9WxWngp9d_ljM0tb@w^-A zR+AP^;KWg%@4BIG#n>$CbFe(1YzT4REE!v+ySol1;+PO>sEc?UUuVPHo zygr@J0?YcD`~4kQ&L4BXmpb&{uy6)8-UGJBdjMD3w)a7Y{yMNdpQhE$+wy$}{;!2O zUN7w1a&u}= zo;g_AJ5el8`b94vmBWhX&&{h`xini0q9E@c_}%_{HdoRKsmbh+r$ym{GWlqJu2fo3 z<;f?5T*U7C(cNmX^3Ay0FRsyb2RHtH>H~TP>&aqSo_Az?Xl%qAdH67s&%=*BJT!K6 zm{YHmy=i|YUksG@;OMbKL!;iYBS(&pOn4JRhek&vX>F&lI&IZSugQwNjx1WQ0EV@m zmEK-GH*Y7!Kc7KMg0A!MP4e%JgjoL;*hu3|zAgzgljWag)|>t|P;OJcP{r zjQtqx0d*cW3`yGz9eh8@{U{4jkMsao^!Tomr*(_@P>*~REP9N`iEn5%San_StkDxOg~YN zdBK&d=y6_X(t3=K{6Ef0j3Klw?#FXr&X4vOCztW#e=o{HGVY705Iw%vm!Q`e;!NY>oI%^!jNWd$$dO=Z5yuV4f+CDb$bD@^Lyn TCb7r7-`1ZH)=EV3*;dZ07PL}Y z2~K1v8yRB>|DrWYWNxSi_>`W~wC3~zw`L&@6I+ioI7{> zuOGfT`xdK|UP3E=GQX3PMj2H^mkG9%f6MsS*75bti$A{c-1VaeH(r>yRrAZWUv<=2 z8KR9W8zD?Y>EDn>h<3AVgfJ0%`FCFt{8`58XcZZCMnL@6vj%PhBr>DY)(YA-v*^Hfcot$giWG6F8m+T>CWbf_kvEzwcVmO(16S=;g_Ea{L z=yL{B2~SsCW5_r zQ&;!iwsw2Fx!v5MC(o>$BaMH8O8Y2toTt(CN#4?OdQ+54cu#P?59oDU`h5Uir}0J| zU*M3ZY7Nz&oFUn3(6kSicMde;!{v;E?)Y&3)>tQQR#~SjpI>2+_41@!KKF%n;!4$J zxREu{@-FN8t%=Il#isd=b?Sz@j$PWcOZC9q)R0-b=_TbeaJhC8`oCxvP~^+$9 z=R{D=2XUCu^0?Ojp=B-VUjI9Wdvkb1+z-0i+aEEu@J)29v5RjkO<}uYa)fUZxL^DA z5x&1*UxIjqupdFZg0OEvypj;VAijhU_aMHsuzx{(;XP9H5#CkQKZ5o}?w87b1&!dK z`5YpA+HsD3F!x_gIKM%>hU*%JA5!fI)e`P$eq}^%hoO73=p%g3#{LEE>lfU=J^Oq7 zW~wdcwSsQ(Ehb3v{+1VsPmRVW{g*$+?$tQ{KCq~07eCAR#*X_v-j7a&FN{x`aTynX zZ&WAz7*qBO^ZcrwP$ZT zqg)DtMOXL!w$^TYe`n{D9es9RYg=~*`~6epNSA%Q5>u%9B=w&_K}b5fi!xI*>aQAk zMJzJ&V`n6EM<<<(aj#kS;)i)8#SK*#Gr25A zCU1C}H!*nl|Ai!Zf_$q{tHSpOd~>MJ(4Q$XS$~_q#qh^>3S8=)LikQ25Aaapia4p< z0si=&6}UE(aru=gK7D%bJj%9o8EJz7_*%uGIxpPLSV! zTpNIYTd?#RsH*}#9`Z*%3NH0@KZVC1XQhmf^&=ku58Gq?=<^kB$Tt-6LEeD>KM31H z27jA|>wq8P_#yks`r(g!WlAQ+WT@x- z1ODLWSmpO84&H{AI3wy265BO@5Hu z@Lv_e;qT`-JATvMdVE6%ehn+{=O5OCxXAg$-2MIs^@|_FKw23RN#<9~|Dp`Y^ts0h H&#?dB4($36 diff --git a/Source/Libs/AtkSharp/linux-x86/libatk-1.0-0.dll.so b/Source/Libs/AtkSharp/linux-x86/libatk-1.0-0.dll.so deleted file mode 100755 index a88897af519558b1f50c259f5cfc89c71d97190b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6508 zcmeHLU2IfU5T5MSK*W;Q?5p@K!Ml!-dyB;w-%NHkb7$tv zoH^&rIeX8Yd84VV+2`|#2EX`)Qk`F<2K24fuBJu|Stc7~t&}UhwkO@c#Kol)N=50* zSBR8Xx;TU8S>Up~z6jKS-hiGs1(`@aTq(Q*s<8?@QS0{Ja6%CO2JDaFWgqn3@v~?n zvOm{G8USL6(z2^d)*i6eBwK@1RnMNTt=!T-*>YsXSJZJmv?nbN$tR=_0Uri7G<`pP z_QzvKuN~fB@#XmK$8LW2%VTI>02Lm|0Kd;8uLDot8VoSCS^%Z|Imm$D+Na1vb6q`CrikNhyr;D>Mpu=z`hkY7L&*XBsx6eCEvrnKgeX026 z45&zMk^#(}qHjX(6b*YOTnQa3sxmzj^S|s*&Xd1`FrmOI9( zuF)Im>A>FHRQgismCVGrvtEA9jDJC&*^luUzIX`zySxrIULL*Cabc!tG?SiQa^YsB z@7lLBPGIcVEL~o8mSZ`4_U5j_;n>01E1A)|8*ol*9$Cq~k-36&c;yuWJfU3S|`!B%!TLW{amd3{CjSa|(HyYc`Ey&>>0L;w^ zZnXe0;G~p{NddS<0_zC`uASglQ4!(XU73*);o1m(w@RR5;L6On=kr>>iUvZJU$kFk z<092_G9!zZB`E_2B$YgR8^%bV+~bKzDfj zUxm!GMDSt#KY;4^`4GP>WX_jBy*f*V5+Rq#a?ga=ydJW)XB}h{WWArPYi#w{uY>(= zkIeqBK=#&6f{^F^1w{R!U`H^3qtJWnC=yIMDQBRk#|+ARiNtbZR**%K6v`T*gw-2O zblXuYSxudDm>a1^QYr+`+R3*xnc-(T*g2GT;owv?&e-(;# zpaq2?4zhT;NfoTbObx{xyBpL=y0lMo@q`mLd*cIU_dp~X+7t!^u=65nmu!&?UoB+KZ`%H2b5D*_&|0bi#vpsx_M7K6igyBX?_Do#x@ejzxm- zo^a>`W3voqq6#J^&PNP;&QtgAfOibvhJ01>KSQhnYRLZu#YDqh+zYhhdzn}RKL5&4 z|6AJfe&O4Zc6?tGPlBfotfIV|>VWJ^JHE$>C%|i..\..\..\BuildOutput\Release - - - - - PreserveNewest - + diff --git a/Source/Libs/CairoSharp/CairoSharp.dll.config b/Source/Libs/CairoSharp/CairoSharp.dll.config deleted file mode 100644 index 225389168..000000000 --- a/Source/Libs/CairoSharp/CairoSharp.dll.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Source/Libs/CairoSharp/ImageSurface.cs b/Source/Libs/CairoSharp/ImageSurface.cs index 3b0678e2a..a2e90cb62 100755 --- a/Source/Libs/CairoSharp/ImageSurface.cs +++ b/Source/Libs/CairoSharp/ImageSurface.cs @@ -60,7 +60,7 @@ namespace Cairo { } public ImageSurface (IntPtr data, Format format, int width, int height, int stride) - : base (NativeMethods.cairo_image_surface_create_for_data (data, format, width, height, stride), true) + : base (NativeMethods.cairo_image_surface_create_for_data2 (data, format, width, height, stride), true) { } diff --git a/Source/Libs/CairoSharp/NativeMethods.cs b/Source/Libs/CairoSharp/NativeMethods.cs index 20fa29998..f07c83d84 100755 --- a/Source/Libs/CairoSharp/NativeMethods.cs +++ b/Source/Libs/CairoSharp/NativeMethods.cs @@ -43,477 +43,472 @@ namespace Cairo { const string cairo = "libcairo-2.dll"; - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_append_path (IntPtr cr, IntPtr path); + internal delegate void d_cairo_append_path(IntPtr cr, IntPtr path); + internal static d_cairo_append_path cairo_append_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_append_path")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_arc (IntPtr cr, double xc, double yc, double radius, double angle1, double angle2); + internal delegate void d_cairo_arc(IntPtr cr, double xc, double yc, double radius, double angle1, double angle2); + internal static d_cairo_arc cairo_arc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_arc")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_arc_negative (IntPtr cr, double xc, double yc, double radius, double angle1, double angle2); + internal delegate void d_cairo_arc_negative(IntPtr cr, double xc, double yc, double radius, double angle1, double angle2); + internal static d_cairo_arc_negative cairo_arc_negative = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_arc_negative")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_atsui_font_face_create_for_atsu_font_id (IntPtr font_id); + internal delegate IntPtr d_cairo_atsui_font_face_create_for_atsu_font_id(IntPtr font_id); + internal static d_cairo_atsui_font_face_create_for_atsu_font_id cairo_atsui_font_face_create_for_atsu_font_id = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_atsui_font_face_create_for_atsu_font_id")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_clip (IntPtr cr); + internal delegate void d_cairo_clip(IntPtr cr); + internal static d_cairo_clip cairo_clip = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_clip")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_clip_extents (IntPtr cr, out double x1, out double y1, out double x2, out double y2); + internal delegate void d_cairo_clip_extents(IntPtr cr, out double x1, out double y1, out double x2, out double y2); + internal static d_cairo_clip_extents cairo_clip_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_clip_extents")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_clip_preserve (IntPtr cr); + internal delegate void d_cairo_clip_preserve(IntPtr cr); + internal static d_cairo_clip_preserve cairo_clip_preserve = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_clip_preserve")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_close_path (IntPtr cr); + internal delegate void d_cairo_close_path(IntPtr cr); + internal static d_cairo_close_path cairo_close_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_close_path")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_copy_clip_rectangle_list (IntPtr cr); + internal delegate IntPtr d_cairo_copy_clip_rectangle_list(IntPtr cr); + internal static d_cairo_copy_clip_rectangle_list cairo_copy_clip_rectangle_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_copy_clip_rectangle_list")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_copy_page (IntPtr cr); + internal delegate void d_cairo_copy_page(IntPtr cr); + internal static d_cairo_copy_page cairo_copy_page = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_copy_page")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_copy_path (IntPtr cr); + internal delegate IntPtr d_cairo_copy_path(IntPtr cr); + internal static d_cairo_copy_path cairo_copy_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_copy_path")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_copy_path_flat (IntPtr cr); + internal delegate IntPtr d_cairo_copy_path_flat(IntPtr cr); + internal static d_cairo_copy_path_flat cairo_copy_path_flat = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_copy_path_flat")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_create (IntPtr target); + internal delegate IntPtr d_cairo_create(IntPtr target); + internal static d_cairo_create cairo_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_create")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_curve_to (IntPtr cr, double x1, double y1, double x2, double y2, double x3, double y3); + internal delegate void d_cairo_curve_to(IntPtr cr, double x1, double y1, double x2, double y2, double x3, double y3); + internal static d_cairo_curve_to cairo_curve_to = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_curve_to")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_debug_reset_static_data (); + internal delegate void d_cairo_debug_reset_static_data(); + internal static d_cairo_debug_reset_static_data cairo_debug_reset_static_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_debug_reset_static_data")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_destroy (IntPtr cr); + internal delegate void d_cairo_destroy(IntPtr cr); + internal static d_cairo_destroy cairo_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_destroy")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_device_acquire (IntPtr device); + internal delegate Status d_cairo_device_acquire(IntPtr device); + internal static d_cairo_device_acquire cairo_device_acquire = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_acquire")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_device_destroy (IntPtr device); + internal delegate void d_cairo_device_destroy(IntPtr device); + internal static d_cairo_device_destroy cairo_device_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_destroy")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_device_finish (IntPtr device); + internal delegate void d_cairo_device_finish(IntPtr device); + internal static d_cairo_device_finish cairo_device_finish = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_finish")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_device_flush (IntPtr device); + internal delegate void d_cairo_device_flush(IntPtr device); + internal static d_cairo_device_flush cairo_device_flush = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_flush")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern uint cairo_device_get_reference_count (IntPtr device); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern DeviceType cairo_device_get_type (IntPtr device); + internal delegate DeviceType d_cairo_device_get_type(IntPtr device); + internal static d_cairo_device_get_type cairo_device_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_get_type")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_device_get_user_data (IntPtr device, IntPtr key); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_device_reference (IntPtr device); + internal delegate IntPtr d_cairo_device_reference(IntPtr device); + internal static d_cairo_device_reference cairo_device_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_reference")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_device_release (IntPtr device); + internal delegate void d_cairo_device_release(IntPtr device); + internal static d_cairo_device_release cairo_device_release = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_release")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern int cairo_device_set_user_data (IntPtr device, IntPtr key, IntPtr user_data, IntPtr destroy); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_device_status (IntPtr device); + internal delegate Status d_cairo_device_status(IntPtr device); + internal static d_cairo_device_status cairo_device_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_status")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_device_to_user (IntPtr cr, ref double x, ref double y); + internal delegate void d_cairo_device_to_user(IntPtr cr, ref double x, ref double y); + internal static d_cairo_device_to_user cairo_device_to_user = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_to_user")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_device_to_user_distance (IntPtr cr, ref double dx, ref double dy); + internal delegate void d_cairo_device_to_user_distance(IntPtr cr, ref double dx, ref double dy); + internal static d_cairo_device_to_user_distance cairo_device_to_user_distance = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_device_to_user_distance")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_fill (IntPtr cr); + internal delegate void d_cairo_fill(IntPtr cr); + internal static d_cairo_fill cairo_fill = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_fill")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_fill_extents (IntPtr cr, out double x1, out double y1, out double x2, out double y2); + internal delegate void d_cairo_fill_extents(IntPtr cr, out double x1, out double y1, out double x2, out double y2); + internal static d_cairo_fill_extents cairo_fill_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_fill_extents")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_fill_preserve (IntPtr cr); + internal delegate void d_cairo_fill_preserve(IntPtr cr); + internal static d_cairo_fill_preserve cairo_fill_preserve = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_fill_preserve")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_font_extents (IntPtr cr, out FontExtents extents); + internal delegate void d_cairo_font_extents(IntPtr cr, out FontExtents extents); + internal static d_cairo_font_extents cairo_font_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_extents")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_font_face_destroy (IntPtr font_face); + internal delegate void d_cairo_font_face_destroy(IntPtr font_face); + internal static d_cairo_font_face_destroy cairo_font_face_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_destroy")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern uint cairo_font_face_get_reference_count (IntPtr font_face); + internal delegate uint d_cairo_font_face_get_reference_count(IntPtr font_face); + internal static d_cairo_font_face_get_reference_count cairo_font_face_get_reference_count = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_get_reference_count")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern FontType cairo_font_face_get_type (IntPtr font_face); + internal delegate FontType d_cairo_font_face_get_type(IntPtr font_face); + internal static d_cairo_font_face_get_type cairo_font_face_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_get_type")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_font_face_get_user_data (IntPtr font_face, IntPtr key); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_font_face_reference (IntPtr font_face); + internal delegate IntPtr d_cairo_font_face_reference(IntPtr font_face); + internal static d_cairo_font_face_reference cairo_font_face_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_reference")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern Status cairo_font_face_set_user_data (IntPtr font_face, IntPtr key, IntPtr user_data, DestroyFunc destroy); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_font_face_status (IntPtr font_face); + internal delegate Status d_cairo_font_face_status(IntPtr font_face); + internal static d_cairo_font_face_status cairo_font_face_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_face_status")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_font_options_copy (IntPtr original); + internal delegate IntPtr d_cairo_font_options_copy(IntPtr original); + internal static d_cairo_font_options_copy cairo_font_options_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_copy")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_font_options_create (); + internal delegate IntPtr d_cairo_font_options_create(); + internal static d_cairo_font_options_create cairo_font_options_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_create")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_font_options_destroy (IntPtr options); + internal delegate void d_cairo_font_options_destroy(IntPtr options); + internal static d_cairo_font_options_destroy cairo_font_options_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_destroy")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - [return: MarshalAs (UnmanagedType.U1)] - internal static extern bool cairo_font_options_equal (IntPtr options, IntPtr other); + internal delegate bool d_cairo_font_options_equal(IntPtr options, IntPtr other); + internal static d_cairo_font_options_equal cairo_font_options_equal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_equal")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Antialias cairo_font_options_get_antialias (IntPtr options); + internal delegate Antialias d_cairo_font_options_get_antialias(IntPtr options); + internal static d_cairo_font_options_get_antialias cairo_font_options_get_antialias = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_get_antialias")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern HintMetrics cairo_font_options_get_hint_metrics (IntPtr options); + internal delegate HintMetrics d_cairo_font_options_get_hint_metrics(IntPtr options); + internal static d_cairo_font_options_get_hint_metrics cairo_font_options_get_hint_metrics = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_get_hint_metrics")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern HintStyle cairo_font_options_get_hint_style (IntPtr options); + internal delegate HintStyle d_cairo_font_options_get_hint_style(IntPtr options); + internal static d_cairo_font_options_get_hint_style cairo_font_options_get_hint_style = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_get_hint_style")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern SubpixelOrder cairo_font_options_get_subpixel_order (IntPtr options); + internal delegate SubpixelOrder d_cairo_font_options_get_subpixel_order(IntPtr options); + internal static d_cairo_font_options_get_subpixel_order cairo_font_options_get_subpixel_order = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_get_subpixel_order")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern long cairo_font_options_hash (IntPtr options); + internal delegate long d_cairo_font_options_hash(IntPtr options); + internal static d_cairo_font_options_hash cairo_font_options_hash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_hash")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_font_options_merge (IntPtr options, IntPtr other); + internal delegate void d_cairo_font_options_merge(IntPtr options, IntPtr other); + internal static d_cairo_font_options_merge cairo_font_options_merge = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_merge")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_font_options_set_antialias (IntPtr options, Antialias aa); + internal delegate void d_cairo_font_options_set_antialias(IntPtr options, Antialias aa); + internal static d_cairo_font_options_set_antialias cairo_font_options_set_antialias = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_set_antialias")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_font_options_set_hint_metrics (IntPtr options, HintMetrics metrics); + internal delegate void d_cairo_font_options_set_hint_metrics(IntPtr options, HintMetrics metrics); + internal static d_cairo_font_options_set_hint_metrics cairo_font_options_set_hint_metrics = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_set_hint_metrics")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_font_options_set_hint_style (IntPtr options, HintStyle style); + internal delegate void d_cairo_font_options_set_hint_style(IntPtr options, HintStyle style); + internal static d_cairo_font_options_set_hint_style cairo_font_options_set_hint_style = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_set_hint_style")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_font_options_set_subpixel_order (IntPtr options, SubpixelOrder order); + internal delegate void d_cairo_font_options_set_subpixel_order(IntPtr options, SubpixelOrder order); + internal static d_cairo_font_options_set_subpixel_order cairo_font_options_set_subpixel_order = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_set_subpixel_order")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_font_options_status (IntPtr options); + internal delegate Status d_cairo_font_options_status(IntPtr options); + internal static d_cairo_font_options_status cairo_font_options_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_font_options_status")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern int cairo_format_stride_for_width (Format format, int width); + internal delegate int d_cairo_format_stride_for_width(Format format, int width); + internal static d_cairo_format_stride_for_width cairo_format_stride_for_width = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_format_stride_for_width")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_ft_font_face_create_for_ft_face (IntPtr face, int load_flags); + internal delegate IntPtr d_cairo_ft_font_face_create_for_ft_face(IntPtr face, int load_flags); + internal static d_cairo_ft_font_face_create_for_ft_face cairo_ft_font_face_create_for_ft_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_font_face_create_for_ft_face")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_ft_font_face_create_for_pattern (IntPtr fc_pattern); + internal delegate IntPtr d_cairo_ft_font_face_create_for_pattern(IntPtr fc_pattern); + internal static d_cairo_ft_font_face_create_for_pattern cairo_ft_font_face_create_for_pattern = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_font_face_create_for_pattern")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_ft_font_options_substitute (FontOptions options, IntPtr pattern); + internal delegate void d_cairo_ft_font_options_substitute(FontOptions options, IntPtr pattern); + internal static d_cairo_ft_font_options_substitute cairo_ft_font_options_substitute = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_font_options_substitute")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_ft_scaled_font_lock_face (IntPtr scaled_font); + internal delegate IntPtr d_cairo_ft_scaled_font_lock_face(IntPtr scaled_font); + internal static d_cairo_ft_scaled_font_lock_face cairo_ft_scaled_font_lock_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_scaled_font_lock_face")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_ft_scaled_font_unlock_face (IntPtr scaled_font); + internal delegate void d_cairo_ft_scaled_font_unlock_face(IntPtr scaled_font); + internal static d_cairo_ft_scaled_font_unlock_face cairo_ft_scaled_font_unlock_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_scaled_font_unlock_face")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Antialias cairo_get_antialias (IntPtr cr); + internal delegate Antialias d_cairo_get_antialias(IntPtr cr); + internal static d_cairo_get_antialias cairo_get_antialias = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_antialias")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_get_current_point (IntPtr cr, out double x, out double y); + internal delegate void d_cairo_get_current_point(IntPtr cr, out double x, out double y); + internal static d_cairo_get_current_point cairo_get_current_point = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_current_point")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_get_dash (IntPtr cr, IntPtr dashes, out double offset); + internal delegate void d_cairo_get_dash(IntPtr cr, IntPtr dashes, out double offset); + internal static d_cairo_get_dash cairo_get_dash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_dash")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern int cairo_get_dash_count (IntPtr cr); + internal delegate int d_cairo_get_dash_count(IntPtr cr); + internal static d_cairo_get_dash_count cairo_get_dash_count = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_dash_count")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern FillRule cairo_get_fill_rule (IntPtr cr); + internal delegate FillRule d_cairo_get_fill_rule(IntPtr cr); + internal static d_cairo_get_fill_rule cairo_get_fill_rule = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_fill_rule")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_get_font_face (IntPtr cr); + internal delegate IntPtr d_cairo_get_font_face(IntPtr cr); + internal static d_cairo_get_font_face cairo_get_font_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_font_face")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_get_font_matrix (IntPtr cr, out Matrix matrix); + internal delegate void d_cairo_get_font_matrix(IntPtr cr, out Matrix matrix); + internal static d_cairo_get_font_matrix cairo_get_font_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_font_matrix")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_get_font_options (IntPtr cr, IntPtr options); + internal delegate void d_cairo_get_font_options(IntPtr cr, IntPtr options); + internal static d_cairo_get_font_options cairo_get_font_options = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_font_options")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_get_group_target (IntPtr cr); + internal delegate IntPtr d_cairo_get_group_target(IntPtr cr); + internal static d_cairo_get_group_target cairo_get_group_target = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_group_target")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern LineCap cairo_get_line_cap (IntPtr cr); + internal delegate LineCap d_cairo_get_line_cap(IntPtr cr); + internal static d_cairo_get_line_cap cairo_get_line_cap = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_line_cap")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern LineJoin cairo_get_line_join (IntPtr cr); + internal delegate LineJoin d_cairo_get_line_join(IntPtr cr); + internal static d_cairo_get_line_join cairo_get_line_join = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_line_join")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern double cairo_get_line_width (IntPtr cr); + internal delegate double d_cairo_get_line_width(IntPtr cr); + internal static d_cairo_get_line_width cairo_get_line_width = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_line_width")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_get_matrix (IntPtr cr, Matrix matrix); + internal delegate void d_cairo_get_matrix(IntPtr cr, Matrix matrix); + internal static d_cairo_get_matrix cairo_get_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_matrix")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern double cairo_get_miter_limit (IntPtr cr); + internal delegate double d_cairo_get_miter_limit(IntPtr cr); + internal static d_cairo_get_miter_limit cairo_get_miter_limit = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_miter_limit")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Operator cairo_get_operator (IntPtr cr); + internal delegate Operator d_cairo_get_operator(IntPtr cr); + internal static d_cairo_get_operator cairo_get_operator = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_operator")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern uint cairo_get_reference_count (IntPtr surface); + internal delegate uint d_cairo_get_reference_count(IntPtr surface); + internal static d_cairo_get_reference_count cairo_get_reference_count = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_reference_count")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_get_scaled_font (IntPtr cr); + internal delegate IntPtr d_cairo_get_scaled_font(IntPtr cr); + internal static d_cairo_get_scaled_font cairo_get_scaled_font = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_scaled_font")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_get_source (IntPtr cr); + internal delegate IntPtr d_cairo_get_source(IntPtr cr); + internal static d_cairo_get_source cairo_get_source = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_source")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_get_target (IntPtr cr); + internal delegate IntPtr d_cairo_get_target(IntPtr cr); + internal static d_cairo_get_target cairo_get_target = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_target")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern double cairo_get_tolerance (IntPtr cr); + internal delegate double d_cairo_get_tolerance(IntPtr cr); + internal static d_cairo_get_tolerance cairo_get_tolerance = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_tolerance")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_get_user_data (IntPtr cr, IntPtr key); + internal delegate IntPtr d_cairo_get_user_data(IntPtr cr, IntPtr key); + internal static d_cairo_get_user_data cairo_get_user_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_get_user_data")); // this isn't in the 1.10 doc index - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_glitz_surface_create (IntPtr surface); + internal delegate IntPtr d_cairo_glitz_surface_create(IntPtr surface); + internal static d_cairo_glitz_surface_create cairo_glitz_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_glitz_surface_create")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_glyph_allocate (int num_glyphs); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_glyph_extents (IntPtr cr, IntPtr glyphs, int num_glyphs, out TextExtents extents); + internal delegate void d_cairo_glyph_extents(IntPtr cr, IntPtr glyphs, int num_glyphs, out TextExtents extents); + internal static d_cairo_glyph_extents cairo_glyph_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_glyph_extents")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_glyph_free (IntPtr glyphs); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_glyph_path (IntPtr cr, IntPtr glyphs, int num_glyphs); + internal delegate void d_cairo_glyph_path(IntPtr cr, IntPtr glyphs, int num_glyphs); + internal static d_cairo_glyph_path cairo_glyph_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_glyph_path")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - [return: MarshalAs (UnmanagedType.U1)] - internal static extern bool cairo_has_current_point (IntPtr cr); + internal delegate bool d_cairo_has_current_point(IntPtr cr); + internal static d_cairo_has_current_point cairo_has_current_point = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_has_current_point")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_identity_matrix (IntPtr cr); + internal delegate void d_cairo_identity_matrix(IntPtr cr); + internal static d_cairo_identity_matrix cairo_identity_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_identity_matrix")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_image_surface_create (Cairo.Format format, int width, int height); + internal delegate IntPtr d_cairo_image_surface_create(Cairo.Format format, int width, int height); + internal static d_cairo_image_surface_create cairo_image_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_create")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_image_surface_create_for_data (byte[] data, Cairo.Format format, int width, int height, int stride); + internal delegate IntPtr d_cairo_image_surface_create_for_data(byte[] data, Cairo.Format format, int width, int height, int stride); + internal static d_cairo_image_surface_create_for_data cairo_image_surface_create_for_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_create_for_data")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_image_surface_create_for_data (IntPtr data, Cairo.Format format, int width, int height, int stride); + internal delegate IntPtr d_cairo_image_surface_create_for_data2(IntPtr data, Cairo.Format format, int width, int height, int stride); + internal static d_cairo_image_surface_create_for_data2 cairo_image_surface_create_for_data2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_create_for_data")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_image_surface_create_from_png (string filename); + internal delegate IntPtr d_cairo_image_surface_create_from_png(string filename); + internal static d_cairo_image_surface_create_from_png cairo_image_surface_create_from_png = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_create_from_png")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_image_surface_create_from_png_stream (string filename); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_image_surface_get_data (IntPtr surface); + internal delegate IntPtr d_cairo_image_surface_get_data(IntPtr surface); + internal static d_cairo_image_surface_get_data cairo_image_surface_get_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_data")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Format cairo_image_surface_get_format (IntPtr surface); + internal delegate Format d_cairo_image_surface_get_format(IntPtr surface); + internal static d_cairo_image_surface_get_format cairo_image_surface_get_format = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_format")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern int cairo_image_surface_get_height (IntPtr surface); + internal delegate int d_cairo_image_surface_get_height(IntPtr surface); + internal static d_cairo_image_surface_get_height cairo_image_surface_get_height = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_height")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern int cairo_image_surface_get_stride (IntPtr surface); + internal delegate int d_cairo_image_surface_get_stride(IntPtr surface); + internal static d_cairo_image_surface_get_stride cairo_image_surface_get_stride = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_stride")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern int cairo_image_surface_get_width (IntPtr surface); + internal delegate int d_cairo_image_surface_get_width(IntPtr surface); + internal static d_cairo_image_surface_get_width cairo_image_surface_get_width = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_image_surface_get_width")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - [return: MarshalAs (UnmanagedType.U1)] - internal static extern bool cairo_in_clip (IntPtr cr, double x, double y); + internal delegate bool d_cairo_in_clip(IntPtr cr, double x, double y); + internal static d_cairo_in_clip cairo_in_clip = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_in_clip")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - [return: MarshalAs (UnmanagedType.U1)] - internal static extern bool cairo_in_fill (IntPtr cr, double x, double y); + internal delegate bool d_cairo_in_fill(IntPtr cr, double x, double y); + internal static d_cairo_in_fill cairo_in_fill = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_in_fill")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - [return: MarshalAs (UnmanagedType.U1)] - internal static extern bool cairo_in_stroke (IntPtr cr, double x, double y); + internal delegate bool d_cairo_in_stroke(IntPtr cr, double x, double y); + internal static d_cairo_in_stroke cairo_in_stroke = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_in_stroke")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_line_to (IntPtr cr, double x, double y); + internal delegate void d_cairo_line_to(IntPtr cr, double x, double y); + internal static d_cairo_line_to cairo_line_to = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_line_to")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_mask (IntPtr cr, IntPtr pattern); + internal delegate void d_cairo_mask(IntPtr cr, IntPtr pattern); + internal static d_cairo_mask cairo_mask = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_mask")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_mask_surface (IntPtr cr, IntPtr surface, double x, double y); + internal delegate void d_cairo_mask_surface(IntPtr cr, IntPtr surface, double x, double y); + internal static d_cairo_mask_surface cairo_mask_surface = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_mask_surface")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_matrix_init (Matrix matrix, double xx, double yx, double xy, double yy, double x0, double y0); + internal delegate void d_cairo_matrix_init(Matrix matrix, double xx, double yx, double xy, double yy, double x0, double y0); + internal static d_cairo_matrix_init cairo_matrix_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_matrix_init_identity (Matrix matrix); + internal delegate void d_cairo_matrix_init_identity(Matrix matrix); + internal static d_cairo_matrix_init_identity cairo_matrix_init_identity = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init_identity")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_matrix_init_rotate (Matrix matrix, double radians); + internal delegate void d_cairo_matrix_init_rotate(Matrix matrix, double radians); + internal static d_cairo_matrix_init_rotate cairo_matrix_init_rotate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init_rotate")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_matrix_init_scale (Matrix matrix, double sx, double sy); + internal delegate void d_cairo_matrix_init_scale(Matrix matrix, double sx, double sy); + internal static d_cairo_matrix_init_scale cairo_matrix_init_scale = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init_scale")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_matrix_init_translate (Matrix matrix, double tx, double ty); + internal delegate void d_cairo_matrix_init_translate(Matrix matrix, double tx, double ty); + internal static d_cairo_matrix_init_translate cairo_matrix_init_translate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_init_translate")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_matrix_invert (Matrix matrix); + internal delegate Status d_cairo_matrix_invert(Matrix matrix); + internal static d_cairo_matrix_invert cairo_matrix_invert = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_invert")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_matrix_multiply (Matrix result, Matrix a, Matrix b); + internal delegate void d_cairo_matrix_multiply(Matrix result, Matrix a, Matrix b); + internal static d_cairo_matrix_multiply cairo_matrix_multiply = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_multiply")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_matrix_rotate (Matrix matrix, double radians); + internal delegate void d_cairo_matrix_rotate(Matrix matrix, double radians); + internal static d_cairo_matrix_rotate cairo_matrix_rotate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_rotate")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_matrix_scale (Matrix matrix, double sx, double sy); + internal delegate void d_cairo_matrix_scale(Matrix matrix, double sx, double sy); + internal static d_cairo_matrix_scale cairo_matrix_scale = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_scale")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_matrix_transform_distance (Matrix matrix, ref double dx, ref double dy); + internal delegate void d_cairo_matrix_transform_distance(Matrix matrix, ref double dx, ref double dy); + internal static d_cairo_matrix_transform_distance cairo_matrix_transform_distance = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_transform_distance")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_matrix_transform_point (Matrix matrix, ref double x, ref double y); + internal delegate void d_cairo_matrix_transform_point(Matrix matrix, ref double x, ref double y); + internal static d_cairo_matrix_transform_point cairo_matrix_transform_point = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_transform_point")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_matrix_translate (Matrix matrix, double tx, double ty); + internal delegate void d_cairo_matrix_translate(Matrix matrix, double tx, double ty); + internal static d_cairo_matrix_translate cairo_matrix_translate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_matrix_translate")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_move_to (IntPtr cr, double x, double y); + internal delegate void d_cairo_move_to(IntPtr cr, double x, double y); + internal static d_cairo_move_to cairo_move_to = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_move_to")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_new_path (IntPtr cr); + internal delegate void d_cairo_new_path(IntPtr cr); + internal static d_cairo_new_path cairo_new_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_new_path")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_new_sub_path (IntPtr cr); + internal delegate void d_cairo_new_sub_path(IntPtr cr); + internal static d_cairo_new_sub_path cairo_new_sub_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_new_sub_path")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_paint (IntPtr cr); + internal delegate void d_cairo_paint(IntPtr cr); + internal static d_cairo_paint cairo_paint = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_paint")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_paint_with_alpha (IntPtr cr, double alpha); + internal delegate void d_cairo_paint_with_alpha(IntPtr cr, double alpha); + internal static d_cairo_paint_with_alpha cairo_paint_with_alpha = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_paint_with_alpha")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_path_destroy (IntPtr path); + internal delegate void d_cairo_path_destroy(IntPtr path); + internal static d_cairo_path_destroy cairo_path_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_path_destroy")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_path_extents (IntPtr cr, out double x1, out double y1, out double x2, out double y2); + internal delegate void d_cairo_path_extents(IntPtr cr, out double x1, out double y1, out double x2, out double y2); + internal static d_cairo_path_extents cairo_path_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_path_extents")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_pattern_add_color_stop_rgb (IntPtr pattern, double offset, double red, double green, double blue); + internal delegate void d_cairo_pattern_add_color_stop_rgb(IntPtr pattern, double offset, double red, double green, double blue); + internal static d_cairo_pattern_add_color_stop_rgb cairo_pattern_add_color_stop_rgb = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_add_color_stop_rgb")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_pattern_add_color_stop_rgba (IntPtr pattern, double offset, double red, double green, double blue, double alpha); + internal delegate void d_cairo_pattern_add_color_stop_rgba(IntPtr pattern, double offset, double red, double green, double blue, double alpha); + internal static d_cairo_pattern_add_color_stop_rgba cairo_pattern_add_color_stop_rgba = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_add_color_stop_rgba")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_pattern_create_for_surface (IntPtr surface); + internal delegate IntPtr d_cairo_pattern_create_for_surface(IntPtr surface); + internal static d_cairo_pattern_create_for_surface cairo_pattern_create_for_surface = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_for_surface")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_pattern_create_linear (double x0, double y0, double x1, double y1); + internal delegate IntPtr d_cairo_pattern_create_linear(double x0, double y0, double x1, double y1); + internal static d_cairo_pattern_create_linear cairo_pattern_create_linear = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_linear")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_pattern_create_radial (double cx0, double cy0, double radius0, double cx1, double cy1, double radius1); + internal delegate IntPtr d_cairo_pattern_create_radial(double cx0, double cy0, double radius0, double cx1, double cy1, double radius1); + internal static d_cairo_pattern_create_radial cairo_pattern_create_radial = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_radial")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_pattern_create_rgb (double r, double g, double b); + internal delegate IntPtr d_cairo_pattern_create_rgb(double r, double g, double b); + internal static d_cairo_pattern_create_rgb cairo_pattern_create_rgb = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_rgb")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_pattern_create_rgba (double r, double g, double b, double a); + internal delegate IntPtr d_cairo_pattern_create_rgba(double r, double g, double b, double a); + internal static d_cairo_pattern_create_rgba cairo_pattern_create_rgba = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_create_rgba")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_pattern_destroy (IntPtr pattern); + internal delegate void d_cairo_pattern_destroy(IntPtr pattern); + internal static d_cairo_pattern_destroy cairo_pattern_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_destroy")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_pattern_get_color_stop_count (IntPtr pattern, out int count); + internal delegate Status d_cairo_pattern_get_color_stop_count(IntPtr pattern, out int count); + internal static d_cairo_pattern_get_color_stop_count cairo_pattern_get_color_stop_count = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_color_stop_count")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_pattern_get_color_stop_rgba (IntPtr pattern, int index, out double offset, out double red, out double green, out double blue, out double alpha); + internal delegate Status d_cairo_pattern_get_color_stop_rgba(IntPtr pattern, int index, out double offset, out double red, out double green, out double blue, out double alpha); + internal static d_cairo_pattern_get_color_stop_rgba cairo_pattern_get_color_stop_rgba = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_color_stop_rgba")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Extend cairo_pattern_get_extend (IntPtr pattern); + internal delegate Extend d_cairo_pattern_get_extend(IntPtr pattern); + internal static d_cairo_pattern_get_extend cairo_pattern_get_extend = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_extend")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Filter cairo_pattern_get_filter (IntPtr pattern); + internal delegate Filter d_cairo_pattern_get_filter(IntPtr pattern); + internal static d_cairo_pattern_get_filter cairo_pattern_get_filter = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_filter")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_pattern_get_linear_points (IntPtr pattern, out double x0, out double y0, out double x1, out double y1); + internal delegate Status d_cairo_pattern_get_linear_points(IntPtr pattern, out double x0, out double y0, out double x1, out double y1); + internal static d_cairo_pattern_get_linear_points cairo_pattern_get_linear_points = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_linear_points")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_pattern_get_matrix (IntPtr pattern, Matrix matrix); + internal delegate void d_cairo_pattern_get_matrix(IntPtr pattern, Matrix matrix); + internal static d_cairo_pattern_get_matrix cairo_pattern_get_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_matrix")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_pattern_get_radial_circles (IntPtr pattern, out double x0, out double y0, out double r0, out double x1, out double y1, out double r1); + internal delegate Status d_cairo_pattern_get_radial_circles(IntPtr pattern, out double x0, out double y0, out double r0, out double x1, out double y1, out double r1); + internal static d_cairo_pattern_get_radial_circles cairo_pattern_get_radial_circles = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_radial_circles")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern uint cairo_pattern_get_reference_count (IntPtr pattern); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_pattern_get_rgba (IntPtr pattern, out double red, out double green, out double blue, out double alpha); + internal delegate Status d_cairo_pattern_get_rgba(IntPtr pattern, out double red, out double green, out double blue, out double alpha); + internal static d_cairo_pattern_get_rgba cairo_pattern_get_rgba = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_rgba")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_pattern_get_surface (IntPtr pattern, out IntPtr surface); + internal delegate Status d_cairo_pattern_get_surface(IntPtr pattern, out IntPtr surface); + internal static d_cairo_pattern_get_surface cairo_pattern_get_surface = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_surface")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern PatternType cairo_pattern_get_type (IntPtr pattern); + internal delegate PatternType d_cairo_pattern_get_type(IntPtr pattern); + internal static d_cairo_pattern_get_type cairo_pattern_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_get_type")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_pattern_get_user_data (IntPtr pattern, IntPtr key); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_pattern_reference (IntPtr pattern); + internal delegate IntPtr d_cairo_pattern_reference(IntPtr pattern); + internal static d_cairo_pattern_reference cairo_pattern_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_reference")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_pattern_set_extend (IntPtr pattern, Extend extend); + internal delegate void d_cairo_pattern_set_extend(IntPtr pattern, Extend extend); + internal static d_cairo_pattern_set_extend cairo_pattern_set_extend = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_set_extend")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_pattern_set_filter (IntPtr pattern, Filter filter); + internal delegate void d_cairo_pattern_set_filter(IntPtr pattern, Filter filter); + internal static d_cairo_pattern_set_filter cairo_pattern_set_filter = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_set_filter")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_pattern_set_matrix (IntPtr pattern, Matrix matrix); + internal delegate void d_cairo_pattern_set_matrix(IntPtr pattern, Matrix matrix); + internal static d_cairo_pattern_set_matrix cairo_pattern_set_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_set_matrix")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern Status cairo_pattern_set_user_data (IntPtr pattern, IntPtr key, IntPtr user_data, DestroyFunc destroy); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_pattern_status (IntPtr pattern); + internal delegate Status d_cairo_pattern_status(IntPtr pattern); + internal static d_cairo_pattern_status cairo_pattern_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pattern_status")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern Status cairo_pdf_get_versions (IntPtr versions, out int num_versions); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_pdf_surface_create (string filename, double width, double height); + internal delegate IntPtr d_cairo_pdf_surface_create(string filename, double width, double height); + internal static d_cairo_pdf_surface_create cairo_pdf_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pdf_surface_create")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_pdf_surface_create_for_stream (string filename, double width, double height); @@ -521,17 +516,17 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_pdf_surface_restrict_to_version (IntPtr surface, PdfVersion version); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_pdf_surface_set_size (IntPtr surface, double x, double y); + internal delegate void d_cairo_pdf_surface_set_size(IntPtr surface, double x, double y); + internal static d_cairo_pdf_surface_set_size cairo_pdf_surface_set_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pdf_surface_set_size")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_pdf_version_to_string (PdfVersion version); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_pop_group (IntPtr cr); + internal delegate IntPtr d_cairo_pop_group(IntPtr cr); + internal static d_cairo_pop_group cairo_pop_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pop_group")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_pop_group_to_source (IntPtr cr); + internal delegate void d_cairo_pop_group_to_source(IntPtr cr); + internal static d_cairo_pop_group_to_source cairo_pop_group_to_source = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_pop_group_to_source")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_ps_get_levels (IntPtr levels, out int num_levels); @@ -539,20 +534,20 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_ps_level_to_string (PSLevel version); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_ps_surface_create (string filename, double width, double height); + internal delegate IntPtr d_cairo_ps_surface_create(string filename, double width, double height); + internal static d_cairo_ps_surface_create cairo_ps_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_create")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_ps_surface_create_for_stream (string filename, double width, double height); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_ps_surface_dsc_begin_page_setup (IntPtr surface); + internal delegate void d_cairo_ps_surface_dsc_begin_page_setup(IntPtr surface); + internal static d_cairo_ps_surface_dsc_begin_page_setup cairo_ps_surface_dsc_begin_page_setup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_dsc_begin_page_setup")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_ps_surface_dsc_begin_setup (IntPtr surface); + internal delegate void d_cairo_ps_surface_dsc_begin_setup(IntPtr surface); + internal static d_cairo_ps_surface_dsc_begin_setup cairo_ps_surface_dsc_begin_setup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_dsc_begin_setup")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_ps_surface_dsc_comment (IntPtr surface, string comment); + internal delegate void d_cairo_ps_surface_dsc_comment(IntPtr surface, string comment); + internal static d_cairo_ps_surface_dsc_comment cairo_ps_surface_dsc_comment = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_dsc_comment")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //[return: MarshalAs (UnmanagedType.U1)] @@ -564,14 +559,14 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_ps_surface_set_eps (IntPtr surface, bool eps); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_ps_surface_set_size (IntPtr surface, double x, double y); + internal delegate void d_cairo_ps_surface_set_size(IntPtr surface, double x, double y); + internal static d_cairo_ps_surface_set_size cairo_ps_surface_set_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ps_surface_set_size")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_push_group (IntPtr cr); + internal delegate void d_cairo_push_group(IntPtr cr); + internal static d_cairo_push_group cairo_push_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_push_group")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_push_group_with_content (IntPtr cr, Content content); + internal delegate void d_cairo_push_group_with_content(IntPtr cr, Content content); + internal static d_cairo_push_group_with_content cairo_push_group_with_content = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_push_group_with_content")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_quartz_font_face_create_for_atsui_font_id (int font_id); @@ -579,8 +574,8 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_quartz_font_face_create_for_cgfont (IntPtr font); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_quartz_surface_create (IntPtr context, bool flipped, int width, int height); + internal delegate IntPtr d_cairo_quartz_surface_create(IntPtr context, bool flipped, int width, int height); + internal static d_cairo_quartz_surface_create cairo_quartz_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_quartz_surface_create")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_quartz_surface_create_for_cg_context (IntPtr context, uint width, uint height); @@ -594,128 +589,128 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_recording_surface_ink_extents (IntPtr surface, out double x, out double y, out double width, out double height); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_rectangle (IntPtr cr, double x, double y, double width, double height); + internal delegate void d_cairo_rectangle(IntPtr cr, double x, double y, double width, double height); + internal static d_cairo_rectangle cairo_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rectangle")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_rectangle_list_destroy (IntPtr rectangle_list); + internal delegate void d_cairo_rectangle_list_destroy(IntPtr rectangle_list); + internal static d_cairo_rectangle_list_destroy cairo_rectangle_list_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rectangle_list_destroy")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_reference (IntPtr cr); + internal delegate IntPtr d_cairo_reference(IntPtr cr); + internal static d_cairo_reference cairo_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_reference")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern bool cairo_region_contains_point (IntPtr region, int x, int y); + internal delegate bool d_cairo_region_contains_point(IntPtr region, int x, int y); + internal static d_cairo_region_contains_point cairo_region_contains_point = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_contains_point")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern RegionOverlap cairo_region_contains_rectangle (IntPtr region, ref RectangleInt rectangle); + internal delegate RegionOverlap d_cairo_region_contains_rectangle(IntPtr region, ref RectangleInt rectangle); + internal static d_cairo_region_contains_rectangle cairo_region_contains_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_contains_rectangle")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_region_copy (IntPtr original); + internal delegate IntPtr d_cairo_region_copy(IntPtr original); + internal static d_cairo_region_copy cairo_region_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_copy")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_region_create (); + internal delegate IntPtr d_cairo_region_create(); + internal static d_cairo_region_create cairo_region_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_create")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_region_create_rectangle (ref RectangleInt rect); + internal delegate IntPtr d_cairo_region_create_rectangle(ref RectangleInt rect); + internal static d_cairo_region_create_rectangle cairo_region_create_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_create_rectangle")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_region_create_rectangles (RectangleInt[] rects, int count); + internal delegate IntPtr d_cairo_region_create_rectangles(RectangleInt[] rects, int count); + internal static d_cairo_region_create_rectangles cairo_region_create_rectangles = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_create_rectangles")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_region_destroy (IntPtr region); + internal delegate void d_cairo_region_destroy(IntPtr region); + internal static d_cairo_region_destroy cairo_region_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_destroy")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern bool cairo_region_equal (IntPtr a, IntPtr b); + internal delegate bool d_cairo_region_equal(IntPtr a, IntPtr b); + internal static d_cairo_region_equal cairo_region_equal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_equal")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_region_get_extents (IntPtr region, out RectangleInt extents); + internal delegate void d_cairo_region_get_extents(IntPtr region, out RectangleInt extents); + internal static d_cairo_region_get_extents cairo_region_get_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_get_extents")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_region_get_rectangle (IntPtr region, int nth, out RectangleInt rectangle); + internal delegate void d_cairo_region_get_rectangle(IntPtr region, int nth, out RectangleInt rectangle); + internal static d_cairo_region_get_rectangle cairo_region_get_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_get_rectangle")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_region_intersect (IntPtr dst, IntPtr other); + internal delegate Status d_cairo_region_intersect(IntPtr dst, IntPtr other); + internal static d_cairo_region_intersect cairo_region_intersect = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_intersect")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_region_intersect_rectangle (IntPtr dst, ref RectangleInt rectangle); + internal delegate Status d_cairo_region_intersect_rectangle(IntPtr dst, ref RectangleInt rectangle); + internal static d_cairo_region_intersect_rectangle cairo_region_intersect_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_intersect_rectangle")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern bool cairo_region_is_empty (IntPtr region); + internal delegate bool d_cairo_region_is_empty(IntPtr region); + internal static d_cairo_region_is_empty cairo_region_is_empty = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_is_empty")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern int cairo_region_num_rectangles (IntPtr region); + internal delegate int d_cairo_region_num_rectangles(IntPtr region); + internal static d_cairo_region_num_rectangles cairo_region_num_rectangles = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_num_rectangles")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_region_reference (IntPtr region); + internal delegate IntPtr d_cairo_region_reference(IntPtr region); + internal static d_cairo_region_reference cairo_region_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_reference")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_region_status (IntPtr region); + internal delegate Status d_cairo_region_status(IntPtr region); + internal static d_cairo_region_status cairo_region_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_status")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_region_subtract (IntPtr dst, IntPtr other); + internal delegate Status d_cairo_region_subtract(IntPtr dst, IntPtr other); + internal static d_cairo_region_subtract cairo_region_subtract = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_subtract")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_region_subtract_rectangle (IntPtr dst, ref RectangleInt rectangle); + internal delegate Status d_cairo_region_subtract_rectangle(IntPtr dst, ref RectangleInt rectangle); + internal static d_cairo_region_subtract_rectangle cairo_region_subtract_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_subtract_rectangle")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_region_translate (IntPtr region, int dx, int dy); + internal delegate void d_cairo_region_translate(IntPtr region, int dx, int dy); + internal static d_cairo_region_translate cairo_region_translate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_translate")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_region_union (IntPtr dst, IntPtr other); + internal delegate Status d_cairo_region_union(IntPtr dst, IntPtr other); + internal static d_cairo_region_union cairo_region_union = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_union")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_region_union_rectangle (IntPtr dst, ref RectangleInt rectangle); + internal delegate Status d_cairo_region_union_rectangle(IntPtr dst, ref RectangleInt rectangle); + internal static d_cairo_region_union_rectangle cairo_region_union_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_union_rectangle")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_region_xor (IntPtr dst, IntPtr other); + internal delegate Status d_cairo_region_xor(IntPtr dst, IntPtr other); + internal static d_cairo_region_xor cairo_region_xor = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_xor")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_region_xor_rectangle (IntPtr dst, ref RectangleInt rectangle); + internal delegate Status d_cairo_region_xor_rectangle(IntPtr dst, ref RectangleInt rectangle); + internal static d_cairo_region_xor_rectangle cairo_region_xor_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_region_xor_rectangle")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_rel_curve_to (IntPtr cr, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3); + internal delegate void d_cairo_rel_curve_to(IntPtr cr, double dx1, double dy1, double dx2, double dy2, double dx3, double dy3); + internal static d_cairo_rel_curve_to cairo_rel_curve_to = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rel_curve_to")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_rel_line_to (IntPtr cr, double dx, double dy); + internal delegate void d_cairo_rel_line_to(IntPtr cr, double dx, double dy); + internal static d_cairo_rel_line_to cairo_rel_line_to = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rel_line_to")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_rel_move_to (IntPtr cr, double dx, double dy); + internal delegate void d_cairo_rel_move_to(IntPtr cr, double dx, double dy); + internal static d_cairo_rel_move_to cairo_rel_move_to = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rel_move_to")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_reset_clip (IntPtr cr); + internal delegate void d_cairo_reset_clip(IntPtr cr); + internal static d_cairo_reset_clip cairo_reset_clip = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_reset_clip")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_restore (IntPtr cr); + internal delegate void d_cairo_restore(IntPtr cr); + internal static d_cairo_restore cairo_restore = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_restore")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_rotate (IntPtr cr, double angle); + internal delegate void d_cairo_rotate(IntPtr cr, double angle); + internal static d_cairo_rotate cairo_rotate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_rotate")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_save (IntPtr cr); + internal delegate void d_cairo_save(IntPtr cr); + internal static d_cairo_save cairo_save = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_save")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_scale (IntPtr cr, double sx, double sy); + internal delegate void d_cairo_scale(IntPtr cr, double sx, double sy); + internal static d_cairo_scale cairo_scale = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scale")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_scaled_font_create (IntPtr fontFace, Matrix matrix, Matrix ctm, IntPtr options); + internal delegate IntPtr d_cairo_scaled_font_create(IntPtr fontFace, Matrix matrix, Matrix ctm, IntPtr options); + internal static d_cairo_scaled_font_create cairo_scaled_font_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_create")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_scaled_font_destroy (IntPtr scaled_font); + internal delegate IntPtr d_cairo_scaled_font_destroy(IntPtr scaled_font); + internal static d_cairo_scaled_font_destroy cairo_scaled_font_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_destroy")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_scaled_font_extents (IntPtr scaled_font, out FontExtents extents); + internal delegate void d_cairo_scaled_font_extents(IntPtr scaled_font, out FontExtents extents); + internal static d_cairo_scaled_font_extents cairo_scaled_font_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_extents")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_scaled_font_get_ctm (IntPtr scaled_font, out Matrix matrix); + internal delegate void d_cairo_scaled_font_get_ctm(IntPtr scaled_font, out Matrix matrix); + internal static d_cairo_scaled_font_get_ctm cairo_scaled_font_get_ctm = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_ctm")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_scaled_font_get_font_face (IntPtr scaled_font); + internal delegate IntPtr d_cairo_scaled_font_get_font_face(IntPtr scaled_font); + internal static d_cairo_scaled_font_get_font_face cairo_scaled_font_get_font_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_font_face")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_scaled_font_get_font_matrix (IntPtr scaled_font, out Matrix matrix); + internal delegate void d_cairo_scaled_font_get_font_matrix(IntPtr scaled_font, out Matrix matrix); + internal static d_cairo_scaled_font_get_font_matrix cairo_scaled_font_get_font_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_font_matrix")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_scaled_font_get_font_options (IntPtr scaled_font); + internal delegate IntPtr d_cairo_scaled_font_get_font_options(IntPtr scaled_font); + internal static d_cairo_scaled_font_get_font_options cairo_scaled_font_get_font_options = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_font_options")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] @@ -724,122 +719,122 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_scaled_font_get_scale_matrix (IntPtr scaled_font, out Matrix matrix); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern FontType cairo_scaled_font_get_type (IntPtr scaled_font); + internal delegate FontType d_cairo_scaled_font_get_type(IntPtr scaled_font); + internal static d_cairo_scaled_font_get_type cairo_scaled_font_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_get_type")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_scaled_font_get_user_data (IntPtr scaled_font, IntPtr key); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_scaled_font_glyph_extents (IntPtr scaled_font, IntPtr glyphs, int num_glyphs, out TextExtents extents); + internal delegate void d_cairo_scaled_font_glyph_extents(IntPtr scaled_font, IntPtr glyphs, int num_glyphs, out TextExtents extents); + internal static d_cairo_scaled_font_glyph_extents cairo_scaled_font_glyph_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_glyph_extents")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_scaled_font_reference (IntPtr scaled_font); + internal delegate IntPtr d_cairo_scaled_font_reference(IntPtr scaled_font); + internal static d_cairo_scaled_font_reference cairo_scaled_font_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_reference")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern Status cairo_scaled_font_set_user_data (IntPtr scaled_font, IntPtr key, IntPtr user_data, DestroyFunc destroy); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_scaled_font_status (IntPtr scaled_font); + internal delegate Status d_cairo_scaled_font_status(IntPtr scaled_font); + internal static d_cairo_scaled_font_status cairo_scaled_font_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_status")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_scaled_font_text_extents (IntPtr scaled_font, string utf8, out TextExtents extents); + internal delegate void d_cairo_scaled_font_text_extents(IntPtr scaled_font, string utf8, out TextExtents extents); + internal static d_cairo_scaled_font_text_extents cairo_scaled_font_text_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_scaled_font_text_extents")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern Status cairo_scaled_font_text_to_glyphs (IntPtr scaled_font, double x, double y, IntPtr utf8, IntPtr glyphs, out int num_glyphs, IntPtr clusters, out int num_clusters, IntPtr cluster_flags); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_select_font_face (IntPtr cr, string family, FontSlant slant, FontWeight weight); + internal delegate void d_cairo_select_font_face(IntPtr cr, string family, FontSlant slant, FontWeight weight); + internal static d_cairo_select_font_face cairo_select_font_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_select_font_face")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_antialias (IntPtr cr, Antialias antialias); + internal delegate void d_cairo_set_antialias(IntPtr cr, Antialias antialias); + internal static d_cairo_set_antialias cairo_set_antialias = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_antialias")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_dash (IntPtr cr, double [] dashes, int ndash, double offset); + internal delegate void d_cairo_set_dash(IntPtr cr, double [] dashes, int ndash, double offset); + internal static d_cairo_set_dash cairo_set_dash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_dash")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_fill_rule (IntPtr cr, Cairo.FillRule fill_rule); + internal delegate void d_cairo_set_fill_rule(IntPtr cr, Cairo.FillRule fill_rule); + internal static d_cairo_set_fill_rule cairo_set_fill_rule = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_fill_rule")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_font_face (IntPtr cr, IntPtr fontFace); + internal delegate void d_cairo_set_font_face(IntPtr cr, IntPtr fontFace); + internal static d_cairo_set_font_face cairo_set_font_face = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_font_face")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_font_matrix (IntPtr cr, Matrix matrix); + internal delegate void d_cairo_set_font_matrix(IntPtr cr, Matrix matrix); + internal static d_cairo_set_font_matrix cairo_set_font_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_font_matrix")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_font_options (IntPtr cr, IntPtr options); + internal delegate void d_cairo_set_font_options(IntPtr cr, IntPtr options); + internal static d_cairo_set_font_options cairo_set_font_options = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_font_options")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_font_size (IntPtr cr, double size); + internal delegate void d_cairo_set_font_size(IntPtr cr, double size); + internal static d_cairo_set_font_size cairo_set_font_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_font_size")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_line_cap (IntPtr cr, LineCap line_cap); + internal delegate void d_cairo_set_line_cap(IntPtr cr, LineCap line_cap); + internal static d_cairo_set_line_cap cairo_set_line_cap = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_line_cap")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_line_join (IntPtr cr, LineJoin line_join); + internal delegate void d_cairo_set_line_join(IntPtr cr, LineJoin line_join); + internal static d_cairo_set_line_join cairo_set_line_join = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_line_join")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_line_width (IntPtr cr, double width); + internal delegate void d_cairo_set_line_width(IntPtr cr, double width); + internal static d_cairo_set_line_width cairo_set_line_width = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_line_width")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_matrix (IntPtr cr, Matrix matrix); + internal delegate void d_cairo_set_matrix(IntPtr cr, Matrix matrix); + internal static d_cairo_set_matrix cairo_set_matrix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_matrix")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_miter_limit (IntPtr cr, double limit); + internal delegate void d_cairo_set_miter_limit(IntPtr cr, double limit); + internal static d_cairo_set_miter_limit cairo_set_miter_limit = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_miter_limit")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_operator (IntPtr cr, Cairo.Operator op); + internal delegate void d_cairo_set_operator(IntPtr cr, Cairo.Operator op); + internal static d_cairo_set_operator cairo_set_operator = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_operator")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_scaled_font (IntPtr cr, IntPtr scaled_font); + internal delegate void d_cairo_set_scaled_font(IntPtr cr, IntPtr scaled_font); + internal static d_cairo_set_scaled_font cairo_set_scaled_font = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_scaled_font")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_source (IntPtr cr, IntPtr pattern); + internal delegate void d_cairo_set_source(IntPtr cr, IntPtr pattern); + internal static d_cairo_set_source cairo_set_source = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_source")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_source_rgb (IntPtr cr, double red, double green, double blue); + internal delegate void d_cairo_set_source_rgb(IntPtr cr, double red, double green, double blue); + internal static d_cairo_set_source_rgb cairo_set_source_rgb = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_source_rgb")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_source_rgba (IntPtr cr, double red, double green, double blue, double alpha); + internal delegate void d_cairo_set_source_rgba(IntPtr cr, double red, double green, double blue, double alpha); + internal static d_cairo_set_source_rgba cairo_set_source_rgba = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_source_rgba")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_source_surface (IntPtr cr, IntPtr surface, double x, double y); + internal delegate void d_cairo_set_source_surface(IntPtr cr, IntPtr surface, double x, double y); + internal static d_cairo_set_source_surface cairo_set_source_surface = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_source_surface")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_set_tolerance (IntPtr cr, double tolerance); + internal delegate void d_cairo_set_tolerance(IntPtr cr, double tolerance); + internal static d_cairo_set_tolerance cairo_set_tolerance = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_set_tolerance")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern Status cairo_set_user_data (IntPtr cr, IntPtr key, IntPtr user_data, DestroyFunc destroy); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_show_glyphs (IntPtr ct, IntPtr glyphs, int num_glyphs); + internal delegate void d_cairo_show_glyphs(IntPtr ct, IntPtr glyphs, int num_glyphs); + internal static d_cairo_show_glyphs cairo_show_glyphs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_show_glyphs")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_show_page (IntPtr cr); + internal delegate void d_cairo_show_page(IntPtr cr); + internal static d_cairo_show_page cairo_show_page = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_show_page")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_show_text (IntPtr cr, byte[] utf8); + internal delegate void d_cairo_show_text(IntPtr cr, byte[] utf8); + internal static d_cairo_show_text cairo_show_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_show_text")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_show_text_glyphs (IntPtr cr, IntPtr utf8, int utf8_len, IntPtr glyphs, int num_glyphs, IntPtr clusters, int num_clusters, ClusterFlags cluster_flags); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_status (IntPtr cr); + internal delegate Status d_cairo_status(IntPtr cr); + internal static d_cairo_status cairo_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_status")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_status_to_string (Status status); + internal delegate IntPtr d_cairo_status_to_string(Status status); + internal static d_cairo_status_to_string cairo_status_to_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_status_to_string")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_stroke (IntPtr cr); + internal delegate void d_cairo_stroke(IntPtr cr); + internal static d_cairo_stroke cairo_stroke = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_stroke")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_stroke_extents (IntPtr cr, out double x1, out double y1, out double x2, out double y2); + internal delegate void d_cairo_stroke_extents(IntPtr cr, out double x1, out double y1, out double x2, out double y2); + internal static d_cairo_stroke_extents cairo_stroke_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_stroke_extents")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_stroke_preserve (IntPtr cr); + internal delegate void d_cairo_stroke_preserve(IntPtr cr); + internal static d_cairo_stroke_preserve cairo_stroke_preserve = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_stroke_preserve")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_surface_copy_page (IntPtr surface); @@ -847,41 +842,41 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_surface_create_for_rectangle (IntPtr surface, double x, double y, double width, double height); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_surface_create_similar (IntPtr surface, Cairo.Content content, int width, int height); + internal delegate IntPtr d_cairo_surface_create_similar(IntPtr surface, Cairo.Content content, int width, int height); + internal static d_cairo_surface_create_similar cairo_surface_create_similar = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_create_similar")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_surface_destroy (IntPtr surface); + internal delegate void d_cairo_surface_destroy(IntPtr surface); + internal static d_cairo_surface_destroy cairo_surface_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_destroy")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_surface_finish (IntPtr surface); + internal delegate void d_cairo_surface_finish(IntPtr surface); + internal static d_cairo_surface_finish cairo_surface_finish = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_finish")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_surface_flush (IntPtr surface); + internal delegate void d_cairo_surface_flush(IntPtr surface); + internal static d_cairo_surface_flush cairo_surface_flush = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_flush")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Content cairo_surface_get_content (IntPtr surface); + internal delegate Content d_cairo_surface_get_content(IntPtr surface); + internal static d_cairo_surface_get_content cairo_surface_get_content = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_content")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_surface_get_device (IntPtr surface); + internal delegate IntPtr d_cairo_surface_get_device(IntPtr surface); + internal static d_cairo_surface_get_device cairo_surface_get_device = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_device")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_surface_get_device_offset (IntPtr surface, out double x, out double y); + internal delegate void d_cairo_surface_get_device_offset(IntPtr surface, out double x, out double y); + internal static d_cairo_surface_get_device_offset cairo_surface_get_device_offset = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_device_offset")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_surface_get_fallback_resolution (IntPtr surface, out double x_pixels_per_inch, out double y_pixels_per_inch); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_surface_get_font_options (IntPtr surface, IntPtr FontOptions); + internal delegate void d_cairo_surface_get_font_options(IntPtr surface, IntPtr FontOptions); + internal static d_cairo_surface_get_font_options cairo_surface_get_font_options = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_font_options")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_surface_get_mime_data (IntPtr surface, IntPtr mime_type, out IntPtr data, out IntPtr length); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern uint cairo_surface_get_reference_count (IntPtr surface); + internal delegate uint d_cairo_surface_get_reference_count(IntPtr surface); + internal static d_cairo_surface_get_reference_count cairo_surface_get_reference_count = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_reference_count")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern SurfaceType cairo_surface_get_type (IntPtr surface); + internal delegate SurfaceType d_cairo_surface_get_type(IntPtr surface); + internal static d_cairo_surface_get_type cairo_surface_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_get_type")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] @@ -891,20 +886,20 @@ namespace Cairo //[return: MarshalAs (UnmanagedType.U1)] //internal static extern bool cairo_surface_has_show_text_glyphs (IntPtr surface); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_surface_mark_dirty (IntPtr surface); + internal delegate void d_cairo_surface_mark_dirty(IntPtr surface); + internal static d_cairo_surface_mark_dirty cairo_surface_mark_dirty = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_mark_dirty")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_surface_mark_dirty_rectangle (IntPtr surface, int x, int y, int width, int height); + internal delegate void d_cairo_surface_mark_dirty_rectangle(IntPtr surface, int x, int y, int width, int height); + internal static d_cairo_surface_mark_dirty_rectangle cairo_surface_mark_dirty_rectangle = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_mark_dirty_rectangle")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_surface_reference (IntPtr surface); + internal delegate IntPtr d_cairo_surface_reference(IntPtr surface); + internal static d_cairo_surface_reference cairo_surface_reference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_reference")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_surface_set_device_offset (IntPtr surface, double x, double y); + internal delegate void d_cairo_surface_set_device_offset(IntPtr surface, double x, double y); + internal static d_cairo_surface_set_device_offset cairo_surface_set_device_offset = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_set_device_offset")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_surface_set_fallback_resolution (IntPtr surface, double x, double y); + internal delegate void d_cairo_surface_set_fallback_resolution(IntPtr surface, double x, double y); + internal static d_cairo_surface_set_fallback_resolution cairo_surface_set_fallback_resolution = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_set_fallback_resolution")); // DONTCARE //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] @@ -913,11 +908,11 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_surface_show_page (IntPtr surface); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_surface_status (IntPtr surface); + internal delegate Status d_cairo_surface_status(IntPtr surface); + internal static d_cairo_surface_status cairo_surface_status = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_status")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_surface_write_to_png (IntPtr surface, string filename); + internal delegate void d_cairo_surface_write_to_png(IntPtr surface, string filename); + internal static d_cairo_surface_write_to_png cairo_surface_write_to_png = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_surface_write_to_png")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_surface_write_to_png_stream (IntPtr surface, WriteFunc writeFunc); @@ -925,14 +920,14 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_svg_get_versions (out IntPtr versions, out int num_versions); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_svg_surface_create (string fileName, double width, double height); + internal delegate IntPtr d_cairo_svg_surface_create(string fileName, double width, double height); + internal static d_cairo_svg_surface_create cairo_svg_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_svg_surface_create")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_svg_surface_create_for_stream (double width, double height); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_svg_surface_restrict_to_version (IntPtr surface, SvgVersion version); + internal delegate IntPtr d_cairo_svg_surface_restrict_to_version(IntPtr surface, SvgVersion version); + internal static d_cairo_svg_surface_restrict_to_version cairo_svg_surface_restrict_to_version = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_svg_surface_restrict_to_version")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_svg_version_to_string (SvgVersion version); @@ -943,11 +938,11 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_text_cluster_free (IntPtr clusters); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_text_extents (IntPtr cr, byte[] utf8, out TextExtents extents); + internal delegate void d_cairo_text_extents(IntPtr cr, byte[] utf8, out TextExtents extents); + internal static d_cairo_text_extents cairo_text_extents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_text_extents")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_text_path (IntPtr ct, byte[] utf8); + internal delegate void d_cairo_text_path(IntPtr ct, byte[] utf8); + internal static d_cairo_text_path cairo_text_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_text_path")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_toy_font_face_create (IntPtr face, FontSlant slant, FontWeight weight); @@ -961,11 +956,11 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern FontWeight cairo_toy_font_face_get_weight (IntPtr face); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_transform (IntPtr cr, Matrix matrix); + internal delegate void d_cairo_transform(IntPtr cr, Matrix matrix); + internal static d_cairo_transform cairo_transform = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_transform")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_translate (IntPtr cr, double tx, double ty); + internal delegate void d_cairo_translate(IntPtr cr, double tx, double ty); + internal static d_cairo_translate cairo_translate = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_translate")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_user_font_face_create (); @@ -994,27 +989,27 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern blah cairo_user_font_face_set_unicode_to_glyph_func (blah) - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_user_to_device (IntPtr cr, ref double x, ref double y); + internal delegate void d_cairo_user_to_device(IntPtr cr, ref double x, ref double y); + internal static d_cairo_user_to_device cairo_user_to_device = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_user_to_device")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_user_to_device_distance (IntPtr cr, ref double dx, ref double dy); + internal delegate void d_cairo_user_to_device_distance(IntPtr cr, ref double dx, ref double dy); + internal static d_cairo_user_to_device_distance cairo_user_to_device_distance = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_user_to_device_distance")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern int cairo_version (); + internal delegate int d_cairo_version(); + internal static d_cairo_version cairo_version = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_version")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_version_string (); + internal delegate IntPtr d_cairo_version_string(); + internal static d_cairo_version_string cairo_version_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_version_string")); // not in the 1.10 doc index - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_directfb_surface_create (IntPtr dfb, IntPtr surface); + internal delegate IntPtr d_cairo_directfb_surface_create(IntPtr dfb, IntPtr surface); + internal static d_cairo_directfb_surface_create cairo_directfb_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_directfb_surface_create")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_win32_font_face_create_for_hfont (IntPtr hfont); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_win32_font_face_create_for_logfontw (IntPtr logfontw); + internal delegate IntPtr d_cairo_win32_font_face_create_for_logfontw(IntPtr logfontw); + internal static d_cairo_win32_font_face_create_for_logfontw cairo_win32_font_face_create_for_logfontw = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_font_face_create_for_logfontw")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_win32_font_face_create_for_logfontw_hfont (IntPtr logfontw, IntPtr hfont); @@ -1022,8 +1017,8 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_win32_printing_surface_create (IntPtr hdc); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_win32_scaled_font_done_font (IntPtr scaled_font); + internal delegate void d_cairo_win32_scaled_font_done_font(IntPtr scaled_font); + internal static d_cairo_win32_scaled_font_done_font cairo_win32_scaled_font_done_font = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_scaled_font_done_font")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_win32_scaled_font_get_logical_to_device (IntPtr scaled_font, out IntPtr matrix); @@ -1031,17 +1026,17 @@ namespace Cairo //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern void cairo_win32_scaled_font_get_device_to_logical (IntPtr scaled_font, out IntPtr matrix); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern double cairo_win32_scaled_font_get_metrics_factor (IntPtr scaled_font); + internal delegate double d_cairo_win32_scaled_font_get_metrics_factor(IntPtr scaled_font); + internal static d_cairo_win32_scaled_font_get_metrics_factor cairo_win32_scaled_font_get_metrics_factor = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_scaled_font_get_metrics_factor")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern Status cairo_win32_scaled_font_select_font (IntPtr scaled_font, IntPtr hdc); + internal delegate Status d_cairo_win32_scaled_font_select_font(IntPtr scaled_font, IntPtr hdc); + internal static d_cairo_win32_scaled_font_select_font cairo_win32_scaled_font_select_font = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_scaled_font_select_font")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_win32_surface_create (IntPtr hdc); + internal delegate IntPtr d_cairo_win32_surface_create(IntPtr hdc); + internal static d_cairo_win32_surface_create cairo_win32_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_surface_create")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_win32_surface_create_with_ddb (IntPtr hdc, Format format, int width, int height); + internal delegate IntPtr d_cairo_win32_surface_create_with_ddb(IntPtr hdc, Format format, int width, int height); + internal static d_cairo_win32_surface_create_with_ddb cairo_win32_surface_create_with_ddb = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_win32_surface_create_with_ddb")); //[DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] //internal static extern IntPtr cairo_win32_surface_create_with_dib (Format format, int width, int height); @@ -1053,48 +1048,48 @@ namespace Cairo //internal static extern IntPtr cairo_win32_surface_get_image (IntPtr surface); // not in the 1.10 doc index - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_xcb_surface_create (IntPtr connection, uint drawable, IntPtr visual, int width, int height); + internal delegate IntPtr d_cairo_xcb_surface_create(IntPtr connection, uint drawable, IntPtr visual, int width, int height); + internal static d_cairo_xcb_surface_create cairo_xcb_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xcb_surface_create")); // not in the 1.10 doc index - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_xcb_surface_create_for_bitmap (IntPtr connection, uint bitmap, IntPtr screen, int width, int height); + internal delegate IntPtr d_cairo_xcb_surface_create_for_bitmap(IntPtr connection, uint bitmap, IntPtr screen, int width, int height); + internal static d_cairo_xcb_surface_create_for_bitmap cairo_xcb_surface_create_for_bitmap = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xcb_surface_create_for_bitmap")); // not in the 1.10 doc index - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_xcb_surface_set_size (IntPtr surface, int width, int height); + internal delegate void d_cairo_xcb_surface_set_size(IntPtr surface, int width, int height); + internal static d_cairo_xcb_surface_set_size cairo_xcb_surface_set_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xcb_surface_set_size")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_xlib_surface_create (IntPtr display, IntPtr drawable, IntPtr visual, int width, int height); + internal delegate IntPtr d_cairo_xlib_surface_create(IntPtr display, IntPtr drawable, IntPtr visual, int width, int height); + internal static d_cairo_xlib_surface_create cairo_xlib_surface_create = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_create")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_xlib_surface_create_for_bitmap (IntPtr display, IntPtr bitmap, IntPtr screen, int width, int height); + internal delegate IntPtr d_cairo_xlib_surface_create_for_bitmap(IntPtr display, IntPtr bitmap, IntPtr screen, int width, int height); + internal static d_cairo_xlib_surface_create_for_bitmap cairo_xlib_surface_create_for_bitmap = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_create_for_bitmap")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern int cairo_xlib_surface_get_depth (IntPtr surface); + internal delegate int d_cairo_xlib_surface_get_depth(IntPtr surface); + internal static d_cairo_xlib_surface_get_depth cairo_xlib_surface_get_depth = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_depth")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_xlib_surface_get_display (IntPtr surface); + internal delegate IntPtr d_cairo_xlib_surface_get_display(IntPtr surface); + internal static d_cairo_xlib_surface_get_display cairo_xlib_surface_get_display = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_display")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_xlib_surface_get_drawable (IntPtr surface); + internal delegate IntPtr d_cairo_xlib_surface_get_drawable(IntPtr surface); + internal static d_cairo_xlib_surface_get_drawable cairo_xlib_surface_get_drawable = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_drawable")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern int cairo_xlib_surface_get_height (IntPtr surface); + internal delegate int d_cairo_xlib_surface_get_height(IntPtr surface); + internal static d_cairo_xlib_surface_get_height cairo_xlib_surface_get_height = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_height")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_xlib_surface_get_screen (IntPtr surface); + internal delegate IntPtr d_cairo_xlib_surface_get_screen(IntPtr surface); + internal static d_cairo_xlib_surface_get_screen cairo_xlib_surface_get_screen = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_screen")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern IntPtr cairo_xlib_surface_get_visual (IntPtr surface); + internal delegate IntPtr d_cairo_xlib_surface_get_visual(IntPtr surface); + internal static d_cairo_xlib_surface_get_visual cairo_xlib_surface_get_visual = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_visual")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern int cairo_xlib_surface_get_width (IntPtr surface); + internal delegate int d_cairo_xlib_surface_get_width(IntPtr surface); + internal static d_cairo_xlib_surface_get_width cairo_xlib_surface_get_width = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_get_width")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_xlib_surface_set_drawable (IntPtr surface, IntPtr drawable, int width, int height); + internal delegate void d_cairo_xlib_surface_set_drawable(IntPtr surface, IntPtr drawable, int width, int height); + internal static d_cairo_xlib_surface_set_drawable cairo_xlib_surface_set_drawable = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_set_drawable")); - [DllImport (cairo, CallingConvention=CallingConvention.Cdecl)] - internal static extern void cairo_xlib_surface_set_size (IntPtr surface, int width, int height); + internal delegate void d_cairo_xlib_surface_set_size(IntPtr surface, int width, int height); + internal static d_cairo_xlib_surface_set_size cairo_xlib_surface_set_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_xlib_surface_set_size")); } } diff --git a/Source/Libs/CairoSharp/linux-arm/libcairo-2.dll.so b/Source/Libs/CairoSharp/linux-arm/libcairo-2.dll.so deleted file mode 100755 index beaaa759ec2ac3658292fe3ae6507ce5249e61df..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5008 zcma)AU2I%O6`s4hZtS$FwOM_y&S^`*%+XYEE?hTVBs7o| z9)>&!-UH@*hrzqiO&S5ElhxneW4xD!)pt?f-*0dhR(=7zowO6bz>W!V4qpXx-$+@^ zj6KEv5bR&oE#^ag@d;~k;LBipygvim_Fe%N%Av4Lw&wGkG(yt;r5?Ow;T+0$!S;Cc z)%C=|Lux=x0}Ih!RRClT+yZyUhXxjG+nYhV5c_{e1MV2-H>7Ssiodg{d0e-cPmaPX zEtF#A%|R&7D+W<;u~dtL$eWA&N`Th65cRv(R{YY!`1H($*pK4Hs;UH)S`aHg4wh)q zE0<;q+PddQk-w~{j_O+M7cQxJKPrCDk2pXn_U6OzlB$JsaZi=!&DLt{5yhT|zC^)7 zQJ1xOPCGGA?3bd@t%dHB&@KA0Z@MZkAV~UaYbYmnAn1ng<4p11yqd_XiM*Cb-eI(6br!#8h#zBAg$Y>c!r8!N4cH(uN5 zZ~wM+Glhe4(HgX{p>tEv2TL826Fv zsgXPBQ>%@`tXCJB!)oO~v(tIZ$*(q5{(38W>Nk3Ra)!6Ce$hpLhyAnJl~z`*w6;2( zzluKhq>VLGe=D(lE5Fj0USDmf++br+4K?vD?)|WRq{%wxovF>e`PIfB1wS*s`6sLV z`=p#g{YO%MdVI5!f4|xJ+WXB+K8Z>ns)>C|Dny4omXe&rn3 zKE3fC<~fth30~eixUt$uw^tiycB#XOXwr^4Rc|=os5g$o&RgjJGjK-L8-3Y&<4u%* z3C7LlvUjC>?fce$Ixk@knqJ3wngkPn0Os4zw~=ok-yFsSo@2%pKFN$5JkN&{%(^RJ zm{5li5YR=Hxj@!IJ_yM-hOuG|d&3xZ63p1d_n-IU$1uY3QAoz7DwuJID`Tu6{j1Xn zY5RVO@lj|CcJIa18G8aBKk#Qu$~l5!-`MojiJ3D~=hOqKerLcL%ItRzIET{1&ZAwU z?3fVOPfBYqn)MsZ)f>Y$7JtX|O49{RY#E-Pk0tk8>xbb<{NbWw6Q_|JIHGn(te?5xPk`n8G533;NB><5=V0S^!1j30;!4~0KJ3xo0=DPVw%U1H{@H{7 zZDEc#2>bSUhk)gNF!%c$un_GXwQvsjIB<9TtokyrZSM<~KKnnev3WMp8eObKqsW^^FBS@;epDG*2p578KAxi|+$Y`qXd#MAZm5p>_occ3RrILEi*s{s zK^-kJ3k$uA<#5(7d&M}6YM#HiqzYlBS`Ol%=$`z_37x9_uaZtkO=gEoEsmCz$w!Ne zmCCXTXI~5oF}t6@7*>mwZzkRT?;2fqbm#ArKA>l?o;;T2d1t4`rY5|J=g%FvF9^KMf7=^3;n=sFMICI8+@iS=)RoiyI$>yknQ}KB_ z0_JN0b~80`Ud9ySh1+YB9iKgq)=3sH~sELimTu9N3=i}_HGd=4ynjK}09nS7!Hq0U=+ zd_x~@b(qmG78_Z$2KE^RJ=OZNL7g53N2kzDJm;aZMHtMoW{w|n) zq8{^t?R)5PUTD&KjF0?3&U%6&v@Pz(D`3u#_82GE@Zk>!=VtzSp;**E>J< z`6-xo_57f>4L#=WLel3AR6vJEL=*MwTuin`d?$LtG>*O755aRods#5g6vq@AMr!#j VIz1t=$GqRxtHGJS5+z8{`!7YhM6Un< diff --git a/Source/Libs/CairoSharp/linux-x64/libcairo-2.dll.so b/Source/Libs/CairoSharp/linux-x64/libcairo-2.dll.so deleted file mode 100755 index f828c0df39ec128487d9dcb5b1d0a73c4c78b343..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7240 zcmeHMU1%It6h50x+Vm$sjkZmHpraOSA3Byw|Ago!X_6@|{YS};YFDwy@0JNMhnOg2({5QM#9 z?z!hX=iHxj@9dm=@={lCcTFThC{cQngqy7OkeC*n-JlyxVswC3aJ`W>DBZe6(UMkL z3qgqtr6Xgk;3w9oSf++*fX?bE&1nj|8rBlKer?yU?Lc4G`k?iyS0Y)CJixqy(AKA%-<2q#9BZY!DIz!n6_4FR@ z=(P8kd(6FR;;O1)KjY6sh0Adh=V@Ydinp|eE@&gXCph2zdfk?OAAmP&yjA-bIQZEn zL-iC@OzVsd`@+j{r@*hF{3inH;zlO$f(0m3_KJ7Ti zKA8J&Ae`SI-pF|k!w;!;l$r?lG`}z^x5LoAS>#c^XJh|@`YlWD-=6*hel^vW^IA)H z`4$r_^8VIT@K2-0XZ)8x#val*ejk`sWk1&uzOmzekN2Zn;Y4Y`beVqI8LyPr8D_jvK8E6Xx8P2Uj+${=OtIK*#*Ryp zrND`iM9v;d=SG~gop5vcg6&M4rg$!MGM#jj33K1U{f}2xQpp?J$>*ISXH?vLkw)`Q zCTS-oGMOTq_&AmA38>n3_dt7Jm)&*bkYt1GL?LI7JK2P!d=4Ey(%yHtlTl6uL8GVl zXh(ameYCs#nXW;5u)U+Vi|zg?bEFeLUWzG{eUc1NASEOn-A9@!7W3zgyd)Nxg<{5a zMwq&JkB+02&ACZ)EIVP2Or+9@U8w{qZrmx1lbI-H+0vtK-jke4<_oD@Ho({{%O}&0 z7?7zFXQrDx?UJe1W+ulyUwbmo&7KTxHgqznIQN=kE3V9wX>O>@n8}GTGI_%@yotfX z|1UU+6XaWsTot}QpxZ-zhJL2VWcly>Ervb5Q=pRXl!EUx;s6gN&WIC9>;QXw&&pIQ z%DDW>l;ah|4Kc=~Z`jZ31}NeaR#8Rz@E402i8Wx4?<1(>l%-()&;uP}nZz#O@f`&< z#F$HX{vJw{&@$Lx(F1`ZUc&hBAJ(5`ds!3WvlDuQKsRC_O|`g;$_et@Pih6wZ_Aoq z19?@zXF~RfM?oc@?l0l-Cs`=tWBrH+K*Rc2Kl*%?8}bc>e-Jm|{|8}x@Stz9ZIjO) z@r5Owa)F-5E%LxGu|Rx}@ezmM|15ZqunyS4kMFastRMD>S7v2WTntq&R}=-F z%$YfJ&Y5%eo;&keLrY^I5D*PP2@0ifP^234^;MpxS`1kt8)S`?E4{WSJ+R2b#S}_K z>C2akl&|%03eD5NC3$@jr~$nJJ#ic|k$SjNcn4HtC3vFN?YrSdA^ru}AH&Oj=>6kQ zppD4>TpMW!h$TwX?hYAk-g{=}uF2)QwspNXa<%OHdrjXM)NwtuCoPW3C!`Mm9|YDl zT%A1gbFOUVFAWu?3Y z8ZszR4#`nc0}lXYu6>HZ1(Zp#JOUc#VgY4RB4SzHNhf7xTs!SrmRRvr+!d<}M6Bla zRx27y$GYPgHe>EnFcxS|pryVonn46VEZmU?a zsO{PqzB7~YMn_XBDoriTb@kR}^J#O7H%o8w0Yt|8F-8G#pyb*JnYD3*zewKkM0LiB z!B^lMk(L-9y#;v*0(^%QZl_4Gsnev0Nn3WZc;Z=f7#Pc8pN6tixm@mzbME4aN70zQ zSp32ms7P*<0nDAEZ$j=A4ZB7>2^}jc$GS#le-l4JGjQQE_#8gYNe>_6bNeOt@u6e4 zyfIdG4Bp62hW6#gvlmM*kBtnw>*d$6;VZKjM4%9XLIesCC`6zTfkFfd5hz69e-eQzeD+^QzQ7#K29h!l;a4(qtcO9F zTde_Qo{Mi^l~*!*U@n4hZ6*J9Kj)OAGjqpDQ0AyDpi4nN06qldS2l(cF+^5?oP+-| zQ09Xxfy_Pdh3%X~JHEUfbQh!&&T+{1KviF~{TE>Vt%12yQ+@q2#s*}?8;xz|X0uA` z=2Pb81g~0v7;sWb#-spTBZ2h<0@qFms;G!??w-uZh;VI$pjRbOG4Nz&+_QOYP(=fw z$}c*ovT>2B8JUsA-pt61Fl6i%A*gmxqG8^YT#ApxVLNJUyr?57c-NlvR=sjcQmVw{tvWd-L-z!U^GwMtt%UkgxmX zZID?9pq~KzH-hT<2V}V@Ww-sg}1KH7DB0_vnIQ}y8dJ_Z-Y_;g8s zXF<37{9l30vqT7B{Xc-}_yrKZ3COx`LA^Rl1{whY#BZr@LI&E_L)P}JgKUDV_mg#v zEk65ou;1g8+5bhz{<=v7@~pp*s6Q0!2nKKvdVd{7B560{_I7od5t%KKSZ>maut<_Y zVI%5T-3h1DPFPXbNoOp(w@)HY@^B*N#-irdnwqMGja2c)veRk19~BWd-7j5fI~lX0 zy~$)hy7(kjt(jwLS&jQ^TN|u~-8)##vHEJZn%yziIvlawp5D|Uv$JoZ)+k$}8OQ3e zQ&E<8c09kkwzat)ttk6wZ%r+G>S|l8J&lcR4eeHYZCy(P#`vcyQNGCIm6PTahQeWg zrDuK>ij|-_r6CToaJfkpti;UpCtbS})J=P|M{_C1jhWr4UbC||o``OWM@30JcBV(n zXnzVlJ?f@C&C9WLChnx>2o`kdSc3Lqsv*t83D@j)Tru5PAD(KBW~|5CAJ53!8c(Nr zc(9Z42)sKkePC=B!c5e`#KieXV$XT%{vGg+;oFd}O8#evl|T*ozo3|CxQly%c6=`r ztHI}A8R~yaTi!2xJJOEtYvM`p)PYr$cT*V1zO>_eoXERN18oUAfxMq+$M-ui1YVEJ zc47yR_Zj(pHtp`J+W;ur6ZWNn4t~>ec F{sh~8N^}4K diff --git a/Source/Libs/GLibSharp/Bytes.cs b/Source/Libs/GLibSharp/Bytes.cs index ddfbe53b3..479a52c8b 100755 --- a/Source/Libs/GLibSharp/Bytes.cs +++ b/Source/Libs/GLibSharp/Bytes.cs @@ -27,8 +27,8 @@ namespace GLib { public partial class Bytes : GLib.Opaque, IComparable, IEquatable { - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_bytes_get_type (); + delegate IntPtr d_g_bytes_get_type(); + static d_g_bytes_get_type g_bytes_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_get_type")); public static GLib.GType GType { get { @@ -40,56 +40,56 @@ namespace GLib { public Bytes (IntPtr raw) : base (raw) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_bytes_new (byte [] data, UIntPtr size); + delegate IntPtr d_g_bytes_new(byte [] data, UIntPtr size); + static d_g_bytes_new g_bytes_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new")); public Bytes (byte [] data) { Raw = g_bytes_new (data, new UIntPtr ((ulong)data.Length)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_bytes_new_from_bytes (IntPtr raw, UIntPtr offset, UIntPtr length); + delegate IntPtr d_g_bytes_new_from_bytes(IntPtr raw, UIntPtr offset, UIntPtr length); + static d_g_bytes_new_from_bytes g_bytes_new_from_bytes = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new_from_bytes")); public Bytes (Bytes bytes, ulong offset, ulong length) { Raw = g_bytes_new_from_bytes (bytes.Handle, new UIntPtr (offset), new UIntPtr (length)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_bytes_new_take (byte [] data, UIntPtr size); + delegate IntPtr d_g_bytes_new_take(byte [] data, UIntPtr size); + static d_g_bytes_new_take g_bytes_new_take = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new_take")); public static Bytes NewTake (byte [] data) { return new Bytes (g_bytes_new_take (data, new UIntPtr ((ulong)data.Length))); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_bytes_new_static (byte [] data, UIntPtr size); + delegate IntPtr d_g_bytes_new_static(byte [] data, UIntPtr size); + static d_g_bytes_new_static g_bytes_new_static = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_new_static")); public static Bytes NewStatic (byte [] data) { return new Bytes (g_bytes_new_static (data, new UIntPtr ((ulong)data.Length))); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_bytes_compare (IntPtr raw, IntPtr bytes); + delegate int d_g_bytes_compare(IntPtr raw, IntPtr bytes); + static d_g_bytes_compare g_bytes_compare = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_compare")); public int CompareTo (Bytes bytes) { return g_bytes_compare (Handle, bytes.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_bytes_equal (IntPtr raw, IntPtr bytes2); + delegate bool d_g_bytes_equal(IntPtr raw, IntPtr bytes2); + static d_g_bytes_equal g_bytes_equal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_equal")); public bool Equals (Bytes other) { return g_bytes_equal (Handle, other.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern UIntPtr g_bytes_get_size (IntPtr raw); + delegate UIntPtr d_g_bytes_get_size(IntPtr raw); + static d_g_bytes_get_size g_bytes_get_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_get_size")); public ulong Size { get { @@ -97,16 +97,16 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_bytes_hash (IntPtr raw); + delegate uint d_g_bytes_hash(IntPtr raw); + static d_g_bytes_hash g_bytes_hash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_hash")); public uint GetHash () { return g_bytes_hash (Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_bytes_get_data (IntPtr raw, out UIntPtr size); + delegate IntPtr d_g_bytes_get_data(IntPtr raw, out UIntPtr size); + static d_g_bytes_get_data g_bytes_get_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_get_data")); public byte [] Data { get { @@ -124,8 +124,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_bytes_ref (IntPtr raw); + delegate IntPtr d_g_bytes_ref(IntPtr raw); + static d_g_bytes_ref g_bytes_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_ref")); protected override void Ref (IntPtr raw) { @@ -135,8 +135,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_bytes_unref (IntPtr raw); + delegate void d_g_bytes_unref(IntPtr raw); + static d_g_bytes_unref g_bytes_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_bytes_unref")); protected override void Unref (IntPtr raw) { diff --git a/Source/Libs/GLibSharp/Cond.cs b/Source/Libs/GLibSharp/Cond.cs index ddd28423e..22585e036 100755 --- a/Source/Libs/GLibSharp/Cond.cs +++ b/Source/Libs/GLibSharp/Cond.cs @@ -16,43 +16,43 @@ namespace GLib { int i2; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_cond_broadcast(IntPtr raw); + delegate void d_g_cond_broadcast(IntPtr raw); + static d_g_cond_broadcast g_cond_broadcast = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_broadcast")); public void Broadcast() { g_cond_broadcast(Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_cond_clear(IntPtr raw); + delegate void d_g_cond_clear(IntPtr raw); + static d_g_cond_clear g_cond_clear = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_clear")); public void Clear() { g_cond_clear(Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_cond_init(IntPtr raw); + delegate void d_g_cond_init(IntPtr raw); + static d_g_cond_init g_cond_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_init")); public void Init() { g_cond_init(Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_cond_signal(IntPtr raw); + delegate void d_g_cond_signal(IntPtr raw); + static d_g_cond_signal g_cond_signal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_signal")); public void Signal() { g_cond_signal(Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_cond_wait(IntPtr raw, IntPtr mutex); + delegate void d_g_cond_wait(IntPtr raw, IntPtr mutex); + static d_g_cond_wait g_cond_wait = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_wait")); public void Wait(GLib.Mutex mutex) { g_cond_wait(Handle, mutex == null ? IntPtr.Zero : mutex.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_cond_wait_until(IntPtr raw, IntPtr mutex, long end_time); + delegate bool d_g_cond_wait_until(IntPtr raw, IntPtr mutex, long end_time); + static d_g_cond_wait_until g_cond_wait_until = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_cond_wait_until")); public bool WaitUntil(GLib.Mutex mutex, long end_time) { bool raw_ret = g_cond_wait_until(Handle, mutex == null ? IntPtr.Zero : mutex.Handle, end_time); diff --git a/Source/Libs/GLibSharp/Date.cs b/Source/Libs/GLibSharp/Date.cs index 75961b25c..adca884e1 100755 --- a/Source/Libs/GLibSharp/Date.cs +++ b/Source/Libs/GLibSharp/Date.cs @@ -11,8 +11,8 @@ namespace GLib { #region Autogenerated code public partial class Date : GLib.Opaque { - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_get_type(); + delegate IntPtr d_g_date_get_type(); + static d_g_date_get_type g_date_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_type")); public static GLib.GType GType { get { @@ -22,43 +22,43 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_add_days(IntPtr raw, uint n_days); + delegate void d_g_date_add_days(IntPtr raw, uint n_days); + static d_g_date_add_days g_date_add_days = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_add_days")); public void AddDays(uint n_days) { g_date_add_days(Handle, n_days); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_add_months(IntPtr raw, uint n_months); + delegate void d_g_date_add_months(IntPtr raw, uint n_months); + static d_g_date_add_months g_date_add_months = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_add_months")); public void AddMonths(uint n_months) { g_date_add_months(Handle, n_months); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_add_years(IntPtr raw, uint n_years); + delegate void d_g_date_add_years(IntPtr raw, uint n_years); + static d_g_date_add_years g_date_add_years = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_add_years")); public void AddYears(uint n_years) { g_date_add_years(Handle, n_years); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_clamp(IntPtr raw, IntPtr min_date, IntPtr max_date); + delegate void d_g_date_clamp(IntPtr raw, IntPtr min_date, IntPtr max_date); + static d_g_date_clamp g_date_clamp = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_clamp")); public void Clamp(GLib.Date min_date, GLib.Date max_date) { g_date_clamp(Handle, min_date == null ? IntPtr.Zero : min_date.Handle, max_date == null ? IntPtr.Zero : max_date.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_clear(IntPtr raw, uint n_dates); + delegate void d_g_date_clear(IntPtr raw, uint n_dates); + static d_g_date_clear g_date_clear = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_clear")); public void Clear(uint n_dates) { g_date_clear(Handle, n_dates); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_compare(IntPtr raw, IntPtr rhs); + delegate int d_g_date_compare(IntPtr raw, IntPtr rhs); + static d_g_date_compare g_date_compare = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_compare")); public int Compare(GLib.Date rhs) { int raw_ret = g_date_compare(Handle, rhs == null ? IntPtr.Zero : rhs.Handle); @@ -66,8 +66,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_days_between(IntPtr raw, IntPtr date2); + delegate int d_g_date_days_between(IntPtr raw, IntPtr date2); + static d_g_date_days_between g_date_days_between = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_days_between")); public int DaysBetween(GLib.Date date2) { int raw_ret = g_date_days_between(Handle, date2 == null ? IntPtr.Zero : date2.Handle); @@ -75,11 +75,11 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern byte g_date_get_day(IntPtr raw); + delegate byte d_g_date_get_day(IntPtr raw); + static d_g_date_get_day g_date_get_day = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_day")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_set_day(IntPtr raw, byte day); + delegate void d_g_date_set_day(IntPtr raw, byte day); + static d_g_date_set_day g_date_set_day = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_day")); public byte Day { get { @@ -92,8 +92,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_date_get_day_of_year(IntPtr raw); + delegate uint d_g_date_get_day_of_year(IntPtr raw); + static d_g_date_get_day_of_year g_date_get_day_of_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_day_of_year")); public uint DayOfYear { get { @@ -103,8 +103,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_date_get_iso8601_week_of_year(IntPtr raw); + delegate uint d_g_date_get_iso8601_week_of_year(IntPtr raw); + static d_g_date_get_iso8601_week_of_year g_date_get_iso8601_week_of_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_iso8601_week_of_year")); public uint Iso8601WeekOfYear { get { @@ -114,11 +114,11 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_date_get_julian(IntPtr raw); + delegate uint d_g_date_get_julian(IntPtr raw); + static d_g_date_get_julian g_date_get_julian = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_julian")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_set_julian(IntPtr raw, uint julian_date); + delegate void d_g_date_set_julian(IntPtr raw, uint julian_date); + static d_g_date_set_julian g_date_set_julian = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_julian")); public uint Julian { get { @@ -131,8 +131,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_date_get_monday_week_of_year(IntPtr raw); + delegate uint d_g_date_get_monday_week_of_year(IntPtr raw); + static d_g_date_get_monday_week_of_year g_date_get_monday_week_of_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_monday_week_of_year")); public uint MondayWeekOfYear { get { @@ -142,11 +142,11 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_get_month(IntPtr raw); + delegate int d_g_date_get_month(IntPtr raw); + static d_g_date_get_month g_date_get_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_month")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_set_month(IntPtr raw, int month); + delegate void d_g_date_set_month(IntPtr raw, int month); + static d_g_date_set_month g_date_set_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_month")); public int Month { get { @@ -159,8 +159,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_date_get_sunday_week_of_year(IntPtr raw); + delegate uint d_g_date_get_sunday_week_of_year(IntPtr raw); + static d_g_date_get_sunday_week_of_year g_date_get_sunday_week_of_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_sunday_week_of_year")); public uint SundayWeekOfYear { get { @@ -170,8 +170,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_get_weekday(IntPtr raw); + delegate int d_g_date_get_weekday(IntPtr raw); + static d_g_date_get_weekday g_date_get_weekday = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_weekday")); public int Weekday { get { @@ -181,11 +181,11 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern ushort g_date_get_year(IntPtr raw); + delegate ushort d_g_date_get_year(IntPtr raw); + static d_g_date_get_year g_date_get_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_year")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_set_year(IntPtr raw, ushort year); + delegate void d_g_date_set_year(IntPtr raw, ushort year); + static d_g_date_set_year g_date_set_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_year")); public ushort Year { get { @@ -198,8 +198,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_is_first_of_month(IntPtr raw); + delegate bool d_g_date_is_first_of_month(IntPtr raw); + static d_g_date_is_first_of_month g_date_is_first_of_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_is_first_of_month")); public bool IsFirstOfMonth { get { @@ -209,8 +209,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_is_last_of_month(IntPtr raw); + delegate bool d_g_date_is_last_of_month(IntPtr raw); + static d_g_date_is_last_of_month g_date_is_last_of_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_is_last_of_month")); public bool IsLastOfMonth { get { @@ -220,22 +220,22 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_order(IntPtr raw, IntPtr date2); + delegate void d_g_date_order(IntPtr raw, IntPtr date2); + static d_g_date_order g_date_order = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_order")); public void Order(GLib.Date date2) { g_date_order(Handle, date2 == null ? IntPtr.Zero : date2.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_set_dmy(IntPtr raw, byte day, int month, ushort y); + delegate void d_g_date_set_dmy(IntPtr raw, byte day, int month, ushort y); + static d_g_date_set_dmy g_date_set_dmy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_dmy")); public void SetDmy(byte day, int month, ushort y) { g_date_set_dmy(Handle, day, month, y); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_set_parse(IntPtr raw, IntPtr str); + delegate void d_g_date_set_parse(IntPtr raw, IntPtr str); + static d_g_date_set_parse g_date_set_parse = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_parse")); public string Parse { set { @@ -245,8 +245,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_set_time(IntPtr raw, int time_); + delegate void d_g_date_set_time(IntPtr raw, int time_); + static d_g_date_set_time g_date_set_time = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_time")); [Obsolete] public int Time { @@ -255,8 +255,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_set_time_t(IntPtr raw, IntPtr timet); + delegate void d_g_date_set_time_t(IntPtr raw, IntPtr timet); + static d_g_date_set_time_t g_date_set_time_t = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_time_t")); public long TimeT { set { @@ -264,8 +264,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_set_time_val(IntPtr raw, IntPtr value); + delegate void d_g_date_set_time_val(IntPtr raw, IntPtr value); + static d_g_date_set_time_val g_date_set_time_val = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_set_time_val")); public GLib.TimeVal TimeVal { set { @@ -276,36 +276,36 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_subtract_days(IntPtr raw, uint n_days); + delegate void d_g_date_subtract_days(IntPtr raw, uint n_days); + static d_g_date_subtract_days g_date_subtract_days = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_subtract_days")); public void SubtractDays(uint n_days) { g_date_subtract_days(Handle, n_days); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_subtract_months(IntPtr raw, uint n_months); + delegate void d_g_date_subtract_months(IntPtr raw, uint n_months); + static d_g_date_subtract_months g_date_subtract_months = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_subtract_months")); public void SubtractMonths(uint n_months) { g_date_subtract_months(Handle, n_months); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_subtract_years(IntPtr raw, uint n_years); + delegate void d_g_date_subtract_years(IntPtr raw, uint n_years); + static d_g_date_subtract_years g_date_subtract_years = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_subtract_years")); public void SubtractYears(uint n_years) { g_date_subtract_years(Handle, n_years); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_to_struct_tm(IntPtr raw, IntPtr tm); + delegate void d_g_date_to_struct_tm(IntPtr raw, IntPtr tm); + static d_g_date_to_struct_tm g_date_to_struct_tm = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_to_struct_tm")); public void ToStructTm(IntPtr tm) { g_date_to_struct_tm(Handle, tm); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_valid(IntPtr raw); + delegate bool d_g_date_valid(IntPtr raw); + static d_g_date_valid g_date_valid = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid")); public bool Valid() { bool raw_ret = g_date_valid(Handle); @@ -313,8 +313,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern byte g_date_get_days_in_month(int month, ushort year); + delegate byte d_g_date_get_days_in_month(int month, ushort year); + static d_g_date_get_days_in_month g_date_get_days_in_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_days_in_month")); public static byte GetDaysInMonth(int month, ushort year) { byte raw_ret = g_date_get_days_in_month(month, year); @@ -322,8 +322,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern byte g_date_get_monday_weeks_in_year(ushort year); + delegate byte d_g_date_get_monday_weeks_in_year(ushort year); + static d_g_date_get_monday_weeks_in_year g_date_get_monday_weeks_in_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_monday_weeks_in_year")); public static byte GetMondayWeeksInYear(ushort year) { byte raw_ret = g_date_get_monday_weeks_in_year(year); @@ -331,8 +331,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern byte g_date_get_sunday_weeks_in_year(ushort year); + delegate byte d_g_date_get_sunday_weeks_in_year(ushort year); + static d_g_date_get_sunday_weeks_in_year g_date_get_sunday_weeks_in_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_get_sunday_weeks_in_year")); public static byte GetSundayWeeksInYear(ushort year) { byte raw_ret = g_date_get_sunday_weeks_in_year(year); @@ -340,8 +340,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_is_leap_year(ushort year); + delegate bool d_g_date_is_leap_year(ushort year); + static d_g_date_is_leap_year g_date_is_leap_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_is_leap_year")); public static bool IsLeapYear(ushort year) { bool raw_ret = g_date_is_leap_year(year); @@ -349,8 +349,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern UIntPtr g_date_strftime(IntPtr s, UIntPtr slen, IntPtr format, IntPtr date); + delegate UIntPtr d_g_date_strftime(IntPtr s, UIntPtr slen, IntPtr format, IntPtr date); + static d_g_date_strftime g_date_strftime = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_strftime")); public static ulong Strftime(string s, string format, GLib.Date date) { IntPtr native_s = GLib.Marshaller.StringToPtrGStrdup (s); @@ -362,8 +362,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_valid_day(byte day); + delegate bool d_g_date_valid_day(byte day); + static d_g_date_valid_day g_date_valid_day = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_day")); public static bool ValidDay(byte day) { bool raw_ret = g_date_valid_day(day); @@ -371,8 +371,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_valid_dmy(byte day, int month, ushort year); + delegate bool d_g_date_valid_dmy(byte day, int month, ushort year); + static d_g_date_valid_dmy g_date_valid_dmy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_dmy")); public static bool ValidDmy(byte day, int month, ushort year) { bool raw_ret = g_date_valid_dmy(day, month, year); @@ -380,8 +380,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_valid_julian(uint julian_date); + delegate bool d_g_date_valid_julian(uint julian_date); + static d_g_date_valid_julian g_date_valid_julian = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_julian")); public static bool ValidJulian(uint julian_date) { bool raw_ret = g_date_valid_julian(julian_date); @@ -389,8 +389,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_valid_month(int month); + delegate bool d_g_date_valid_month(int month); + static d_g_date_valid_month g_date_valid_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_month")); public static bool ValidMonth(int month) { bool raw_ret = g_date_valid_month(month); @@ -398,8 +398,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_valid_weekday(int weekday); + delegate bool d_g_date_valid_weekday(int weekday); + static d_g_date_valid_weekday g_date_valid_weekday = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_weekday")); public static bool ValidWeekday(int weekday) { bool raw_ret = g_date_valid_weekday(weekday); @@ -407,8 +407,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_valid_year(ushort year); + delegate bool d_g_date_valid_year(ushort year); + static d_g_date_valid_year g_date_valid_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_valid_year")); public static bool ValidYear(ushort year) { bool raw_ret = g_date_valid_year(year); @@ -418,32 +418,32 @@ namespace GLib { public Date(IntPtr raw) : base(raw) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_new(); + delegate IntPtr d_g_date_new(); + static d_g_date_new g_date_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_new")); public Date () { Raw = g_date_new(); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_new_dmy(byte day, int month, ushort year); + delegate IntPtr d_g_date_new_dmy(byte day, int month, ushort year); + static d_g_date_new_dmy g_date_new_dmy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_new_dmy")); public Date (byte day, int month, ushort year) { Raw = g_date_new_dmy(day, month, year); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_new_julian(uint julian_day); + delegate IntPtr d_g_date_new_julian(uint julian_day); + static d_g_date_new_julian g_date_new_julian = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_new_julian")); public Date (uint julian_day) { Raw = g_date_new_julian(julian_day); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_free(IntPtr raw); + delegate void d_g_date_free(IntPtr raw); + static d_g_date_free g_date_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_free")); protected override void Free (IntPtr raw) { diff --git a/Source/Libs/GLibSharp/DateTime.cs b/Source/Libs/GLibSharp/DateTime.cs index 2ac54a8b8..f9bdcbd3b 100755 --- a/Source/Libs/GLibSharp/DateTime.cs +++ b/Source/Libs/GLibSharp/DateTime.cs @@ -11,8 +11,8 @@ namespace GLib { #region Autogenerated code public partial class DateTime : GLib.Opaque { - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_get_type(); + delegate IntPtr d_g_date_time_get_type(); + static d_g_date_time_get_type g_date_time_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_type")); public static GLib.GType GType { get { @@ -22,8 +22,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_add(IntPtr raw, long timespan); + delegate IntPtr d_g_date_time_add(IntPtr raw, long timespan); + static d_g_date_time_add g_date_time_add = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add")); public GLib.DateTime Add(long timespan) { IntPtr raw_ret = g_date_time_add(Handle, timespan); @@ -31,8 +31,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_add_days(IntPtr raw, int days); + delegate IntPtr d_g_date_time_add_days(IntPtr raw, int days); + static d_g_date_time_add_days g_date_time_add_days = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_days")); public GLib.DateTime AddDays(int days) { IntPtr raw_ret = g_date_time_add_days(Handle, days); @@ -40,8 +40,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_add_full(IntPtr raw, int years, int months, int days, int hours, int minutes, double seconds); + delegate IntPtr d_g_date_time_add_full(IntPtr raw, int years, int months, int days, int hours, int minutes, double seconds); + static d_g_date_time_add_full g_date_time_add_full = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_full")); public GLib.DateTime AddFull(int years, int months, int days, int hours, int minutes, double seconds) { IntPtr raw_ret = g_date_time_add_full(Handle, years, months, days, hours, minutes, seconds); @@ -49,8 +49,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_add_hours(IntPtr raw, int hours); + delegate IntPtr d_g_date_time_add_hours(IntPtr raw, int hours); + static d_g_date_time_add_hours g_date_time_add_hours = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_hours")); public GLib.DateTime AddHours(int hours) { IntPtr raw_ret = g_date_time_add_hours(Handle, hours); @@ -58,8 +58,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_add_minutes(IntPtr raw, int minutes); + delegate IntPtr d_g_date_time_add_minutes(IntPtr raw, int minutes); + static d_g_date_time_add_minutes g_date_time_add_minutes = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_minutes")); public GLib.DateTime AddMinutes(int minutes) { IntPtr raw_ret = g_date_time_add_minutes(Handle, minutes); @@ -67,8 +67,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_add_months(IntPtr raw, int months); + delegate IntPtr d_g_date_time_add_months(IntPtr raw, int months); + static d_g_date_time_add_months g_date_time_add_months = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_months")); public GLib.DateTime AddMonths(int months) { IntPtr raw_ret = g_date_time_add_months(Handle, months); @@ -76,8 +76,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_add_seconds(IntPtr raw, double seconds); + delegate IntPtr d_g_date_time_add_seconds(IntPtr raw, double seconds); + static d_g_date_time_add_seconds g_date_time_add_seconds = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_seconds")); public GLib.DateTime AddSeconds(double seconds) { IntPtr raw_ret = g_date_time_add_seconds(Handle, seconds); @@ -85,8 +85,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_add_weeks(IntPtr raw, int weeks); + delegate IntPtr d_g_date_time_add_weeks(IntPtr raw, int weeks); + static d_g_date_time_add_weeks g_date_time_add_weeks = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_weeks")); public GLib.DateTime AddWeeks(int weeks) { IntPtr raw_ret = g_date_time_add_weeks(Handle, weeks); @@ -94,8 +94,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_add_years(IntPtr raw, int years); + delegate IntPtr d_g_date_time_add_years(IntPtr raw, int years); + static d_g_date_time_add_years g_date_time_add_years = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_add_years")); public GLib.DateTime AddYears(int years) { IntPtr raw_ret = g_date_time_add_years(Handle, years); @@ -103,8 +103,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern long g_date_time_difference(IntPtr raw, IntPtr begin); + delegate long d_g_date_time_difference(IntPtr raw, IntPtr begin); + static d_g_date_time_difference g_date_time_difference = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_difference")); public long Difference(GLib.DateTime begin) { long raw_ret = g_date_time_difference(Handle, begin == null ? IntPtr.Zero : begin.Handle); @@ -112,8 +112,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_format(IntPtr raw, IntPtr format); + delegate IntPtr d_g_date_time_format(IntPtr raw, IntPtr format); + static d_g_date_time_format g_date_time_format = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_format")); public string Format(string format) { IntPtr native_format = GLib.Marshaller.StringToPtrGStrdup (format); @@ -123,8 +123,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_time_get_day_of_month(IntPtr raw); + delegate int d_g_date_time_get_day_of_month(IntPtr raw); + static d_g_date_time_get_day_of_month g_date_time_get_day_of_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_day_of_month")); public int DayOfMonth { get { @@ -134,8 +134,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_time_get_day_of_week(IntPtr raw); + delegate int d_g_date_time_get_day_of_week(IntPtr raw); + static d_g_date_time_get_day_of_week g_date_time_get_day_of_week = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_day_of_week")); public int DayOfWeek { get { @@ -145,8 +145,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_time_get_day_of_year(IntPtr raw); + delegate int d_g_date_time_get_day_of_year(IntPtr raw); + static d_g_date_time_get_day_of_year g_date_time_get_day_of_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_day_of_year")); public int DayOfYear { get { @@ -156,8 +156,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_time_get_hour(IntPtr raw); + delegate int d_g_date_time_get_hour(IntPtr raw); + static d_g_date_time_get_hour g_date_time_get_hour = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_hour")); public int Hour { get { @@ -167,8 +167,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_time_get_microsecond(IntPtr raw); + delegate int d_g_date_time_get_microsecond(IntPtr raw); + static d_g_date_time_get_microsecond g_date_time_get_microsecond = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_microsecond")); public int Microsecond { get { @@ -178,8 +178,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_time_get_minute(IntPtr raw); + delegate int d_g_date_time_get_minute(IntPtr raw); + static d_g_date_time_get_minute g_date_time_get_minute = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_minute")); public int Minute { get { @@ -189,8 +189,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_time_get_month(IntPtr raw); + delegate int d_g_date_time_get_month(IntPtr raw); + static d_g_date_time_get_month g_date_time_get_month = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_month")); public int Month { get { @@ -200,8 +200,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_time_get_second(IntPtr raw); + delegate int d_g_date_time_get_second(IntPtr raw); + static d_g_date_time_get_second g_date_time_get_second = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_second")); public int Second { get { @@ -211,8 +211,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern double g_date_time_get_seconds(IntPtr raw); + delegate double d_g_date_time_get_seconds(IntPtr raw); + static d_g_date_time_get_seconds g_date_time_get_seconds = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_seconds")); public double Seconds { get { @@ -222,8 +222,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_get_timezone_abbreviation(IntPtr raw); + delegate IntPtr d_g_date_time_get_timezone_abbreviation(IntPtr raw); + static d_g_date_time_get_timezone_abbreviation g_date_time_get_timezone_abbreviation = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_timezone_abbreviation")); public string TimezoneAbbreviation { get { @@ -233,8 +233,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern long g_date_time_get_utc_offset(IntPtr raw); + delegate long d_g_date_time_get_utc_offset(IntPtr raw); + static d_g_date_time_get_utc_offset g_date_time_get_utc_offset = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_utc_offset")); public long UtcOffset { get { @@ -244,8 +244,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_time_get_week_numbering_year(IntPtr raw); + delegate int d_g_date_time_get_week_numbering_year(IntPtr raw); + static d_g_date_time_get_week_numbering_year g_date_time_get_week_numbering_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_week_numbering_year")); public int WeekNumberingYear { get { @@ -255,8 +255,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_time_get_week_of_year(IntPtr raw); + delegate int d_g_date_time_get_week_of_year(IntPtr raw); + static d_g_date_time_get_week_of_year g_date_time_get_week_of_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_week_of_year")); public int WeekOfYear { get { @@ -266,8 +266,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_time_get_year(IntPtr raw); + delegate int d_g_date_time_get_year(IntPtr raw); + static d_g_date_time_get_year g_date_time_get_year = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_year")); public int Year { get { @@ -277,15 +277,15 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_time_get_ymd(IntPtr raw, out int year, out int month, out int day); + delegate void d_g_date_time_get_ymd(IntPtr raw, out int year, out int month, out int day); + static d_g_date_time_get_ymd g_date_time_get_ymd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_get_ymd")); public void GetYmd(out int year, out int month, out int day) { g_date_time_get_ymd(Handle, out year, out month, out day); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_time_is_daylight_savings(IntPtr raw); + delegate bool d_g_date_time_is_daylight_savings(IntPtr raw); + static d_g_date_time_is_daylight_savings g_date_time_is_daylight_savings = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_is_daylight_savings")); public bool IsDaylightSavings { get { @@ -295,8 +295,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_to_local(IntPtr raw); + delegate IntPtr d_g_date_time_to_local(IntPtr raw); + static d_g_date_time_to_local g_date_time_to_local = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_local")); public GLib.DateTime ToLocal() { IntPtr raw_ret = g_date_time_to_local(Handle); @@ -304,8 +304,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_time_to_timeval(IntPtr raw, IntPtr tv); + delegate bool d_g_date_time_to_timeval(IntPtr raw, IntPtr tv); + static d_g_date_time_to_timeval g_date_time_to_timeval = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_timeval")); public bool ToTimeval(GLib.TimeVal tv) { IntPtr native_tv = GLib.Marshaller.StructureToPtrAlloc (tv); @@ -316,8 +316,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_to_timezone(IntPtr raw, IntPtr tz); + delegate IntPtr d_g_date_time_to_timezone(IntPtr raw, IntPtr tz); + static d_g_date_time_to_timezone g_date_time_to_timezone = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_timezone")); public GLib.DateTime ToTimezone(GLib.TimeZone tz) { IntPtr raw_ret = g_date_time_to_timezone(Handle, tz == null ? IntPtr.Zero : tz.Handle); @@ -325,8 +325,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern long g_date_time_to_unix(IntPtr raw); + delegate long d_g_date_time_to_unix(IntPtr raw); + static d_g_date_time_to_unix g_date_time_to_unix = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_unix")); public long ToUnix() { long raw_ret = g_date_time_to_unix(Handle); @@ -334,8 +334,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_to_utc(IntPtr raw); + delegate IntPtr d_g_date_time_to_utc(IntPtr raw); + static d_g_date_time_to_utc g_date_time_to_utc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_to_utc")); public GLib.DateTime ToUtc() { IntPtr raw_ret = g_date_time_to_utc(Handle); @@ -343,8 +343,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_date_time_compare(IntPtr dt1, IntPtr dt2); + delegate int d_g_date_time_compare(IntPtr dt1, IntPtr dt2); + static d_g_date_time_compare g_date_time_compare = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_compare")); public static int Compare(IntPtr dt1, IntPtr dt2) { int raw_ret = g_date_time_compare(dt1, dt2); @@ -352,8 +352,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_date_time_equal(IntPtr dt1, IntPtr dt2); + delegate bool d_g_date_time_equal(IntPtr dt1, IntPtr dt2); + static d_g_date_time_equal g_date_time_equal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_equal")); public static bool Equal(IntPtr dt1, IntPtr dt2) { bool raw_ret = g_date_time_equal(dt1, dt2); @@ -361,8 +361,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_date_time_hash(IntPtr datetime); + delegate uint d_g_date_time_hash(IntPtr datetime); + static d_g_date_time_hash g_date_time_hash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_hash")); public static uint Hash(IntPtr datetime) { uint raw_ret = g_date_time_hash(datetime); @@ -372,16 +372,16 @@ namespace GLib { public DateTime(IntPtr raw) : base(raw) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_new(IntPtr tz, int year, int month, int day, int hour, int minute, double seconds); + delegate IntPtr d_g_date_time_new(IntPtr tz, int year, int month, int day, int hour, int minute, double seconds); + static d_g_date_time_new g_date_time_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new")); public DateTime (GLib.TimeZone tz, int year, int month, int day, int hour, int minute, double seconds) { Raw = g_date_time_new(tz == null ? IntPtr.Zero : tz.Handle, year, month, day, hour, minute, seconds); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_new_from_timeval_local(IntPtr tv); + delegate IntPtr d_g_date_time_new_from_timeval_local(IntPtr tv); + static d_g_date_time_new_from_timeval_local g_date_time_new_from_timeval_local = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_timeval_local")); public DateTime (GLib.TimeVal tv) { @@ -391,8 +391,8 @@ namespace GLib { Marshal.FreeHGlobal (native_tv); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_new_from_timeval_utc(IntPtr tv); + delegate IntPtr d_g_date_time_new_from_timeval_utc(IntPtr tv); + static d_g_date_time_new_from_timeval_utc g_date_time_new_from_timeval_utc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_timeval_utc")); public static DateTime NewFromTimevalUtc(GLib.TimeVal tv) { @@ -403,16 +403,16 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_new_from_unix_local(long t); + delegate IntPtr d_g_date_time_new_from_unix_local(long t); + static d_g_date_time_new_from_unix_local g_date_time_new_from_unix_local = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_unix_local")); public DateTime (long t) { Raw = g_date_time_new_from_unix_local(t); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_new_from_unix_utc(long t); + delegate IntPtr d_g_date_time_new_from_unix_utc(long t); + static d_g_date_time_new_from_unix_utc g_date_time_new_from_unix_utc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_from_unix_utc")); public static DateTime NewFromUnixUtc(long t) { @@ -420,32 +420,32 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_new_local(int year, int month, int day, int hour, int minute, double seconds); + delegate IntPtr d_g_date_time_new_local(int year, int month, int day, int hour, int minute, double seconds); + static d_g_date_time_new_local g_date_time_new_local = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_local")); public DateTime (int year, int month, int day, int hour, int minute, double seconds) { Raw = g_date_time_new_local(year, month, day, hour, minute, seconds); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_new_now(IntPtr tz); + delegate IntPtr d_g_date_time_new_now(IntPtr tz); + static d_g_date_time_new_now g_date_time_new_now = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_now")); public DateTime (GLib.TimeZone tz) { Raw = g_date_time_new_now(tz == null ? IntPtr.Zero : tz.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_new_now_local(); + delegate IntPtr d_g_date_time_new_now_local(); + static d_g_date_time_new_now_local g_date_time_new_now_local = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_now_local")); public DateTime () { Raw = g_date_time_new_now_local(); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_new_now_utc(); + delegate IntPtr d_g_date_time_new_now_utc(); + static d_g_date_time_new_now_utc g_date_time_new_now_utc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_now_utc")); public static DateTime NewNowUtc() { @@ -453,8 +453,8 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_new_utc(int year, int month, int day, int hour, int minute, double seconds); + delegate IntPtr d_g_date_time_new_utc(int year, int month, int day, int hour, int minute, double seconds); + static d_g_date_time_new_utc g_date_time_new_utc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_new_utc")); public static DateTime NewUtc(int year, int month, int day, int hour, int minute, double seconds) { @@ -462,8 +462,8 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_date_time_ref(IntPtr raw); + delegate IntPtr d_g_date_time_ref(IntPtr raw); + static d_g_date_time_ref g_date_time_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_ref")); protected override void Ref (IntPtr raw) { @@ -473,8 +473,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_date_time_unref(IntPtr raw); + delegate void d_g_date_time_unref(IntPtr raw); + static d_g_date_time_unref g_date_time_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_date_time_unref")); protected override void Unref (IntPtr raw) { diff --git a/Source/Libs/GLibSharp/FileUtils.cs b/Source/Libs/GLibSharp/FileUtils.cs index 8aa0321d9..f03d6073c 100755 --- a/Source/Libs/GLibSharp/FileUtils.cs +++ b/Source/Libs/GLibSharp/FileUtils.cs @@ -26,11 +26,11 @@ namespace GLib { public class FileUtils { - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - extern static bool g_file_get_contents (IntPtr filename, out IntPtr contents, out int length, out IntPtr error); + delegate bool d_g_file_get_contents(IntPtr filename, out IntPtr contents, out int length, out IntPtr error); + static d_g_file_get_contents g_file_get_contents = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_file_get_contents")); - [DllImport (Global.GLibNativeDll)] - extern static bool g_file_get_contents_utf8 (IntPtr filename, out IntPtr contents, out int length, out IntPtr error); + delegate bool d_g_file_get_contents_utf8(IntPtr filename, out IntPtr contents, out int length, out IntPtr error); + static d_g_file_get_contents_utf8 g_file_get_contents_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_file_get_contents_utf8")); public static string GetFileContents (string filename) { diff --git a/Source/Libs/GLibSharp/GException.cs b/Source/Libs/GLibSharp/GException.cs index cb113afd2..5bcf63604 100755 --- a/Source/Libs/GLibSharp/GException.cs +++ b/Source/Libs/GLibSharp/GException.cs @@ -60,8 +60,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_clear_error (ref IntPtr errptr); + delegate void d_g_clear_error(ref IntPtr errptr); + static d_g_clear_error g_clear_error = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_clear_error")); ~GException () { g_clear_error (ref errptr); diff --git a/Source/Libs/GLibSharp/GLibSharp-api.xml b/Source/Libs/GLibSharp/GLibSharp-api.xml index e6d11500e..cd07d2459 100755 --- a/Source/Libs/GLibSharp/GLibSharp-api.xml +++ b/Source/Libs/GLibSharp/GLibSharp-api.xml @@ -30,4 +30,4 @@ - \ No newline at end of file + diff --git a/Source/Libs/GLibSharp/GLibSharp.csproj b/Source/Libs/GLibSharp/GLibSharp.csproj index 443c0b524..d49d0758d 100755 --- a/Source/Libs/GLibSharp/GLibSharp.csproj +++ b/Source/Libs/GLibSharp/GLibSharp.csproj @@ -15,11 +15,6 @@ ..\..\..\BuildOutput\Release - - - - - PreserveNewest - + diff --git a/Source/Libs/GLibSharp/GLibSharp.dll.config b/Source/Libs/GLibSharp/GLibSharp.dll.config deleted file mode 100644 index 03cb09f20..000000000 --- a/Source/Libs/GLibSharp/GLibSharp.dll.config +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/Source/Libs/GLibSharp/GString.cs b/Source/Libs/GLibSharp/GString.cs index 1575b3ce5..bf639e43a 100755 --- a/Source/Libs/GLibSharp/GString.cs +++ b/Source/Libs/GLibSharp/GString.cs @@ -27,16 +27,16 @@ namespace GLib { IntPtr handle; - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_string_free (IntPtr mem, bool free_segments); + delegate IntPtr d_g_string_free(IntPtr mem, bool free_segments); + static d_g_string_free g_string_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_string_free")); ~GString () { g_string_free (handle, true); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_string_new (IntPtr text); + delegate IntPtr d_g_string_new(IntPtr text); + static d_g_string_new g_string_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_string_new")); public GString (string text) { diff --git a/Source/Libs/GLibSharp/GType.cs b/Source/Libs/GLibSharp/GType.cs index 32e5eb878..3302df912 100755 --- a/Source/Libs/GLibSharp/GType.cs +++ b/Source/Libs/GLibSharp/GType.cs @@ -431,37 +431,37 @@ namespace GLib { return GType.Is (ValFromInstancePtr (raw), this); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_type_class_peek (IntPtr gtype); + delegate IntPtr d_g_type_class_peek(IntPtr gtype); + static d_g_type_class_peek g_type_class_peek = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_class_peek")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_type_class_ref (IntPtr gtype); + delegate IntPtr d_g_type_class_ref(IntPtr gtype); + static d_g_type_class_ref g_type_class_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_class_ref")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_type_default_interface_peek (IntPtr gtype); + delegate IntPtr d_g_type_default_interface_peek(IntPtr gtype); + static d_g_type_default_interface_peek g_type_default_interface_peek = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_default_interface_peek")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_type_default_interface_ref (IntPtr gtype); + delegate IntPtr d_g_type_default_interface_ref(IntPtr gtype); + static d_g_type_default_interface_ref g_type_default_interface_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_default_interface_ref")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_type_from_name (string name); + delegate IntPtr d_g_type_from_name(string name); + static d_g_type_from_name g_type_from_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_from_name")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_type_init (); + delegate void d_g_type_init(); + static d_g_type_init g_type_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_init")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_type_name (IntPtr raw); + delegate IntPtr d_g_type_name(IntPtr raw); + static d_g_type_name g_type_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_name")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_type_parent (IntPtr type); + delegate IntPtr d_g_type_parent(IntPtr type); + static d_g_type_parent g_type_parent = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_parent")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_type_query (IntPtr type, out GTypeQuery query); + delegate void d_g_type_query(IntPtr type, out GTypeQuery query); + static d_g_type_query g_type_query = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_query")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_type_register_static (IntPtr parent, IntPtr name, ref GTypeInfo info, int flags); + delegate IntPtr d_g_type_register_static(IntPtr parent, IntPtr name, ref GTypeInfo info, int flags); + static d_g_type_register_static g_type_register_static = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_register_static")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_type_is_a (IntPtr type, IntPtr is_a_type); + delegate bool d_g_type_is_a(IntPtr type, IntPtr is_a_type); + static d_g_type_is_a g_type_is_a = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_is_a")); } } diff --git a/Source/Libs/GLibSharp/Global.cs b/Source/Libs/GLibSharp/Global.cs index 46ebeac6e..e1eec9c6b 100755 --- a/Source/Libs/GLibSharp/Global.cs +++ b/Source/Libs/GLibSharp/Global.cs @@ -27,13 +27,9 @@ namespace GLib { public class Global { - //this is a static class private Global () {} - internal const string GLibNativeDll = "libglib-2.0-0.dll"; - internal const string GObjectNativeDll = "libgobject-2.0-0.dll"; - internal static bool IsWindowsPlatform { get { switch (Environment.OSVersion.Platform) { @@ -59,11 +55,11 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_set_prgname (IntPtr name); + delegate void d_g_set_prgname(IntPtr name); + static d_g_set_prgname g_set_prgname = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_prgname")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_get_prgname (); + delegate IntPtr d_g_get_prgname(); + static d_g_get_prgname g_get_prgname = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_get_prgname")); public static string ApplicationName { get { @@ -76,14 +72,14 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_set_application_name (IntPtr name); + delegate void d_g_set_application_name(IntPtr name); + static d_g_set_application_name g_set_application_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_application_name")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_get_application_name (); + delegate IntPtr d_g_get_application_name(); + static d_g_get_application_name g_get_application_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_get_application_name")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_format_size_for_display (long size); + delegate IntPtr d_g_format_size_for_display(long size); + static d_g_format_size_for_display g_format_size_for_display = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_format_size_for_display")); static public string FormatSizeForDisplay (long size) { diff --git a/Source/Libs/GLibSharp/IOChannel.cs b/Source/Libs/GLibSharp/IOChannel.cs index aaf8d23ac..bce628b4f 100755 --- a/Source/Libs/GLibSharp/IOChannel.cs +++ b/Source/Libs/GLibSharp/IOChannel.cs @@ -323,104 +323,104 @@ namespace GLib { return (IOChannelError) g_io_channel_error_from_errno (en); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_io_channel_unix_new (int fd); + delegate IntPtr d_g_io_channel_unix_new(int fd); + static d_g_io_channel_unix_new g_io_channel_unix_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_unix_new")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_io_channel_new_file (IntPtr filename, IntPtr mode, out IntPtr error); + delegate IntPtr d_g_io_channel_new_file(IntPtr filename, IntPtr mode, out IntPtr error); + static d_g_io_channel_new_file g_io_channel_new_file = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_new_file")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_io_channel_new_file_utf8 (IntPtr filename, IntPtr mode, out IntPtr error); + delegate IntPtr d_g_io_channel_new_file_utf8(IntPtr filename, IntPtr mode, out IntPtr error); + static d_g_io_channel_new_file_utf8 g_io_channel_new_file_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_new_file_utf8")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_error_quark (); + delegate int d_g_io_channel_error_quark(); + static d_g_io_channel_error_quark g_io_channel_error_quark = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_error_quark")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_error_from_errno (int en); + delegate int d_g_io_channel_error_from_errno(int en); + static d_g_io_channel_error_from_errno g_io_channel_error_from_errno = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_error_from_errno")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_flush (IntPtr raw, out IntPtr error); + delegate int d_g_io_channel_flush(IntPtr raw, out IntPtr error); + static d_g_io_channel_flush g_io_channel_flush = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_flush")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_io_channel_init (IntPtr raw); + delegate void d_g_io_channel_init(IntPtr raw); + static d_g_io_channel_init g_io_channel_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_init")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_read_chars (IntPtr raw, byte[] buf, UIntPtr count, out UIntPtr bytes_read, out IntPtr error); + delegate int d_g_io_channel_read_chars(IntPtr raw, byte[] buf, UIntPtr count, out UIntPtr bytes_read, out IntPtr error); + static d_g_io_channel_read_chars g_io_channel_read_chars = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_chars")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_read_line (IntPtr raw, out IntPtr str_return, IntPtr length, out UIntPtr terminator_pos, out IntPtr error); + delegate int d_g_io_channel_read_line(IntPtr raw, out IntPtr str_return, IntPtr length, out UIntPtr terminator_pos, out IntPtr error); + static d_g_io_channel_read_line g_io_channel_read_line = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_line")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_read_to_end (IntPtr raw, out IntPtr str_return, out UIntPtr length, out IntPtr error); + delegate int d_g_io_channel_read_to_end(IntPtr raw, out IntPtr str_return, out UIntPtr length, out IntPtr error); + static d_g_io_channel_read_to_end g_io_channel_read_to_end = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_to_end")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_read_unichar (IntPtr raw, out uint thechar, out IntPtr error); + delegate int d_g_io_channel_read_unichar(IntPtr raw, out uint thechar, out IntPtr error); + static d_g_io_channel_read_unichar g_io_channel_read_unichar = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_read_unichar")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_seek_position (IntPtr raw, long offset, int type, out IntPtr error); + delegate int d_g_io_channel_seek_position(IntPtr raw, long offset, int type, out IntPtr error); + static d_g_io_channel_seek_position g_io_channel_seek_position = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_seek_position")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_shutdown (IntPtr raw, bool flush, out IntPtr err); + delegate int d_g_io_channel_shutdown(IntPtr raw, bool flush, out IntPtr err); + static d_g_io_channel_shutdown g_io_channel_shutdown = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_shutdown")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_write_chars (IntPtr raw, byte[] buf, IntPtr count, out UIntPtr bytes_written, out IntPtr error); + delegate int d_g_io_channel_write_chars(IntPtr raw, byte[] buf, IntPtr count, out UIntPtr bytes_written, out IntPtr error); + static d_g_io_channel_write_chars g_io_channel_write_chars = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_write_chars")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_write_unichar (IntPtr raw, uint thechar, out IntPtr error); + delegate int d_g_io_channel_write_unichar(IntPtr raw, uint thechar, out IntPtr error); + static d_g_io_channel_write_unichar g_io_channel_write_unichar = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_write_unichar")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_get_buffer_condition (IntPtr raw); + delegate int d_g_io_channel_get_buffer_condition(IntPtr raw); + static d_g_io_channel_get_buffer_condition g_io_channel_get_buffer_condition = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_buffer_condition")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_io_channel_get_buffered (IntPtr raw); + delegate bool d_g_io_channel_get_buffered(IntPtr raw); + static d_g_io_channel_get_buffered g_io_channel_get_buffered = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_buffered")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_io_channel_set_buffered (IntPtr raw, bool buffered); + delegate void d_g_io_channel_set_buffered(IntPtr raw, bool buffered); + static d_g_io_channel_set_buffered g_io_channel_set_buffered = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_buffered")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern UIntPtr g_io_channel_get_buffer_size (IntPtr raw); + delegate UIntPtr d_g_io_channel_get_buffer_size(IntPtr raw); + static d_g_io_channel_get_buffer_size g_io_channel_get_buffer_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_buffer_size")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_io_channel_set_buffer_size (IntPtr raw, UIntPtr size); + delegate void d_g_io_channel_set_buffer_size(IntPtr raw, UIntPtr size); + static d_g_io_channel_set_buffer_size g_io_channel_set_buffer_size = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_buffer_size")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_io_channel_get_close_on_unref (IntPtr raw); + delegate bool d_g_io_channel_get_close_on_unref(IntPtr raw); + static d_g_io_channel_get_close_on_unref g_io_channel_get_close_on_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_close_on_unref")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_io_channel_set_close_on_unref (IntPtr raw, bool do_close); + delegate void d_g_io_channel_set_close_on_unref(IntPtr raw, bool do_close); + static d_g_io_channel_set_close_on_unref g_io_channel_set_close_on_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_close_on_unref")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_io_channel_get_encoding (IntPtr raw); + delegate IntPtr d_g_io_channel_get_encoding(IntPtr raw); + static d_g_io_channel_get_encoding g_io_channel_get_encoding = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_encoding")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_set_encoding (IntPtr raw, IntPtr encoding, out IntPtr error); + delegate int d_g_io_channel_set_encoding(IntPtr raw, IntPtr encoding, out IntPtr error); + static d_g_io_channel_set_encoding g_io_channel_set_encoding = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_encoding")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_get_flags (IntPtr raw); + delegate int d_g_io_channel_get_flags(IntPtr raw); + static d_g_io_channel_get_flags g_io_channel_get_flags = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_flags")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_set_flags (IntPtr raw, int flags, out IntPtr error); + delegate int d_g_io_channel_set_flags(IntPtr raw, int flags, out IntPtr error); + static d_g_io_channel_set_flags g_io_channel_set_flags = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_flags")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_io_channel_get_line_term (IntPtr raw, out int length); + delegate IntPtr d_g_io_channel_get_line_term(IntPtr raw, out int length); + static d_g_io_channel_get_line_term g_io_channel_get_line_term = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_get_line_term")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_io_channel_set_line_term (IntPtr raw, byte[] term, int length); + delegate void d_g_io_channel_set_line_term(IntPtr raw, byte[] term, int length); + static d_g_io_channel_set_line_term g_io_channel_set_line_term = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_set_line_term")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_io_channel_unix_get_fd (IntPtr raw); + delegate int d_g_io_channel_unix_get_fd(IntPtr raw); + static d_g_io_channel_unix_get_fd g_io_channel_unix_get_fd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_unix_get_fd")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_io_channel_ref (IntPtr raw); + delegate IntPtr d_g_io_channel_ref(IntPtr raw); + static d_g_io_channel_ref g_io_channel_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_ref")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_io_channel_unref (IntPtr raw); + delegate void d_g_io_channel_unref(IntPtr raw); + static d_g_io_channel_unref g_io_channel_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_channel_unref")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_io_add_watch_full (IntPtr raw, int priority, int condition, IOFuncNative func, IntPtr user_data, DestroyNotify notify); + delegate uint d_g_io_add_watch_full(IntPtr raw, int priority, int condition, IOFuncNative func, IntPtr user_data, DestroyNotify notify); + static d_g_io_add_watch_full g_io_add_watch_full = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_add_watch_full")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_io_create_watch (IntPtr raw, int condition); + delegate IntPtr d_g_io_create_watch(IntPtr raw, int condition); + static d_g_io_create_watch g_io_create_watch = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_io_create_watch")); } public delegate bool IOFunc (IOChannel source, IOCondition condition); diff --git a/Source/Libs/GLibSharp/Idle.cs b/Source/Libs/GLibSharp/Idle.cs index 36f50909f..c880d7f67 100755 --- a/Source/Libs/GLibSharp/Idle.cs +++ b/Source/Libs/GLibSharp/Idle.cs @@ -69,8 +69,8 @@ namespace GLib { { } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_idle_add (IdleHandlerInternal d, IntPtr data); + delegate uint d_g_idle_add(IdleHandlerInternal d, IntPtr data); + static d_g_idle_add g_idle_add = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_idle_add")); public static uint Add (IdleHandler hndlr) { @@ -84,8 +84,8 @@ namespace GLib { return p.ID; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_idle_add_full (int priority, IdleHandlerInternal d, IntPtr data, DestroyNotify notify); + delegate uint d_g_idle_add_full(int priority, IdleHandlerInternal d, IntPtr data, DestroyNotify notify); + static d_g_idle_add_full g_idle_add_full = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_idle_add_full")); public static uint Add (IdleHandler hndlr, Priority priority) { diff --git a/Source/Libs/GLibSharp/InitiallyUnowned.cs b/Source/Libs/GLibSharp/InitiallyUnowned.cs index ea1a0b235..884bf2efc 100755 --- a/Source/Libs/GLibSharp/InitiallyUnowned.cs +++ b/Source/Libs/GLibSharp/InitiallyUnowned.cs @@ -33,8 +33,8 @@ namespace GLib { } } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - private static extern void g_object_ref_sink (IntPtr raw); + delegate void d_g_object_ref_sink(IntPtr raw); + static d_g_object_ref_sink g_object_ref_sink = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref_sink")); protected override IntPtr Raw { get { @@ -47,14 +47,14 @@ namespace GLib { } } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_object_is_floating (IntPtr raw); + delegate bool d_g_object_is_floating(IntPtr raw); + static d_g_object_is_floating g_object_is_floating = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_is_floating")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_force_floating (IntPtr raw); + delegate void d_g_object_force_floating(IntPtr raw); + static d_g_object_force_floating g_object_force_floating = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_force_floating")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_unref (IntPtr raw); + delegate void d_g_object_unref(IntPtr raw); + static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref")); public bool IsFloating { get { diff --git a/Source/Libs/GLibSharp/KeyFile.cs b/Source/Libs/GLibSharp/KeyFile.cs index 7f5018cb2..006ce5767 100755 --- a/Source/Libs/GLibSharp/KeyFile.cs +++ b/Source/Libs/GLibSharp/KeyFile.cs @@ -539,125 +539,125 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_free (IntPtr raw); + delegate void d_g_key_file_free(IntPtr raw); + static d_g_key_file_free g_key_file_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_free")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_key_file_get_boolean (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + delegate bool d_g_key_file_get_boolean(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + static d_g_key_file_get_boolean g_key_file_get_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_boolean")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_get_boolean_list (IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error); + delegate IntPtr d_g_key_file_get_boolean_list(IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error); + static d_g_key_file_get_boolean_list g_key_file_get_boolean_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_boolean_list")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_get_comment (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + delegate IntPtr d_g_key_file_get_comment(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + static d_g_key_file_get_comment g_key_file_get_comment = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_comment")); - [DllImport (Global.GLibNativeDll)] - static extern double g_key_file_get_double (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + delegate double d_g_key_file_get_double(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + static d_g_key_file_get_double g_key_file_get_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_double")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_get_double_list (IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error); + delegate IntPtr d_g_key_file_get_double_list(IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error); + static d_g_key_file_get_double_list g_key_file_get_double_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_double_list")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_get_groups (IntPtr raw, IntPtr dummy); + delegate IntPtr d_g_key_file_get_groups(IntPtr raw, IntPtr dummy); + static d_g_key_file_get_groups g_key_file_get_groups = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_groups")); - [DllImport (Global.GLibNativeDll)] - static extern int g_key_file_get_integer (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + delegate int d_g_key_file_get_integer(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + static d_g_key_file_get_integer g_key_file_get_integer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_integer")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_get_integer_list (IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error); + delegate IntPtr d_g_key_file_get_integer_list(IntPtr raw, IntPtr group_name, IntPtr key, out UIntPtr length, out IntPtr error); + static d_g_key_file_get_integer_list g_key_file_get_integer_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_integer_list")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_get_keys (IntPtr raw, IntPtr group_name, IntPtr dummy, out IntPtr error); + delegate IntPtr d_g_key_file_get_keys(IntPtr raw, IntPtr group_name, IntPtr dummy, out IntPtr error); + static d_g_key_file_get_keys g_key_file_get_keys = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_keys")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_get_locale_string (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, out IntPtr error); + delegate IntPtr d_g_key_file_get_locale_string(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, out IntPtr error); + static d_g_key_file_get_locale_string g_key_file_get_locale_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_locale_string")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_get_locale_string_list (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr dummy, out IntPtr error); + delegate IntPtr d_g_key_file_get_locale_string_list(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr dummy, out IntPtr error); + static d_g_key_file_get_locale_string_list g_key_file_get_locale_string_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_locale_string_list")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_get_start_group (IntPtr raw); + delegate IntPtr d_g_key_file_get_start_group(IntPtr raw); + static d_g_key_file_get_start_group g_key_file_get_start_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_start_group")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_get_string (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + delegate IntPtr d_g_key_file_get_string(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + static d_g_key_file_get_string g_key_file_get_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_string")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_get_string_list (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr dummy, out IntPtr error); + delegate IntPtr d_g_key_file_get_string_list(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr dummy, out IntPtr error); + static d_g_key_file_get_string_list g_key_file_get_string_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_string_list")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_get_value (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + delegate IntPtr d_g_key_file_get_value(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + static d_g_key_file_get_value g_key_file_get_value = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_get_value")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_key_file_has_group (IntPtr raw, IntPtr group_name); + delegate bool d_g_key_file_has_group(IntPtr raw, IntPtr group_name); + static d_g_key_file_has_group g_key_file_has_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_has_group")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_key_file_has_key (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + delegate bool d_g_key_file_has_key(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + static d_g_key_file_has_key g_key_file_has_key = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_has_key")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_key_file_load_from_data (IntPtr raw, byte[] data, UIntPtr length, int flags, out IntPtr error); + delegate bool d_g_key_file_load_from_data(IntPtr raw, byte[] data, UIntPtr length, int flags, out IntPtr error); + static d_g_key_file_load_from_data g_key_file_load_from_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_data")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_key_file_load_from_data_dirs (IntPtr raw, IntPtr file, out IntPtr full_path, int flags, out IntPtr error); + delegate bool d_g_key_file_load_from_data_dirs(IntPtr raw, IntPtr file, out IntPtr full_path, int flags, out IntPtr error); + static d_g_key_file_load_from_data_dirs g_key_file_load_from_data_dirs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_data_dirs")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_key_file_load_from_dirs (IntPtr raw, IntPtr file, IntPtr search_dirs, out IntPtr full_path, int flags, out IntPtr error); + delegate bool d_g_key_file_load_from_dirs(IntPtr raw, IntPtr file, IntPtr search_dirs, out IntPtr full_path, int flags, out IntPtr error); + static d_g_key_file_load_from_dirs g_key_file_load_from_dirs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_dirs")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_key_file_load_from_file (IntPtr raw, IntPtr file, int flags, out IntPtr error); + delegate bool d_g_key_file_load_from_file(IntPtr raw, IntPtr file, int flags, out IntPtr error); + static d_g_key_file_load_from_file g_key_file_load_from_file = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_load_from_file")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_new (); + delegate IntPtr d_g_key_file_new(); + static d_g_key_file_new g_key_file_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_new")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_key_file_remove_comment (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + delegate bool d_g_key_file_remove_comment(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + static d_g_key_file_remove_comment g_key_file_remove_comment = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_remove_comment")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_key_file_remove_group (IntPtr raw, IntPtr group_name, out IntPtr error); + delegate bool d_g_key_file_remove_group(IntPtr raw, IntPtr group_name, out IntPtr error); + static d_g_key_file_remove_group g_key_file_remove_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_remove_group")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_key_file_remove_key (IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + delegate bool d_g_key_file_remove_key(IntPtr raw, IntPtr group_name, IntPtr key, out IntPtr error); + static d_g_key_file_remove_key g_key_file_remove_key = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_remove_key")); - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_set_boolean (IntPtr raw, IntPtr group_name, IntPtr key, bool value); + delegate void d_g_key_file_set_boolean(IntPtr raw, IntPtr group_name, IntPtr key, bool value); + static d_g_key_file_set_boolean g_key_file_set_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_boolean")); - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_set_boolean_list (IntPtr raw, IntPtr group_name, IntPtr key, bool[] list, UIntPtr n_list); + delegate void d_g_key_file_set_boolean_list(IntPtr raw, IntPtr group_name, IntPtr key, bool[] list, UIntPtr n_list); + static d_g_key_file_set_boolean_list g_key_file_set_boolean_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_boolean_list")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_key_file_set_comment (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr comment, out IntPtr error); + delegate bool d_g_key_file_set_comment(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr comment, out IntPtr error); + static d_g_key_file_set_comment g_key_file_set_comment = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_comment")); - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_set_double (IntPtr raw, IntPtr group_name, IntPtr key, double value); + delegate void d_g_key_file_set_double(IntPtr raw, IntPtr group_name, IntPtr key, double value); + static d_g_key_file_set_double g_key_file_set_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_double")); - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_set_double_list (IntPtr raw, IntPtr group_name, IntPtr key, double[] list, UIntPtr n_list); + delegate void d_g_key_file_set_double_list(IntPtr raw, IntPtr group_name, IntPtr key, double[] list, UIntPtr n_list); + static d_g_key_file_set_double_list g_key_file_set_double_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_double_list")); - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_set_integer (IntPtr raw, IntPtr group_name, IntPtr key, int value); + delegate void d_g_key_file_set_integer(IntPtr raw, IntPtr group_name, IntPtr key, int value); + static d_g_key_file_set_integer g_key_file_set_integer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_integer")); - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_set_integer_list (IntPtr raw, IntPtr group_name, IntPtr key, int[] list, UIntPtr n_list); + delegate void d_g_key_file_set_integer_list(IntPtr raw, IntPtr group_name, IntPtr key, int[] list, UIntPtr n_list); + static d_g_key_file_set_integer_list g_key_file_set_integer_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_integer_list")); - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_set_list_separator (IntPtr raw, byte separator); + delegate void d_g_key_file_set_list_separator(IntPtr raw, byte separator); + static d_g_key_file_set_list_separator g_key_file_set_list_separator = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_list_separator")); - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_set_locale_string (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr value); + delegate void d_g_key_file_set_locale_string(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr value); + static d_g_key_file_set_locale_string g_key_file_set_locale_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_locale_string")); - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_set_locale_string_list (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr list, UIntPtr length); + delegate void d_g_key_file_set_locale_string_list(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr locale, IntPtr list, UIntPtr length); + static d_g_key_file_set_locale_string_list g_key_file_set_locale_string_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_locale_string_list")); - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_set_string (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr value); + delegate void d_g_key_file_set_string(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr value); + static d_g_key_file_set_string g_key_file_set_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_string")); - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_set_string_list (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr list, UIntPtr n_list); + delegate void d_g_key_file_set_string_list(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr list, UIntPtr n_list); + static d_g_key_file_set_string_list g_key_file_set_string_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_string_list")); - [DllImport (Global.GLibNativeDll)] - static extern void g_key_file_set_value (IntPtr raw, IntPtr group_name, IntPtr key, IntPtr value); + delegate void d_g_key_file_set_value(IntPtr raw, IntPtr group_name, IntPtr key, IntPtr value); + static d_g_key_file_set_value g_key_file_set_value = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_set_value")); - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_key_file_to_data (IntPtr raw, out UIntPtr length, IntPtr dummy); + delegate IntPtr d_g_key_file_to_data(IntPtr raw, out UIntPtr length, IntPtr dummy); + static d_g_key_file_to_data g_key_file_to_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_key_file_to_data")); } } diff --git a/Source/Libs/GLibSharp/List.cs b/Source/Libs/GLibSharp/List.cs index 12fbee6a7..fe62105e1 100755 --- a/Source/Libs/GLibSharp/List.cs +++ b/Source/Libs/GLibSharp/List.cs @@ -26,24 +26,24 @@ namespace GLib { public class List : ListBase { - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_list_copy (IntPtr l); + delegate IntPtr d_g_list_copy(IntPtr l); + static d_g_list_copy g_list_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_copy")); public override object Clone () { return new List (g_list_copy (Handle)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_list_length (IntPtr l); + delegate int d_g_list_length(IntPtr l); + static d_g_list_length g_list_length = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_length")); internal override int Length (IntPtr list) { return g_list_length (list); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_list_free(IntPtr l); + delegate void d_g_list_free(IntPtr l); + static d_g_list_free g_list_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_free")); internal override void Free (IntPtr list) { @@ -51,24 +51,24 @@ namespace GLib { g_list_free (list); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_list_append (IntPtr l, IntPtr raw); + delegate IntPtr d_g_list_append(IntPtr l, IntPtr raw); + static d_g_list_append g_list_append = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_append")); internal override IntPtr Append (IntPtr list, IntPtr raw) { return g_list_append (list, raw); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_list_prepend (IntPtr l, IntPtr raw); + delegate IntPtr d_g_list_prepend(IntPtr l, IntPtr raw); + static d_g_list_prepend g_list_prepend = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_prepend")); internal override IntPtr Prepend (IntPtr list, IntPtr raw) { return g_list_prepend (list, raw); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_list_nth_data (IntPtr l, uint n); + delegate IntPtr d_g_list_nth_data(IntPtr l, uint n); + static d_g_list_nth_data g_list_nth_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_list_nth_data")); internal override IntPtr NthData (uint n) { diff --git a/Source/Libs/GLibSharp/ListBase.cs b/Source/Libs/GLibSharp/ListBase.cs index 15816a1de..7338f5f92 100755 --- a/Source/Libs/GLibSharp/ListBase.cs +++ b/Source/Libs/GLibSharp/ListBase.cs @@ -190,8 +190,8 @@ namespace GLib { return fullname + "Adapter"; } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_unref (IntPtr item); + delegate void d_g_object_unref(IntPtr item); + static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref")); public void Empty () { diff --git a/Source/Libs/GLibSharp/Log.cs b/Source/Libs/GLibSharp/Log.cs index bd17e1731..fc33d7f5f 100755 --- a/Source/Libs/GLibSharp/Log.cs +++ b/Source/Libs/GLibSharp/Log.cs @@ -123,8 +123,8 @@ namespace GLib { handlers = new System.Collections.Generic.Dictionary (); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_logv (IntPtr log_domain, LogLevelFlags flags, IntPtr message); + delegate void d_g_logv(IntPtr log_domain, LogLevelFlags flags, IntPtr message); + static d_g_logv g_logv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_logv")); public void WriteLog (string logDomain, LogLevelFlags flags, string format, params object [] args) { @@ -135,8 +135,8 @@ namespace GLib { Marshaller.Free (nmessage); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_log_set_handler (IntPtr log_domain, LogLevelFlags flags, LogFuncNative log_func, IntPtr user_data); + delegate uint d_g_log_set_handler(IntPtr log_domain, LogLevelFlags flags, LogFuncNative log_func, IntPtr user_data); + static d_g_log_set_handler g_log_set_handler = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_handler")); public static uint SetLogHandler (string logDomain, LogLevelFlags flags, LogFunc logFunc) { @@ -152,8 +152,8 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_log_remove_handler (IntPtr log_domain, uint handler_id); + delegate uint d_g_log_remove_handler(IntPtr log_domain, uint handler_id); + static d_g_log_remove_handler g_log_remove_handler = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_remove_handler")); public static void RemoveLogHandler (string logDomain, uint handlerID) { @@ -167,8 +167,8 @@ namespace GLib { Marshaller.Free (ndom); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern PrintFuncNative g_set_print_handler (PrintFuncNative handler); + delegate PrintFuncNative d_g_set_print_handler(PrintFuncNative handler); + static d_g_set_print_handler g_set_print_handler = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_print_handler")); public static PrintFunc SetPrintHandler (PrintFunc handler) { @@ -178,8 +178,8 @@ namespace GLib { return helper.Invoker; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern PrintFuncNative g_set_printerr_handler (PrintFuncNative handler); + delegate PrintFuncNative d_g_set_printerr_handler(PrintFuncNative handler); + static d_g_set_printerr_handler g_set_printerr_handler = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_set_printerr_handler")); public static PrintFunc SetPrintErrorHandler (PrintFunc handler) { @@ -189,8 +189,8 @@ namespace GLib { return helper.Invoker; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_log_default_handler (IntPtr log_domain, LogLevelFlags log_level, IntPtr message, IntPtr unused_data); + delegate void d_g_log_default_handler(IntPtr log_domain, LogLevelFlags log_level, IntPtr message, IntPtr unused_data); + static d_g_log_default_handler g_log_default_handler = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_default_handler")); public static void DefaultHandler (string logDomain, LogLevelFlags logLevel, string message) @@ -202,16 +202,16 @@ namespace GLib { Marshaller.Free (nmess); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - extern static LogLevelFlags g_log_set_always_fatal (LogLevelFlags fatal_mask); + delegate LogLevelFlags d_g_log_set_always_fatal(LogLevelFlags fatal_mask); + static d_g_log_set_always_fatal g_log_set_always_fatal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_always_fatal")); public static LogLevelFlags SetAlwaysFatal (LogLevelFlags fatalMask) { return g_log_set_always_fatal (fatalMask); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - extern static LogLevelFlags g_log_set_fatal_mask (IntPtr log_domain, LogLevelFlags fatal_mask); + delegate LogLevelFlags d_g_log_set_fatal_mask(IntPtr log_domain, LogLevelFlags fatal_mask); + static d_g_log_set_fatal_mask g_log_set_fatal_mask = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_fatal_mask")); public static LogLevelFlags SetAlwaysFatal (string logDomain, LogLevelFlags fatalMask) { @@ -244,8 +244,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - extern static LogFuncNative g_log_set_default_handler (LogFuncNative log_func, IntPtr user_data); + delegate LogFuncNative d_g_log_set_default_handler(LogFuncNative log_func, IntPtr user_data); + static d_g_log_set_default_handler g_log_set_default_handler = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_log_set_default_handler")); public static LogFunc SetDefaultHandler (LogFunc log_func) { diff --git a/Source/Libs/GLibSharp/MainContext.cs b/Source/Libs/GLibSharp/MainContext.cs index a187ff7cd..63da4243c 100755 --- a/Source/Libs/GLibSharp/MainContext.cs +++ b/Source/Libs/GLibSharp/MainContext.cs @@ -27,16 +27,16 @@ namespace GLib { public class MainContext { IntPtr handle; - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_main_context_new (); + delegate IntPtr d_g_main_context_new(); + static d_g_main_context_new g_main_context_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_new")); public MainContext () { handle = g_main_context_new (); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_main_context_ref (IntPtr raw); + delegate void d_g_main_context_ref(IntPtr raw); + static d_g_main_context_ref g_main_context_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_ref")); public MainContext (IntPtr raw) { @@ -50,8 +50,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_main_context_unref (IntPtr raw); + delegate void d_g_main_context_unref(IntPtr raw); + static d_g_main_context_unref g_main_context_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_unref")); ~MainContext () { @@ -59,8 +59,8 @@ namespace GLib { handle = IntPtr.Zero; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_main_context_default (); + delegate IntPtr d_g_main_context_default(); + static d_g_main_context_default g_main_context_default = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_default")); public static MainContext Default { get { @@ -68,8 +68,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_main_context_thread_default (); + delegate IntPtr d_g_main_context_thread_default(); + static d_g_main_context_thread_default g_main_context_thread_default = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_thread_default")); public MainContext ThreadDefault { get { @@ -79,16 +79,16 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_main_context_push_thread_default (IntPtr raw); + delegate void d_g_main_context_push_thread_default(IntPtr raw); + static d_g_main_context_push_thread_default g_main_context_push_thread_default = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_push_thread_default")); public void PushThreadDefault () { g_main_context_push_thread_default (handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_main_context_pop_thread_default (IntPtr raw); + delegate void d_g_main_context_pop_thread_default(IntPtr raw); + static d_g_main_context_pop_thread_default g_main_context_pop_thread_default = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_pop_thread_default")); public void PopThreadDefault () { @@ -96,8 +96,8 @@ namespace GLib { } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_main_context_iteration (IntPtr raw, bool may_block); + delegate bool d_g_main_context_iteration(IntPtr raw, bool may_block); + static d_g_main_context_iteration g_main_context_iteration = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_iteration")); public bool RunIteration (bool may_block) { @@ -109,8 +109,8 @@ namespace GLib { return RunIteration (false); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_main_context_pending (IntPtr raw); + delegate bool d_g_main_context_pending(IntPtr raw); + static d_g_main_context_pending g_main_context_pending = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_pending")); public bool HasPendingEvents { @@ -119,8 +119,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_main_context_wakeup (IntPtr raw); + delegate void d_g_main_context_wakeup(IntPtr raw); + static d_g_main_context_wakeup g_main_context_wakeup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_context_wakeup")); public void Wakeup () { @@ -142,8 +142,8 @@ namespace GLib { } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_main_depth (); + delegate int d_g_main_depth(); + static d_g_main_depth g_main_depth = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_depth")); public static int Depth { get { return g_main_depth (); } } diff --git a/Source/Libs/GLibSharp/MainLoop.cs b/Source/Libs/GLibSharp/MainLoop.cs index 9ea366ae8..a548852ae 100755 --- a/Source/Libs/GLibSharp/MainLoop.cs +++ b/Source/Libs/GLibSharp/MainLoop.cs @@ -25,8 +25,8 @@ namespace GLib { public class MainLoop { private IntPtr handle; - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_main_loop_new (IntPtr context, bool isRunning); + delegate IntPtr d_g_main_loop_new(IntPtr context, bool isRunning); + static d_g_main_loop_new g_main_loop_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_new")); public MainLoop () : this (MainContext.Default) { } @@ -37,8 +37,8 @@ namespace GLib { handle = g_main_loop_new (context.Handle, is_running); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_main_loop_unref (IntPtr loop); + delegate void d_g_main_loop_unref(IntPtr loop); + static d_g_main_loop_unref g_main_loop_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_unref")); ~MainLoop () { @@ -46,8 +46,8 @@ namespace GLib { handle = IntPtr.Zero; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_main_loop_is_running (IntPtr loop); + delegate bool d_g_main_loop_is_running(IntPtr loop); + static d_g_main_loop_is_running g_main_loop_is_running = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_is_running")); public bool IsRunning { get { @@ -55,24 +55,24 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_main_loop_run (IntPtr loop); + delegate void d_g_main_loop_run(IntPtr loop); + static d_g_main_loop_run g_main_loop_run = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_run")); public void Run () { g_main_loop_run (handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_main_loop_quit (IntPtr loop); + delegate void d_g_main_loop_quit(IntPtr loop); + static d_g_main_loop_quit g_main_loop_quit = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_quit")); public void Quit () { g_main_loop_quit (handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_main_loop_get_context (IntPtr loop); + delegate IntPtr d_g_main_loop_get_context(IntPtr loop); + static d_g_main_loop_get_context g_main_loop_get_context = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_main_loop_get_context")); public MainContext Context { get { diff --git a/Source/Libs/GLibSharp/ManagedValue.cs b/Source/Libs/GLibSharp/ManagedValue.cs index 266a7b58d..f1eeb296b 100755 --- a/Source/Libs/GLibSharp/ManagedValue.cs +++ b/Source/Libs/GLibSharp/ManagedValue.cs @@ -66,8 +66,8 @@ namespace GLib { static FreeFunc free; static GType boxed_type = GType.Invalid; - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_boxed_type_register_static (IntPtr typename, CopyFunc copy_func, FreeFunc free_func); + delegate IntPtr d_g_boxed_type_register_static(IntPtr typename, CopyFunc copy_func, FreeFunc free_func); + static d_g_boxed_type_register_static g_boxed_type_register_static = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_boxed_type_register_static")); public static GType GType { get { diff --git a/Source/Libs/GLibSharp/Markup.cs b/Source/Libs/GLibSharp/Markup.cs index 7a06fdf18..7ec8317b4 100755 --- a/Source/Libs/GLibSharp/Markup.cs +++ b/Source/Libs/GLibSharp/Markup.cs @@ -29,8 +29,8 @@ namespace GLib { public class Markup { private Markup () {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_markup_escape_text (IntPtr text, int len); + delegate IntPtr d_g_markup_escape_text(IntPtr text, int len); + static d_g_markup_escape_text g_markup_escape_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_markup_escape_text")); static public string EscapeText (string s) { diff --git a/Source/Libs/GLibSharp/Marshaller.cs b/Source/Libs/GLibSharp/Marshaller.cs index 1e1f53233..783a76a57 100755 --- a/Source/Libs/GLibSharp/Marshaller.cs +++ b/Source/Libs/GLibSharp/Marshaller.cs @@ -30,8 +30,8 @@ namespace GLib { private Marshaller () {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_free (IntPtr mem); + delegate void d_g_free(IntPtr mem); + static d_g_free g_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_free")); public static void Free (IntPtr ptr) { @@ -47,23 +47,15 @@ namespace GLib { g_free (ptrs [i]); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_filename_to_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); - - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_filename_to_utf8_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); - + delegate IntPtr d_g_filename_to_utf8(IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); + static d_g_filename_to_utf8 g_filename_to_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_filename_to_utf8")); + public static string FilenamePtrToString (IntPtr ptr) { if (ptr == IntPtr.Zero) return null; IntPtr dummy, error; - IntPtr utf8; - - if (Global.IsWindowsPlatform) - utf8 = g_filename_to_utf8_utf8 (ptr, -1, IntPtr.Zero, out dummy, out error); - else - utf8 = g_filename_to_utf8 (ptr, -1, IntPtr.Zero, out dummy, out error); + IntPtr utf8 = g_filename_to_utf8 (ptr, -1, IntPtr.Zero, out dummy, out error); if (error != IntPtr.Zero) throw new GLib.GException (error); @@ -124,11 +116,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_filename_from_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); - - [DllImport (Global.GLibNativeDll)] - static extern IntPtr g_filename_from_utf8_utf8 (IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); + delegate IntPtr d_g_filename_from_utf8(IntPtr mem, int len, IntPtr read, out IntPtr written, out IntPtr error); + static d_g_filename_from_utf8 g_filename_from_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_filename_from_utf8")); public static IntPtr StringToFilenamePtr (string str) { @@ -137,13 +126,7 @@ namespace GLib { IntPtr dummy, error; IntPtr utf8 = StringToPtrGStrdup (str); - - IntPtr result; - - if (Global.IsWindowsPlatform) - result = g_filename_from_utf8_utf8 (utf8, -1, IntPtr.Zero, out dummy, out error); - else - result = g_filename_from_utf8 (utf8, -1, IntPtr.Zero, out dummy, out error); + IntPtr result = g_filename_from_utf8 (utf8, -1, IntPtr.Zero, out dummy, out error); g_free (utf8); if (error != IntPtr.Zero) @@ -194,8 +177,8 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_strfreev (IntPtr mem); + delegate void d_g_strfreev(IntPtr mem); + static d_g_strfreev g_strfreev = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_strfreev")); public static void StrFreeV (IntPtr null_term_array) { @@ -239,8 +222,8 @@ namespace GLib { return members; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_malloc(UIntPtr size); + delegate IntPtr d_g_malloc(UIntPtr size); + static d_g_malloc g_malloc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_malloc")); public static IntPtr Malloc (ulong size) { @@ -260,11 +243,11 @@ namespace GLib { return local_epoch.AddSeconds (time_t.ToInt64 () + utc_offset); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_malloc0 (UIntPtr size); + delegate IntPtr d_g_malloc0(UIntPtr size); + static d_g_malloc0 g_malloc0 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_malloc0")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_unichar_to_utf8 (uint c, IntPtr buf); + delegate int d_g_unichar_to_utf8(uint c, IntPtr buf); + static d_g_unichar_to_utf8 g_unichar_to_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_unichar_to_utf8")); public static char GUnicharToChar (uint ucs4_char) { @@ -288,8 +271,8 @@ namespace GLib { return PtrToStringGFree (buf); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_utf16_to_ucs4 (ref ushort c, IntPtr len, IntPtr d1, IntPtr d2, IntPtr d3); + delegate IntPtr d_g_utf16_to_ucs4(ref ushort c, IntPtr len, IntPtr d1, IntPtr d2, IntPtr d3); + static d_g_utf16_to_ucs4 g_utf16_to_ucs4 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_utf16_to_ucs4")); public static uint CharToGUnichar (char c) { diff --git a/Source/Libs/GLibSharp/Mutex.cs b/Source/Libs/GLibSharp/Mutex.cs index 28c3274ac..e65ad438f 100755 --- a/Source/Libs/GLibSharp/Mutex.cs +++ b/Source/Libs/GLibSharp/Mutex.cs @@ -16,29 +16,29 @@ namespace GLib { int i2; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_mutex_clear(IntPtr raw); + delegate void d_g_mutex_clear(IntPtr raw); + static d_g_mutex_clear g_mutex_clear = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_clear")); public void Clear() { g_mutex_clear(Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_mutex_init(IntPtr raw); + delegate void d_g_mutex_init(IntPtr raw); + static d_g_mutex_init g_mutex_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_init")); public void Init() { g_mutex_init(Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_mutex_lock(IntPtr raw); + delegate void d_g_mutex_lock(IntPtr raw); + static d_g_mutex_lock g_mutex_lock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_lock")); public void Lock() { g_mutex_lock(Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_mutex_trylock(IntPtr raw); + delegate bool d_g_mutex_trylock(IntPtr raw); + static d_g_mutex_trylock g_mutex_trylock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_trylock")); public bool Trylock() { bool raw_ret = g_mutex_trylock(Handle); @@ -46,8 +46,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_mutex_unlock(IntPtr raw); + delegate void d_g_mutex_unlock(IntPtr raw); + static d_g_mutex_unlock g_mutex_unlock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_mutex_unlock")); public void Unlock() { g_mutex_unlock(Handle); diff --git a/Source/Libs/GLibSharp/NotifyHandler.cs b/Source/Libs/GLibSharp/NotifyHandler.cs index 40504d536..6c6ffdd5a 100755 --- a/Source/Libs/GLibSharp/NotifyHandler.cs +++ b/Source/Libs/GLibSharp/NotifyHandler.cs @@ -22,8 +22,8 @@ namespace GLib { public delegate void NotifyHandler (object o, NotifyArgs args); public class NotifyArgs : GLib.SignalArgs { - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_get_name (IntPtr pspec); + delegate IntPtr d_g_param_spec_get_name(IntPtr pspec); + static d_g_param_spec_get_name g_param_spec_get_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_get_name")); public string Property { get { diff --git a/Source/Libs/GLibSharp/Object.cs b/Source/Libs/GLibSharp/Object.cs index 59172a8cf..dfde3f8b1 100755 --- a/Source/Libs/GLibSharp/Object.cs +++ b/Source/Libs/GLibSharp/Object.cs @@ -77,11 +77,11 @@ namespace GLib { public static bool WarnOnFinalize { get; set; } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_object_ref (IntPtr raw); + delegate IntPtr d_g_object_ref(IntPtr raw); + static d_g_object_ref g_object_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_unref (IntPtr raw); + delegate void d_g_object_unref(IntPtr raw); + static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref")); public static Object TryGetObject (IntPtr o) { @@ -401,8 +401,8 @@ namespace GLib { } } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_get_name (IntPtr pspec); + delegate IntPtr d_g_param_spec_get_name(IntPtr pspec); + static d_g_param_spec_get_name g_param_spec_get_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_get_name")); static IntPtr ConstructorCallback (IntPtr gtypeval, uint n_construct_properties, IntPtr construct_properties) { @@ -440,8 +440,8 @@ namespace GLib { return raw; } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_class_override_property (IntPtr klass, uint prop_id, IntPtr name); + delegate void d_g_object_class_override_property(IntPtr klass, uint prop_id, IntPtr name); + static d_g_object_class_override_property g_object_class_override_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_override_property")); public static void OverrideProperty (IntPtr oclass, uint property_id, string name) { @@ -456,8 +456,8 @@ namespace GLib { idx++; } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_object_class_find_property (IntPtr klass, IntPtr name); + delegate IntPtr d_g_object_class_find_property(IntPtr klass, IntPtr name); + static d_g_object_class_find_property g_object_class_find_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_find_property")); static IntPtr FindClassProperty (GLib.Object o, string name) { @@ -466,8 +466,8 @@ namespace GLib { return g_object_class_find_property (gobjectclass, native_name); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_object_interface_find_property (IntPtr klass, IntPtr name); + delegate IntPtr d_g_object_interface_find_property(IntPtr klass, IntPtr name); + static d_g_object_interface_find_property g_object_interface_find_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_interface_find_property")); static IntPtr FindInterfaceProperty (GType type, string name) { @@ -476,8 +476,8 @@ namespace GLib { return g_object_interface_find_property (g_iface, native_name); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_class_install_property (IntPtr klass, uint prop_id, IntPtr param_spec); + delegate void d_g_object_class_install_property(IntPtr klass, uint prop_id, IntPtr param_spec); + static d_g_object_class_install_property g_object_class_install_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_install_property")); static IntPtr RegisterProperty (GType type, string name, string nick, string blurb, uint property_id, GType property_type, bool can_read, bool can_write) { @@ -567,8 +567,8 @@ namespace GLib { } } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_type_add_interface_static (IntPtr gtype, IntPtr iface_type, ref GInterfaceInfo info); + delegate void d_g_type_add_interface_static(IntPtr gtype, IntPtr iface_type, ref GInterfaceInfo info); + static d_g_type_add_interface_static g_type_add_interface_static = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_add_interface_static")); protected internal static GType RegisterGType (System.Type t) { @@ -605,16 +605,16 @@ namespace GLib { CreateNativeObject (new string [0], new GLib.Value [0]); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_object_new (IntPtr gtype, IntPtr dummy); + delegate IntPtr d_g_object_new(IntPtr gtype, IntPtr dummy); + static d_g_object_new g_object_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_new")); struct GParameter { public IntPtr name; public GLib.Value val; } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_object_newv (IntPtr gtype, int n_params, GParameter[] parms); + delegate IntPtr d_g_object_newv(IntPtr gtype, int n_params, GParameter[] parms); + static d_g_object_newv g_object_newv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_newv")); protected virtual void CreateNativeObject (string[] names, GLib.Value[] vals) { @@ -725,8 +725,8 @@ namespace GLib { } } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_get_property (IntPtr obj, IntPtr name, ref GLib.Value val); + delegate void d_g_object_get_property(IntPtr obj, IntPtr name, ref GLib.Value val); + static d_g_object_get_property g_object_get_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_get_property")); public GLib.Value GetProperty (string name) { @@ -737,8 +737,8 @@ namespace GLib { return val; } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_set_property (IntPtr obj, IntPtr name, ref GLib.Value val); + delegate void d_g_object_set_property(IntPtr obj, IntPtr name, ref GLib.Value val); + static d_g_object_set_property g_object_set_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_set_property")); public void SetProperty (string name, GLib.Value val) { @@ -747,8 +747,8 @@ namespace GLib { GLib.Marshaller.Free (native_name); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_notify (IntPtr obj, IntPtr property_name); + delegate void d_g_object_notify(IntPtr obj, IntPtr property_name); + static d_g_object_notify g_object_notify = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_notify")); protected void Notify (string property_name) { @@ -808,11 +808,11 @@ namespace GLib { Signal.OverrideDefaultHandler (gtype, name, cb); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - protected static extern void g_signal_chain_from_overridden (IntPtr args, ref GLib.Value retval); + protected delegate void d_g_signal_chain_from_overridden(IntPtr args, ref GLib.Value retval); + protected static d_g_signal_chain_from_overridden g_signal_chain_from_overridden = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_chain_from_overridden")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_type_check_instance_is_a (IntPtr obj, IntPtr gtype); + delegate bool d_g_type_check_instance_is_a(IntPtr obj, IntPtr gtype); + static d_g_type_check_instance_is_a g_type_check_instance_is_a = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_check_instance_is_a")); internal static bool IsObject (IntPtr obj) { diff --git a/Source/Libs/GLibSharp/ObjectManager.cs b/Source/Libs/GLibSharp/ObjectManager.cs index 7334a23eb..29234a47a 100755 --- a/Source/Libs/GLibSharp/ObjectManager.cs +++ b/Source/Libs/GLibSharp/ObjectManager.cs @@ -83,7 +83,7 @@ namespace GLib { return result; } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_type_parent (IntPtr typ); + delegate IntPtr d_g_type_parent(IntPtr typ); + static d_g_type_parent g_type_parent = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_parent")); } } diff --git a/Source/Libs/GLibSharp/ParamSpec.cs b/Source/Libs/GLibSharp/ParamSpec.cs index 11aa275b2..9972b88c8 100755 --- a/Source/Libs/GLibSharp/ParamSpec.cs +++ b/Source/Libs/GLibSharp/ParamSpec.cs @@ -143,62 +143,62 @@ namespace GLib { public uint param_id; } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_char (IntPtr name, IntPtr nick, IntPtr blurb, sbyte min, sbyte max, sbyte dval, int flags); + delegate IntPtr d_g_param_spec_char(IntPtr name, IntPtr nick, IntPtr blurb, sbyte min, sbyte max, sbyte dval, int flags); + static d_g_param_spec_char g_param_spec_char = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_char")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_uchar (IntPtr name, IntPtr nick, IntPtr blurb, byte min, byte max, byte dval, int flags); + delegate IntPtr d_g_param_spec_uchar(IntPtr name, IntPtr nick, IntPtr blurb, byte min, byte max, byte dval, int flags); + static d_g_param_spec_uchar g_param_spec_uchar = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_uchar")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_boolean (IntPtr name, IntPtr nick, IntPtr blurb, bool dval, int flags); + delegate IntPtr d_g_param_spec_boolean(IntPtr name, IntPtr nick, IntPtr blurb, bool dval, int flags); + static d_g_param_spec_boolean g_param_spec_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_boolean")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_enum (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr enum_type, int dval, int flags); + delegate IntPtr d_g_param_spec_enum(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr enum_type, int dval, int flags); + static d_g_param_spec_enum g_param_spec_enum = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_enum")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_int (IntPtr name, IntPtr nick, IntPtr blurb, int min, int max, int dval, int flags); + delegate IntPtr d_g_param_spec_int(IntPtr name, IntPtr nick, IntPtr blurb, int min, int max, int dval, int flags); + static d_g_param_spec_int g_param_spec_int = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_int")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_uint (IntPtr name, IntPtr nick, IntPtr blurb, uint min, uint max, uint dval, int flags); + delegate IntPtr d_g_param_spec_uint(IntPtr name, IntPtr nick, IntPtr blurb, uint min, uint max, uint dval, int flags); + static d_g_param_spec_uint g_param_spec_uint = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_uint")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_long (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr min, IntPtr max, IntPtr dval, int flags); + delegate IntPtr d_g_param_spec_long(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr min, IntPtr max, IntPtr dval, int flags); + static d_g_param_spec_long g_param_spec_long = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_long")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_ulong (IntPtr name, IntPtr nick, IntPtr blurb, UIntPtr min, UIntPtr max, UIntPtr dval, int flags); + delegate IntPtr d_g_param_spec_ulong(IntPtr name, IntPtr nick, IntPtr blurb, UIntPtr min, UIntPtr max, UIntPtr dval, int flags); + static d_g_param_spec_ulong g_param_spec_ulong = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_ulong")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_int64 (IntPtr name, IntPtr nick, IntPtr blurb, long min, long max, long dval, int flags); + delegate IntPtr d_g_param_spec_int64(IntPtr name, IntPtr nick, IntPtr blurb, long min, long max, long dval, int flags); + static d_g_param_spec_int64 g_param_spec_int64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_int64")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_uint64 (IntPtr name, IntPtr nick, IntPtr blurb, ulong min, ulong max, ulong dval, int flags); + delegate IntPtr d_g_param_spec_uint64(IntPtr name, IntPtr nick, IntPtr blurb, ulong min, ulong max, ulong dval, int flags); + static d_g_param_spec_uint64 g_param_spec_uint64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_uint64")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_float (IntPtr name, IntPtr nick, IntPtr blurb, float min, float max, float dval, int flags); + delegate IntPtr d_g_param_spec_float(IntPtr name, IntPtr nick, IntPtr blurb, float min, float max, float dval, int flags); + static d_g_param_spec_float g_param_spec_float = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_float")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_double (IntPtr name, IntPtr nick, IntPtr blurb, double min, double max, double dval, int flags); + delegate IntPtr d_g_param_spec_double(IntPtr name, IntPtr nick, IntPtr blurb, double min, double max, double dval, int flags); + static d_g_param_spec_double g_param_spec_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_double")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_string (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags); + delegate IntPtr d_g_param_spec_string(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags); + static d_g_param_spec_string g_param_spec_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_string")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_pointer (IntPtr name, IntPtr nick, IntPtr blurb, int flags); + delegate IntPtr d_g_param_spec_pointer(IntPtr name, IntPtr nick, IntPtr blurb, int flags); + static d_g_param_spec_pointer g_param_spec_pointer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_pointer")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_gtype (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags); + delegate IntPtr d_g_param_spec_gtype(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr dval, int flags); + static d_g_param_spec_gtype g_param_spec_gtype = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_gtype")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_boxed (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags); + delegate IntPtr d_g_param_spec_boxed(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags); + static d_g_param_spec_boxed g_param_spec_boxed = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_boxed")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_param_spec_object (IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags); + delegate IntPtr d_g_param_spec_object(IntPtr name, IntPtr nick, IntPtr blurb, IntPtr return_type, int flags); + static d_g_param_spec_object g_param_spec_object = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_param_spec_object")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_gtype_get_type (); + delegate IntPtr d_g_gtype_get_type(); + static d_g_gtype_get_type g_gtype_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_gtype_get_type")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_type_is_a (IntPtr a, IntPtr b); + delegate bool d_g_type_is_a(IntPtr a, IntPtr b); + static d_g_type_is_a g_type_is_a = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_is_a")); } } diff --git a/Source/Libs/GLibSharp/PollFD.cs b/Source/Libs/GLibSharp/PollFD.cs index cb3e10cfa..7e3cdf5e3 100755 --- a/Source/Libs/GLibSharp/PollFD.cs +++ b/Source/Libs/GLibSharp/PollFD.cs @@ -24,8 +24,8 @@ namespace GLib { return (GLib.PollFD) Marshal.PtrToStructure (raw, typeof (GLib.PollFD)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_pollfd_get_type(); + delegate IntPtr d_g_pollfd_get_type(); + static d_g_pollfd_get_type g_pollfd_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_pollfd_get_type")); public static GLib.GType GType { get { diff --git a/Source/Libs/GLibSharp/PtrArray.cs b/Source/Libs/GLibSharp/PtrArray.cs index d6a433660..8affc4a81 100755 --- a/Source/Libs/GLibSharp/PtrArray.cs +++ b/Source/Libs/GLibSharp/PtrArray.cs @@ -32,8 +32,8 @@ namespace GLib { internal bool elements_owned = false; protected System.Type element_type = null; - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_ptr_array_sized_new (uint n_preallocs); + delegate IntPtr d_g_ptr_array_sized_new(uint n_preallocs); + static d_g_ptr_array_sized_new g_ptr_array_sized_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_sized_new")); public PtrArray (uint n_preallocs, System.Type element_type, bool owned, bool elements_owned) { @@ -43,8 +43,8 @@ namespace GLib { this.elements_owned = elements_owned; } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_ptr_array_new (); + delegate IntPtr d_g_ptr_array_new(); + static d_g_ptr_array_new g_ptr_array_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_new")); public PtrArray (System.Type element_type, bool owned, bool elements_owned) { @@ -77,11 +77,11 @@ namespace GLib { GC.SuppressFinalize (this); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_ptr_array_free (IntPtr raw, bool free_seg); + delegate void d_g_ptr_array_free(IntPtr raw, bool free_seg); + static d_g_ptr_array_free g_ptr_array_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_free")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_unref (IntPtr item); + delegate void d_g_object_unref(IntPtr item); + static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_object_unref")); void Dispose (bool disposing) { @@ -117,24 +117,24 @@ namespace GLib { } } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_ptr_array_add (IntPtr raw, IntPtr val); + delegate void d_g_ptr_array_add(IntPtr raw, IntPtr val); + static d_g_ptr_array_add g_ptr_array_add = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_add")); public void Add (IntPtr val) { g_ptr_array_add (Handle, val); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_ptr_array_remove (IntPtr raw, IntPtr data); + delegate void d_g_ptr_array_remove(IntPtr raw, IntPtr data); + static d_g_ptr_array_remove g_ptr_array_remove = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_remove")); public void Remove (IntPtr data) { g_ptr_array_remove (Handle, data); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_ptr_array_remove_range (IntPtr raw, uint index, uint length); + delegate void d_g_ptr_array_remove_range(IntPtr raw, uint index, uint length); + static d_g_ptr_array_remove_range g_ptr_array_remove_range = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_remove_range")); public void RemoveRange (IntPtr data, uint index, uint length) { @@ -257,8 +257,8 @@ namespace GLib { return new ListEnumerator (this); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_ptr_array_copy (IntPtr raw); + delegate IntPtr d_g_ptr_array_copy(IntPtr raw); + static d_g_ptr_array_copy g_ptr_array_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_ptr_array_copy")); // ICloneable public object Clone () diff --git a/Source/Libs/GLibSharp/RecMutex.cs b/Source/Libs/GLibSharp/RecMutex.cs index dc4f68058..bc2a7ae00 100755 --- a/Source/Libs/GLibSharp/RecMutex.cs +++ b/Source/Libs/GLibSharp/RecMutex.cs @@ -18,29 +18,29 @@ namespace GLib { } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_rec_mutex_clear(IntPtr raw); + delegate void d_g_rec_mutex_clear(IntPtr raw); + static d_g_rec_mutex_clear g_rec_mutex_clear = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_clear")); public void Clear() { g_rec_mutex_clear(Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_rec_mutex_init(IntPtr raw); + delegate void d_g_rec_mutex_init(IntPtr raw); + static d_g_rec_mutex_init g_rec_mutex_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_init")); public void Init() { g_rec_mutex_init(Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_rec_mutex_lock(IntPtr raw); + delegate void d_g_rec_mutex_lock(IntPtr raw); + static d_g_rec_mutex_lock g_rec_mutex_lock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_lock")); public void Lock() { g_rec_mutex_lock(Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_rec_mutex_trylock(IntPtr raw); + delegate bool d_g_rec_mutex_trylock(IntPtr raw); + static d_g_rec_mutex_trylock g_rec_mutex_trylock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_trylock")); public bool Trylock() { bool raw_ret = g_rec_mutex_trylock(Handle); @@ -48,8 +48,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_rec_mutex_unlock(IntPtr raw); + delegate void d_g_rec_mutex_unlock(IntPtr raw); + static d_g_rec_mutex_unlock g_rec_mutex_unlock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_rec_mutex_unlock")); public void Unlock() { g_rec_mutex_unlock(Handle); diff --git a/Source/Libs/GLibSharp/SList.cs b/Source/Libs/GLibSharp/SList.cs index cf1a5906d..7a06317f8 100755 --- a/Source/Libs/GLibSharp/SList.cs +++ b/Source/Libs/GLibSharp/SList.cs @@ -26,24 +26,24 @@ namespace GLib { public class SList : ListBase { - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_slist_copy (IntPtr l); + delegate IntPtr d_g_slist_copy(IntPtr l); + static d_g_slist_copy g_slist_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_copy")); public override object Clone () { return new SList (g_slist_copy (Handle)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_slist_length (IntPtr l); + delegate int d_g_slist_length(IntPtr l); + static d_g_slist_length g_slist_length = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_length")); internal override int Length (IntPtr list) { return g_slist_length (list); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_slist_free(IntPtr l); + delegate void d_g_slist_free(IntPtr l); + static d_g_slist_free g_slist_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_free")); internal override void Free (IntPtr list) { @@ -51,16 +51,16 @@ namespace GLib { g_slist_free (list); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_slist_append (IntPtr l, IntPtr raw); + delegate IntPtr d_g_slist_append(IntPtr l, IntPtr raw); + static d_g_slist_append g_slist_append = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_append")); internal override IntPtr Append (IntPtr list, IntPtr raw) { return g_slist_append (list, raw); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_slist_prepend (IntPtr l, IntPtr raw); + delegate IntPtr d_g_slist_prepend(IntPtr l, IntPtr raw); + static d_g_slist_prepend g_slist_prepend = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_prepend")); internal override IntPtr Prepend (IntPtr list, IntPtr raw) { @@ -68,8 +68,8 @@ namespace GLib { } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_slist_nth_data (IntPtr l, uint n); + delegate IntPtr d_g_slist_nth_data(IntPtr l, uint n); + static d_g_slist_nth_data g_slist_nth_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_slist_nth_data")); internal override IntPtr NthData (uint n) { diff --git a/Source/Libs/GLibSharp/Signal.cs b/Source/Libs/GLibSharp/Signal.cs index 9636a4a48..20c9794e9 100755 --- a/Source/Libs/GLibSharp/Signal.cs +++ b/Source/Libs/GLibSharp/Signal.cs @@ -309,7 +309,7 @@ namespace GLib { ret_obj = ret.Val; ret.Dispose (); } else - g_signal_emitv (inst_and_params.ArrayPtr, signal_id, gquark, IntPtr.Zero); + g_signal_emitv2 (inst_and_params.ArrayPtr, signal_id, gquark, IntPtr.Zero); foreach (GLib.Value val in vals) val.Dispose (); @@ -357,33 +357,33 @@ namespace GLib { g_signal_override_class_closure (id, gtype.Val, closure); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_cclosure_new (Delegate cb, IntPtr data, IntPtr notify); + delegate IntPtr d_g_cclosure_new(Delegate cb, IntPtr data, IntPtr notify); + static d_g_cclosure_new g_cclosure_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_cclosure_new")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_signal_get_invocation_hint (IntPtr instance); + delegate IntPtr d_g_signal_get_invocation_hint(IntPtr instance); + static d_g_signal_get_invocation_hint g_signal_get_invocation_hint = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_get_invocation_hint")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_signal_emitv (IntPtr instance_and_params, uint signal_id, uint gquark_detail, ref GLib.Value return_value); + delegate void d_g_signal_emitv(IntPtr instance_and_params, uint signal_id, uint gquark_detail, ref GLib.Value return_value); + static d_g_signal_emitv g_signal_emitv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_emitv")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_signal_emitv (IntPtr instance_and_params, uint signal_id, uint gquark_detail, IntPtr return_value); + delegate void d_g_signal_emitv2(IntPtr instance_and_params, uint signal_id, uint gquark_detail, IntPtr return_value); + static d_g_signal_emitv2 g_signal_emitv2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_emitv")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_signal_lookup (IntPtr name, IntPtr itype); + delegate uint d_g_signal_lookup(IntPtr name, IntPtr itype); + static d_g_signal_lookup g_signal_lookup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_lookup")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_signal_override_class_closure (uint id, IntPtr gtype, IntPtr closure); + delegate void d_g_signal_override_class_closure(uint id, IntPtr gtype, IntPtr closure); + static d_g_signal_override_class_closure g_signal_override_class_closure = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_override_class_closure")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_signal_query (uint signal_id, out Query query); + delegate void d_g_signal_query(uint signal_id, out Query query); + static d_g_signal_query g_signal_query = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_query")); //better not to expose g_quark_from_static_string () due to memory allocation issues - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_quark_from_string (IntPtr str); + delegate uint d_g_quark_from_string(IntPtr str); + static d_g_quark_from_string g_quark_from_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_quark_from_string")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern ulong g_signal_add_emission_hook (uint signal_id, uint gquark_detail, EmissionHookNative hook_func, IntPtr hook_data, IntPtr data_destroy); + delegate ulong d_g_signal_add_emission_hook(uint signal_id, uint gquark_detail, EmissionHookNative hook_func, IntPtr hook_data, IntPtr data_destroy); + static d_g_signal_add_emission_hook g_signal_add_emission_hook = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_add_emission_hook")); } } diff --git a/Source/Libs/GLibSharp/SignalAttribute.cs b/Source/Libs/GLibSharp/SignalAttribute.cs index 66adbbb3c..73f218ad0 100755 --- a/Source/Libs/GLibSharp/SignalAttribute.cs +++ b/Source/Libs/GLibSharp/SignalAttribute.cs @@ -1,9 +1,9 @@ // SignalAttribute.cs // // Author: -// Ricardo Fernández Pascual +// Ricardo Fern�ndez Pascual // -// Copyright (c) Ricardo Fernández Pascual +// Copyright (c) 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 diff --git a/Source/Libs/GLibSharp/SignalClosure.cs b/Source/Libs/GLibSharp/SignalClosure.cs index 9e2b4166b..a216c7601 100755 --- a/Source/Libs/GLibSharp/SignalClosure.cs +++ b/Source/Libs/GLibSharp/SignalClosure.cs @@ -201,26 +201,26 @@ namespace GLib { } } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_cclosure_new (Delegate cb, IntPtr user_data, ClosureNotify notify); + delegate IntPtr d_g_cclosure_new(Delegate cb, IntPtr user_data, ClosureNotify notify); + static d_g_cclosure_new g_cclosure_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_cclosure_new")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_closure_new_simple (int closure_size, IntPtr dummy); + delegate IntPtr d_g_closure_new_simple(int closure_size, IntPtr dummy); + static d_g_closure_new_simple g_closure_new_simple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_new_simple")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_closure_set_marshal (IntPtr closure, ClosureMarshal marshaler); + delegate void d_g_closure_set_marshal(IntPtr closure, ClosureMarshal marshaler); + static d_g_closure_set_marshal g_closure_set_marshal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_set_marshal")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_closure_add_finalize_notifier (IntPtr closure, IntPtr dummy, ClosureNotify notify); + delegate void d_g_closure_add_finalize_notifier(IntPtr closure, IntPtr dummy, ClosureNotify notify); + static d_g_closure_add_finalize_notifier g_closure_add_finalize_notifier = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_add_finalize_notifier")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_signal_connect_closure (IntPtr obj, IntPtr name, IntPtr closure, bool is_after); + delegate uint d_g_signal_connect_closure(IntPtr obj, IntPtr name, IntPtr closure, bool is_after); + static d_g_signal_connect_closure g_signal_connect_closure = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_connect_closure")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_signal_handler_disconnect (IntPtr instance, uint handler); + delegate void d_g_signal_handler_disconnect(IntPtr instance, uint handler); + static d_g_signal_handler_disconnect g_signal_handler_disconnect = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_handler_disconnect")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_signal_handler_is_connected (IntPtr instance, uint handler); + delegate bool d_g_signal_handler_is_connected(IntPtr instance, uint handler); + static d_g_signal_handler_is_connected g_signal_handler_is_connected = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_handler_is_connected")); } } diff --git a/Source/Libs/GLibSharp/Source.cs b/Source/Libs/GLibSharp/Source.cs index f810b5436..b357db25e 100755 --- a/Source/Libs/GLibSharp/Source.cs +++ b/Source/Libs/GLibSharp/Source.cs @@ -76,8 +76,8 @@ namespace GLib { public Source(IntPtr raw) : base(raw) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_source_new(IntPtr source_funcs, uint struct_size); + delegate IntPtr d_g_source_new(IntPtr source_funcs, uint struct_size); + static d_g_source_new g_source_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_new")); public Source (GLib.SourceFuncs source_funcs, uint struct_size) { @@ -147,8 +147,8 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_source_remove (uint tag); + delegate bool d_g_source_remove(uint tag); + static d_g_source_remove g_source_remove = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove")); public static bool Remove (uint tag) { @@ -163,8 +163,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_source_get_type(); + delegate IntPtr d_g_source_get_type(); + static d_g_source_get_type g_source_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_type")); public static GLib.GType GType { get { @@ -174,8 +174,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_source_get_context(IntPtr raw); + delegate IntPtr d_g_source_get_context(IntPtr raw); + static d_g_source_get_context g_source_get_context = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_context")); public GLib.MainContext Context { get { @@ -185,11 +185,11 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_source_get_priority(IntPtr raw); + delegate int d_g_source_get_priority(IntPtr raw); + static d_g_source_get_priority g_source_get_priority = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_priority")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_set_priority(IntPtr raw, int priority); + delegate void d_g_source_set_priority(IntPtr raw, int priority); + static d_g_source_set_priority g_source_set_priority = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_priority")); public int Priority { get { @@ -202,11 +202,11 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_source_get_name(IntPtr raw); + delegate IntPtr d_g_source_get_name(IntPtr raw); + static d_g_source_get_name g_source_get_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_name")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_set_name(IntPtr raw, IntPtr name); + delegate void d_g_source_set_name(IntPtr raw, IntPtr name); + static d_g_source_set_name g_source_set_name = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_name")); public string Name { get { @@ -221,15 +221,15 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_add_child_source(IntPtr raw, IntPtr child_source); + delegate void d_g_source_add_child_source(IntPtr raw, IntPtr child_source); + static d_g_source_add_child_source g_source_add_child_source = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_add_child_source")); public void AddChildSource(GLib.Source child_source) { g_source_add_child_source(Handle, child_source == null ? IntPtr.Zero : child_source.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_add_poll(IntPtr raw, IntPtr fd); + delegate void d_g_source_add_poll(IntPtr raw, IntPtr fd); + static d_g_source_add_poll g_source_add_poll = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_add_poll")); public void AddPoll(GLib.PollFD fd) { IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); @@ -238,8 +238,8 @@ namespace GLib { Marshal.FreeHGlobal (native_fd); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_source_attach(IntPtr raw, IntPtr context); + delegate uint d_g_source_attach(IntPtr raw, IntPtr context); + static d_g_source_attach g_source_attach = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_attach")); public uint Attach(GLib.MainContext context) { uint raw_ret = g_source_attach(Handle, context == null ? IntPtr.Zero : context.Handle); @@ -251,11 +251,11 @@ namespace GLib { return Attach (null); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_source_get_can_recurse(IntPtr raw); + delegate bool d_g_source_get_can_recurse(IntPtr raw); + static d_g_source_get_can_recurse g_source_get_can_recurse = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_can_recurse")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_set_can_recurse(IntPtr raw, bool can_recurse); + delegate void d_g_source_set_can_recurse(IntPtr raw, bool can_recurse); + static d_g_source_set_can_recurse g_source_set_can_recurse = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_can_recurse")); public bool CanRecurse { get { @@ -268,8 +268,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_get_current_time(IntPtr raw, IntPtr timeval); + delegate void d_g_source_get_current_time(IntPtr raw, IntPtr timeval); + static d_g_source_get_current_time g_source_get_current_time = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_current_time")); [Obsolete] public void GetCurrentTime(GLib.TimeVal timeval) { @@ -279,8 +279,8 @@ namespace GLib { Marshal.FreeHGlobal (native_timeval); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_source_get_id(IntPtr raw); + delegate uint d_g_source_get_id(IntPtr raw); + static d_g_source_get_id g_source_get_id = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_id")); public uint Id { get { @@ -290,11 +290,11 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern long g_source_get_ready_time(IntPtr raw); + delegate long d_g_source_get_ready_time(IntPtr raw); + static d_g_source_get_ready_time g_source_get_ready_time = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_ready_time")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_set_ready_time(IntPtr raw, long ready_time); + delegate void d_g_source_set_ready_time(IntPtr raw, long ready_time); + static d_g_source_set_ready_time g_source_set_ready_time = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_ready_time")); public long ReadyTime { get { @@ -307,8 +307,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern long g_source_get_time(IntPtr raw); + delegate long d_g_source_get_time(IntPtr raw); + static d_g_source_get_time g_source_get_time = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_get_time")); public long Time { get { @@ -318,8 +318,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_source_is_destroyed(IntPtr raw); + delegate bool d_g_source_is_destroyed(IntPtr raw); + static d_g_source_is_destroyed g_source_is_destroyed = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_is_destroyed")); public bool IsDestroyed { get { @@ -329,15 +329,15 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_modify_unix_fd(IntPtr raw, IntPtr tag, int new_events); + delegate void d_g_source_modify_unix_fd(IntPtr raw, IntPtr tag, int new_events); + static d_g_source_modify_unix_fd g_source_modify_unix_fd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_modify_unix_fd")); public void ModifyUnixFd(IntPtr tag, GLib.IOCondition new_events) { g_source_modify_unix_fd(Handle, tag, (int) new_events); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_source_query_unix_fd(IntPtr raw, IntPtr tag); + delegate int d_g_source_query_unix_fd(IntPtr raw, IntPtr tag); + static d_g_source_query_unix_fd g_source_query_unix_fd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_query_unix_fd")); public GLib.IOCondition QueryUnixFd(IntPtr tag) { int raw_ret = g_source_query_unix_fd(Handle, tag); @@ -345,15 +345,15 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_remove_child_source(IntPtr raw, IntPtr child_source); + delegate void d_g_source_remove_child_source(IntPtr raw, IntPtr child_source); + static d_g_source_remove_child_source g_source_remove_child_source = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_child_source")); public void RemoveChildSource(GLib.Source child_source) { g_source_remove_child_source(Handle, child_source == null ? IntPtr.Zero : child_source.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_remove_poll(IntPtr raw, IntPtr fd); + delegate void d_g_source_remove_poll(IntPtr raw, IntPtr fd); + static d_g_source_remove_poll g_source_remove_poll = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_poll")); public void RemovePoll(GLib.PollFD fd) { IntPtr native_fd = GLib.Marshaller.StructureToPtrAlloc (fd); @@ -362,15 +362,15 @@ namespace GLib { Marshal.FreeHGlobal (native_fd); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_remove_unix_fd(IntPtr raw, IntPtr tag); + delegate void d_g_source_remove_unix_fd(IntPtr raw, IntPtr tag); + static d_g_source_remove_unix_fd g_source_remove_unix_fd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_unix_fd")); public void RemoveUnixFd(IntPtr tag) { g_source_remove_unix_fd(Handle, tag); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_set_callback_indirect(IntPtr raw, IntPtr callback_data, IntPtr callback_funcs); + delegate void d_g_source_set_callback_indirect(IntPtr raw, IntPtr callback_data, IntPtr callback_funcs); + static d_g_source_set_callback_indirect g_source_set_callback_indirect = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_callback_indirect")); public void SetCallbackIndirect(IntPtr callback_data, GLib.SourceCallbackFuncs callback_funcs) { IntPtr native_callback_funcs = GLib.Marshaller.StructureToPtrAlloc (callback_funcs); @@ -379,8 +379,8 @@ namespace GLib { Marshal.FreeHGlobal (native_callback_funcs); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_set_funcs(IntPtr raw, IntPtr value); + delegate void d_g_source_set_funcs(IntPtr raw, IntPtr value); + static d_g_source_set_funcs g_source_set_funcs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_funcs")); public GLib.SourceFuncs Funcs { set { @@ -391,8 +391,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_source_remove_by_funcs_user_data(IntPtr funcs, IntPtr user_data); + delegate bool d_g_source_remove_by_funcs_user_data(IntPtr funcs, IntPtr user_data); + static d_g_source_remove_by_funcs_user_data g_source_remove_by_funcs_user_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_by_funcs_user_data")); public static bool RemoveByFuncsUserData(GLib.SourceFuncs funcs, IntPtr user_data) { IntPtr native_funcs = GLib.Marshaller.StructureToPtrAlloc (funcs); @@ -403,8 +403,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_source_remove_by_user_data(IntPtr user_data); + delegate bool d_g_source_remove_by_user_data(IntPtr user_data); + static d_g_source_remove_by_user_data g_source_remove_by_user_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_remove_by_user_data")); public static bool RemoveByUserData(IntPtr user_data) { bool raw_ret = g_source_remove_by_user_data(user_data); @@ -412,8 +412,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_set_name_by_id(uint tag, IntPtr name); + delegate void d_g_source_set_name_by_id(uint tag, IntPtr name); + static d_g_source_set_name_by_id g_source_set_name_by_id = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_set_name_by_id")); public static void SetNameById(uint tag, string name) { IntPtr native_name = GLib.Marshaller.StringToPtrGStrdup (name); @@ -421,8 +421,8 @@ namespace GLib { GLib.Marshaller.Free (native_name); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_source_ref(IntPtr raw); + delegate IntPtr d_g_source_ref(IntPtr raw); + static d_g_source_ref g_source_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_ref")); protected override void Ref (IntPtr raw) { @@ -432,8 +432,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_unref(IntPtr raw); + delegate void d_g_source_unref(IntPtr raw); + static d_g_source_unref g_source_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_unref")); protected override void Unref (IntPtr raw) { @@ -443,8 +443,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_source_destroy(IntPtr raw); + delegate void d_g_source_destroy(IntPtr raw); + static d_g_source_destroy g_source_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_source_destroy")); protected override void Free (IntPtr raw) { diff --git a/Source/Libs/GLibSharp/Spawn.cs b/Source/Libs/GLibSharp/Spawn.cs index 9e5792c97..80fa0592f 100755 --- a/Source/Libs/GLibSharp/Spawn.cs +++ b/Source/Libs/GLibSharp/Spawn.cs @@ -102,19 +102,19 @@ namespace GLib { this.pid = pid; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_spawn_close_pid (int pid); + delegate void d_g_spawn_close_pid(int pid); + static d_g_spawn_close_pid g_spawn_close_pid = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_close_pid")); public void Close () { g_spawn_close_pid ((int) pid); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_spawn_async (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error); + delegate bool d_g_spawn_async(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error); + static d_g_spawn_async g_spawn_async = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_async")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_spawn_async_utf8 (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error); + delegate bool d_g_spawn_async_utf8(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, out IntPtr error); + static d_g_spawn_async_utf8 g_spawn_async_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_async_utf8")); public static bool SpawnAsync (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out Process child_process) { @@ -139,11 +139,11 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_spawn_async_with_pipes (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error); + delegate bool d_g_spawn_async_with_pipes(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error); + static d_g_spawn_async_with_pipes g_spawn_async_with_pipes = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_async_with_pipes")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_spawn_async_with_pipes_utf8 (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error); + delegate bool d_g_spawn_async_with_pipes_utf8(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out int pid, IntPtr stdin, IntPtr stdout, IntPtr stderr, out IntPtr error); + static d_g_spawn_async_with_pipes_utf8 g_spawn_async_with_pipes_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_async_with_pipes_utf8")); public static bool SpawnAsyncWithPipes (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out Process child_process, ref int stdin, ref int stdout, ref int stderr) { @@ -183,11 +183,11 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_spawn_sync (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); + delegate bool d_g_spawn_sync(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); + static d_g_spawn_sync g_spawn_sync = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_sync")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_spawn_sync_utf8 (IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); + delegate bool d_g_spawn_sync_utf8(IntPtr dir, IntPtr[] argv, IntPtr[] envp, int flags, SpawnChildSetupFuncNative func, IntPtr data, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); + static d_g_spawn_sync_utf8 g_spawn_sync_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_sync_utf8")); public static bool SpawnSync (string working_directory, string[] argv, string[] envp, SpawnFlags flags, SpawnChildSetupFunc child_setup, out string stdout, out string stderr, out int exit_status) { @@ -212,11 +212,11 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_spawn_command_line_async (IntPtr cmdline, out IntPtr error); + delegate bool d_g_spawn_command_line_async(IntPtr cmdline, out IntPtr error); + static d_g_spawn_command_line_async g_spawn_command_line_async = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_command_line_async")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_spawn_command_line_async_utf8 (IntPtr cmdline, out IntPtr error); + delegate bool d_g_spawn_command_line_async_utf8(IntPtr cmdline, out IntPtr error); + static d_g_spawn_command_line_async_utf8 g_spawn_command_line_async_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_command_line_async_utf8")); public static bool SpawnCommandLineAsync (string command_line) { @@ -234,11 +234,11 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_spawn_command_line_sync (IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); + delegate bool d_g_spawn_command_line_sync(IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); + static d_g_spawn_command_line_sync g_spawn_command_line_sync = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_spawn_command_line_sync")); - [DllImport (Global.GLibNativeDll)] - static extern bool g_spawn_command_line_sync_utf8 (IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); + delegate bool d_g_spawn_command_line_sync_utf8(IntPtr cmdline, out IntPtr stdout, out IntPtr stderr, out int exit_status, out IntPtr error); + static d_g_spawn_command_line_sync_utf8 g_spawn_command_line_sync_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_spawn_command_line_sync_utf8")); public static bool SpawnCommandLineSync (string command_line, out string stdout, out string stderr, out int exit_status) { diff --git a/Source/Libs/GLibSharp/TimeVal.cs b/Source/Libs/GLibSharp/TimeVal.cs index 6f4053c30..d0da3d92d 100755 --- a/Source/Libs/GLibSharp/TimeVal.cs +++ b/Source/Libs/GLibSharp/TimeVal.cs @@ -39,8 +39,8 @@ namespace GLib { return (GLib.TimeVal) Marshal.PtrToStructure (raw, typeof (GLib.TimeVal)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_time_val_add(IntPtr raw, IntPtr microseconds); + delegate void d_g_time_val_add(IntPtr raw, IntPtr microseconds); + static d_g_time_val_add g_time_val_add = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_val_add")); public void Add(long microseconds) { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); @@ -50,8 +50,8 @@ namespace GLib { System.Runtime.InteropServices.Marshal.FreeHGlobal (this_as_native); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_time_val_to_iso8601(IntPtr raw); + delegate IntPtr d_g_time_val_to_iso8601(IntPtr raw); + static d_g_time_val_to_iso8601 g_time_val_to_iso8601 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_val_to_iso8601")); public string ToIso8601() { IntPtr this_as_native = System.Runtime.InteropServices.Marshal.AllocHGlobal (System.Runtime.InteropServices.Marshal.SizeOf (this)); @@ -63,8 +63,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_time_val_from_iso8601(IntPtr iso_date, IntPtr time_); + delegate bool d_g_time_val_from_iso8601(IntPtr iso_date, IntPtr time_); + static d_g_time_val_from_iso8601 g_time_val_from_iso8601 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_val_from_iso8601")); public static bool FromIso8601(string iso_date, out GLib.TimeVal time_) { IntPtr native_iso_date = GLib.Marshaller.StringToPtrGStrdup (iso_date); diff --git a/Source/Libs/GLibSharp/TimeZone.cs b/Source/Libs/GLibSharp/TimeZone.cs index 17705e655..9e1b87263 100755 --- a/Source/Libs/GLibSharp/TimeZone.cs +++ b/Source/Libs/GLibSharp/TimeZone.cs @@ -11,8 +11,8 @@ namespace GLib { #region Autogenerated code public partial class TimeZone : GLib.Opaque { - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_time_zone_get_type(); + delegate IntPtr d_g_time_zone_get_type(); + static d_g_time_zone_get_type g_time_zone_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_type")); public static GLib.GType GType { get { @@ -22,8 +22,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_time_zone_adjust_time(IntPtr raw, int type, long time_); + delegate int d_g_time_zone_adjust_time(IntPtr raw, int type, long time_); + static d_g_time_zone_adjust_time g_time_zone_adjust_time = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_adjust_time")); public int AdjustTime(int type, long time_) { int raw_ret = g_time_zone_adjust_time(Handle, type, time_); @@ -31,8 +31,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_time_zone_find_interval(IntPtr raw, int type, long time_); + delegate int d_g_time_zone_find_interval(IntPtr raw, int type, long time_); + static d_g_time_zone_find_interval g_time_zone_find_interval = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_find_interval")); public int FindInterval(int type, long time_) { int raw_ret = g_time_zone_find_interval(Handle, type, time_); @@ -40,8 +40,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_time_zone_get_abbreviation(IntPtr raw, int interval); + delegate IntPtr d_g_time_zone_get_abbreviation(IntPtr raw, int interval); + static d_g_time_zone_get_abbreviation g_time_zone_get_abbreviation = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_abbreviation")); public string GetAbbreviation(int interval) { IntPtr raw_ret = g_time_zone_get_abbreviation(Handle, interval); @@ -49,8 +49,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_time_zone_get_offset(IntPtr raw, int interval); + delegate int d_g_time_zone_get_offset(IntPtr raw, int interval); + static d_g_time_zone_get_offset g_time_zone_get_offset = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_get_offset")); public int GetOffset(int interval) { int raw_ret = g_time_zone_get_offset(Handle, interval); @@ -58,8 +58,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_time_zone_is_dst(IntPtr raw, int interval); + delegate bool d_g_time_zone_is_dst(IntPtr raw, int interval); + static d_g_time_zone_is_dst g_time_zone_is_dst = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_is_dst")); public bool IsDst(int interval) { bool raw_ret = g_time_zone_is_dst(Handle, interval); @@ -69,8 +69,8 @@ namespace GLib { public TimeZone(IntPtr raw) : base(raw) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_time_zone_new(IntPtr identifier); + delegate IntPtr d_g_time_zone_new(IntPtr identifier); + static d_g_time_zone_new g_time_zone_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new")); public TimeZone (string identifier) { @@ -79,16 +79,16 @@ namespace GLib { GLib.Marshaller.Free (native_identifier); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_time_zone_new_local(); + delegate IntPtr d_g_time_zone_new_local(); + static d_g_time_zone_new_local g_time_zone_new_local = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new_local")); public TimeZone () { Raw = g_time_zone_new_local(); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_time_zone_new_utc(); + delegate IntPtr d_g_time_zone_new_utc(); + static d_g_time_zone_new_utc g_time_zone_new_utc = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_new_utc")); public static TimeZone NewUtc() { @@ -96,8 +96,8 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_time_zone_ref(IntPtr raw); + delegate IntPtr d_g_time_zone_ref(IntPtr raw); + static d_g_time_zone_ref g_time_zone_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_ref")); protected override void Ref (IntPtr raw) { @@ -107,8 +107,8 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_time_zone_unref(IntPtr raw); + delegate void d_g_time_zone_unref(IntPtr raw); + static d_g_time_zone_unref g_time_zone_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_time_zone_unref")); protected override void Unref (IntPtr raw) { @@ -143,4 +143,4 @@ namespace GLib { #endregion } -} \ No newline at end of file +} diff --git a/Source/Libs/GLibSharp/Timeout.cs b/Source/Libs/GLibSharp/Timeout.cs index d0dc03c03..b9821c09a 100755 --- a/Source/Libs/GLibSharp/Timeout.cs +++ b/Source/Libs/GLibSharp/Timeout.cs @@ -64,8 +64,8 @@ namespace GLib { } private Timeout () {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_timeout_add (uint interval, TimeoutHandlerInternal d, IntPtr data); + delegate uint d_g_timeout_add(uint interval, TimeoutHandlerInternal d, IntPtr data); + static d_g_timeout_add g_timeout_add = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_timeout_add")); public static uint Add (uint interval, TimeoutHandler hndlr) { @@ -79,8 +79,8 @@ namespace GLib { return p.ID; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_timeout_add_full (int priority, uint interval, TimeoutHandlerInternal d, IntPtr data, DestroyNotify notify); + delegate uint d_g_timeout_add_full(int priority, uint interval, TimeoutHandlerInternal d, IntPtr data, DestroyNotify notify); + static d_g_timeout_add_full g_timeout_add_full = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_timeout_add_full")); public static uint Add (uint interval, TimeoutHandler hndlr, Priority priority) { @@ -94,8 +94,8 @@ namespace GLib { return p.ID; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_timeout_add_seconds (uint interval, TimeoutHandlerInternal d, IntPtr data); + delegate uint d_g_timeout_add_seconds(uint interval, TimeoutHandlerInternal d, IntPtr data); + static d_g_timeout_add_seconds g_timeout_add_seconds = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_timeout_add_seconds")); public static uint AddSeconds (uint interval, TimeoutHandler hndlr) { diff --git a/Source/Libs/GLibSharp/ToggleRef.cs b/Source/Libs/GLibSharp/ToggleRef.cs index f4c440041..2d97bba69 100755 --- a/Source/Libs/GLibSharp/ToggleRef.cs +++ b/Source/Libs/GLibSharp/ToggleRef.cs @@ -155,17 +155,17 @@ namespace GLib { return false; } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_add_toggle_ref (IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data); + delegate void d_g_object_add_toggle_ref(IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data); + static d_g_object_add_toggle_ref g_object_add_toggle_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_add_toggle_ref")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_remove_toggle_ref (IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data); + delegate void d_g_object_remove_toggle_ref(IntPtr raw, ToggleNotifyHandler notify_cb, IntPtr data); + static d_g_object_remove_toggle_ref g_object_remove_toggle_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_remove_toggle_ref")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_object_ref (IntPtr raw); + delegate IntPtr d_g_object_ref(IntPtr raw); + static d_g_object_ref g_object_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_unref (IntPtr raw); + delegate void d_g_object_unref(IntPtr raw); + static d_g_object_unref g_object_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_unref")); } } diff --git a/Source/Libs/GLibSharp/Value.cs b/Source/Libs/GLibSharp/Value.cs index d6bc71e28..66b9f8c10 100755 --- a/Source/Libs/GLibSharp/Value.cs +++ b/Source/Libs/GLibSharp/Value.cs @@ -383,7 +383,7 @@ namespace GLib { case PlatformID.Win32S: case PlatformID.Win32Windows: case PlatformID.WinCE: - g_value_set_long (ref this, (int) val); + g_value_set_long2 (ref this, (int) val); break; default: g_value_set_long (ref this, new IntPtr (val)); @@ -398,7 +398,7 @@ namespace GLib { case PlatformID.Win32S: case PlatformID.Win32Windows: case PlatformID.WinCE: - g_value_set_ulong (ref this, (uint) val); + g_value_set_ulong2 (ref this, (uint) val); break; default: g_value_set_ulong (ref this, new UIntPtr (val)); @@ -610,145 +610,145 @@ namespace GLib { g_value_init (ref this, spec.ValueType.Val); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_object_class_find_property (IntPtr klass, IntPtr name); + delegate IntPtr d_g_object_class_find_property(IntPtr klass, IntPtr name); + static d_g_object_class_find_property g_object_class_find_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_class_find_property")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_type_check_value_holds (ref Value val, IntPtr gtype); + delegate bool d_g_type_check_value_holds(ref Value val, IntPtr gtype); + static d_g_type_check_value_holds g_type_check_value_holds = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_type_check_value_holds")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_init (ref GLib.Value val, IntPtr gtype); + delegate void d_g_value_init(ref GLib.Value val, IntPtr gtype); + static d_g_value_init g_value_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_init")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_unset (ref GLib.Value val); + delegate void d_g_value_unset(ref GLib.Value val); + static d_g_value_unset g_value_unset = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_unset")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_boolean (ref Value val, bool data); + delegate void d_g_value_set_boolean(ref Value val, bool data); + static d_g_value_set_boolean g_value_set_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_boolean")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_uchar (ref Value val, byte data); + delegate void d_g_value_set_uchar(ref Value val, byte data); + static d_g_value_set_uchar g_value_set_uchar = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_uchar")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_char (ref Value val, sbyte data); + delegate void d_g_value_set_char(ref Value val, sbyte data); + static d_g_value_set_char g_value_set_char = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_char")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_boxed (ref Value val, IntPtr data); + delegate void d_g_value_set_boxed(ref Value val, IntPtr data); + static d_g_value_set_boxed g_value_set_boxed = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_boxed")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_double (ref Value val, double data); + delegate void d_g_value_set_double(ref Value val, double data); + static d_g_value_set_double g_value_set_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_double")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_float (ref Value val, float data); + delegate void d_g_value_set_float(ref Value val, float data); + static d_g_value_set_float g_value_set_float = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_float")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_int (ref Value val, int data); + delegate void d_g_value_set_int(ref Value val, int data); + static d_g_value_set_int g_value_set_int = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_int")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_int64 (ref Value val, long data); + delegate void d_g_value_set_int64(ref Value val, long data); + static d_g_value_set_int64 g_value_set_int64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_int64")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_long (ref Value val, IntPtr data); + delegate void d_g_value_set_long(ref Value val, IntPtr data); + static d_g_value_set_long g_value_set_long = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_long")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_long (ref Value val, int data); + delegate void d_g_value_set_long2(ref Value val, int data); + static d_g_value_set_long2 g_value_set_long2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_long")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_uint64 (ref Value val, ulong data); + delegate void d_g_value_set_uint64(ref Value val, ulong data); + static d_g_value_set_uint64 g_value_set_uint64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_uint64")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_object (ref Value val, IntPtr data); + delegate void d_g_value_set_object(ref Value val, IntPtr data); + static d_g_value_set_object g_value_set_object = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_object")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_param (ref Value val, IntPtr data); + delegate void d_g_value_set_param(ref Value val, IntPtr data); + static d_g_value_set_param g_value_set_param = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_param")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_pointer (ref Value val, IntPtr data); + delegate void d_g_value_set_pointer(ref Value val, IntPtr data); + static d_g_value_set_pointer g_value_set_pointer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_pointer")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_string (ref Value val, IntPtr data); + delegate void d_g_value_set_string(ref Value val, IntPtr data); + static d_g_value_set_string g_value_set_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_string")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_uint (ref Value val, uint data); + delegate void d_g_value_set_uint(ref Value val, uint data); + static d_g_value_set_uint g_value_set_uint = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_uint")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_ulong (ref Value val, UIntPtr data); + delegate void d_g_value_set_ulong(ref Value val, UIntPtr data); + static d_g_value_set_ulong g_value_set_ulong = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_ulong")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_ulong (ref Value val, uint data); + delegate void d_g_value_set_ulong2(ref Value val, uint data); + static d_g_value_set_ulong2 g_value_set_ulong2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_ulong")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_enum (ref Value val, int data); + delegate void d_g_value_set_enum(ref Value val, int data); + static d_g_value_set_enum g_value_set_enum = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_enum")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_flags (ref Value val, uint data); + delegate void d_g_value_set_flags(ref Value val, uint data); + static d_g_value_set_flags g_value_set_flags = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_flags")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_set_variant (ref Value val, IntPtr data); + delegate void d_g_value_set_variant(ref Value val, IntPtr data); + static d_g_value_set_variant g_value_set_variant = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_set_variant")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_value_get_boolean (ref Value val); + delegate bool d_g_value_get_boolean(ref Value val); + static d_g_value_get_boolean g_value_get_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_boolean")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern byte g_value_get_uchar (ref Value val); + delegate byte d_g_value_get_uchar(ref Value val); + static d_g_value_get_uchar g_value_get_uchar = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_uchar")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern sbyte g_value_get_char (ref Value val); + delegate sbyte d_g_value_get_char(ref Value val); + static d_g_value_get_char g_value_get_char = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_char")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_value_get_boxed (ref Value val); + delegate IntPtr d_g_value_get_boxed(ref Value val); + static d_g_value_get_boxed g_value_get_boxed = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_boxed")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern double g_value_get_double (ref Value val); + delegate double d_g_value_get_double(ref Value val); + static d_g_value_get_double g_value_get_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_double")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern float g_value_get_float (ref Value val); + delegate float d_g_value_get_float(ref Value val); + static d_g_value_get_float g_value_get_float = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_float")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_value_get_int (ref Value val); + delegate int d_g_value_get_int(ref Value val); + static d_g_value_get_int g_value_get_int = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_int")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern long g_value_get_int64 (ref Value val); + delegate long d_g_value_get_int64(ref Value val); + static d_g_value_get_int64 g_value_get_int64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_int64")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_value_get_long (ref Value val); + delegate IntPtr d_g_value_get_long(ref Value val); + static d_g_value_get_long g_value_get_long = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_long")); - [DllImport (Global.GObjectNativeDll, EntryPoint = "g_value_get_long", CallingConvention = CallingConvention.Cdecl)] - static extern int g_value_get_long_as_int (ref Value val); + delegate int d_g_value_get_long_as_int(ref Value val); + static d_g_value_get_long_as_int g_value_get_long_as_int = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_long")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern ulong g_value_get_uint64 (ref Value val); + delegate ulong d_g_value_get_uint64(ref Value val); + static d_g_value_get_uint64 g_value_get_uint64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_uint64")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern UIntPtr g_value_get_ulong (ref Value val); + delegate UIntPtr d_g_value_get_ulong(ref Value val); + static d_g_value_get_ulong g_value_get_ulong = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_ulong")); - [DllImport (Global.GObjectNativeDll, EntryPoint = "g_value_get_ulong", CallingConvention = CallingConvention.Cdecl)] - static extern int g_value_get_ulong_as_uint (ref Value val); + delegate int d_g_value_get_ulong_as_uint(ref Value val); + static d_g_value_get_ulong_as_uint g_value_get_ulong_as_uint = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_ulong")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_value_get_object (ref Value val); + delegate IntPtr d_g_value_get_object(ref Value val); + static d_g_value_get_object g_value_get_object = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_object")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_value_get_param (ref Value val); + delegate IntPtr d_g_value_get_param(ref Value val); + static d_g_value_get_param g_value_get_param = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_param")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_value_get_pointer (ref Value val); + delegate IntPtr d_g_value_get_pointer(ref Value val); + static d_g_value_get_pointer g_value_get_pointer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_pointer")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_value_get_string (ref Value val); + delegate IntPtr d_g_value_get_string(ref Value val); + static d_g_value_get_string g_value_get_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_string")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_value_get_uint (ref Value val); + delegate uint d_g_value_get_uint(ref Value val); + static d_g_value_get_uint g_value_get_uint = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_uint")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_value_get_enum (ref Value val); + delegate int d_g_value_get_enum(ref Value val); + static d_g_value_get_enum g_value_get_enum = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_enum")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_value_get_flags (ref Value val); + delegate uint d_g_value_get_flags(ref Value val); + static d_g_value_get_flags g_value_get_flags = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_flags")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_strv_get_type (); + delegate IntPtr d_g_strv_get_type(); + static d_g_strv_get_type g_strv_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_strv_get_type")); - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_value_get_variant (ref Value val); + delegate IntPtr d_g_value_get_variant(ref Value val); + static d_g_value_get_variant g_value_get_variant = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_get_variant")); } } diff --git a/Source/Libs/GLibSharp/ValueArray.cs b/Source/Libs/GLibSharp/ValueArray.cs index 2fce7679b..0dffe7e4c 100755 --- a/Source/Libs/GLibSharp/ValueArray.cs +++ b/Source/Libs/GLibSharp/ValueArray.cs @@ -33,8 +33,8 @@ namespace GLib { static private IList PendingFrees = new List (); static private bool idle_queued = false; - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_value_array_new (uint n_preallocs); + delegate IntPtr d_g_value_array_new(uint n_preallocs); + static d_g_value_array_new g_value_array_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_new")); public ValueArray (uint n_preallocs) { @@ -58,8 +58,8 @@ namespace GLib { GC.SuppressFinalize (this); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_array_free (IntPtr raw); + delegate void d_g_value_array_free(IntPtr raw); + static d_g_value_array_free g_value_array_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_free")); void Dispose (bool disposing) { @@ -116,32 +116,32 @@ namespace GLib { get { return Native.values; } } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_array_append (IntPtr raw, ref GLib.Value val); + delegate void d_g_value_array_append(IntPtr raw, ref GLib.Value val); + static d_g_value_array_append g_value_array_append = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_append")); public void Append (GLib.Value val) { g_value_array_append (Handle, ref val); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_array_insert (IntPtr raw, uint idx, ref GLib.Value val); + delegate void d_g_value_array_insert(IntPtr raw, uint idx, ref GLib.Value val); + static d_g_value_array_insert g_value_array_insert = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_insert")); public void Insert (uint idx, GLib.Value val) { g_value_array_insert (Handle, idx, ref val); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_array_prepend (IntPtr raw, ref GLib.Value val); + delegate void d_g_value_array_prepend(IntPtr raw, ref GLib.Value val); + static d_g_value_array_prepend g_value_array_prepend = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_prepend")); public void Prepend (GLib.Value val) { g_value_array_prepend (Handle, ref val); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_value_array_remove (IntPtr raw, uint idx); + delegate void d_g_value_array_remove(IntPtr raw, uint idx); + static d_g_value_array_remove g_value_array_remove = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_remove")); public void Remove (uint idx) { @@ -153,8 +153,8 @@ namespace GLib { get { return (int) Native.n_values; } } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_value_array_get_nth (IntPtr raw, uint idx); + delegate IntPtr d_g_value_array_get_nth(IntPtr raw, uint idx); + static d_g_value_array_get_nth g_value_array_get_nth = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_get_nth")); public object this [int index] { get { @@ -227,8 +227,8 @@ namespace GLib { return new ListEnumerator (this); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_value_array_copy (IntPtr raw); + delegate IntPtr d_g_value_array_copy(IntPtr raw); + static d_g_value_array_copy g_value_array_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_copy")); // ICloneable public object Clone () @@ -236,8 +236,8 @@ namespace GLib { return new ValueArray (g_value_array_copy (Handle)); } - [DllImport (Global.GObjectNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_value_array_get_type (); + delegate IntPtr d_g_value_array_get_type(); + static d_g_value_array_get_type g_value_array_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_value_array_get_type")); public static GLib.GType GType { get { diff --git a/Source/Libs/GLibSharp/Variant.cs b/Source/Libs/GLibSharp/Variant.cs index b4051016c..395935334 100755 --- a/Source/Libs/GLibSharp/Variant.cs +++ b/Source/Libs/GLibSharp/Variant.cs @@ -38,8 +38,8 @@ namespace GLib { Dispose (true); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_variant_unref (IntPtr handle); + delegate void d_g_variant_unref(IntPtr handle); + static d_g_variant_unref g_variant_unref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_unref")); void Dispose (bool disposing) { @@ -52,16 +52,16 @@ namespace GLib { GC.SuppressFinalize (this); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_ref_sink (IntPtr handle); + delegate IntPtr d_g_variant_ref_sink(IntPtr handle); + static d_g_variant_ref_sink g_variant_ref_sink = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_ref_sink")); public Variant (IntPtr handle) { this.handle = g_variant_ref_sink (handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_get_type (IntPtr val); + delegate IntPtr d_g_variant_get_type(IntPtr val); + static d_g_variant_get_type g_variant_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_type")); VariantType type; public VariantType Type { @@ -72,60 +72,60 @@ namespace GLib { } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_variant (IntPtr val); + delegate IntPtr d_g_variant_new_variant(IntPtr val); + static d_g_variant_new_variant g_variant_new_variant = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_variant")); public static Variant NewVariant (Variant val) { return new Variant (g_variant_new_variant (val.Handle)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_boolean (bool val); + delegate IntPtr d_g_variant_new_boolean(bool val); + static d_g_variant_new_boolean g_variant_new_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_boolean")); public Variant (bool val) : this (g_variant_new_boolean (val)) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_byte (byte val); + delegate IntPtr d_g_variant_new_byte(byte val); + static d_g_variant_new_byte g_variant_new_byte = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_byte")); public Variant (byte val) : this (g_variant_new_byte (val)) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_int16 (short val); + delegate IntPtr d_g_variant_new_int16(short val); + static d_g_variant_new_int16 g_variant_new_int16 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_int16")); public Variant (short val) : this (g_variant_new_int16 (val)) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_uint16 (ushort val); + delegate IntPtr d_g_variant_new_uint16(ushort val); + static d_g_variant_new_uint16 g_variant_new_uint16 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_uint16")); public Variant (ushort val) : this (g_variant_new_uint16 (val)) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_int32 (int val); + delegate IntPtr d_g_variant_new_int32(int val); + static d_g_variant_new_int32 g_variant_new_int32 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_int32")); public Variant (int val) : this (g_variant_new_int32 (val)) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_uint32 (uint val); + delegate IntPtr d_g_variant_new_uint32(uint val); + static d_g_variant_new_uint32 g_variant_new_uint32 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_uint32")); public Variant (uint val) : this (g_variant_new_uint32 (val)) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_int64 (long val); + delegate IntPtr d_g_variant_new_int64(long val); + static d_g_variant_new_int64 g_variant_new_int64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_int64")); public Variant (long val) : this (g_variant_new_int64 (val)) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_uint64 (ulong val); + delegate IntPtr d_g_variant_new_uint64(ulong val); + static d_g_variant_new_uint64 g_variant_new_uint64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_uint64")); public Variant (ulong val) : this (g_variant_new_uint64 (val)) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_double (double val); + delegate IntPtr d_g_variant_new_double(double val); + static d_g_variant_new_double g_variant_new_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_double")); public Variant (double val) : this (g_variant_new_double (val)) {} - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_string (IntPtr val); + delegate IntPtr d_g_variant_new_string(IntPtr val); + static d_g_variant_new_string g_variant_new_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_string")); public Variant (string val) { @@ -134,8 +134,8 @@ namespace GLib { Marshaller.Free (native_val); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_strv (IntPtr[] strv, IntPtr length); + delegate IntPtr d_g_variant_new_strv(IntPtr[] strv, IntPtr length); + static d_g_variant_new_strv g_variant_new_strv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_strv")); public Variant (string[] strv) { @@ -144,8 +144,8 @@ namespace GLib { Marshaller.Free (native); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_tuple (IntPtr[] children, UIntPtr n_children); + delegate IntPtr d_g_variant_new_tuple(IntPtr[] children, UIntPtr n_children); + static d_g_variant_new_tuple g_variant_new_tuple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_tuple")); public static Variant NewTuple (Variant[] children) { @@ -159,8 +159,8 @@ namespace GLib { return new Variant (g_variant_new_tuple (native, new UIntPtr ((ulong) children.Length))); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_array (IntPtr child_type, IntPtr[] children, UIntPtr n_children); + delegate IntPtr d_g_variant_new_array(IntPtr child_type, IntPtr[] children, UIntPtr n_children); + static d_g_variant_new_array g_variant_new_array = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_array")); public static Variant NewArray (Variant[] children) { @@ -189,8 +189,8 @@ namespace GLib { native, new UIntPtr ((ulong) children.Length))); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_new_dict_entry (IntPtr k, IntPtr v); + delegate IntPtr d_g_variant_new_dict_entry(IntPtr k, IntPtr v); + static d_g_variant_new_dict_entry g_variant_new_dict_entry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_new_dict_entry")); public static Variant NewDictEntry (Variant k, Variant v) { @@ -210,80 +210,80 @@ namespace GLib { handle = g_variant_ref_sink (NewArray (type, pairs.ToArray ()).Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_variant_get_boolean (IntPtr handle); + delegate bool d_g_variant_get_boolean(IntPtr handle); + static d_g_variant_get_boolean g_variant_get_boolean = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_boolean")); public static explicit operator bool (Variant val) { return g_variant_get_boolean (val.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern byte g_variant_get_byte (IntPtr handle); + delegate byte d_g_variant_get_byte(IntPtr handle); + static d_g_variant_get_byte g_variant_get_byte = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_byte")); public static explicit operator byte (Variant val) { return g_variant_get_byte (val.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern short g_variant_get_int16 (IntPtr handle); + delegate short d_g_variant_get_int16(IntPtr handle); + static d_g_variant_get_int16 g_variant_get_int16 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_int16")); public static explicit operator short (Variant val) { return g_variant_get_int16 (val.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern ushort g_variant_get_uint16 (IntPtr handle); + delegate ushort d_g_variant_get_uint16(IntPtr handle); + static d_g_variant_get_uint16 g_variant_get_uint16 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_uint16")); public static explicit operator ushort (Variant val) { return g_variant_get_uint16 (val.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_variant_get_int32 (IntPtr handle); + delegate int d_g_variant_get_int32(IntPtr handle); + static d_g_variant_get_int32 g_variant_get_int32 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_int32")); public static explicit operator int (Variant val) { return g_variant_get_int32 (val.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint g_variant_get_uint32 (IntPtr handle); + delegate uint d_g_variant_get_uint32(IntPtr handle); + static d_g_variant_get_uint32 g_variant_get_uint32 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_uint32")); public static explicit operator uint (Variant val) { return g_variant_get_uint32 (val.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern long g_variant_get_int64 (IntPtr handle); + delegate long d_g_variant_get_int64(IntPtr handle); + static d_g_variant_get_int64 g_variant_get_int64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_int64")); public static explicit operator long (Variant val) { return g_variant_get_int64 (val.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern ulong g_variant_get_uint64 (IntPtr handle); + delegate ulong d_g_variant_get_uint64(IntPtr handle); + static d_g_variant_get_uint64 g_variant_get_uint64 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_uint64")); public static explicit operator ulong (Variant val) { return g_variant_get_uint64 (val.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern double g_variant_get_double (IntPtr handle); + delegate double d_g_variant_get_double(IntPtr handle); + static d_g_variant_get_double g_variant_get_double = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_double")); public static explicit operator double (Variant val) { return g_variant_get_double (val.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_get_string (IntPtr handle, IntPtr length); + delegate IntPtr d_g_variant_get_string(IntPtr handle, IntPtr length); + static d_g_variant_get_string g_variant_get_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_string")); public static explicit operator string (Variant val) { @@ -291,8 +291,8 @@ namespace GLib { return GLib.Marshaller.Utf8PtrToString (str); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_print (IntPtr variant, bool type_annotate); + delegate IntPtr d_g_variant_print(IntPtr variant, bool type_annotate); + static d_g_variant_print g_variant_print = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_print")); public string Print (bool type_annotate) { @@ -300,11 +300,11 @@ namespace GLib { return Marshaller.PtrToStringGFree (str); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_n_children (IntPtr handle); + delegate IntPtr d_g_variant_n_children(IntPtr handle); + static d_g_variant_n_children g_variant_n_children = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_n_children")); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_get_child_value (IntPtr handle, IntPtr index); + delegate IntPtr d_g_variant_get_child_value(IntPtr handle, IntPtr index); + static d_g_variant_get_child_value g_variant_get_child_value = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_child_value")); public Variant[] ToArray () { @@ -320,8 +320,8 @@ namespace GLib { return ret; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_get_variant (IntPtr handle); + delegate IntPtr d_g_variant_get_variant(IntPtr handle); + static d_g_variant_get_variant g_variant_get_variant = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_get_variant")); public Dictionary ToAsv () { diff --git a/Source/Libs/GLibSharp/VariantType.cs b/Source/Libs/GLibSharp/VariantType.cs index 4c716ee42..88fa974f7 100755 --- a/Source/Libs/GLibSharp/VariantType.cs +++ b/Source/Libs/GLibSharp/VariantType.cs @@ -47,8 +47,8 @@ namespace GLib { public static VariantType ByteString = new VariantType ("ay"); public static VariantType ByteStringArray = new VariantType ("aay"); - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_variant_type_string_is_valid (IntPtr type_string); + delegate bool d_g_variant_type_string_is_valid(IntPtr type_string); + static d_g_variant_type_string_is_valid g_variant_type_string_is_valid = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_string_is_valid")); public static bool StringIsValid (string type_string) { @@ -76,8 +76,8 @@ namespace GLib { Dispose (true); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void g_variant_type_free (IntPtr handle); + delegate void d_g_variant_type_free(IntPtr handle); + static d_g_variant_type_free g_variant_type_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_free")); void Dispose (bool disposing) { @@ -90,16 +90,16 @@ namespace GLib { GC.SuppressFinalize (this); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_copy (IntPtr handle); + delegate IntPtr d_g_variant_type_copy(IntPtr handle); + static d_g_variant_type_copy g_variant_type_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_copy")); public VariantType (IntPtr handle) { this.handle = g_variant_type_copy (handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_new (IntPtr type_name); + delegate IntPtr d_g_variant_type_new(IntPtr type_name); + static d_g_variant_type_new g_variant_type_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new")); public VariantType (string type_string) { @@ -113,145 +113,145 @@ namespace GLib { return new VariantType (Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_variant_type_equal (IntPtr a, IntPtr b); + delegate bool d_g_variant_type_equal(IntPtr a, IntPtr b); + static d_g_variant_type_equal g_variant_type_equal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_equal")); public override bool Equals (object o) { return (o is VariantType) && g_variant_type_equal (Handle, (o as VariantType).Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_variant_type_hash (IntPtr a); + delegate int d_g_variant_type_hash(IntPtr a); + static d_g_variant_type_hash g_variant_type_hash = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_hash")); public override int GetHashCode () { return g_variant_type_hash (Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_peek_string (IntPtr a); + delegate IntPtr d_g_variant_type_peek_string(IntPtr a); + static d_g_variant_type_peek_string g_variant_type_peek_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_peek_string")); public override string ToString () { return Marshaller.Utf8PtrToString (g_variant_type_peek_string (Handle)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_variant_type_is_array (IntPtr type); + delegate bool d_g_variant_type_is_array(IntPtr type); + static d_g_variant_type_is_array g_variant_type_is_array = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_array")); public bool IsArray { get { return g_variant_type_is_array (Handle); } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_variant_type_is_basic (IntPtr type); + delegate bool d_g_variant_type_is_basic(IntPtr type); + static d_g_variant_type_is_basic g_variant_type_is_basic = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_basic")); public bool IsBasic { get { return g_variant_type_is_basic (Handle); } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_variant_type_is_container (IntPtr type); + delegate bool d_g_variant_type_is_container(IntPtr type); + static d_g_variant_type_is_container g_variant_type_is_container = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_container")); public bool IsContainer { get { return g_variant_type_is_container (Handle); } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_variant_type_is_definite (IntPtr type); + delegate bool d_g_variant_type_is_definite(IntPtr type); + static d_g_variant_type_is_definite g_variant_type_is_definite = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_definite")); public bool IsDefinite { get { return g_variant_type_is_definite (Handle); } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_variant_type_is_dict_entry (IntPtr type); + delegate bool d_g_variant_type_is_dict_entry(IntPtr type); + static d_g_variant_type_is_dict_entry g_variant_type_is_dict_entry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_dict_entry")); public bool IsDictionaryEntry { get { return g_variant_type_is_dict_entry (Handle); } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_variant_type_is_maybe (IntPtr type); + delegate bool d_g_variant_type_is_maybe(IntPtr type); + static d_g_variant_type_is_maybe g_variant_type_is_maybe = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_maybe")); public bool IsMaybe { get { return g_variant_type_is_maybe (Handle); } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_variant_type_is_tuple (IntPtr type); + delegate bool d_g_variant_type_is_tuple(IntPtr type); + static d_g_variant_type_is_tuple g_variant_type_is_tuple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_tuple")); public bool IsTuple { get { return g_variant_type_is_tuple (Handle); } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_variant_type_is_variant (IntPtr type); + delegate bool d_g_variant_type_is_variant(IntPtr type); + static d_g_variant_type_is_variant g_variant_type_is_variant = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_variant")); public bool IsVariant { get { return g_variant_type_is_variant (Handle); } } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool g_variant_type_is_subtype_of (IntPtr type, IntPtr supertype); + delegate bool d_g_variant_type_is_subtype_of(IntPtr type, IntPtr supertype); + static d_g_variant_type_is_subtype_of g_variant_type_is_subtype_of = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_is_subtype_of")); public bool IsSubtypeOf (VariantType supertype) { return g_variant_type_is_subtype_of (Handle, supertype == null ? IntPtr.Zero : supertype.Handle); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_element (IntPtr type); + delegate IntPtr d_g_variant_type_element(IntPtr type); + static d_g_variant_type_element g_variant_type_element = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_element")); public VariantType Element () { return new VariantType (g_variant_type_element (Handle)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_first (IntPtr type); + delegate IntPtr d_g_variant_type_first(IntPtr type); + static d_g_variant_type_first g_variant_type_first = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_first")); public VariantType First () { return new VariantType (g_variant_type_first (Handle)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_next (IntPtr type); + delegate IntPtr d_g_variant_type_next(IntPtr type); + static d_g_variant_type_next g_variant_type_next = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_next")); public VariantType Next () { return new VariantType (g_variant_type_next (Handle)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_n_items (IntPtr type); + delegate IntPtr d_g_variant_type_n_items(IntPtr type); + static d_g_variant_type_n_items g_variant_type_n_items = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_n_items")); public long NItems () { return g_variant_type_n_items (Handle).ToInt64 (); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_key (IntPtr type); + delegate IntPtr d_g_variant_type_key(IntPtr type); + static d_g_variant_type_key g_variant_type_key = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_key")); public VariantType Key () { return new VariantType (g_variant_type_key (Handle)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_value (IntPtr type); + delegate IntPtr d_g_variant_type_value(IntPtr type); + static d_g_variant_type_value g_variant_type_value = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_value")); public VariantType Value () { return new VariantType (g_variant_type_value (Handle)); } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_new_array (IntPtr element); + delegate IntPtr d_g_variant_type_new_array(IntPtr element); + static d_g_variant_type_new_array g_variant_type_new_array = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_array")); public static VariantType NewArray (VariantType element) { @@ -260,8 +260,8 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_new_dict_entry (IntPtr key, IntPtr value); + delegate IntPtr d_g_variant_type_new_dict_entry(IntPtr key, IntPtr value); + static d_g_variant_type_new_dict_entry g_variant_type_new_dict_entry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_dict_entry")); public static VariantType NewDictionaryEntry (VariantType key, VariantType value) { @@ -270,8 +270,8 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_new_maybe (IntPtr element); + delegate IntPtr d_g_variant_type_new_maybe(IntPtr element); + static d_g_variant_type_new_maybe g_variant_type_new_maybe = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_maybe")); public static VariantType NewMaybe (VariantType element) { @@ -280,8 +280,8 @@ namespace GLib { return result; } - [DllImport (Global.GLibNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_variant_type_new_tuple (IntPtr[] items, int n_items); + delegate IntPtr d_g_variant_type_new_tuple(IntPtr[] items, int n_items); + static d_g_variant_type_new_tuple g_variant_type_new_tuple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_variant_type_new_tuple")); public static VariantType NewTuple (VariantType[] items) { diff --git a/Source/Libs/GLibSharp/linux-arm/libglib-2.0-0.dll.so b/Source/Libs/GLibSharp/linux-arm/libglib-2.0-0.dll.so deleted file mode 100755 index 8946174da89a46be3ccf6765d3be47813ad44a70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5008 zcma)AU1(g#6`s3y6-&;KHj01L#BJ8#fJ>~aZJJ^yEy1!Z2NNkSvicDEaC^0TC2hQ` zRqtN4(o-O`w2(mZ(4U7il_+@#trPaa52m<55XTR}4@y(0A%SYOT9BzB+fry~OSj)Q zbB}hs$f*xH_slnQ=FH5QpL13(jg6mi97hSc>Zl@G>rv`S$ZQ6mlWmOt&2h@JH zFMN8BQo_AZA*U1WSVIM98@gne1UcHisdG^8s5Clc!BEldDSTT1Ewqu>fyr#=7!QIU z0h9KF_kr&v0PQtGe+Te=7~BuOU)Lyg5b{glhrstGbzdYnXV+3Nb2Js43)f8-3H2p~ z2OtlC_kcOyLGW&Lokl=zvij{k#(OTTzJvPSUV}5R@@wE*Njvci?3fVe@J%rHjg-O6 z*i-Be!2V_3Vm{OtpRgtiz6iF*s{`BiUI7-$qVO5mp3igA2ub@Fy6}>Pvnc-?Y>!7@ zT}>Q3p!(D#un_Gn2!PCjx51t9Gs?w+ZF^H_7h?bKYrq}j{07t~kmBzQY97-q=98uH zi}S@;`7;p8_X}YZ&K9e282K|%P!7>LQ$hW%wdJ5VKRP*eJ`SRIaY2>Cay5)q5Qj^& z=$DGqd2QVfq9|BaR7Z6+4)Pb&To4t07(^VP82fXT$^})e%*0()zCT^9vPTsAKKc@c z^95bj<~i-eJn$@d=m{_9RV!W&>V+Tp0^F(082@cK$?( z3w47Mm-$mlT;L5#47^2&aqeGRt$+TPp_}R2_~y~|=QdlFH@Cmi9U?8Rt?X~K+mAT8)rQJlZDvmXLC;Ul@D|oDy6Eq)em|&u zl;zqdH{QiOr;<6r%X|AbR_ktSwSIb+I-H0G?WmKry7TQ?{TS@Lh5o+;r&X=qld09; zMEN&h+-xp;SGv=_Z~eFZ66T=kb)2VhF!6_AzWsa~`3CaMVNBpTW?bQu%(%hxd?>-J zy99;_bqE0gT~vt+gya)_FC^a>#)>uU4P)2|Fk=(nf8LLu!3fJoAQ_wZo-qz_WsDW1 zf3@2c+P+(2d=%P(-8(ULMjpo}2!rXOat@=|Gcq}GeCqVXS#?jU*XeTx()*nK&Ovw3 zdAMVg9TVdENv`&yS--(tt?`S&CSr1(2AcxcZ!o>siA@swICqk(qo&y}gU#McY;X}9 zNX$P-ZW8r*9}MPhnEf=^M0)P0!6x#F?_9-bZT8KyGh^t)2F7BN+*4QYqOQ^(7rSXY zEUo_5{wi7|_VTn4%lsAQf2`9T=gsKfNY*d<>pKUbPfc~{6UurWoIW2|Vi`{&$K!c7 z)T^c~oWhBtKHqgiy^66}*5_b-Y!`p=mi)xR4lwQWP8sS|?^;;w^Zl3h-=n}cizN1W z-wfTSuAv~9toEP5OZhul={K?z=IHo3; z{N{4w`?qf7rC3uj^D17Lf+XKxX@Nyo11UKbZS{8CZz+j#xMgd8sR=6)xDWxtsF zjamA%uZ9<^(J*qR;n{qCIEcza^OgBz#+aSwUaa6XEQUPT=V?n-qYs_0RT7iVU? zygE`~3RdxFOO@%M>eY%r7t9w*q4J*{KX+s@~vD6hI)j)Q5)I5Kih zN^?PVPI-mpd8il}N6L%B66;K1p%g1m|1k0JYXW6GB@eOO!;g!?lJdeiv+YJL`3a!a zqzq$0xtLepYy}2%_V2+}N?QryI4Vvr#$lEB;4X=I6Q6rtBjyQY{@#>p#ixyY7|hp{ z^~|5hH83*L4K!PGkiW*$Oj ze#U-`_JBGM8->Jl@M4nE)*bXXFEnXA#z+1iXFb6X+BWy&6)@*VdyJE7`0;-fWg(79ejO}&e6P2m*F8V> z`30DE_57fB3wq4mg{03LsDKWSh$iaUxfsVHiSG=;UeGx9ZXX2C4ee#XJX0J~Xb`F8 Wcj@$m#2)j0TdxXd{!Wx2MelzE<3$nx diff --git a/Source/Libs/GLibSharp/linux-arm/libgobject-2.0-0.dll.so b/Source/Libs/GLibSharp/linux-arm/libgobject-2.0-0.dll.so deleted file mode 100755 index 95210ac8c7ba080324ea95407478d4761bf96519..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5012 zcma)AU2I&%6`s4hCUz3=;^wd5mW>poRK(W{rAnX`isLva!Y0Tu52z2f*SpvDl3lNR z_qy0mNJv#HfdmizlPI-S@lZiP`;dnSrBx){s6srLAE`)1?XK4=B_a=76sf2}Y`<^j z9`9svXpVgDnQ!LInVB;`=d7O}8$abZjuJ|$!-{CFN2!M)52f)*sGf&aMy1fUPwi#< zLhTNvgnOYvPQ~1@h6>Pi=#pU)Xpgpq)nO?*P8{fcwFB>Kdi?Lw+0lE%5HR?wbVXoU|0o98Cr1!gbR{LVa=J zF35f09bnG)0C+oErx8#xUj6kQ#(POveGB!wdks#*${&DRaXaxd>=+a0@Ix^7jg-dB z*i-Be!2U(uVm{OtpRgtaJ`c9X+XS}ly$CFnLE&?-J)b9}5t8=Lb>SroXHfnMY>!7@ z{VjIzfa+6|z(TaQAOJE0{tVn1Kdo?7Zn8Ipb|LovsRrCJ&Tl~d6H@%0M$P@Y#e6ap zUSYlvDQ^Zsd0svUgV{nQ3PNut^h*I+XUeGGwzlLK=0_)|&PIM1EiR~1P^tux@}pph z7QJF&I;X9Bei-`8it4DYM1Jm^n)Ac_bAHGH3XwNgE}v7C@=VlK<$2SU3VVc+=b&Ptr=JaS(a=L~)~%G?EPCYq$TtR*7ZAi&v`v&_YYN{n;o<<m~|MN>tDX&@OOIG=URX%T(U$@G?M>(5aX{yXe zO{FFq829e<@u6$UZ%l0L%&yk| zF8I;Wjel6>594wI^&d(3k5 zt@os>_194TBiOvQT>01OR{OsBRr`6&LDR2ro}K~|zX#^~&-anE4PiEkQX z5nm<73(|kv?J{lOE-^+5U4`9SF?B{Bz{d~#>4I_&qS!MsIdOFABUZblK98Dlae}en*B1^ zyxS5Vl86taTI{G~9Qk=4NJ+gLWy=`H!&-Y*2 z-$8+I7D?>$z8TuBuAm^;!R^%J$NIcA#L}O*8TX_R|4F{W8%6!|TmCax&I@mCw?C;b z{^V_b08}%#h=Kv9;ejv_HSJ@D+5m z^P>P*_J{dj#h9jfeL8;*EbC|f_iJD|f6V`0?b3hC!Wr23E3iG@W4O|`y$`zdH-YW> zw5)dCmj86&FD=aR`eEN5Z$Gfy59WX00T!aYLl({e9|7)+pH|-ow(Z?#>9ha+8h7%) zW5BXs%>TwLecD&UiL~1w}Mg_O54*9pGIuBL! zs6>l1Gj2{D$}Fir z=E;$X)1#bvrR>f5^Z8<+yvN7SoERDR&YU`Rc5KR<8aXjOCW&h&jn%2EPJB&f>~&?* zdId17^{f>4*7VyhS2tS>mLPE?*y26 z2$}gA`!U)B>O5=|lC~K-_4um>m z>G2&TZ#VAKMsMK-NX9cV*JoZfGbW(=37ErheT-vd&PPbf&!U3a58SKcFaI|qZPaC% z{4+59L_OvOty}1EUTD&KjF0?Z&U%a?v@Oo{MKI?_dyJE7_y@pYl!av6S5P5(e6O!V zuX}#%^BXYj>iI#h1wH2OLel3|R6vJEL=*MwTuin`d?$K?G>*O71Hp4cducGw6vq@A ZL~8kCIz1+_$GqRxdk)TgQWeg z)w@@X^b`n`77|Dv`Uhz$QSwkyC+veCOmT}Lswp84N)u?Hq21ML!6ts#217#$*?!;5 zJ=*bBPJPh1XTF&;XJ*d)oU?jDp;!1orwEwqt0fXQs<825u8 z1e5lI_ks5ifOZ?9zeD&w03HP2t80`x2>E63m%w}Dx-Sx(bJ9{Ub2Js43)f8-2@S-B z`yda1cY!(IL*SiggGNBfc=b1T8Sf=w^-a|8?Ke0LE58A5$L++=uwzV|!?(fQH&Pli zV^6U^1pAkDi}_Gre8QRx_#)UIZwuJA_ad-R28B<+_I#d{Mo8Mf(1VvPoI&|>ust4q z^_SSeLux=x0}IjKq5#MY_+xN){ItSRxy{}T+J)HvhZ=ClIKLtF4@mKM8Z{5;7W2ta zc*TWcq`Wx@<$3ua4Caf~C&Ozg)s2*BagUQw_0(t=#lp$-xyF{KoDEeHc^hPK`8Z8oGad)S7Lc3 zmRDoRd(8HBEMG!>0+-=3B`#qN`Z&6Xanc`0Q!DF z2|FKB;!=G?i3?q)#3kOM#K6}nG0weL*BYPxbL2*?APp-72yl$1RSmjGr`Jz>R-75bYPUk@@=?8*2@f8Eg!yp(ftO-S4#zH(BSrF}1lnyVm%d z;K#=||8AB48kZBOe_zUvjc<0cZ#O&NdApg)Cb6#bH?C%0XeQc+8_w^>H&wdUbZW4@ zxYj6Pex(f8K3#tc^PGw21TXI%tgkha?X||~9qMp0nzW-%)*8;!wZ<{nc^&-_H2n1i{D^^4(!v;5lY&LA8z@ zJkP^1X5A$)OsHW51$0p*E)a4LJ5JXDGGL z+3y@o9&#S&8fC|rxPDSnd(o`lV6N8q#b6UPxlV&kf$KMzUhKvviGQ3sDXAl;*)N05 zyDjk{iTFUO$Bs(Ik)QX0l+?Rn_S0Y!?YW-@o9HLLODaZevu~!ISwlBIFdmcSo+kA! z>MH$7VmEDvrPRMVUq_3?U!E3XnZLsPk9E7_yczwE;`NLE2ipf>K+W{%6UurWtk(mU zc*c{+@p#@1^{ZJ6Cvf7Z&v)HWzhZor^*LA{+r?kJB|ovS15Eq8Q-=E0TNW1keE+5W z4=C`>B8h$8H$!{XH53FpxSe|ZSf96sSo#yU;+_=ZKgm~kqo{vz+kXbjdEu??^(Xbk zpS;ZvV`_rwUz<4IV`!K2;{cxm7XLf&|2bg310=T7Uvj>g8FIW&xA%LO_UC67zJ{)L zeiQ)9{xJWm8q+kdPv?(;W&OkNMxLJ^F82I0GAh2DZn00$19$_g;_w7O*{^ zw$;wt^6wt}nT0vtAne=Y9R!y9!Tj$lz(TZl#KIZiW5C_<)9RbRw!N=e`t1LZ#@+ny z1hDKE^S=p8pZ3-0QZ*b!?ld}|%Z>VBd1Rro5RCBg96jzLks8f~QPHiaBmP~fEzBNIR0*q|zqG7!mGWXKh=RO(;#^r6#*Wo)(2G z%H*W^rE+;iRc48o>eN*yz9uvF zdNOIf0vOhMR*HM){JfhOe{mKqNxII(cgVrF6Jq^)U^|sJIlCm#OqOrYtatoepxpe*0#uBQLgj`*iFKy1Sc;TOCn*=dDDc%&auLg2{J_XBD>o>Z zZ8vK1&j76^Wf=3z#hh~ID=?tbe;2M&+KL}VVR3dT3aY#ZcS+2f_}udvF;5`#H>X@H zK5gW~V7{iTXZ}R4ftfLosl)rq_mY@;%(uwQvxKDh4O9$(smFYSyclB$ZI8G9aWM5x zftiPpnV+#AqdlO`!^R*RuNF(2xY&w@pd@tC|UlaF;E z)HzF!?;v@naldEu7GHp5JR@^`=4CTu0;(T?ISkjwI7a4tgrxi|DwzGiy*mE#e>2iX zU6#o|0@F{_V_wj{gC6IFCauT#$p7VR#27-`;#^+@bAGhPIJu60031bGNXC5y6{5%Y z`X=;x=f^(30Mo9XAN1PLW9}{_eO^Tcba+HGQP0lBWNXBCqBl(A*t>lYJU6tL2J=jD cOrc?Ra(a1bq;EX{lgJL-9pWL=*)LNF{2)6j7=VSFQsY(xN)q?X4y1}HC4$~U0w^D=Bty&hXXr;6e zl*mvzGR7KyS~n?{si7L6^Lk1Pn!>JvwZ!hYwmYuvKws7Rpw+5ZB3X_+z{7O6)&mt? zDNo*V<1*g8mO8CCz;@EdYU`WT^902*#pZr~qWtvq4^jR5d+M7XYuIuu`eWnVGbcO0 z?eG4cMM^HN6+4;V`B@`Em96UpTg%Tne%iafynXG5*Ux?Z?1`OMXYOqJ<%?gn*H{=T zJDE2^n6T2nA&pQu%)Al8gdO1L!4mj6#_DJ@8FfZL`ijEqX>SOh)_7Q7{98}ebP5}! zdz0f?PwVOF@L{y=v2-?L=Upe~+BVtAOwuKLlnL2K2m9=JB9|CT=G{bYu&*PP%_Ih$ zkyOHym6q7CGmdoNq>^V7luC|_@w5Mc*<|LkW|IIhX&oXv5qDgNY1Lgtqpq@QZ1$!EQ0!ll_6z6GTdy==bg5J;;cu#P?kLz_?`h5Uir}0MZU*O>9 zYYo+-oFUn3lm#Cy?;Oga50^8Fa@U9Zx5k>jU2R>gdVYgJ)=RT)Md34Rdan8g%*dK) zd5dL3)=brFqI2Y~b>Wt~jZNCMNzHI!e$=ep^`f#FzEQiYm6mz7KPiec2M1I)`(E-YHt7oM;pH?7Z?+(zy&qC4Cu9j?~jRLeS6qlt&D>6Wk7b8ATEQ)69h`I))G zmN~8$dJ2WY&8m5BMuu;2SDi$^X)5Z&KaH{iky?9TwZ&zZ8)XlaJy7;Q*#l({ls!=P z!2i|*h&vHyB8GJIioi=OD`lfcit&4m<`K7V(>&ta9hyhnx?S^#bLHM51@hmQ3R&T= z=z(z^nAbrp?sAJ-zFw5MTvj#F22C3^mAjObD>~T4IPZF}x@Sof`b!0G{7YJ&13@(( z_+e4=Q(FF~<~6H({qG3w&EXMoKj`V`c+}X-H_?4YGhbMm!g{6nDBmP-zxKOSq@`g;BX3hVIQGkMcbm`xn%&UvdBT^zZYlskWTg zO1i_hm|&6jx1xl9Hfem;fB9qV0gdDLfmv0WxsLFS9rt^@AKeOH>7O*?GA@2^R3}_b zD*csyUTyxDlz!>`Dz)Bsl>SP8eyH%3`}L95$GVtR<1($d2c;_PCRYOUkG7WPe-V(GEsA6$Fi* z-ec`;z4o#0?x(s2?ZLM8-Y&NLr_7Pg`gkd(Q1(gEKY@IZbaW4Crq)(}(#T612$1&9W6&=IInSR9ejBtQeWR;c4E) z;NkxloWu$8twyd2-yhK3p*}-DQ)III5B?Uz9^WZY$#+V@cN%ekhZ1MRz1RWv_?{K1 zR+Mr1l_|z6h#OiNlfGd;uN$D3S>`X&hrd|NNUQ<-DLqk8$tg?0{GkUr#4?Fpz~eg# zYKSqH@cccLD6VC&zoG{MMZARZ;XkZD!}hW!#Am1U27zwHK$>cC5tS3_r#>e^*4}gaCv3~UVGB@NK3jZK(!2b`z`rtv|WZPPw zJ>m;XI^_aAk6Y$}zs&;iJ;p~Ig8#GNJ;FL*2S2{Ywz7WMBVL)8NpUe$y9suVAJ-`n1YRDe(PouVnUf3S|$J`Jd%pc!HV-h7#G zMQNZ_TT8(9!Ro685quH)(o(_Hmg0kgB1P$g1f&qPV2UW!hpgw^xnD9f*+}t05cZUv zbI*6qxj*OL$((z7va7edA`&4`l%6AzCMrFoO)Ji<(+y^Aw1<}Qb3Lt7wp9zNMXi)p zf)g3aM#fmizqUFhGB;EMd|FRwMsxU8u$A~7(td}uANV`k9=uxhN+ipXAMh~Ws_nqV zR_KMhZd}HDSZdIQ{p=@wEVaHVJx_2fQ+(F&FUr531B3MWnlCpzai`e&?CoO9y^EV# zFQ2b@i&aW5p%p)w-~$cp{e=P3GN1ZlJF-mCYmu zoZ(c$)0NiPvEz<(;G~i#5|l~~k7kEoPQ=_DEoQTs&zjAG#iX^1>_psg9kT7=eBPS_ zLzy`B^zQHIv|G#;bEjSavkH#3|6hSIoTtLZByVX2UDW1yPjJ2u>2+KBeE{B|@g^N# z;E<>54b`KZA=zutj1QN04m9h-<&1(J_;CN$Sf}n)Tj#1?uQAAaW6G^4er=t)S$zX; zWKFid&$>Ztvg*9p?0sOJz3XmZmk#YxJ5-z=G3&RSRz5>F>bJDfg3SI$#Bg$Fzv^cD z9Q#|>=c3lxS?l`D^H$`R_062y#2rR-hpVK+rTUv_UBPBlc*;7}`rS%y4a$6Kt#hqE zvs7Grlbpd5j61j-R8 zN1z;m|7`@2cOuV34(aF>L6%%rXqCt2^Y>aUBX8fJW#qS;w2ZuUqn459%DqJh`rqe@ zS&^^kfpHy})=4bxa}+h$JnD9$KMAQ747C{gm3J)-{bx0R`}xhq#2iS@%Kh` z!jExfzc|iI&Hp`RUwXevt@lG^zc`+k6~1`CKGpVE7mJF%;Af=7e*M6>p)7)rzgR3) zFOgDRsXE7U#!L0Hj`0Te2-jCOX*@j7Czt4_o$*q2ogv0c)nh1@bMtOtWWdTBd>@> zW_~>FI>XG}oX5w|%4FSyIhrY$!-Zrjz9ShYC5<`xF*4)h8TRzJoAWfUCUW^?HWLtR z*5wi@M;yphg)`Gl9Cyi7YcmsLUaUQx7iLd~Haj}$WQ=>wvKK$hV<~Q^nwZHYF*13> z)4Ykn!~ZWN$rI#Tjan7HKj2$KeTM!_k;(c$_*)Ere5b&r-YJCdH1YrsC9a5*${pa3 z@7X-phB7X{GV}Qg@`g6Xq;L37>jwBG*7-^L@RP-YGqFKa@6c2sW=_<9VaxmM4ka)SK+6WRd$ z&b+19KwTB^iI6|?QE;iJ`zbvB1S@5HtRMLRc-S86N1tzVL%yMi5Ap{5|3TOuGWfgf zTkrEneql+cOtAB$1sV7UtdQ7aeB>ece-^w)SO@$N$B)@p)(?N=E7LM5CPO_J9`FbM zgjIfjLSCZ>z&Sw=@B_aZ@<;yDr2SzR_J{l#H^c_>$9K_K!e8dM(0%-!#QSikr&45XDIkz{_Q{IAJ?Oka6y{u%cF E8?1Zzp#T5? diff --git a/Source/Libs/GLibSharp/linux-x64/libgthread-2.0-0.dll.so b/Source/Libs/GLibSharp/linux-x64/libgthread-2.0-0.dll.so deleted file mode 100755 index 0245be6fc3e8c177d417235b945b2adb50cbfecb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7240 zcmeHMTWB0*6h6r&ZFi8p<}4@CPZ^-k|`u@jR~}1m`<{jWN|NbcUGFB zHqffACD8W4%cB-l@I~;YrGhCf#TUT~wxS>bDMT%pB1-ik>pB1Y-)3gAk>Z0O>?u3v zKi@g$znuS{%=u4GboO*rR#XruMo*GR6IDLasuic#=mxV^+D%LNxt7)_+v<7Mf>u&1 z!HEoIBV#P#Uu&HbnH#DBKCP!TqdEL4*-HElYQKZp5B!|A2d`1R63KGp2RzC*YddhU z6?*!%7nkwwmm0KTANxrki>+@;&l4QW6rTtA7vo>|{sD4dJJwfwAR~^Kno_*~d_I7i-xkE32StUn1_%F{G&QpGUg15Ai-qhxJPjJ2u>UCTCeE{B|@g^N# z;E<>54b`KZA=zutOaPa64m2CU<&1*v1@Pe3SSRn)SZAwWT49j&%9K}G_`*7Qz2+L+ z$eL_lf2bK6_TF74W-cCau#V%BdurF;gj)o*I0d71qWi{a#sKGn_E zIrg`%&c&=Vv)0v_r>u$_)|Yc$6L(mlJ6tIpF4o^f%Q7~j{A1S1mRrlYH6Zh;wa&Ku z%u-?Xb$-rt7Yc=I^yyM&79ydMzW*m3xa2^uNy) zG9q8n1LHa{t&>>X;KfU7Im-x9mBmjIwI}|-5niI7+d%zy4Bdlx0U9oT`4)nHwoOYgZdcX zU$8G>JVw}$FkVI2w=iB!h+i0ALWp}9Us~M1Fuw2}Df$@iD(W9$`x5s{Wxs;PaL@t{ zF+S}$#{ro8uO*z{FkZ)X4I>Dtc8ux?_q3ogCbz@Ly;<}zzGq|q!uE{|?%%%s13@#@ zmh)Ogclj0*CV77=OT?#6<5R)QA7c+`9Dg5JRJ4nq6?|jI{T}Z}m%<`-O2{Z2oU4`_lVWYQ66%`-SoRSm6uz>l1B{b+M@EGk#W-*smWLHLpUDD^=%M%6O@M)-c|{9?|;B28~DO`RF43v@u?)t~1DZsd@|zXT6-49~m)+X}-i_ zdntQZiYz%UiNrJZXfiY8B<;AD$>wY)e~gARsiR5PbK~aDJ-Z$+ZKR4fwv){|<6KMe zvg0(8byBV!&!=KYvwI^h1+g*Kay`6UF{=HHSvg5goJ?5n2Qu5h*cz;{(z79sY z6aNKNcBl-KcQlfbaWqOrqjwBm)&)uW2$IEuUBM2YCbj{~&4)8T<|Q ztq=Gkzp$iJCfNDXybSzZR!HnIKJpO!KMUR?tOI_C}k>xVz`m1&t2lcApT5BP(B z#Hye_A+ON`;GCcb_<>)J_#^*m(*CfE`a}Md8)Ad`*$JBN*5eyG@T*z*2>-Ai#6`|0<{tDvq+k4D45XD2kz{_Q{IAG>OrQI#_>B7h E4a|%A`2YX_ diff --git a/Source/Libs/GLibSharp/linux-x86/libglib-2.0-0.dll.so b/Source/Libs/GLibSharp/linux-x86/libglib-2.0-0.dll.so deleted file mode 100755 index bea66166256333162d05ddda43b85afd8f244809..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6508 zcmeHLU2IfU5T5MD>6R+5$iZ6n6u&F${C-LOBnd#kM> z(XyIYYeR#Ym}pEBjEVACBQfv*EKyJ%D#nC2Nt9#_O@xThn9BNn=k955Yc<94io`Fx_mFMgp^>ldj8eQlMisTM<)$VOQs+7a7kWY1ZqHUKu?^2Or##J6y65aSP7n}b^ES6A&7qg_Q&wDAA0Zj zS+o(^pKBux0I@`A-qR_UpZw<1*KHfNTyASTcJ*%4(8>2dc$Ye^hxVk!A^C*#KH&Yp z`o`}kPycxQ$ki7PRD3aVYuSzOep!a*IZ)w|4DkCs@;dPJt-%0OqXkgPM}Vbd0Hv~0 zj)4XYN|XbVCN(IzGS@!E-~!5|SRMkc!#)kCr*gU6>t~(C*@w}X zzEJ#J22>f`;9ru7r*im6`6**)pgwK&TIq8w3eD1vHJUV>z zraQ*U&Y|n+$-utcMEXMMrOfDvvtEA9jC@X?*^lrTJbwuNJG~AzT^zdJer~F0D3hLC zbneDl-_>uYoWSt$X}Y}PEX8v6?#o?)!{LL|moh_lM$T-YKMd8LeFjE@nbq)#&aa+U zvFzJ8oWAYOrz|~Lk{ieQklfpBf|G1D=$C0)`jo@bkJe|?Xk36o1PT!-M4%9XLIesCC`6zTfkFiSClRQ^Xa6ZnXe0;G~p{NddS<0_zC`uASglQ4!(XU73+VEM{az$c+K1UuE30d97bX1EI<< z+OM*4k*XP)k;UH3$c!*#>=nVUc2J~aM&?esdr0aRH;v~Wx-tqC039cPJ`-hrN${&3 z17lF4%$;-dP*T6z!Pz|BuPP7JxZsynk`Ik)SR}V{JY#$F^Dn{);fzK-@?(&%dE_0C zSqGpWAN)6g>iPR*xx^szJQL_|0F-Bz;Dh)1B>|+IKPj<)na_Qq`xzu zJ3aodK;~H@_^|#TKz00lh+h`6u3J#A&XR#ffDiFo>Y0#%w)K#;J?kKwA?y8QU1OWa zejV)FJTm(~57}Ec2|}Lr7ZCM_f*rvC4ngm&qew96q@2F)ZZjyeB@)YtSwR*_QmAT# z5>`(%(Pc-ikdsKJEW58?f{EDSXxIsd%o}PNUB;h$JDZ#_SdyGT8(>lv6^G`*K9X?!j5$~XgR%o@k3@;|3a-HwuVv(tJjW) zSl-$7?4G*T-3@3(*++Y8ZfUEpYq8pzn%WyXtd6?+mPU;6PgSCPg~u%?%_$7k)_Ti4 z^Q%xS1I?)magc?}O{!oeW@;ej*j=Db(xttcizl40*%R+GyZR#0(B?=;l+{uiS?+J%KFgB}TCW>HU;(Wxg=R9@)4tU3~{>WD)|1-o&poaWkP)s!3!M#8`zL$yB z;PbBx^}nSp?-#xuX~*|9aSS|lU=`)vR10KZ+VMS390RX`wuGmFyq{>t_d78FUXROm zVkeOI8Tm0hhz5A?xDX`-WUZBUXYn9%&e|XCc{lR?#yRlj;QyBRICu@TBb)+iI|ELL zT%QK=v`qoE9q$z)$I(EZcm$~JYGFhCLmPo=-$%W67@!u&xMLFWmpmon9lFX2u-{ukFNu03+UM8t9M6dqdmtz9@m69uuk={ycb&&vE(QE}dsbAB3-f z E1Zp@;WdHyG diff --git a/Source/Libs/GLibSharp/linux-x86/libgobject-2.0-0.dll.so b/Source/Libs/GLibSharp/linux-x86/libgobject-2.0-0.dll.so deleted file mode 100755 index 206265421c58581622f550cee39ed0111d871889..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6508 zcmeHLU2IfU5T5Mj4F^V_a-P?9$cQ5YVYHLUk zR*ki3Z16#!j7f=!e-8#DQHT+iD7+!Wgf~f)WDQM(h}dXl{l0Vd&|5@fd^6eE%$=Dt zbLN~g=k7UoW`Ao(TPPF~17QgZrD#}W4d_b?wPuZ2GE0`rVyRVnV^6wkhQ^r`YDDR4 z=Ze%W(KvzTN#Lxqz6#WW-h!TZ7BZ1~xKelx)L=b$qS0-?8h1=t_M%MR#+;}_9J zWPh%WGy=pDrF~168>&UR*g{*l{t{^QmSkuRRgd`KPFLwnNdguF+32k=f{bL+R` z$G$(b@4~aY>OLE}de7zaKiz}oX;2rCEbu!5@>1~hZNLK4XarEo`++rN05!5e4uM82 zN|Yn=3aLd&%Ut^;gA151)p9Rrl#2z-mpLMi)0_4(PR@^Iea8_enMwNM^ni%7sdKZF zaIK&!-CpCw2V!&(OC?`$C6(;%^}3&N;|^Q z$*mQ~O~m{dCefYC={cY&laTg~P0cOND*F+8wVtb9LJ0Ah`t?J_^$~JQlGuVOc~gt( zJ*x&^hj)o|j-}}p$g>dSYou^GL5hu?Bt=|y=Etjx8_?lE;dkuSaDJjxD!u%rKeNcl zVS&-5Z2Cy_nzl72lje174gidw!g`Ux=U-1WM4xIb|{zhKoghvkYx&E~O!0^E< z+W&&Cp-cJk$oA6N{HdBVh0zgznfzQB`IJ73hw(UYau51<1s$w7J#=a3iHWMALVkS4 ziOWku7rvSBBg2O#>GGUE8%x=?y>t!^hj&k&DGXg7IsP#HVW^$O$6<7!un0cU`Nd-@ zj{VDr^Vjrz=I6)fl#by2kkT7$f|KGJ(692e3@L}BBcCiQ``i5^{S8Oz3usU={PhO? zAHClMjfNGdM4%FZN(3qqs6?O=fl34_5vWAqe-wcReD+^NuD~2E1|($;!mniJSa*Xm zw^|I!JQv@-DzCf`lz9lgwUzwKjgnW3&deRhL7Ag=fX)UT1KtJXS2l(cu|(#9oPz)P zpv(ss0GWH>3)?%4c6@nz=q^Ylyiv%%fvUb}`!B%!+W_;X_Li1Mt>wsyS6J(8BymP} zD`jp@(A5IOfRj=(CI#Rc39Kg&xOPHVMMZ>j*D@m`!nF~?x=Ns8pk-#FXg;EZUYM3EcOMJ(+mDf{+`Ey320r^457X$J- z$gBgP=Us>cRQF3oeTB>5~4A zgRT$wKL?rb5+Q{3e+O#f7ef4skWJl!di5?@Xas~1zuAEaS!i1Z+1RrVvJ!H%JRa*B zs{{5+VZSvXv;WhOgLRWQ{R0yB(tA^`?+U7x@9A)InF@iTD#ZvoxO3#@9WR(vAYLu*P38!BIh}M zu}p&HosCayY1+K01+6Ii7;o(zTbr9YoULtbJ6k)Q&Zg#$R*dmaRibivN0*bP6^5eG zV2$V2Dimu#(~3eI}vxJm0l@GyQgVe=?O=nM{b1`eM00 zu@i$C^wiYPYRz+QHkb4=(*y^)tec{}*lI|7Z_2lOJzs3!9l%qq(RTav{%9k;HCktQ zc!;Hwad`K9`oP#Mf!U~liH-LojXmdE_wRsr3{OKImHf{T>wyN!e+jYCa2@vo?RYK| z*MKh{8R~yaTi!3ce`v?^n)nWQ>cA?>yD17}U)u2;Cys$PKwH9NK;BQZO*zsN=avTHXiTi-YE(#msAI1pO_&yl4!vIkr<6^+f?^QI=AEvL)U!K86 zM_a?Q4$M0N!|573t|+5Jlj14A4dm@bJM~TSH+Jts&)Ct9=QL~cXTckvq+IXwK+cbL zy#KDi&a4qlH^)5!-q?u+0Y<#j4A38u_lB|KeK7}iW=yDV@+ZM_e2&X=yXF=<`XGD_ zB;P;*K)ZRGRZr>+GR6k#VMphSKv*>89N5Hnk7F9B$H&;~W-v4wmSY6%j$m`onoa?` FKLMaaOfCQb diff --git a/Source/Libs/GLibSharp/linux-x86/libgthread-2.0-0.dll.so b/Source/Libs/GLibSharp/linux-x86/libgthread-2.0-0.dll.so deleted file mode 100755 index ded8bc4b4541bd42db40cee36092799d113bfd3c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6508 zcmeHLU2IfU5T0cLD^@9G5l{?QY!Du}sn8VAm@JeQNy>kT7=t&rdvDtf`-8i;+8Pps z6=Q9x4L<0TF)1-oA5n>c2VseVFILoqH%XMFh8iIPHdmK7OOG7ne1%l&dixP zbIzG__nbR(pt-dr5{Za`s6>TQJSx%v`qDhDX%I_h$}(9f3zXj2lkT3baR!ANQThe5 zMHVd9IELnN;LNgq8mI-m1wC;XGLd??Qg{v2U>$g((QUsJco6>r?2qAP2lV0bN6*o#|}G$p>yOa2#=xnPebN2Z%VE+BQ3$ zpYuDD`M}S$ZEi|sGk%-fp7OPBYK@cVap}NKC13C*m2B?}x^lkjtypQ-+xe_r&$a}) zMsa-44O~p3J)hTeKvTw(jjfy3H#sZqN9~cu38RC>`S6L(FP>0w z>|WMixTfb*TNte_9mD$}r8n3FCnF7@pA~2sQ4R+OK3rP%x93Ot>yOnH(V$}Z>rMJU ze!mGC4J%NIKqUf|2vj0ai9jU+l?YTKP>I0*C<68P?7xUyfjOEBBxMf5uVm&}cY`vw zS_sNK7vH`rue=YGc?iC>m3;kXDZ2ojnLCbxGDmF%odr4sybH*$Yz!r0iOc~x1OK(4 z%m?QJnS0<1J9`xE`0~!8yC9Xw4nqD7RP{yMe*xy-2ADT(Y-)PcT86B6xwYCx5@&R` zQ|9IbT`fQiI4LD#QUI=zz*l!KV?EehpaNQ&UdBR^z)E^3V1Pj;)eYlPyiCmBmx;r}TgiMr3oFMHaSR~1# zq~T?q&Q!MDO*vkW&E*}pyGIh)^uClI_@3RkW=;LnMymMYxVfC$i&{vK>y?h2oAw>A zJDu)Dmyo2YHIqyor)9^w&CO2pmJO`tI6Z3`?M^>%_9dL4t2?vTZtt0@)nlud&pKUh z#$$PB!&6(9*UulPPaS(i0_hx%n=! zz1|FZY8vFU<~cu?Pi8Zd1P8jDpQ63kYDjxuDzH1Vf!KlHgQr@f?RV+@(MEb}w9fGG z;HHxac+Up(fw5Tvvrz#P8}CONd(OA+-vRF!o`yUs`JW-y0S%P@5@Ms_2JQvg@mwZ0 zfG-~z>VHdH-Y>j=Xvg!K_zrmLz$(hSDGp>`+VLDG4uLm7Tf!4S-cPjS`A&?1H{-IM zxC_Ypj6BbMq6I!YE=2KwthLha3?4+z+4!S9??#?)oCEJx{%?s7fj2-q!f~Lnv*3it z^%)>f+dR$T4jbYh#t78-J`}dY0C6DWV!+Jr6*SNvrmxOlp20>( zTf?&s%sT(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_color_hash")); public override int GetHashCode() { return (int) gdk_color_hash(ref this); diff --git a/Source/Libs/GdkSharp/Device.cs b/Source/Libs/GdkSharp/Device.cs index 16137ccfe..09db728d4 100755 --- a/Source/Libs/GdkSharp/Device.cs +++ b/Source/Libs/GdkSharp/Device.cs @@ -25,11 +25,11 @@ namespace Gdk { public partial class Device { - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_device_free_history(IntPtr events, int n_events); + delegate void d_gdk_device_free_history(IntPtr events, int n_events); + static d_gdk_device_free_history gdk_device_free_history = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_device_free_history")); - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gdk_device_get_history(IntPtr device, IntPtr window, uint start, uint stop, out IntPtr events, out int n_events); + delegate bool d_gdk_device_get_history(IntPtr device, IntPtr window, uint start, uint stop, out IntPtr events, out int n_events); + static d_gdk_device_get_history gdk_device_get_history = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_device_get_history")); public TimeCoord[] GetHistory (Gdk.Window window, uint start, uint stop) { diff --git a/Source/Libs/GdkSharp/Display.cs b/Source/Libs/GdkSharp/Display.cs index 871397281..11ea6e05b 100755 --- a/Source/Libs/GdkSharp/Display.cs +++ b/Source/Libs/GdkSharp/Display.cs @@ -26,8 +26,8 @@ namespace Gdk { public partial class Display { - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_display_get_pointer(IntPtr raw, IntPtr screen, out int x, out int y, out int mask); + delegate void d_gdk_display_get_pointer(IntPtr raw, IntPtr screen, out int x, out int y, out int mask); + static d_gdk_display_get_pointer gdk_display_get_pointer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_get_pointer")); [Obsolete] public void GetPointer(Gdk.Screen screen, out int x, out int y, out Gdk.ModifierType mask) { @@ -36,13 +36,13 @@ namespace Gdk { mask = (Gdk.ModifierType) mask_as_int; } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_display_get_pointer(IntPtr raw, out IntPtr screen, out int x, out int y, out int mask); + delegate void d_gdk_display_get_pointer2(IntPtr raw, out IntPtr screen, out int x, out int y, out int mask); + static d_gdk_display_get_pointer2 gdk_display_get_pointer2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_get_pointer")); public void GetPointer(out Gdk.Screen screen, out int x, out int y, out Gdk.ModifierType mask) { IntPtr screen_handle; int mask_as_int; - gdk_display_get_pointer(Handle, out screen_handle, out x, out y, out mask_as_int); + gdk_display_get_pointer2(Handle, out screen_handle, out x, out y, out mask_as_int); screen = (Gdk.Screen) GLib.Object.GetObject(screen_handle); mask = (Gdk.ModifierType) mask_as_int; } @@ -66,8 +66,8 @@ namespace Gdk { GetPointer (out screen, out x, out y, out mod); } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_display_list_devices (IntPtr raw); + delegate IntPtr d_gdk_display_list_devices(IntPtr raw); + static d_gdk_display_list_devices gdk_display_list_devices = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_list_devices")); public Device[] ListDevices () { diff --git a/Source/Libs/GdkSharp/DisplayManager.cs b/Source/Libs/GdkSharp/DisplayManager.cs index a79a1ee33..3f8127576 100755 --- a/Source/Libs/GdkSharp/DisplayManager.cs +++ b/Source/Libs/GdkSharp/DisplayManager.cs @@ -25,8 +25,8 @@ namespace Gdk { public partial class DisplayManager { - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_display_manager_list_displays (IntPtr raw); + delegate IntPtr d_gdk_display_manager_list_displays(IntPtr raw); + static d_gdk_display_manager_list_displays gdk_display_manager_list_displays = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_display_manager_list_displays")); public Display[] ListDisplays () { diff --git a/Source/Libs/GdkSharp/Event.cs b/Source/Libs/GdkSharp/Event.cs index 99d26cd1b..d2015c636 100755 --- a/Source/Libs/GdkSharp/Event.cs +++ b/Source/Libs/GdkSharp/Event.cs @@ -39,8 +39,8 @@ namespace Gdk { get { return raw; } } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_event_get_type (); + delegate IntPtr d_gdk_event_get_type(); + static d_gdk_event_get_type gdk_event_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_event_get_type")); public static GLib.GType GType { get { return new GLib.GType (gdk_event_get_type ()); } diff --git a/Source/Libs/GdkSharp/GdkSharp.csproj b/Source/Libs/GdkSharp/GdkSharp.csproj index 6fd4c6c62..349c26f27 100755 --- a/Source/Libs/GdkSharp/GdkSharp.csproj +++ b/Source/Libs/GdkSharp/GdkSharp.csproj @@ -29,11 +29,6 @@ - - - - - PreserveNewest - + diff --git a/Source/Libs/GdkSharp/GdkSharp.dll.config b/Source/Libs/GdkSharp/GdkSharp.dll.config deleted file mode 100644 index bdb1c4c87..000000000 --- a/Source/Libs/GdkSharp/GdkSharp.dll.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/Source/Libs/GdkSharp/Global.cs b/Source/Libs/GdkSharp/Global.cs index 357c799c3..cc3df43f9 100755 --- a/Source/Libs/GdkSharp/Global.cs +++ b/Source/Libs/GdkSharp/Global.cs @@ -26,10 +26,8 @@ namespace Gdk { public partial class Global { - internal const string GdkNativeDll = "libgdk-3-0.dll"; - - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_list_visuals (); + delegate IntPtr d_gdk_list_visuals(); + static d_gdk_list_visuals gdk_list_visuals = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_list_visuals")); public static Visual[] ListVisuals () { @@ -107,8 +105,8 @@ namespace Gdk { } } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gdk_init_check(ref int argc, ref IntPtr argv); + delegate bool d_gdk_init_check(ref int argc, ref IntPtr argv); + static d_gdk_init_check gdk_init_check = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_init_check")); public static bool InitCheck (ref string[] argv) { @@ -121,8 +119,8 @@ namespace Gdk { return result; } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_parse_args(ref int argc, ref IntPtr argv); + delegate void d_gdk_parse_args(ref int argc, ref IntPtr argv); + static d_gdk_parse_args gdk_parse_args = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_parse_args")); public static void ParseArgs (ref string[] argv) { @@ -134,8 +132,8 @@ namespace Gdk { argv = a.GetArgs (argc); } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_query_depths (out IntPtr depths, out int n_depths); + delegate void d_gdk_query_depths(out IntPtr depths, out int n_depths); + static d_gdk_query_depths gdk_query_depths = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_query_depths")); public static int[] QueryDepths () { @@ -146,8 +144,8 @@ namespace Gdk { Marshal.Copy (ptr, result, 0, count); return result; } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_query_visual_types (out IntPtr types, out int n_types); + delegate void d_gdk_query_visual_types(out IntPtr types, out int n_types); + static d_gdk_query_visual_types gdk_query_visual_types = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_query_visual_types")); public static VisualType[] QueryVisualTypes () { diff --git a/Source/Libs/GdkSharp/Keymap.cs b/Source/Libs/GdkSharp/Keymap.cs index a87ebd677..9a7d26222 100755 --- a/Source/Libs/GdkSharp/Keymap.cs +++ b/Source/Libs/GdkSharp/Keymap.cs @@ -26,8 +26,8 @@ namespace Gdk { public partial class Keymap { - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gdk_keymap_get_entries_for_keycode(IntPtr raw, uint hardware_keycode, out IntPtr keys, out IntPtr keyvals, out int n_entries); + delegate bool d_gdk_keymap_get_entries_for_keycode(IntPtr raw, uint hardware_keycode, out IntPtr keys, out IntPtr keyvals, out int n_entries); + static d_gdk_keymap_get_entries_for_keycode gdk_keymap_get_entries_for_keycode = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_keymap_get_entries_for_keycode")); public void GetEntriesForKeycode(uint hardware_keycode, out Gdk.KeymapKey[] keys, out uint[] keyvals) { @@ -51,8 +51,8 @@ namespace Gdk { } } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gdk_keymap_get_entries_for_keyval(IntPtr raw, uint keyval, out IntPtr keys, out int n_keys); + delegate bool d_gdk_keymap_get_entries_for_keyval(IntPtr raw, uint keyval, out IntPtr keys, out int n_keys); + static d_gdk_keymap_get_entries_for_keyval gdk_keymap_get_entries_for_keyval = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_keymap_get_entries_for_keyval")); public KeymapKey[] GetEntriesForKeyval (uint keyval) { diff --git a/Source/Libs/GdkSharp/Pixbuf.cs b/Source/Libs/GdkSharp/Pixbuf.cs index c54d6fa05..3c0107c4a 100755 --- a/Source/Libs/GdkSharp/Pixbuf.cs +++ b/Source/Libs/GdkSharp/Pixbuf.cs @@ -86,8 +86,8 @@ namespace Gdk { return new Pixbuf (System.Reflection.Assembly.GetCallingAssembly (), resource); } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_pixbuf_scale_simple(IntPtr raw, int dest_width, int dest_height, int interp_type); + delegate IntPtr d_gdk_pixbuf_scale_simple(IntPtr raw, int dest_width, int dest_height, int interp_type); + static d_gdk_pixbuf_scale_simple gdk_pixbuf_scale_simple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_scale_simple")); public Gdk.Pixbuf ScaleSimple(int dest_width, int dest_height, Gdk.InterpType interp_type) { IntPtr raw_ret = gdk_pixbuf_scale_simple(Handle, dest_width, dest_height, (int) interp_type); @@ -95,8 +95,8 @@ namespace Gdk { return ret; } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_pixbuf_composite_color_simple(IntPtr raw, int dest_width, int dest_height, int interp_type, int overall_alpha, int check_size, uint color1, uint color2); + delegate IntPtr d_gdk_pixbuf_composite_color_simple(IntPtr raw, int dest_width, int dest_height, int interp_type, int overall_alpha, int check_size, uint color1, uint color2); + static d_gdk_pixbuf_composite_color_simple gdk_pixbuf_composite_color_simple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_composite_color_simple")); public Gdk.Pixbuf CompositeColorSimple(int dest_width, int dest_height, Gdk.InterpType interp_type, int overall_alpha, int check_size, uint color1, uint color2) { IntPtr raw_ret = gdk_pixbuf_composite_color_simple(Handle, dest_width, dest_height, (int) interp_type, overall_alpha, check_size, color1, color2); @@ -104,8 +104,8 @@ namespace Gdk { return ret; } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_pixbuf_add_alpha(IntPtr raw, bool substitute_color, byte r, byte g, byte b); + delegate IntPtr d_gdk_pixbuf_add_alpha(IntPtr raw, bool substitute_color, byte r, byte g, byte b); + static d_gdk_pixbuf_add_alpha gdk_pixbuf_add_alpha = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_add_alpha")); public Gdk.Pixbuf AddAlpha(bool substitute_color, byte r, byte g, byte b) { IntPtr raw_ret = gdk_pixbuf_add_alpha(Handle, substitute_color, r, g, b); @@ -146,8 +146,8 @@ namespace Gdk { } } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_pixbuf_new_from_data(byte[] data, int colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, DestroyHelper.NativeDelegate destroy_fn, IntPtr destroy_fn_data); + delegate IntPtr d_gdk_pixbuf_new_from_data(byte[] data, int colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, DestroyHelper.NativeDelegate destroy_fn, IntPtr destroy_fn_data); + static d_gdk_pixbuf_new_from_data gdk_pixbuf_new_from_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_new_from_data")); public Pixbuf (byte[] data, Gdk.Colorspace colorspace, bool has_alpha, int bits_per_sample, int width, int height, int rowstride, Gdk.PixbufDestroyNotify destroy_fn) : base (IntPtr.Zero) { @@ -175,8 +175,8 @@ namespace Gdk { } */ - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern unsafe IntPtr gdk_pixbuf_new_from_inline(int len, IntPtr data, bool copy_pixels, out IntPtr error); + delegate IntPtr d_gdk_pixbuf_new_from_inline(int len, IntPtr data, bool copy_pixels, out IntPtr error); + static d_gdk_pixbuf_new_from_inline gdk_pixbuf_new_from_inline = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_new_from_inline")); public unsafe Pixbuf(int data_length, void *data, bool copy_pixels) : base (IntPtr.Zero) { @@ -198,8 +198,8 @@ namespace Gdk { // // the 'Pixels' property // - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_pixbuf_get_pixels(IntPtr raw); + delegate IntPtr d_gdk_pixbuf_get_pixels(IntPtr raw); + static d_gdk_pixbuf_get_pixels gdk_pixbuf_get_pixels = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_get_pixels")); public IntPtr Pixels { get { @@ -208,8 +208,8 @@ namespace Gdk { } } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_pixbuf_get_formats(); + delegate IntPtr d_gdk_pixbuf_get_formats(); + static d_gdk_pixbuf_get_formats gdk_pixbuf_get_formats = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_get_formats")); public static PixbufFormat[] Formats { get { @@ -224,8 +224,8 @@ namespace Gdk { } } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern unsafe bool gdk_pixbuf_save(IntPtr raw, IntPtr filename, IntPtr type, out IntPtr error, IntPtr dummy); + delegate bool d_gdk_pixbuf_save(IntPtr raw, IntPtr filename, IntPtr type, out IntPtr error, IntPtr dummy); + static d_gdk_pixbuf_save gdk_pixbuf_save = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save")); public unsafe bool Save(string filename, string type) { IntPtr error = IntPtr.Zero; @@ -238,8 +238,8 @@ namespace Gdk { return ret; } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern unsafe bool gdk_pixbuf_save_to_bufferv (IntPtr raw, out IntPtr buffer, out IntPtr buffer_size, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); + delegate bool d_gdk_pixbuf_save_to_bufferv(IntPtr raw, out IntPtr buffer, out IntPtr buffer_size, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); + static d_gdk_pixbuf_save_to_bufferv gdk_pixbuf_save_to_bufferv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save_to_bufferv")); IntPtr[] NullTerm (string[] src) { @@ -286,8 +286,8 @@ namespace Gdk { return result; } - [DllImport ("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern unsafe bool gdk_pixbuf_save_to_callbackv (IntPtr raw, GdkSharp.PixbufSaveFuncNative save_func, IntPtr user_data, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); + delegate bool d_gdk_pixbuf_save_to_callbackv(IntPtr raw, GdkSharp.PixbufSaveFuncNative save_func, IntPtr user_data, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); + static d_gdk_pixbuf_save_to_callbackv gdk_pixbuf_save_to_callbackv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_save_to_callbackv")); public unsafe void SaveToCallback (PixbufSaveFunc save_func, string type) { @@ -310,8 +310,8 @@ namespace Gdk { throw new GLib.GException (error); } - [DllImport("libgdk_pixbuf-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern unsafe bool gdk_pixbuf_savev(IntPtr raw, IntPtr filename, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); + delegate bool d_gdk_pixbuf_savev(IntPtr raw, IntPtr filename, IntPtr type, IntPtr[] option_keys, IntPtr[] option_values, out IntPtr error); + static d_gdk_pixbuf_savev gdk_pixbuf_savev = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixbuf_savev")); public unsafe bool Savev(string filename, string type, string[] option_keys, string[] option_values) { IntPtr error = IntPtr.Zero; diff --git a/Source/Libs/GdkSharp/PixbufLoader.cs b/Source/Libs/GdkSharp/PixbufLoader.cs index 6817bb213..4137bcd71 100755 --- a/Source/Libs/GdkSharp/PixbufLoader.cs +++ b/Source/Libs/GdkSharp/PixbufLoader.cs @@ -28,8 +28,8 @@ namespace Gdk { public partial class PixbufLoader { - [DllImport ("libgobject-2.0-0", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_object_ref (IntPtr handle); + delegate IntPtr d_g_object_ref(IntPtr handle); + static d_g_object_ref g_object_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref")); internal IntPtr PixbufHandle { get { diff --git a/Source/Libs/GdkSharp/Pixdata.cs b/Source/Libs/GdkSharp/Pixdata.cs index cb9f31d1b..de67e1aa7 100755 --- a/Source/Libs/GdkSharp/Pixdata.cs +++ b/Source/Libs/GdkSharp/Pixdata.cs @@ -23,8 +23,8 @@ namespace Gdk { public partial struct Pixdata { - [DllImport ("libgdk_pixbuf-2.0-0", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_pixdata_serialize (ref Gdk.Pixdata raw, out uint len); + delegate IntPtr d_gdk_pixdata_serialize(ref Gdk.Pixdata raw, out uint len); + static d_gdk_pixdata_serialize gdk_pixdata_serialize = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GdkPixbuf), "gdk_pixdata_serialize")); public byte [] Serialize () { uint len; diff --git a/Source/Libs/GdkSharp/Property.cs b/Source/Libs/GdkSharp/Property.cs index 03773f0a5..98857273b 100755 --- a/Source/Libs/GdkSharp/Property.cs +++ b/Source/Libs/GdkSharp/Property.cs @@ -26,18 +26,18 @@ namespace Gdk { public partial class Property { - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_property_change(IntPtr window, IntPtr property, IntPtr type, int format, int mode, out byte data, int nelements); + delegate void d_gdk_property_change2(IntPtr window, IntPtr property, IntPtr type, int format, int mode, out byte data, int nelements); + static d_gdk_property_change2 gdk_property_change2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_property_change")); [Obsolete ("Replaced by corrected overload with data parameter")] public static byte Change(Gdk.Window window, Gdk.Atom property, Gdk.Atom type, int format, Gdk.PropMode mode, int nelements) { byte data; - gdk_property_change(window == null ? IntPtr.Zero : window.Handle, property == null ? IntPtr.Zero : property.Handle, type == null ? IntPtr.Zero : type.Handle, format, (int) mode, out data, nelements); + gdk_property_change2(window == null ? IntPtr.Zero : window.Handle, property == null ? IntPtr.Zero : property.Handle, type == null ? IntPtr.Zero : type.Handle, format, (int) mode, out data, nelements); return data; } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gdk_property_get(IntPtr window, IntPtr property, IntPtr type, UIntPtr offset, UIntPtr length, bool pdelete, out IntPtr actual_property_type, out int actual_format, out int actual_length, out IntPtr data); + delegate bool d_gdk_property_get(IntPtr window, IntPtr property, IntPtr type, UIntPtr offset, UIntPtr length, bool pdelete, out IntPtr actual_property_type, out int actual_format, out int actual_length, out IntPtr data); + static d_gdk_property_get gdk_property_get = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_property_get")); public static bool Get(Gdk.Window window, Gdk.Atom property, Gdk.Atom type, ulong offset, ulong length, int pdelete, out Gdk.Atom actual_property_type, out int actual_format, out int actual_length, out byte[] data) { IntPtr actual_property_type_as_native; diff --git a/Source/Libs/GdkSharp/Rectangle.cs b/Source/Libs/GdkSharp/Rectangle.cs index debc1693a..a1f2919e6 100755 --- a/Source/Libs/GdkSharp/Rectangle.cs +++ b/Source/Libs/GdkSharp/Rectangle.cs @@ -219,8 +219,8 @@ namespace Gdk { return Offset (rect, dr.X, dr.Y); } - [DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_rectangle_get_type(); + delegate IntPtr d_gdk_rectangle_get_type(); + static d_gdk_rectangle_get_type gdk_rectangle_get_type = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_rectangle_get_type")); public static GLib.GType GType { get { @@ -230,8 +230,8 @@ namespace Gdk { } } - [DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_rectangle_union (ref Rectangle src1, ref Rectangle src2, out Rectangle dest); + delegate void d_gdk_rectangle_union(ref Rectangle src1, ref Rectangle src2, out Rectangle dest); + static d_gdk_rectangle_union gdk_rectangle_union = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_rectangle_union")); public Gdk.Rectangle Union (Gdk.Rectangle src) { @@ -240,8 +240,8 @@ namespace Gdk { return dest; } - [DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gdk_rectangle_intersect (ref Rectangle src1, ref Rectangle src2, out Rectangle dest); + delegate bool d_gdk_rectangle_intersect(ref Rectangle src1, ref Rectangle src2, out Rectangle dest); + static d_gdk_rectangle_intersect gdk_rectangle_intersect = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_rectangle_intersect")); public bool Intersect (Gdk.Rectangle src, out Gdk.Rectangle dest) { diff --git a/Source/Libs/GdkSharp/Screen.cs b/Source/Libs/GdkSharp/Screen.cs index 84412644b..5f23975ee 100755 --- a/Source/Libs/GdkSharp/Screen.cs +++ b/Source/Libs/GdkSharp/Screen.cs @@ -25,8 +25,8 @@ namespace Gdk { public partial class Screen { - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_screen_get_toplevel_windows (IntPtr raw); + delegate IntPtr d_gdk_screen_get_toplevel_windows(IntPtr raw); + static d_gdk_screen_get_toplevel_windows gdk_screen_get_toplevel_windows = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_get_toplevel_windows")); public Window[] ToplevelWindows { @@ -42,8 +42,8 @@ namespace Gdk { } } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_screen_list_visuals (IntPtr raw); + delegate IntPtr d_gdk_screen_list_visuals(IntPtr raw); + static d_gdk_screen_list_visuals gdk_screen_list_visuals = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_list_visuals")); public Visual[] ListVisuals () { @@ -57,11 +57,11 @@ namespace Gdk { return result; } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_screen_get_font_options(IntPtr raw); + delegate IntPtr d_gdk_screen_get_font_options(IntPtr raw); + static d_gdk_screen_get_font_options gdk_screen_get_font_options = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_get_font_options")); - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_screen_set_font_options(IntPtr raw, IntPtr options); + delegate void d_gdk_screen_set_font_options(IntPtr raw, IntPtr options); + static d_gdk_screen_set_font_options gdk_screen_set_font_options = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_screen_set_font_options")); [GLib.Property ("font-options")] public Cairo.FontOptions FontOptions { diff --git a/Source/Libs/GdkSharp/TextProperty.cs b/Source/Libs/GdkSharp/TextProperty.cs index ccfc8cbeb..bee4ac99a 100755 --- a/Source/Libs/GdkSharp/TextProperty.cs +++ b/Source/Libs/GdkSharp/TextProperty.cs @@ -26,8 +26,8 @@ namespace Gdk { public class TextProperty { - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int gdk_text_property_to_utf8_list_for_display(IntPtr display, IntPtr encoding, int format, byte[] text, int length, out IntPtr list); + delegate int d_gdk_text_property_to_utf8_list_for_display(IntPtr display, IntPtr encoding, int format, byte[] text, int length, out IntPtr list); + static d_gdk_text_property_to_utf8_list_for_display gdk_text_property_to_utf8_list_for_display = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_text_property_to_utf8_list_for_display")); public static string[] ToStringListForDisplay (Gdk.Display display, Gdk.Atom encoding, int format, byte[] text, int length) { diff --git a/Source/Libs/GdkSharp/Window.cs b/Source/Libs/GdkSharp/Window.cs index 5c5c772ad..a10a73412 100755 --- a/Source/Libs/GdkSharp/Window.cs +++ b/Source/Libs/GdkSharp/Window.cs @@ -32,11 +32,11 @@ namespace Gdk { public Window (Gdk.Window parent, Gdk.WindowAttr attributes, Gdk.WindowAttributesType attributes_mask) : this (parent, attributes, (int)attributes_mask) {} - [DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_window_get_background_pattern(IntPtr raw); + delegate IntPtr d_gdk_window_get_background_pattern(IntPtr raw); + static d_gdk_window_get_background_pattern gdk_window_get_background_pattern = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_get_background_pattern")); - [DllImport(Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_window_set_background_pattern(IntPtr raw, IntPtr pattern); + delegate void d_gdk_window_set_background_pattern(IntPtr raw, IntPtr pattern); + static d_gdk_window_set_background_pattern gdk_window_set_background_pattern = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_set_background_pattern")); public Cairo.Pattern BackgroundPattern { get { @@ -49,8 +49,8 @@ namespace Gdk { } } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gdk_window_get_children(IntPtr raw); + delegate IntPtr d_gdk_window_get_children(IntPtr raw); + static d_gdk_window_get_children gdk_window_get_children = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_get_children")); public Window[] Children { get { @@ -65,8 +65,8 @@ namespace Gdk { } } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_window_set_icon_list(IntPtr raw, IntPtr pixbufs); + delegate void d_gdk_window_set_icon_list(IntPtr raw, IntPtr pixbufs); + static d_gdk_window_set_icon_list gdk_window_set_icon_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_set_icon_list")); public Pixbuf[] IconList { set { @@ -77,11 +77,11 @@ namespace Gdk { } } - [DllImport ("libgobject-2.0-0", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_object_ref (IntPtr raw); + delegate IntPtr d_g_object_ref(IntPtr raw); + static d_g_object_ref g_object_ref = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_ref")); - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_window_destroy(IntPtr raw); + delegate void d_gdk_window_destroy(IntPtr raw); + static d_gdk_window_destroy gdk_window_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_destroy")); public void Destroy () { @@ -97,11 +97,11 @@ namespace Gdk { gdk_window_move_resize (Handle, rect.X, rect.Y, rect.Width, rect.Height); } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_window_get_user_data (IntPtr raw, out IntPtr data); + delegate void d_gdk_window_get_user_data(IntPtr raw, out IntPtr data); + static d_gdk_window_get_user_data gdk_window_get_user_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_get_user_data")); - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_window_set_user_data(IntPtr raw, IntPtr user_data); + delegate void d_gdk_window_set_user_data(IntPtr raw, IntPtr user_data); + static d_gdk_window_set_user_data gdk_window_set_user_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_set_user_data")); public IntPtr UserData { get { IntPtr data; @@ -113,11 +113,11 @@ namespace Gdk { } } - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_window_add_filter (IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data); + delegate void d_gdk_window_add_filter(IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data); + static d_gdk_window_add_filter gdk_window_add_filter = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_add_filter")); - [DllImport (Global.GdkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gdk_window_remove_filter (IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data); + delegate void d_gdk_window_remove_filter(IntPtr handle, GdkSharp.FilterFuncNative wrapper, IntPtr data); + static d_gdk_window_remove_filter gdk_window_remove_filter = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gdk), "gdk_window_remove_filter")); static IDictionary filter_all_hash; static IDictionary FilterAllHash { diff --git a/Source/Libs/GdkSharp/linux-arm/libgdk-3-0.dll.so b/Source/Libs/GdkSharp/linux-arm/libgdk-3-0.dll.so deleted file mode 100755 index 55a9360f63683ee1da21c1defe0dd6866aa14665..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5008 zcma)AU2I&%6`s4hCUzirar5IsS~gOUf{3q|pDKY?D30S)5jLqD_W||ca=m+PFWL2O z?_Rg|6B26GN+7{Qe;z2cRq=pmK>Lt~2&I)J(mbF%m{O^cioomjN{Q-+ZG}WsRV?2( zbB}jeIglftd*+)tb7tnu&pGQC$Hq@Pj-!N<>WCs*?NRCp$V?iagz9-hWmF1n`_(?S zS3bT=DdAqIkW(>ttf2yQ1G;3G1UcHisdG^8s1!P6z);cc34B`sEwqu>fXQs<825o6 z0F(BC_k!;x0PQwHe+TfrAKVY#qid8p0Qqh3x4`$rbzdhq=cJ`z=4dK77p|Kw66%W! z_d@Om?*enagW#R$8jXOG@#=5vGTuwV>N}|K?KLAZ=^J4 z#-3t-0QN8G7W1LL_=GhX@CC3v-Y3Aey_bQ7GAL}3t@%77jgYi|z6&o}ID_&nust4q zbtQK2fa+6|z(TZF5dfJ1H^H6pp@9Y4_NLG-#Qs0kfIG(d4XEpo;_ozS9?~u5lcDem z^My!xGZ4!2@N ziiPQ%w(j|1=r1X%qq-XTx$|ny5A#3wLk>`gyt#7uysDOGqOK~>o32*bBaA!`eTjnk zye@0=oOWy;cs752=yA7NcC*mU`;l+DDlZ_2`)g|`$95p-hF{=J@!q@=%S*Am982C| zwr|Dq*Qih6B3z`z1-yVgP2iH&D6tV2DRKEOQR4hxro_cvrNs7J!A<))OcSmn!B`Jz?6V3psr%6~vPn_X_I%tuY7CL0*{ zzVwNqo5>R^^@FTe=Nf}*d0(U5e!$7DG*tFVGkxMOdVX?-H?e-vMSq9=)9K}AS}iv> z+wFggKKG=BHB)~xwtYRj+>=~esjEzXy_XdS9MZ;fuKbgkjkV7szXFJgYh z4A(xn{x0S@70(G?-rc{xQct#4>Zf+7!-;6njyh4RJ3p$`kHXHI=>L0gO4aH;>012_ zl>Y?A&E~Rqq}%QL<`?Z3F$Ybr;XI9li9Z1I?dRLbH;``*V*<}H;|iZ-#tok5gE3~^ zMKDaLg9r%dqKaG~>mcuj4g8_d-jzZh&HCf8}ODRBJ;(~F(hB(aZkCna^%H2Y<+*?Wl%NyG*c z^AA!oj{3Y026H#eej3c(Hv4I?iG1R_q++x-`)1miF?3=BV=+nYX;SZ^uF{_*cGGrP zO8uw(Fj^$`^0W}k{1xVZw9_5u&FEi`*Dv~O+XtafO?BxL%6c7~J`Y%88BZd|<9RpK ztEMfSz=@+i-*rR1im_SN=U{zo=lM6ZNBzpe4sH$Y^G+G+Rqt9@?DPGX_V-ZWn?(}) zyl;l?QCCqA?BI6l@ne178e-{B+>Coti2o#4;fsEc?UU zuWC%wygr@31eWzP_xmldoImD%uXpLcW8n;J{0-P1?`d3V+uny=`kTP^d|FmJZ_DRh z`2QB>c>S<%k9PoA?gw+f?*I$Y-eC)8fR6%q#!suqfo*#aTKeq&kjCa6VeWSvSoVv# z-^Ggn=O{7{i2tT%3;;>7Zz2nT&fgbhlcpd^7I$jcat>;qAY#`hcFnda_uS=bfG$nHclNo;}6n^VDC@-Nro5?GD@|>m7d^D7U&)iu`HF zC^T|TN^^d7PPzG|d8il}g~|M?&J*TBpe$kgF|<$Fm?J?2|v=2=2gd=wRZVCpg7AXj1xq3!Y3KLw`VNig#e zGV?R`W3&gi_W%98OggR^K z@f{@ZH13a$Ugago?*G4_N{>nTJeb39eT-vd&PPbfFQ9_i58SKcFaIwiZPaC%{4+59 zL_OvOTes2UywIfe7$5n6oV6H3Xj|Nmm%*GL?J-WS;>Z6Hl!av6*H9sPe6MdnuX}#% z^E)u@>iI!$3wq4mg{05xsDKWSh$iaUxtMH?_)hc&X&igE7lP-8_R?UUDUK;Lh}7~Y Vbb3r;k9ohXSA{eGEJ~1~_a)JGL^S{a diff --git a/Source/Libs/GdkSharp/linux-arm/libgdk_pixbuf-2.0-0.dll.so b/Source/Libs/GdkSharp/linux-arm/libgdk_pixbuf-2.0-0.dll.so deleted file mode 100755 index 57c6a095d08346772e42c0affc9e15602eeaa993..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5016 zcma)AU1(g#6+TzHiX|tpHmd)cxa}GoaEW!bO;hZoC0Lf_Vj{&wRv$tiZm+ag(#E@5 zb@!^3=tCe-`j9~K&_760iIRtsCSf1^5Q1B7D`~Xtl|5`< z+`LCbxeqGjbiy5Lr~tK~ONL31XYAWL5A~j;(IE?lifQk`_cp+7w2`j?liAKO9soZC zChY<52H#5n+G&OP4&wVDcmRCAsS()+`C0I1!1pC}pC&lxl%rthXe&4uuA44W>Q4&0 zAoqfIfH~j&;O*!`8Udw})wgz7@1U?PXHn*{bH}5v zt|ks1lzy3X^l5L=!C9352JVcXk^U}wQ;t6Sf5%|%80R-Abx8Gh1~m_x7W>Ik1cik{ zEWs><1VKKkM015|994qZN?3}}I$K8lwzZ|OurN9~bv6zw@zSD{qEa=AC5)qGS`3PX z=^0}^2rHFvMW~MIY8=j-llicc|6W+(0EIZ1FPG0rwLBYlRRzIxwaOlqI0(>}C|byy zvN6wTC+30Y^5=rZ!t(Ue?9iir&aamJ96II0IJ7n-hzJrx#w^N-K?u0xMVu|(pC2Xi zVj?dkl6RTyw-Wg>>U(e@E>Pkkp2yzy;Ih6$i4D0xiA#8q68GQ|B`)w4N^H}IIO}`S z_c|r){D~45Yn>98dXo|t`6EgUe3KI6+<$Sce*4cuH`2B7jlCL0*{fz0ut8>!=K^#iPzvyJ_-x~I`@Kjh`s8j`!z%pCuXnV+8Jn^?cn>H{*^!27uK{no(->%2E6Hg@LL z>VHuD#OTH!o$~LKau4c1(DLJ>8|~b?jrP~xZKQK4tn2KJi`nNJJ*|Uv@0X(+lBqSk z8f-7F)r**4G0U}2uD^|WP9<}Kmv;`Vuhmnnwff0z>O^V{+L7b6y7!G*{Rr&5j{ZLd zr=?c!&D83zq5KQ5eQ~++|D`+a`{sYz&tVRReuncj1txwE%oxBol5Zj39>xZqW5yRg z&5R#B&j%9By7OR|kOK$|=pscf5ONpfy^wrs7&ES5Zy3vtff=J12Y5eTg%OsIKr%-0 zU1L1r%fy&L`gglsrtP~W#!01{uzM$_&d4M9gi$zM5bq$0y(5zoN2g9soR)if`n-N` zFumK`$jL*?8GRIft))jWum9u zFN^KltuZ2n7(rqlLP{mkpZCFH?uOk@i*3Z`ep+lJp!zN)jM{eJY&$cDPK;noCh0v* znO!th=99v1x(-Xr-`ihAi^gD{7Gj;hVE#us-ErQm{(7>0)xW-V5c*}ROP^5J>*4eT zz#7wd5;-2vyQMyvc5n|)9QFCGTj~?WXkDL&^|4+3#ar@22YbM@&pTzQPu_O0+UNVP z?Y~BWZx%`I^S)WSPcEaN*u(8K<0tyOHN@JVxS8~%Q2%Mp!W%{X+Lr$;*7L$!+wD*4 zt3P?0AHmcV)4wipyvNb5=f?v+0j&P_;QuqgdUGxB9%*WMQ#efEFY z;7$&B3|RMzIpCP1Px~^wRILmne;S^fnHdf%rJ;rLLNvt3bNHx_Olo+h5*Pfk918DB zbpfjAQH_^oXZ;yDlxGrF4(5vG>982&<8q}MgiFgZQ!XtQqd3a@$G&p((e0H?Vrnxy zBx-SGMQmQ0Un-SWq&)p>G!wJ?QFM1&oV+vX_J7yt`@>s*pY#DegZ1RFtROfwIWjR8 zj6HplN$AOEo*tPvJ<6$9%fWoOkS|6Oe0}`PiIMT(%&Ajn$EJd*krU%%n!I*WS(Cn+ z~bzc1Z$^ulZj4R?-q9W^TVX+vCPbZ0wUlsV8Dfx)yK7M56 zm&K3f?Y3LBOrNWH(b7dGX`M(cWiLnyKaiuW56h~FwgS#Z=O?>WojhH8p z`MXoE6`wltK`>ua)-!)1*TBpe$kgF|<$Fm?J?2|v=2=Qw{1Phq!PH~EL0(KSgt5n4 z{{)zNC&0`@$jr~!kI^2`8N-*xi5X|W&bkxzqFkMWqi ztdmc4Amogr$9Ist-MHVhdW+9PcK;s+Rc1`eZ-Y4u*T*xaO)0woEMsm9^)hbpK~q25XKhw;{`D1M|+HuSMX1O!ze51xG$qZ z_4r=5pw~S=_W22zcFp{tcME#V-IcV@E2w}DkBA}axw)8bjrvaYvNVpp+YP~ULwgx8 f&lJa0$|AM=7M-4u+GF1D>U|&1{FN#}s@{JAbUaGA diff --git a/Source/Libs/GdkSharp/linux-x64/libgdk-3-0.dll.so b/Source/Libs/GdkSharp/linux-x64/libgdk-3-0.dll.so deleted file mode 100755 index e3476e74df48fb49c33dec84141ca5b1df3a5e43..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7240 zcmeHMU1%It6h50x+Vm$sjkZmHpi?c_K6ETCZCW9^n>5K3lD5VKS};r}yPITjf9mc; zn&MBO3avF@`ylnf7av6MrQl0T3#POb6$M2^@j(Joh*~g3l&X;RoICg1%uF^?d=P}a zVeYx-JLlY=bMNe&d-6(GZ+A^3LMTysl7ySA^^lkroL#3IOk%X3mT|qF)+yb(1<|5b zMhiiS45cGuEaNBEs92_kYJkq@Da~pMyBgLKyQA9fsI~)rQ|p7)t6qs@Ir0Dx(`{N0 zRCJ|0eaB78cn?~dwPHWpNgqqCZ(7e26w4Hwhxv)}({p%`E^gf(Z~L_Qa{niv{T00) zkGEUHyIG{<;##qj`JJ6MB2*h&A=q+$R`Ao&_4VCrKU{qA+vksMzB+ZU@#n98(OzR= zsBC852w}oX|AsU|Wk2&q2otuSpGPX-6O1*}8Zw%VfbgfbF zhfbJsUoZwmq87=j@{E6kOXTJDp3rWREZ*`_Mq2olF%{qv@iXDh%{>X7ahz zfHRy)d9un9J8{a94xCK-bc!z4 zrrO_T*`PI5cR_Rx+_%o%aW}9@hc;;#D$R_TO)D=CsdT$;hMSS0o7~kwqF*%?^`Rd}Sb<2bJ+RvHva5}%2dW;ZdZ6lost2kb zsCwXk>jA`_h%*sGI(kLmC6<-4+9T!oy+QMc+c#()@$DwfBW~TOdBnMLZ;=A|Z}TNJ z)D=B2t^+eVh{auQPRmz%=JbxHt2AxZRPItzuIOMFYgP{=+BqD@h@q84g}SF z;D--W(ng_k*6!&L@oRd=uSawDFx~S6HtSALW|_?$>^Kl_-rRkDz{q`=!!fMPoQ6eI&TkNJiwPEae`_lEr%~h6{>vX@TQ!c~2WC}i<2u4OcHHmresn8*v466R%eeTxQJrul zd4)&?KQA@^OG>};epOoUdrE(?KR;CX;{Cd=^|3ByRr#3fNQM3So^eBI1gk%pt&}g3 zR9&S!$8yFi^|OxgX0{0DS2k%pJkQ6L=qJv2rM%7%+PK+e;_Gl(Q>}2eun=ce?XZ#c;^4XJ_l$%PL`wq12sjQ@uH?~tKI1`*vaSIbP zQgE^}o$NReMuEPf<8)PSod3(&sB_-u^@c7|)-=R)MITZwr zp57xJ@m~8#clR@01NK0?qqmFg{wZ^$6F**xDU^MZ3{W5?Bpp3Knkg3Z=Z(B17MaC~ ztm_OjbqgLHLo1heQ|4%H+#DWHXOcV9NmAUHQye2RIgw*akGcg<@9z&>IB09s_Br#bs1Zkl%h%D}a7i z*7O?4s{%e9vPV1$D*1GO36DR?LKz?HM?3%;*2ntM=j+^%Zz%kOxB>q^2Z_DI+#Dci^dZ6GFN}O#f)IP{2;eszb1sk z-cNCM{Hpu)_=a};S{6Ra57q;}$oa(F{r1Q7i=V(iS{PzU=2yx7nheP0bB~nku>If7 C#Px&# diff --git a/Source/Libs/GdkSharp/linux-x64/libgdk_pixbuf-2.0-0.dll.so b/Source/Libs/GdkSharp/linux-x64/libgdk_pixbuf-2.0-0.dll.so deleted file mode 100755 index a9ee0d021a490f3d6f7fa851a920b21b35a6a06a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7240 zcmeHMU1%It6h50x()1@y8f}~YKu0auK6DI~wy6-^Buz4fq^)TJEf|K$?j~8>pSn9M zNf9horL_cqKvAEHhzh<4zE~=l(o%dWR-`IENJI)z3#N!teaL#wo%kc>DDZW7WJ}P z2ufrq9T}sRuf$r#GBs2ObXq^sjHa-wVlA;dqV0}oJJ46OK4_itN+i>f3wW4r*Lt9$ zEA8={Zc4_x+t#QR``J!>EH%F={hXkfrr6xeSDde&Lxc4GyVnP^FFV!U*S^?(H1WgN zqc;jH@#GR(v6JUJGiAi6I4aJ<^F|00wx6&2Bk<=KYov8#G#UZv>k4n89U=Uz#>4s&-zKV~F)Wbw zCfl=#R?!pT&1l=BxkBD9xlYlwZL%}@j7#ghe$(P{5Ccbj|k9Ehqo-uUxC;l{a(eO2C^;iavjx3vx47wq#Rdj6JvFMu~{ zyjjN?IQZ!XLwS_FBx{Z~MoNt+4dG=gVtott0LQf$2xn{-NdRLTD5+tGCg88YpN=sNTijVUN0_SVL zJkIA9tV0A<`>50R2Vupi#*QfY^+~UziH9=+ta_t zucrF4U#sahpJIYd-ruT-_^j3Vl>gAj*nJwu?*p@{?c;llPwY6~BeDQjHs`W81W>x!~@3DyW`krw^X#{V7 zF&kAcky2e$onr;#QGPZs-pCf=`pOoKhoAGoCH%BA9#z*FVmzuIL&>6Ba?2wlW|9_4 zEVi4olTu_UaXlneut&3nVJB;++(NNrJLPdo7IG)DX*ZoR_wL{KaI}&t-q=pD=uB`S z#VtZ>xRom|FZ}01}yABI)DWplWk$)vi6;)A>a|33)pg9m+sZ5w>{ z$S*8$$_;uRx4;8`hXoRQjE_77|7XE_gn7UYar}^NW&W^7zA`Nj#m!Lng&XWaKVp&J zo{-n*0kBWt0d}AlLiWginzcRj!uH@lJ`uYk_Qz?cll6A65N|j#QlkQvK;X(?< zqV%OpMM_tDIEChE;G&$q0MvlqfSx!8nMgfcDZB-$u^c>6>-Jo8ZHRvZ_Q&wD7kdBr z<7gwYKi5VY0%D2MxU)^Z8l8M<>*wE{99?{BVB7aUG`zay`fBR99@>)@+VTrL_X3N_0E%U~ zyagIEC{Yf{VNwGR0A;RyiopexNTECgTFu1*N~B1{vN{t^(n`DGlxtaH#gZ{stPT*d zcCRH0la|ax;rP?&&^MCBJ`H51vf1n#=iG(k z52G>XPf8#$x(|6$$_#8aSNe>?3bL&O- z(SakA-Wbc<`mbdsLVL1fnbG1)BSVAkTKRQk@DzQHe~3rlg#+l{=6A6EV*j<4^HT-= zBbkW>=WnbIT={y+4GkQdrpwFj5-ex;p6q2f9N0g7X{7)5;MphW4@0$#KMSM2k(Ka? z&WF#aSaz=)$lUVgQ<9k|$`0dvNcLSe!O3_f=ocAU29(30!B5xb{O!L^e*>X%Mo7i+ z_dE1|`VoKNXq<<91o9EcM<5@8d<60l$VVU_fqVr1ClRQ?Xa7~?3(V2NKvL!*{7Pny z^#CYyt5u-PbMft~@=9h8%ti36t>oYCWSvrUX6`rv${e)`bP4GD!25yx%EnM4hR8CI zbMRjR%6xD+khurGu$|**$CtN*?t)apISTm?P}LW0{{@(TYhdowSXZ~rScj~5y|KmI zh%D|Nz}%eRRSOUUPD;s`6o6|au%1BR+6h4w6%o$elNlKiu8k1%sst(qp3IDUHm?n; zXdqO%MF&+jE>bZgGqTv58JQ7=jJ+ZR)eefZ&dA(JZx2a>;-&H2Lr+Gb0-)m*%w?j? zF9|`lV_*zQl(}P8V`c9LUN%|4GZLEmS=2tZvF*0A)L{WPks#Y zRiC^CGV1{J6M+8)P(A;EER_Ugo@WC6v97=~O9;UG-Q&N9b{(I9I_b((JvhIU;Hoh` zUDDrK(5*iImm%{k5dv8MkDxk!0mN?{vaVZDug;QzMnC}ZTjHCLfwr}fwLR+~8zAfb zWL;yE&wdT;cll)Ye*v<;ZW4h!>n|kg4+T4d0qlp~Uq_Kh%1yi79UW#wW=kZNo3J7* zlB7}CupO&2?zD&FmhC#Jv=#2|k%*Hx7>~M9+uU4LRWZMjD!y3ZR4Uwyiin%)m5x+6 z5w+~@M4}g6e3Gix%rUjBhP^e-^;Z4P?X2clJyn~{&Zui0j96}0ck+PQ-ZNjT%~m_@ zSY6?y&GOFn=XTaK@2Ep7%0Aj#W7DqMnkH*kLqkh_tJPXl+fS}+b=k6*LD?xKgLmXuOa+4}piJ9(AxZ!qCH|5bT%_SW-YIY{O&GznC+};qgMM+)Z zbeEWRZxTH{>ZUx+OVLz1<|O9`7Idj-oc3a>A2i%@XdVa7uIOigTF_h26E8w0QV&-OZ-5$X08cc!T~|C8;$MLMF}&=C-aq~b z+KBAWwULH^SfaFV-z#IkAN_3ZsSm#@e0S_dd~W@M#Hr28sN;HQPg>*3`=oP#bAipR z-;SRCVd&81XP&74bm02kSHJoBZZuDUdY@#0-|drEfTwQ*7MM*&0Hu5cSW5;_D~shd z(2zxma!C3}ElOJE+SQ^!>ZC^Q0o}>P0_tSGh~sppGHEC0g|nXHh?7VsJaOV6;%w{c zblg}r)}6?Cv20goOEQy=b%i6znAT0NaiWDV9fXsK=VOvgM7rGr&cQ?>l8>)hYd6}t zjNQoQD7g*d#N4nK#yldqoSp`n(yp|3Y-?_D*4mHQ>(p#{LKq+Or}+Zf)EYr^%M;j! z8S(}V0X%Cpp!F3x-_r6m$g>gX8>DbMMvBcHCq-=b6h~`D+R^cF=@#~@zc^Mdmydn! z%^Kkj70=h~D}hcz`6L5cKEbgFAJh^Y)HjskgOh(FKSFc(+?(({@G>VqaD=~) z4to#uAGxN-TD-UKN^vx_t9-F|zV9|n#nG8(uPzT<{(8&{^$(5Hbp5`=3)B7PZ|M2d6-VcnPvX2t`BgT-$;f)pFN(AbD2IasAFZtT+y4{&^@kc5 zDHYFKx9R`g`=<*aJ5`|?focS*5vWF>8i8sAsu8G0pc;YySp=H!nSTv=0&}!5kd*lc zzlxb-EdXI|wG5QG2flSxUU?rVa}a!6EBV*k<;+raX6`r&${e)=bROtCz`KC_s)kDu zOJotqF!Gc-Q09Y+fy_1VMV)yM?fBBppt~S-$P7XL4OI0-+kXM(-v*d7wYRivwpJl4 zUTtl(k--_=os_vbL01b915QfGm=u6(B(R=9;Mxg66%`TAUCWG&2-ijk>MDVXftHzZ z11gIQs%VHbPRPv0MVcmLMpoA^NP{ZElX-AZ@1VHYJFVwV>OIu5PUE?UT1KG)VB!?4 zWT4C|2|=}EU@S_MxpO!tmLib3gOhoBP*onZj=w=!qRy6SnJL%HJY!E+)-wb1=Zuc~ zknZ4-$OR>3m|^1#hAJU_3A8HXaochzj?k1S!i1c+1RrV zvIerhuCdN%zXJ9|_5*d|5}4Xx7Vl`FPxp%4CVe z@lsBdMUouq8E(euPG%zEq~m&-Y|aVi3lhzw4klw>%(XXc+SE9`kt)78;cPbCi$aK( z?Ui^ooQgSaK9%Z47oVi6HB(F-r)~F^&Q_;&`&L$SoWiCJc6ZEk4n`fXC!aoGM+(!m zx@>iG8K)i?Fud|&wf(2n;t@i=(uz$(hOsR_uwwBtQa-xZShOy&&F&}njOsFRKbKp5X$K}0U zdxsr;5WWPGZ=?XA-6GAZU+N4p#s(T-N9Xr~ut>@|u!(1nV;X3{Q~rt>42_267=F8x L*xZYzlh5u?r&UUW diff --git a/Source/Libs/GioSharp/AppInfoAdapter.cs b/Source/Libs/GioSharp/AppInfoAdapter.cs index e36b6d01c..a93e8b177 100755 --- a/Source/Libs/GioSharp/AppInfoAdapter.cs +++ b/Source/Libs/GioSharp/AppInfoAdapter.cs @@ -23,8 +23,8 @@ namespace GLib { using System.Runtime.InteropServices; public partial class AppInfoAdapter { - [DllImport (GioGlobal.GioNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_app_info_get_all(); + delegate IntPtr d_g_app_info_get_all(); + static d_g_app_info_get_all g_app_info_get_all = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_app_info_get_all")); public static GLib.IAppInfo[] GetAll () { IntPtr raw_ret = g_app_info_get_all(); diff --git a/Source/Libs/GioSharp/Application.cs b/Source/Libs/GioSharp/Application.cs index b84122747..ed10122e6 100755 --- a/Source/Libs/GioSharp/Application.cs +++ b/Source/Libs/GioSharp/Application.cs @@ -31,8 +31,8 @@ namespace GLib { } - [DllImport (GioGlobal.GioNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int g_application_run (IntPtr raw, int argc, IntPtr argv); + delegate int d_g_application_run(IntPtr raw, int argc, IntPtr argv); + static d_g_application_run g_application_run = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_application_run")); public int Run () { diff --git a/Source/Libs/GioSharp/FileAdapter.cs b/Source/Libs/GioSharp/FileAdapter.cs index d1b4cdc10..2ab517456 100755 --- a/Source/Libs/GioSharp/FileAdapter.cs +++ b/Source/Libs/GioSharp/FileAdapter.cs @@ -37,8 +37,8 @@ namespace GLib { return Delete (null); } - [DllImport (GioGlobal.GioNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_file_get_uri(IntPtr raw); + delegate IntPtr d_g_file_get_uri(IntPtr raw); + static d_g_file_get_uri g_file_get_uri = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_get_uri")); public System.Uri Uri { get { diff --git a/Source/Libs/GioSharp/FileFactory.cs b/Source/Libs/GioSharp/FileFactory.cs index c3d8c9b28..02b5b563a 100755 --- a/Source/Libs/GioSharp/FileFactory.cs +++ b/Source/Libs/GioSharp/FileFactory.cs @@ -27,8 +27,8 @@ namespace GLib { public class FileFactory { - [DllImport (GioGlobal.GioNativeDll, CallingConvention = CallingConvention.Cdecl)] - private static extern IntPtr g_file_new_for_uri (string uri); + delegate IntPtr d_g_file_new_for_uri(string uri); + static d_g_file_new_for_uri g_file_new_for_uri = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_new_for_uri")); public static IFile NewForUri (string uri) { @@ -40,16 +40,16 @@ namespace GLib return GLib.FileAdapter.GetObject (g_file_new_for_uri (uri.ToString ()), false) as IFile; } - [DllImport (GioGlobal.GioNativeDll, CallingConvention = CallingConvention.Cdecl)] - private static extern IntPtr g_file_new_for_path (string path); + delegate IntPtr d_g_file_new_for_path(string path); + static d_g_file_new_for_path g_file_new_for_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_new_for_path")); public static IFile NewForPath (string path) { return GLib.FileAdapter.GetObject (g_file_new_for_path (path), false) as IFile; } - [DllImport (GioGlobal.GioNativeDll, CallingConvention = CallingConvention.Cdecl)] - private static extern IntPtr g_file_new_for_commandline_arg (string arg); + delegate IntPtr d_g_file_new_for_commandline_arg(string arg); + static d_g_file_new_for_commandline_arg g_file_new_for_commandline_arg = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gio), "g_file_new_for_commandline_arg")); public static IFile NewFromCommandlineArg (string arg) { diff --git a/Source/Libs/GioSharp/GioGlobal.cs b/Source/Libs/GioSharp/GioGlobal.cs deleted file mode 100755 index c01489ce0..000000000 --- a/Source/Libs/GioSharp/GioGlobal.cs +++ /dev/null @@ -1,29 +0,0 @@ -// -// Global.cs -// -// Author(s): -// Antonius Riha -// -// Copyright (c) 2014 Antonius Riha -// -// 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 GLib -{ - public partial class GioGlobal - { - internal const string GioNativeDll = "libgio-2.0-0.dll"; - } -} diff --git a/Source/Libs/GioSharp/GioSharp.csproj b/Source/Libs/GioSharp/GioSharp.csproj index 6d026a3bc..0c85f7736 100755 --- a/Source/Libs/GioSharp/GioSharp.csproj +++ b/Source/Libs/GioSharp/GioSharp.csproj @@ -20,11 +20,6 @@ - - - - - PreserveNewest - + diff --git a/Source/Libs/GioSharp/GioSharp.dll.config b/Source/Libs/GioSharp/GioSharp.dll.config deleted file mode 100644 index fa7f933f5..000000000 --- a/Source/Libs/GioSharp/GioSharp.dll.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Source/Libs/GioSharp/linux-arm/libgio-2.0-0.dll.so b/Source/Libs/GioSharp/linux-arm/libgio-2.0-0.dll.so deleted file mode 100755 index 8230f7ce568ea9dc7a1d6dd03764fddd1ee02070..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5008 zcma)AU2I&%6`s4hCUz)zar5Is+HRyE1rc9wDOCckP#njpB5YDQ?gQfCa=m+PFWL2V z?_Rg|6B26GN+7{Qe;z2cRq=q@fc7B|QI%GfNb`X5U`iz-K*HzieQGb; z7e2T{DdAqIkTVH)tf2yQ9lB(g1UcHisdG^8s0=#fz);ccDSTT1Ewqu>fyr#=825nh z1C#cG_kiyt0PQwHe+Tfr7u*lNOV=p1AMzXEuYiC#%1{%XlvhtFNQJx7Xk-to#A^X3|dlBs(U=IeZ_?eIsQt zGxikw1F(Nlx0nz0#V4%EfzN~O@iu^Md(Q(4xu>2DZne zuP!GJ9#DO15?F}#76d@%z#oA-<7ZV03%2b|p}V&%<1D9r9CH9cwFoX?}Ea>TK*s@#2E21eIzKD?bjF zXwfT|rVHA-=SPvhtf-FaYU~%zsX0F?{>+a!Kq>a-!tk7`hBI+jmFG=YtLzcQo`=3f z!F*AdwRuiEF%LXj3WpwY^KLbC^UyB(v2QvnFCa)PXnQCpmLQb+InEUC%?pXVn8-_s z-r4N45WMTv3lT3fAu`r*)xOl^Gg@cQGMt?-rW-)axnGaEzA%*IOd z?u{2WdRu>MUgbf#^5SOptrs@0etfAZ<;zz2l2yK7mCsw{SFQ5zQO@UAnkx5BQ>n=Y z#=R$deCS5{_-g$C>($xDpjz46Xt(ck@~aJ%zue3o|Er##oZ&63Uv$ymVgGD)rI}SL z&8>F(U!u>W*}|Hszm?d&mS5>fudmisuD{-|1{!!5cfZ{_*kGOWr-{wo`PKTnf*&2- zeBUbnBPpj)|BjR&8QpB>-)yvh@Ma^EPh(wYZ>;5>YouBS>&|PVn<`stI5pT_Sgn^a zzjBUipWJu@^PEcN1TXLI-&n1uTdVbxJJjJsG-yX1uhpF&)#^uJ=T-Fo9XO+E^`304 z{tC)}1mk9N**ns$_I>N~_OqCSrk8M@#=*pIf%*3HZR8usH-|BS=a_MYPcn{^KF
49wWX_n-IU*D%8JAxOq1zGsX>Tp42p z>9ck_r0v@!#z&zo*u51~XXHVA{J@_sDd!-HJtLD7N2g9soK|+DYt zI`?*rvSUJAKPj!fXx48qS8M!Yu!)#lr@^Mc^&3ntc4CvnKF*z#)=|^!m%(Q5B{rlH z8%WGQNa-Z%^FA1Srbwj<1v02vVV0~;CfAN<5(!vff?ek6<>Q!%8SnTutm-fG)z&DE| z_GN!~8?T^Vumh~ePxN_fh^0SqlZFx!|4FXG8%6!sw*6<@Fl zsxeLT`gHyRSk}+n?>E45{+Ro{+@=4zg>$g+cVK(G$8e=>dvAB?Zvor$X<6;OE&uJp z|Fba1>xX@Ny#2s(KbZS{6Ih7$4p}${d<3{NepY=K*tYj=OP~Gk*Vw!x%>9l5%YHHU z8?*FjUkxu-qhaJt!?T6Lupd>1=EM15h>z#+Q5T8Sa3P9IZm16Vx1~A{RrILFi!(EB zK^-bG2MfK~ayadmyP5AS5L`BEO+taqPV2oV9sp2QA>UT zXf-Lrm|rOslsg;3fKLBixJqd&ejG=o>BTsx@*dnKF>m5?&uhdyfz02Va;^BZkq?6T znzEkx6S)Rv#z3YH?kOQ;Y%zSq~G*F8V> z`7M}s_57fB6MD?ug{05RsDKWSh$iaUxtMH?_)hc&X&igE2ZHB@_Of7}DUK;Lh}7~a VIz1t=$GqRxtHPOo79~j0`vTLjM5_P* diff --git a/Source/Libs/GioSharp/linux-x64/libgio-2.0-0.dll.so b/Source/Libs/GioSharp/linux-x64/libgio-2.0-0.dll.so deleted file mode 100755 index 15aac75fbb80da8f1970bd98f2a5bbf55dbd9aaa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7240 zcmeHMU1%It6h50x+Vm$)8f}~YKu24!edrik`zJ*6(bOD%+ZQ)q++^ zE5V5jWg}xO;a}@2B{DZu1AJOfX-0GSRk4-$9npSAv>*5z+8(@C^-3hmkst6d->U7v z#a8I)n{HgjyI*S1hJEZOeJr-VNj*<+EK__QI~`j*B!?*7L%6`qWdI_!g$^6bu8WE~)T_)I4{w?EQd*^qzF8}=2i$9z^y6Muy?Nz_s_+3Yh zl_A>1vJt{Wl>QBAglHejMhFwJkADxB!CzpkfmV~zU<9P58F$88>yC# zV}o>Way%PpIX$b-n}&&OdnBFB*m>8+kJI zWiyF>XDF5MbmcX6?35!NIH~061f`NgBgyQJoo2I{&zj95$E3A~>_psg9iG5YKJSgs zP$o{@JqO!6?49OLb9ZT$RK=0TKS8B^k~z*(VMCI)w2I!=E_hFHzK`g2Tl#$f-k|X& z9be#(r|S*XqnshxYtW1jmv;^{>%--Yg6{cn|JGP%Z`E2CYF=7lkoD@MTUESnoxNH+ z1vj!LTHa&bfHhI`rr7MiXPv+4u4k8a?NT>boE|poH@~8M2B+#bx6-`K{>Q{{Vt1eF zX8RobTUX|y*7;fM%FL5ik38I@|L7a&8UCeCn(V zEx)oc1JDQ96;4i~$K%~|lSZ!(9l}053l?YTKP>Db# z0+k3y&}kx%L=XZSSf$6(=zh*^;$-LyHU%?TQ_JKd9K`BgrNUp zu9y}1q8=F6foYw@;x0F<^~=SW>3xsU3eB4|m%EhEMV;(ooR2+N-Ls?#`?;bw{=3?q z6G1f}#9>y;<68fxmbIvR{qGp=&EXMoKj`l0c-+{=H_`3JUcRw3hwaMAQNBswe(l#s z`Tl}^3F1-0egyGq!oCIZ8bbVn_!2_ggZR?Y{sr-c_ejx4c~?>Y2-=sqUn=_*G>U`f zbBOY3$2s=F+Ok+NSH&(9RTaKFCL_E;B-ioWJ&q|AQ(#JHg>f{(vg zELSg)QeC+^$5O`2^|O}o2KEToS2k)qJkLiK>8FkHa&?_S#>>@XD3){cZee)XjM03F z#dgznOo}XdE{nvo_DCu_+>j)EKF%oLu#hZ4oL4*nPQK;X!iFh1gk^=H^$)`a}*xZWV}br?uLD(KL z_&e-d@AF4~VM(V<76G z|J5NJ{(g?L<2T)>$2WA~*RXO6|F9m!Mb0PY?)N{cU;G#b(#nuXGQV>Emt{bvZ#-6d HhW-BrJ~#K# diff --git a/Source/Libs/GioSharp/linux-x86/libgio-2.0-0.dll.so b/Source/Libs/GioSharp/linux-x86/libgio-2.0-0.dll.so deleted file mode 100755 index 25659bc951aa403e07f746979a8a1cb987812db8..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6508 zcmeHLU2IfU5T5M|2iK0@tvh>+IP@xc=G6tBL~XA9KN&S);GVbK=V8(_eci#{T_J(c>300fT`93DCIYS#bf}*vRY1n zmKu~Om&yRCLCKZ5_GtzeP$Gr$7-)ct1(ZmUh-G!f?Sz$bf=S1+#EK@Oj#!-_V(o5g zw!)EQq$`?oBFVPqx|p4av;{k25m&dk#tQWY=^z-3z7dgFw4*C(Z`o>Ankn0?q#Po* zU93nr=mar=j#SDWA5Dp{G&b$7t+Te8&zalYdAig0AvSZrBT#W|gw*;d!e1aCxS~2^ zh2YC^j!26Pm)?fF3<17J3a8Vg*wh(P#H2MnRhW4J9s0+!*r%cNbT*rP=c2PT^EevQ zmkVDR2NlVVGJx4L^i9Z~p<(BUE1_d~#dzn)+%NMJH2q_r!RPS1ob>PjpF6KOPYw;- zcE?!VJ~)}4D&3czNMA0#IzBS&Y?Qm>!(Y&6=3_ki#}1)?yVt?yD}$4*m!=B_$J0|w zF5O!1yK!yWDIGdFLzmZ`iFRO;S0~uABJkpyac2E@wM=Y&TpMp zvFzD2l)mTArzAa9lpV$Skn9I+f|E=Y=vQf4`jo?w;mYFc-nMwvvB+khROunYrT>D09>%(B+_~fR6zAm5rf943SkJ7vaAI zl=Vt%12yV_n_z#wKLNn~fbN5;?6~ zNST`x+-d=0z)2|?lLBy!1lAJ>Tsy(9q9Ve%yD}pq!nG0nZk0gAz?GSC&*im#6%B+c zw`jl0#ziV;WkwczGb=N~kg-<;zuG~Owpp1w>Fyz^U)(gFd+5q2Q~-3G{JBh&`6a=x zb_|R`i86Q2%|l83Y6s`?bib-RP~(DM)<`Zis$q%T$?}Zt&CS06CxkN^@yJg>zUh&7 zKxQ3)ethuX0IKKjla&&O%=1j3zdlf&S%MGV7moiS+I4(<>ZB`E_2B$I0T;mdbV+{~ zKzDllUx&=IMDSt#KY;4^`4GPhWX_jBy*f*V5+Rq!a?ga=yb-dtXB}hzB zw$&B0JAyGQ?AXba73}GikR3l9i#U<6xxKo&a&aS7e6fPbWUvqQ5GUCuoylN4VugF+ z@ji6%NUB;h&(yLS_SZDmTlFowSk19|tGAn75yv_lvYhUo#38ezcd^zmTf-^a>JBEt zEbr`kxuvFgcO6<$_R-!NoA%V!G+BEZ8d~eythSokrh1I=PgSB^iN`G`%_|HA0^T~$ z!YUN&K=TSi9AxowlPXw=nd*x>!46O->C$e^C2S{Rb|reuj-F^Nyd@eIC3Oc=-C~CO z66ontC+TWlizHJ~J26kNpi4$#v=>tiX&#O_W|!@V=|p<*RBJRN-R}OlM()T4f(3%e}-5A)R6lNiiw8%xEE;0_cE~x zeD0N@{r@(8VE#XBV?#5WWVI zucQE=-71$=PwF%>#u_SMN9SunSTyAv*u=BPF*Q`+W9)rB7#cOpF}!x8*xU)-$z%5? DO43W- diff --git a/Source/Libs/GtkSharp.sln b/Source/Libs/GtkSharp.sln index a287dddc7..667b753ba 100755 --- a/Source/Libs/GtkSharp.sln +++ b/Source/Libs/GtkSharp.sln @@ -100,5 +100,17 @@ Global {1EB02885-8190-4A5D-B9EE-CD14E6EA149B}.Release|x64.Build.0 = Release|x64 {1EB02885-8190-4A5D-B9EE-CD14E6EA149B}.Release|x86.ActiveCfg = Release|x86 {1EB02885-8190-4A5D-B9EE-CD14E6EA149B}.Release|x86.Build.0 = Release|x86 + {F8E204DC-9221-4D55-91CC-962DBEF09C6D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F8E204DC-9221-4D55-91CC-962DBEF09C6D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F8E204DC-9221-4D55-91CC-962DBEF09C6D}.Debug|x64.ActiveCfg = Debug|x64 + {F8E204DC-9221-4D55-91CC-962DBEF09C6D}.Debug|x64.Build.0 = Debug|x64 + {F8E204DC-9221-4D55-91CC-962DBEF09C6D}.Debug|x86.ActiveCfg = Debug|x86 + {F8E204DC-9221-4D55-91CC-962DBEF09C6D}.Debug|x86.Build.0 = Debug|x86 + {F8E204DC-9221-4D55-91CC-962DBEF09C6D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F8E204DC-9221-4D55-91CC-962DBEF09C6D}.Release|Any CPU.Build.0 = Release|Any CPU + {F8E204DC-9221-4D55-91CC-962DBEF09C6D}.Release|x64.ActiveCfg = Release|x64 + {F8E204DC-9221-4D55-91CC-962DBEF09C6D}.Release|x64.Build.0 = Release|x64 + {F8E204DC-9221-4D55-91CC-962DBEF09C6D}.Release|x86.ActiveCfg = Release|x86 + {F8E204DC-9221-4D55-91CC-962DBEF09C6D}.Release|x86.Build.0 = Release|x86 EndGlobalSection EndGlobal diff --git a/Source/Libs/GtkSharp/Accel.cs b/Source/Libs/GtkSharp/Accel.cs index a01ce2827..3af5aba6d 100755 --- a/Source/Libs/GtkSharp/Accel.cs +++ b/Source/Libs/GtkSharp/Accel.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class Accel { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_accel_map_save(IntPtr file_name); + delegate void d_gtk_accel_map_save(IntPtr file_name); + static d_gtk_accel_map_save gtk_accel_map_save = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_save")); [Obsolete("Moved to AccelMap class. Use AccelMap.Save instead")] public static void MapSave(string file_name) { @@ -35,8 +35,8 @@ namespace Gtk { GLib.Marshaller.Free (native); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_accel_map_add_filter(IntPtr filter_pattern); + delegate void d_gtk_accel_map_add_filter(IntPtr filter_pattern); + static d_gtk_accel_map_add_filter gtk_accel_map_add_filter = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_add_filter")); [Obsolete("Moved to AccelMap class. Use AccelMap.AddFilter instead")] public static void MapAddFilter(string filter_pattern) { @@ -45,8 +45,8 @@ namespace Gtk { GLib.Marshaller.Free (native); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_accel_map_foreach_unfiltered(IntPtr data, GtkSharp.AccelMapForeachNative foreach_func); + delegate void d_gtk_accel_map_foreach_unfiltered(IntPtr data, GtkSharp.AccelMapForeachNative foreach_func); + static d_gtk_accel_map_foreach_unfiltered gtk_accel_map_foreach_unfiltered = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_foreach_unfiltered")); [Obsolete("Moved to AccelMap class. Use AccelMap.ForeachUnfiltered instead")] public static void MapForeachUnfiltered(IntPtr data, Gtk.AccelMapForeach foreach_func) { @@ -54,16 +54,16 @@ namespace Gtk { gtk_accel_map_foreach_unfiltered(data, foreach_func_wrapper.NativeDelegate); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_accel_map_save_fd(int fd); + delegate void d_gtk_accel_map_save_fd(int fd); + static d_gtk_accel_map_save_fd gtk_accel_map_save_fd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_save_fd")); [Obsolete("Moved to AccelMap class. Use AccelMap.SaveFd instead")] public static void MapSaveFd(int fd) { gtk_accel_map_save_fd(fd); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_accel_map_add_entry(IntPtr accel_path, uint accel_key, int accel_mods); + delegate void d_gtk_accel_map_add_entry(IntPtr accel_path, uint accel_key, int accel_mods); + static d_gtk_accel_map_add_entry gtk_accel_map_add_entry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_add_entry")); [Obsolete("Moved to AccelMap class. Use AccelMap.AddEntry instead")] public static void MapAddEntry(string accel_path, uint accel_key, Gdk.ModifierType accel_mods) { @@ -72,16 +72,16 @@ namespace Gtk { GLib.Marshaller.Free (native); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_accel_map_load_fd(int fd); + delegate void d_gtk_accel_map_load_fd(int fd); + static d_gtk_accel_map_load_fd gtk_accel_map_load_fd = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_load_fd")); [Obsolete("Moved to AccelMap class. Use AccelMap.LoadFd instead")] public static void MapLoadFd(int fd) { gtk_accel_map_load_fd(fd); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_accel_map_lookup_entry(IntPtr accel_path, ref Gtk.AccelKey key); + delegate bool d_gtk_accel_map_lookup_entry(IntPtr accel_path, ref Gtk.AccelKey key); + static d_gtk_accel_map_lookup_entry gtk_accel_map_lookup_entry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_lookup_entry")); [Obsolete("Moved to AccelMap class. Use AccelMap.LookupEntry instead")] public static bool MapLookupEntry(string accel_path, Gtk.AccelKey key) { @@ -91,8 +91,8 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_accel_map_change_entry(IntPtr accel_path, uint accel_key, int accel_mods, bool replace); + delegate bool d_gtk_accel_map_change_entry(IntPtr accel_path, uint accel_key, int accel_mods, bool replace); + static d_gtk_accel_map_change_entry gtk_accel_map_change_entry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_change_entry")); [Obsolete("Moved to AccelMap class. Use AccelMap.ChangeEntry instead")] public static bool MapChangeEntry (string accel_path, uint accel_key, Gdk.ModifierType accel_mods, bool replace) { @@ -102,8 +102,8 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_accel_map_load (IntPtr file_name); + delegate void d_gtk_accel_map_load(IntPtr file_name); + static d_gtk_accel_map_load gtk_accel_map_load = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_load")); [Obsolete("Moved to AccelMap class. Use AccelMap.Load instead")] public static void MapLoad (string file_name) { @@ -112,8 +112,8 @@ namespace Gtk { GLib.Marshaller.Free (native); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_accel_map_foreach(IntPtr data, GtkSharp.AccelMapForeachNative foreach_func); + delegate void d_gtk_accel_map_foreach(IntPtr data, GtkSharp.AccelMapForeachNative foreach_func); + static d_gtk_accel_map_foreach gtk_accel_map_foreach = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_map_foreach")); [Obsolete("Moved to AccelMap class. Use AccelMap.Foreach instead")] public static void MapForeach(IntPtr data, Gtk.AccelMapForeach foreach_func) { @@ -121,8 +121,8 @@ namespace Gtk { gtk_accel_map_foreach(data, foreach_func_wrapper.NativeDelegate); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_accel_groups_from_object (IntPtr obj); + delegate IntPtr d_gtk_accel_groups_from_object(IntPtr obj); + static d_gtk_accel_groups_from_object gtk_accel_groups_from_object = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_accel_groups_from_object")); public static AccelGroup[] GroupsFromObject (GLib.Object obj) { diff --git a/Source/Libs/GtkSharp/Action.cs b/Source/Libs/GtkSharp/Action.cs index c2aaf4456..f0d07d39b 100755 --- a/Source/Libs/GtkSharp/Action.cs +++ b/Source/Libs/GtkSharp/Action.cs @@ -28,8 +28,8 @@ namespace Gtk { public Action (string name, string label) : this (name, label, null, null) {} - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_action_get_proxies (IntPtr raw); + delegate IntPtr d_gtk_action_get_proxies(IntPtr raw); + static d_gtk_action_get_proxies gtk_action_get_proxies = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_action_get_proxies")); public Gtk.Widget[] Proxies { get { diff --git a/Source/Libs/GtkSharp/ActionGroup.cs b/Source/Libs/GtkSharp/ActionGroup.cs index 702279cc7..8c8ae5fbd 100755 --- a/Source/Libs/GtkSharp/ActionGroup.cs +++ b/Source/Libs/GtkSharp/ActionGroup.cs @@ -80,8 +80,8 @@ namespace Gtk { actions[0].Changed += changed; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_action_group_list_actions (IntPtr raw); + delegate IntPtr d_gtk_action_group_list_actions(IntPtr raw); + static d_gtk_action_group_list_actions gtk_action_group_list_actions = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_action_group_list_actions")); public Gtk.Action[] ListActions() { IntPtr raw_ret = gtk_action_group_list_actions (Handle); diff --git a/Source/Libs/GtkSharp/Adjustment.cs b/Source/Libs/GtkSharp/Adjustment.cs index 4912a3711..46433e165 100755 --- a/Source/Libs/GtkSharp/Adjustment.cs +++ b/Source/Libs/GtkSharp/Adjustment.cs @@ -23,8 +23,8 @@ namespace Gtk { public partial class Adjustment { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_adjustment_new(double value, double lower, double upper, double step_increment, double page_increment, double page_size); + delegate IntPtr d_gtk_adjustment_new(double value, double lower, double upper, double step_increment, double page_increment, double page_size); + static d_gtk_adjustment_new gtk_adjustment_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_adjustment_new")); public Adjustment (double value, double lower, double upper, double step_increment, double page_increment, double page_size) : base (IntPtr.Zero) { @@ -42,11 +42,11 @@ namespace Gtk { Raw = gtk_adjustment_new(value, lower, upper, step_increment, page_increment, page_size); } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_freeze_notify (IntPtr inst); + delegate void d_g_object_freeze_notify(IntPtr inst); + static d_g_object_freeze_notify g_object_freeze_notify = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_freeze_notify")); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern void g_object_thaw_notify (IntPtr inst); + delegate void d_g_object_thaw_notify(IntPtr inst); + static d_g_object_thaw_notify g_object_thaw_notify = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_object_thaw_notify")); public void SetBounds (double lower, double upper, double step_increment, double page_increment, double page_size) { diff --git a/Source/Libs/GtkSharp/Application.cs b/Source/Libs/GtkSharp/Application.cs index ea4bb145c..7aa291620 100755 --- a/Source/Libs/GtkSharp/Application.cs +++ b/Source/Libs/GtkSharp/Application.cs @@ -31,13 +31,13 @@ namespace Gtk { const int WS_EX_TOOLWINDOW = 0x00000080; const int WS_OVERLAPPEDWINDOW = 0x00CF0000; - [DllImport ("user32.dll", EntryPoint="CreateWindowExW", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.StdCall)] - static extern IntPtr Win32CreateWindow (int dwExStyle, string lpClassName, string lpWindowName,int dwStyle, int x, int y, int nWidth, int nHeight, IntPtr hWndParent, IntPtr hMenu, IntPtr hInstance, IntPtr lParam); + delegate IntPtr d_Win32CreateWindow(int dwExStyle, string lpClassName, string lpWindowName,int dwStyle, int x, int y, int nWidth, int nHeight, IntPtr hWndParent, IntPtr hMenu, IntPtr hInstance, IntPtr lParam); + static d_Win32CreateWindow Win32CreateWindow; - [DllImport ("user32.dll", EntryPoint="DestroyWindow", CharSet=CharSet.Unicode, CallingConvention=CallingConvention.StdCall)] - static extern bool Win32DestroyWindow (IntPtr window); + delegate bool d_Win32DestroyWindow(IntPtr window); + static d_Win32DestroyWindow Win32DestroyWindow; - static Application () + static Application () { if (!GLib.Thread.Supported) GLib.Thread.Init (); @@ -47,6 +47,9 @@ namespace Gtk { case PlatformID.Win32S: case PlatformID.Win32Windows: case PlatformID.WinCE: + Win32CreateWindow = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load("user32.dll"), "CreateWindowExW")); + Win32DestroyWindow = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load("user32.dll"), "DestroyWindow")); + // No idea why we need to create that window, but it enables visual styles on the Windows platform IntPtr window = Win32CreateWindow (WS_EX_TOOLWINDOW, "static", "gtk-sharp visual styles window", WS_OVERLAPPEDWINDOW, 0, 0, 0, 0, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero, IntPtr.Zero); Win32DestroyWindow (window); @@ -56,11 +59,11 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_init (ref int argc, ref IntPtr argv); + delegate void d_gtk_init(ref int argc, ref IntPtr argv); + static d_gtk_init gtk_init = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_init")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_init_check (ref int argc, ref IntPtr argv); + delegate bool d_gtk_init_check(ref int argc, ref IntPtr argv); + static d_gtk_init_check gtk_init_check = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_init_check")); static void SetPrgname () { @@ -125,16 +128,16 @@ namespace Gtk { return do_init (progname, ref args, true); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_main (); + delegate void d_gtk_main(); + static d_gtk_main gtk_main = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_main")); public static void Run () { gtk_main (); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_events_pending (); + delegate bool d_gtk_events_pending(); + static d_gtk_events_pending gtk_events_pending = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_events_pending")); public static bool EventsPending () @@ -142,11 +145,11 @@ namespace Gtk { return gtk_events_pending (); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_main_iteration (); + delegate void d_gtk_main_iteration(); + static d_gtk_main_iteration gtk_main_iteration = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_main_iteration")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_main_iteration_do (bool blocking); + delegate bool d_gtk_main_iteration_do(bool blocking); + static d_gtk_main_iteration_do gtk_main_iteration_do = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_main_iteration_do")); public static void RunIteration () { @@ -158,8 +161,8 @@ namespace Gtk { return gtk_main_iteration_do (blocking); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_main_quit (); + delegate void d_gtk_main_quit(); + static d_gtk_main_quit gtk_main_quit = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_main_quit")); public static void Quit () { @@ -167,8 +170,8 @@ namespace Gtk { } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_get_current_event (); + delegate IntPtr d_gtk_get_current_event(); + static d_gtk_get_current_event gtk_get_current_event = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_get_current_event")); public static Gdk.Event CurrentEvent { get { diff --git a/Source/Libs/GtkSharp/Bin.cs b/Source/Libs/GtkSharp/Bin.cs index 39c74b748..1e2800c9b 100755 --- a/Source/Libs/GtkSharp/Bin.cs +++ b/Source/Libs/GtkSharp/Bin.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class Bin { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_bin_get_child(IntPtr raw); + delegate IntPtr d_gtk_bin_get_child(IntPtr raw); + static d_gtk_bin_get_child gtk_bin_get_child = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_bin_get_child")); public new Gtk.Widget Child { get { diff --git a/Source/Libs/GtkSharp/Builder.cs b/Source/Libs/GtkSharp/Builder.cs index 631a89579..c2d86367d 100755 --- a/Source/Libs/GtkSharp/Builder.cs +++ b/Source/Libs/GtkSharp/Builder.cs @@ -223,8 +223,8 @@ namespace Gtk { this.handler_type = handler_type; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_builder_connect_signals_full(IntPtr raw, GtkSharp.BuilderConnectFuncNative func, IntPtr user_data); + delegate void d_gtk_builder_connect_signals_full(IntPtr raw, GtkSharp.BuilderConnectFuncNative func, IntPtr user_data); + static d_gtk_builder_connect_signals_full gtk_builder_connect_signals_full = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_builder_connect_signals_full")); public void ConnectSignals() { GtkSharp.BuilderConnectFuncWrapper func_wrapper = new GtkSharp.BuilderConnectFuncWrapper (new BuilderConnectFunc (ConnectFunc)); diff --git a/Source/Libs/GtkSharp/Button.cs b/Source/Libs/GtkSharp/Button.cs index 6087437fa..4c58985f6 100755 --- a/Source/Libs/GtkSharp/Button.cs +++ b/Source/Libs/GtkSharp/Button.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class Button { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_button_new_from_stock(IntPtr stock_id); + delegate IntPtr d_gtk_button_new_from_stock(IntPtr stock_id); + static d_gtk_button_new_from_stock gtk_button_new_from_stock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_button_new_from_stock")); public Button (string stock_id) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/CellRenderer.cs b/Source/Libs/GtkSharp/CellRenderer.cs index 76ff5fdfa..23c649287 100755 --- a/Source/Libs/GtkSharp/CellRenderer.cs +++ b/Source/Libs/GtkSharp/CellRenderer.cs @@ -28,8 +28,8 @@ namespace Gtk { public partial class CellRenderer { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_cell_renderer_start_editing (IntPtr handle, IntPtr evnt, IntPtr widget, IntPtr path, ref Gdk.Rectangle bg_area, ref Gdk.Rectangle cell_area, int flags); + delegate IntPtr d_gtk_cell_renderer_start_editing(IntPtr handle, IntPtr evnt, IntPtr widget, IntPtr path, ref Gdk.Rectangle bg_area, ref Gdk.Rectangle cell_area, int flags); + static d_gtk_cell_renderer_start_editing gtk_cell_renderer_start_editing = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_renderer_start_editing")); public ICellEditable StartEditing (Widget widget, Gdk.Event evnt, string path, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, CellRendererState flags) { @@ -40,12 +40,12 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_cell_renderer_render (IntPtr handle, IntPtr drawable, IntPtr widget, ref Gdk.Rectangle bg_area, ref Gdk.Rectangle cell_area, ref Gdk.Rectangle expose_area, int flags); + delegate void d_gtk_cell_renderer_render2(IntPtr handle, IntPtr drawable, IntPtr widget, ref Gdk.Rectangle bg_area, ref Gdk.Rectangle cell_area, ref Gdk.Rectangle expose_area, int flags); + static d_gtk_cell_renderer_render2 gtk_cell_renderer_render2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_cell_renderer_render")); public void Render (Cairo.Context context, Widget widget, Gdk.Rectangle background_area, Gdk.Rectangle cell_area, Gdk.Rectangle expose_area, CellRendererState flags) { - gtk_cell_renderer_render (Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, ref background_area, ref cell_area, ref expose_area, (int) flags); + gtk_cell_renderer_render2 (Handle, context == null ? IntPtr.Zero : context.Handle, widget == null ? IntPtr.Zero : widget.Handle, ref background_area, ref cell_area, ref expose_area, (int) flags); } // We have to implement this VM manually because x_offset, y_offset, width and height params may be NULL and therefore cannot be treated as "out int" diff --git a/Source/Libs/GtkSharp/CheckMenuItem.cs b/Source/Libs/GtkSharp/CheckMenuItem.cs index f45973e64..2050b61d8 100755 --- a/Source/Libs/GtkSharp/CheckMenuItem.cs +++ b/Source/Libs/GtkSharp/CheckMenuItem.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class CheckMenuItem { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_check_menu_item_new_with_mnemonic (IntPtr label); + delegate IntPtr d_gtk_check_menu_item_new_with_mnemonic(IntPtr label); + static d_gtk_check_menu_item_new_with_mnemonic gtk_check_menu_item_new_with_mnemonic = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_check_menu_item_new_with_mnemonic")); public CheckMenuItem (string label) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/Clipboard.cs b/Source/Libs/GtkSharp/Clipboard.cs index 9d3bfc96a..51634cc42 100755 --- a/Source/Libs/GtkSharp/Clipboard.cs +++ b/Source/Libs/GtkSharp/Clipboard.cs @@ -25,11 +25,11 @@ namespace Gtk { public partial class Clipboard { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_clipboard_set_with_data(IntPtr raw, TargetEntry[] targets, int n_targets, GtkSharp.ClipboardGetFuncNative get_func, GtkSharp.ClipboardClearFuncNative clear_func, IntPtr data); + delegate bool d_gtk_clipboard_set_with_data(IntPtr raw, TargetEntry[] targets, int n_targets, GtkSharp.ClipboardGetFuncNative get_func, GtkSharp.ClipboardClearFuncNative clear_func, IntPtr data); + static d_gtk_clipboard_set_with_data gtk_clipboard_set_with_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_set_with_data")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_clipboard_set_with_owner(IntPtr raw, TargetEntry[] targets, int n_targets, GtkSharp.ClipboardGetFuncNative get_func, GtkSharp.ClipboardClearFuncNative clear_func, IntPtr owner); + delegate bool d_gtk_clipboard_set_with_owner(IntPtr raw, TargetEntry[] targets, int n_targets, GtkSharp.ClipboardGetFuncNative get_func, GtkSharp.ClipboardClearFuncNative clear_func, IntPtr owner); + static d_gtk_clipboard_set_with_owner gtk_clipboard_set_with_owner = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_set_with_owner")); void ClearProxy (Clipboard clipboard) { @@ -73,8 +73,8 @@ namespace Gtk { Text = text; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_clipboard_wait_for_rich_text (IntPtr raw, IntPtr buffer, out IntPtr format, out UIntPtr length); + delegate IntPtr d_gtk_clipboard_wait_for_rich_text(IntPtr raw, IntPtr buffer, out IntPtr format, out UIntPtr length); + static d_gtk_clipboard_wait_for_rich_text gtk_clipboard_wait_for_rich_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_wait_for_rich_text")); public byte[] WaitForRichText(Gtk.TextBuffer buffer, out Gdk.Atom format) { @@ -115,8 +115,8 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_clipboard_request_rich_text(IntPtr raw, IntPtr buffer, RichTextReceivedFuncNative cb, IntPtr user_data); + delegate void d_gtk_clipboard_request_rich_text(IntPtr raw, IntPtr buffer, RichTextReceivedFuncNative cb, IntPtr user_data); + static d_gtk_clipboard_request_rich_text gtk_clipboard_request_rich_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_clipboard_request_rich_text")); public void RequestRichText (Gtk.TextBuffer buffer, RichTextReceivedFunc cb) { diff --git a/Source/Libs/GtkSharp/ColorSelection.cs b/Source/Libs/GtkSharp/ColorSelection.cs index 317fac2c9..8702919fa 100755 --- a/Source/Libs/GtkSharp/ColorSelection.cs +++ b/Source/Libs/GtkSharp/ColorSelection.cs @@ -23,8 +23,8 @@ namespace Gtk { public partial class ColorSelection { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_color_selection_palette_to_string(Gdk.Color[] colors, int n_colors); + delegate IntPtr d_gtk_color_selection_palette_to_string(Gdk.Color[] colors, int n_colors); + static d_gtk_color_selection_palette_to_string gtk_color_selection_palette_to_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_color_selection_palette_to_string")); /// PaletteToString Method public static string PaletteToString(Gdk.Color[] colors) { @@ -34,8 +34,8 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_color_selection_palette_from_string(IntPtr str, out IntPtr colors, out int n_colors); + delegate bool d_gtk_color_selection_palette_from_string(IntPtr str, out IntPtr colors, out int n_colors); + static d_gtk_color_selection_palette_from_string gtk_color_selection_palette_from_string = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_color_selection_palette_from_string")); public static Gdk.Color[] PaletteFromString(string str) { IntPtr parsedColors; @@ -59,11 +59,11 @@ namespace Gtk { return colors; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_color_selection_set_previous_color(IntPtr raw, ref Gdk.Color color); + delegate void d_gtk_color_selection_set_previous_color(IntPtr raw, ref Gdk.Color color); + static d_gtk_color_selection_set_previous_color gtk_color_selection_set_previous_color = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_color_selection_set_previous_color")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_color_selection_get_previous_color(IntPtr raw, out Gdk.Color color); + delegate void d_gtk_color_selection_get_previous_color(IntPtr raw, out Gdk.Color color); + static d_gtk_color_selection_get_previous_color gtk_color_selection_get_previous_color = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_color_selection_get_previous_color")); // Create Gtk# property to replace two Gtk+ functions public Gdk.Color PreviousColor diff --git a/Source/Libs/GtkSharp/Container.cs b/Source/Libs/GtkSharp/Container.cs index a4af7ebd0..b1b7af37e 100644 --- a/Source/Libs/GtkSharp/Container.cs +++ b/Source/Libs/GtkSharp/Container.cs @@ -27,11 +27,11 @@ namespace Gtk public partial class Container : IEnumerable { - [DllImport(Global.GtkNativeDll)] - static extern GParamSpec gtk_container_class_find_child_property (IntPtr cclass, string property_name); + delegate GParamSpec d_gtk_container_class_find_child_property(IntPtr cclass, string property_name); + static d_gtk_container_class_find_child_property gtk_container_class_find_child_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_class_find_child_property")); - [DllImport(Global.GtkNativeDll)] - static extern void gtk_container_child_get_property(IntPtr container, IntPtr child, string property_name, ref GLib.Value value); + delegate void d_gtk_container_child_get_property(IntPtr container, IntPtr child, string property_name, ref GLib.Value value); + static d_gtk_container_child_get_property gtk_container_child_get_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_child_get_property")); struct GTypeInstance { @@ -91,11 +91,11 @@ namespace Gtk } } - [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_container_get_focus_chain(IntPtr raw, out IntPtr list_ptr); + delegate bool d_gtk_container_get_focus_chain(IntPtr raw, out IntPtr list_ptr); + static d_gtk_container_get_focus_chain gtk_container_get_focus_chain = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_get_focus_chain")); - [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_container_set_focus_chain(IntPtr raw, IntPtr list_ptr); + delegate void d_gtk_container_set_focus_chain(IntPtr raw, IntPtr list_ptr); + static d_gtk_container_set_focus_chain gtk_container_set_focus_chain = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_container_set_focus_chain")); public Widget[] FocusChain { diff --git a/Source/Libs/GtkSharp/Dialog.cs b/Source/Libs/GtkSharp/Dialog.cs index c1d068bd0..120e294aa 100755 --- a/Source/Libs/GtkSharp/Dialog.cs +++ b/Source/Libs/GtkSharp/Dialog.cs @@ -26,8 +26,8 @@ namespace Gtk { using System.Runtime.InteropServices; public partial class Dialog { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_dialog_new_with_buttons (IntPtr title, IntPtr i, int flags, IntPtr dummy); + delegate IntPtr d_gtk_dialog_new_with_buttons(IntPtr title, IntPtr i, int flags, IntPtr dummy); + static d_gtk_dialog_new_with_buttons gtk_dialog_new_with_buttons = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_dialog_new_with_buttons")); public Dialog (string title, Gtk.Window parent, Gtk.DialogFlags flags, params object[] button_data) : base(IntPtr.Zero) { IntPtr native = GLib.Marshaller.StringToPtrGStrdup (title); diff --git a/Source/Libs/GtkSharp/Drag.cs b/Source/Libs/GtkSharp/Drag.cs index 6a389009b..7ab0a0693 100755 --- a/Source/Libs/GtkSharp/Drag.cs +++ b/Source/Libs/GtkSharp/Drag.cs @@ -23,8 +23,8 @@ namespace Gtk { public partial class Drag { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_drag_set_icon_default(IntPtr context); + delegate void d_gtk_drag_set_icon_default(IntPtr context); + static d_gtk_drag_set_icon_default gtk_drag_set_icon_default = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_drag_set_icon_default")); public static void SetIconDefault(Gdk.DragContext context) { diff --git a/Source/Libs/GtkSharp/FileChooserDialog.cs b/Source/Libs/GtkSharp/FileChooserDialog.cs index c2657662b..8356b2bd7 100755 --- a/Source/Libs/GtkSharp/FileChooserDialog.cs +++ b/Source/Libs/GtkSharp/FileChooserDialog.cs @@ -28,8 +28,8 @@ namespace Gtk { public partial class FileChooserDialog { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_file_chooser_dialog_new(IntPtr title, IntPtr parent, int action, IntPtr nil); + delegate IntPtr d_gtk_file_chooser_dialog_new(IntPtr title, IntPtr parent, int action, IntPtr nil); + static d_gtk_file_chooser_dialog_new gtk_file_chooser_dialog_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_dialog_new")); public FileChooserDialog (string title, Window parent, FileChooserAction action, params object[] button_data) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/FileChooserNative.cs b/Source/Libs/GtkSharp/FileChooserNative.cs index 3ffd8f520..376df56b0 100755 --- a/Source/Libs/GtkSharp/FileChooserNative.cs +++ b/Source/Libs/GtkSharp/FileChooserNative.cs @@ -27,20 +27,20 @@ namespace Gtk { public FileChooserNative (IntPtr raw) : base(raw) {} - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_file_chooser_native_new(IntPtr title, IntPtr parent, int action, IntPtr accept_label, IntPtr cancel_label); + delegate IntPtr d_gtk_file_chooser_native_new(IntPtr title, IntPtr parent, int action, IntPtr accept_label, IntPtr cancel_label); + static d_gtk_file_chooser_native_new gtk_file_chooser_native_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_new")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern string gtk_file_chooser_native_get_accept_label(IntPtr self); + delegate string d_gtk_file_chooser_native_get_accept_label(IntPtr self); + static d_gtk_file_chooser_native_get_accept_label gtk_file_chooser_native_get_accept_label = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_get_accept_label")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern string gtk_file_chooser_native_set_accept_label(IntPtr self, string accept_label); + delegate string d_gtk_file_chooser_native_set_accept_label(IntPtr self, string accept_label); + static d_gtk_file_chooser_native_set_accept_label gtk_file_chooser_native_set_accept_label = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_set_accept_label")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern string gtk_file_chooser_native_get_cancel_label(IntPtr self); + delegate string d_gtk_file_chooser_native_get_cancel_label(IntPtr self); + static d_gtk_file_chooser_native_get_cancel_label gtk_file_chooser_native_get_cancel_label = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_get_cancel_label")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern string gtk_file_chooser_native_set_cancel_label(IntPtr self, string cancel_label); + delegate string d_gtk_file_chooser_native_set_cancel_label(IntPtr self, string cancel_label); + static d_gtk_file_chooser_native_set_cancel_label gtk_file_chooser_native_set_cancel_label = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_file_chooser_native_set_cancel_label")); public FileChooserNative (string title, Gtk.Window parent, Gtk.FileChooserAction action, string accept_label, string cancel_label) : base(FileChooserNativeCreate(title, parent, action, accept_label, cancel_label)) { diff --git a/Source/Libs/GtkSharp/GtkSharp.csproj b/Source/Libs/GtkSharp/GtkSharp.csproj index b63cea5a8..e02c9f837 100755 --- a/Source/Libs/GtkSharp/GtkSharp.csproj +++ b/Source/Libs/GtkSharp/GtkSharp.csproj @@ -37,11 +37,6 @@ - - - - - PreserveNewest - + diff --git a/Source/Libs/GtkSharp/GtkSharp.dll.config b/Source/Libs/GtkSharp/GtkSharp.dll.config deleted file mode 100644 index 920d579b4..000000000 --- a/Source/Libs/GtkSharp/GtkSharp.dll.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Source/Libs/GtkSharp/HScale.cs b/Source/Libs/GtkSharp/HScale.cs index aec10b5b4..006c4f055 100755 --- a/Source/Libs/GtkSharp/HScale.cs +++ b/Source/Libs/GtkSharp/HScale.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class HScale { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_hscale_new_with_range (double min, double max, double step); + delegate IntPtr d_gtk_hscale_new_with_range(double min, double max, double step); + static d_gtk_hscale_new_with_range gtk_hscale_new_with_range = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_hscale_new_with_range")); public HScale (double min, double max, double step) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/IconFactory.cs b/Source/Libs/GtkSharp/IconFactory.cs index 327000127..dd3f80536 100755 --- a/Source/Libs/GtkSharp/IconFactory.cs +++ b/Source/Libs/GtkSharp/IconFactory.cs @@ -20,8 +20,8 @@ namespace Gtk { public partial class IconFactory { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - extern static void gtk_icon_size_lookup (IconSize size, out int width, out int height); + delegate void d_gtk_icon_size_lookup(IconSize size, out int width, out int height); + static d_gtk_icon_size_lookup gtk_icon_size_lookup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_size_lookup")); /// Query icon dimensions /// Queries dimensions for icons of the specified size. diff --git a/Source/Libs/GtkSharp/IconSet.cs b/Source/Libs/GtkSharp/IconSet.cs index 22ec69d99..0b985f93e 100755 --- a/Source/Libs/GtkSharp/IconSet.cs +++ b/Source/Libs/GtkSharp/IconSet.cs @@ -20,9 +20,8 @@ namespace Gtk { public partial class IconSet { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - unsafe static extern void gtk_icon_set_get_sizes ( - IntPtr raw, out int *pointer_to_enum, out int n_sizes); + unsafe delegate void d_gtk_icon_set_get_sizes(IntPtr raw, out int *pointer_to_enum, out int n_sizes); + static d_gtk_icon_set_get_sizes gtk_icon_set_get_sizes = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_set_get_sizes")); /// Sizes Property /// To be completed diff --git a/Source/Libs/GtkSharp/IconTheme.cs b/Source/Libs/GtkSharp/IconTheme.cs index 31a95a6da..cfa600138 100755 --- a/Source/Libs/GtkSharp/IconTheme.cs +++ b/Source/Libs/GtkSharp/IconTheme.cs @@ -28,8 +28,8 @@ namespace Gtk { public partial class IconTheme { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_icon_theme_list_icons (IntPtr raw, IntPtr context); + delegate IntPtr d_gtk_icon_theme_list_icons(IntPtr raw, IntPtr context); + static d_gtk_icon_theme_list_icons gtk_icon_theme_list_icons = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_list_icons")); public string[] ListIcons (string context) { @@ -47,17 +47,17 @@ namespace Gtk { return result; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_icon_theme_get_search_path(IntPtr raw, out IntPtr path, out int n_elements); + delegate void d_gtk_icon_theme_get_search_path(IntPtr raw, out IntPtr path, out int n_elements); + static d_gtk_icon_theme_get_search_path gtk_icon_theme_get_search_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_get_search_path")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_icon_theme_set_search_path(IntPtr raw, IntPtr[] path, int n_elements); + delegate void d_gtk_icon_theme_set_search_path(IntPtr raw, IntPtr[] path, int n_elements); + static d_gtk_icon_theme_set_search_path gtk_icon_theme_set_search_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_set_search_path")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_icon_theme_get_search_path_utf8(IntPtr raw, out IntPtr path, out int n_elements); + delegate void d_gtk_icon_theme_get_search_path_utf8(IntPtr raw, out IntPtr path, out int n_elements); + static d_gtk_icon_theme_get_search_path_utf8 gtk_icon_theme_get_search_path_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_get_search_path_utf8")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_icon_theme_set_search_path_utf8(IntPtr raw, IntPtr[] path, int n_elements); + delegate void d_gtk_icon_theme_set_search_path_utf8(IntPtr raw, IntPtr[] path, int n_elements); + static d_gtk_icon_theme_set_search_path_utf8 gtk_icon_theme_set_search_path_utf8 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_set_search_path_utf8")); bool IsWindowsPlatform { get { @@ -107,8 +107,8 @@ namespace Gtk { SearchPath = path; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_icon_theme_get_icon_sizes (IntPtr raw, IntPtr icon_name); + delegate IntPtr d_gtk_icon_theme_get_icon_sizes(IntPtr raw, IntPtr icon_name); + static d_gtk_icon_theme_get_icon_sizes gtk_icon_theme_get_icon_sizes = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_theme_get_icon_sizes")); public int[] GetIconSizes (string icon_name) { diff --git a/Source/Libs/GtkSharp/IconView.cs b/Source/Libs/GtkSharp/IconView.cs index 8ab23a092..86badc90f 100755 --- a/Source/Libs/GtkSharp/IconView.cs +++ b/Source/Libs/GtkSharp/IconView.cs @@ -36,8 +36,8 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_icon_view_scroll_to_path(IntPtr raw, IntPtr path, bool use_align, float row_align, float col_align); + delegate void d_gtk_icon_view_scroll_to_path(IntPtr raw, IntPtr path, bool use_align, float row_align, float col_align); + static d_gtk_icon_view_scroll_to_path gtk_icon_view_scroll_to_path = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_icon_view_scroll_to_path")); public void ScrollToPath (Gtk.TreePath path) { diff --git a/Source/Libs/GtkSharp/Image.cs b/Source/Libs/GtkSharp/Image.cs index df4225625..b09a63396 100755 --- a/Source/Libs/GtkSharp/Image.cs +++ b/Source/Libs/GtkSharp/Image.cs @@ -27,8 +27,8 @@ namespace Gtk { public partial class Image { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_image_new_from_icon_set(IntPtr icon_set, int size); + delegate IntPtr d_gtk_image_new_from_icon_set(IntPtr icon_set, int size); + static d_gtk_image_new_from_icon_set gtk_image_new_from_icon_set = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_image_new_from_icon_set")); public Image (Gtk.IconSet icon_set, Gtk.IconSize size) : base (IntPtr.Zero) { @@ -45,8 +45,8 @@ namespace Gtk { Raw = gtk_image_new_from_icon_set(icon_set.Handle, (int) size); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_image_new_from_stock(IntPtr stock_id, int size); + delegate IntPtr d_gtk_image_new_from_stock(IntPtr stock_id, int size); + static d_gtk_image_new_from_stock gtk_image_new_from_stock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_image_new_from_stock")); public Image (string stock_id, Gtk.IconSize size) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/ImageMenuItem.cs b/Source/Libs/GtkSharp/ImageMenuItem.cs index 6379efe12..94b3bab32 100755 --- a/Source/Libs/GtkSharp/ImageMenuItem.cs +++ b/Source/Libs/GtkSharp/ImageMenuItem.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class ImageMenuItem { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_image_menu_item_new_with_mnemonic (IntPtr label); + delegate IntPtr d_gtk_image_menu_item_new_with_mnemonic(IntPtr label); + static d_gtk_image_menu_item_new_with_mnemonic gtk_image_menu_item_new_with_mnemonic = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_image_menu_item_new_with_mnemonic")); public ImageMenuItem (string label) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/Key.cs b/Source/Libs/GtkSharp/Key.cs index 254c65cc2..eef429f44 100755 --- a/Source/Libs/GtkSharp/Key.cs +++ b/Source/Libs/GtkSharp/Key.cs @@ -28,8 +28,8 @@ namespace Gtk { static Hashtable wrappers = new Hashtable (); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint gtk_key_snooper_install (GtkSharp.KeySnoopFuncNative snooper, IntPtr func_data); + delegate uint d_gtk_key_snooper_install(GtkSharp.KeySnoopFuncNative snooper, IntPtr func_data); + static d_gtk_key_snooper_install gtk_key_snooper_install = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_key_snooper_install")); public static uint SnooperInstall (Gtk.KeySnoopFunc snooper) { @@ -39,8 +39,8 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_key_snooper_remove (uint snooper_handler_id); + delegate void d_gtk_key_snooper_remove(uint snooper_handler_id); + static d_gtk_key_snooper_remove gtk_key_snooper_remove = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_key_snooper_remove")); public static void SnooperRemove (uint snooper_handler_id) { diff --git a/Source/Libs/GtkSharp/ListStore.cs b/Source/Libs/GtkSharp/ListStore.cs index 585df14dc..5efdefd46 100755 --- a/Source/Libs/GtkSharp/ListStore.cs +++ b/Source/Libs/GtkSharp/ListStore.cs @@ -26,11 +26,11 @@ namespace Gtk { public partial class ListStore : IEnumerable { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); + delegate bool d_gtk_tree_model_iter_children2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); + static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); public bool IterChildren (out Gtk.TreeIter iter) { - bool raw_ret = gtk_tree_model_iter_children (Handle, out iter, IntPtr.Zero); + bool raw_ret = gtk_tree_model_iter_children2 (Handle, out iter, IntPtr.Zero); bool ret = raw_ret; return ret; } @@ -42,11 +42,11 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_model_iter_nth_child (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); + delegate bool d_gtk_tree_model_iter_nth_child2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); + static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); public bool IterNthChild (out Gtk.TreeIter iter, int n) { - bool raw_ret = gtk_tree_model_iter_nth_child (Handle, out iter, IntPtr.Zero, n); + bool raw_ret = gtk_tree_model_iter_nth_child2 (Handle, out iter, IntPtr.Zero, n); bool ret = raw_ret; return ret; } @@ -121,8 +121,8 @@ namespace Gtk { return iter; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_list_store_insert_with_valuesv(IntPtr raw, out TreeIter iter, int position, int[] columns, GLib.Value[] values, int n_values); + delegate void d_gtk_list_store_insert_with_valuesv2(IntPtr raw, out TreeIter iter, int position, int[] columns, GLib.Value[] values, int n_values); + static d_gtk_list_store_insert_with_valuesv2 gtk_list_store_insert_with_valuesv2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_list_store_insert_with_valuesv")); public TreeIter InsertWithValues (int position, params object[] values) { @@ -139,7 +139,7 @@ namespace Gtk { } TreeIter iter; - gtk_list_store_insert_with_valuesv (Handle, out iter, position, columns, vals, n_values); + gtk_list_store_insert_with_valuesv2 (Handle, out iter, position, columns, vals, n_values); for (int i = 0; i < n_values; i++) vals[i].Dispose (); @@ -147,8 +147,8 @@ namespace Gtk { return iter; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_list_store_set_valuesv(IntPtr raw, ref TreeIter iter, int[] columns, GLib.Value[] values, int n_values); + delegate void d_gtk_list_store_set_valuesv(IntPtr raw, ref TreeIter iter, int[] columns, GLib.Value[] values, int n_values); + static d_gtk_list_store_set_valuesv gtk_list_store_set_valuesv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_list_store_set_valuesv")); public void SetValues (TreeIter iter, params object[] values) { diff --git a/Source/Libs/GtkSharp/Menu.cs b/Source/Libs/GtkSharp/Menu.cs index af848ed28..7cd044895 100755 --- a/Source/Libs/GtkSharp/Menu.cs +++ b/Source/Libs/GtkSharp/Menu.cs @@ -35,8 +35,8 @@ namespace Gtk { PopupAtPointer (null); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_menu_set_screen (IntPtr raw, IntPtr screen); + delegate void d_gtk_menu_set_screen(IntPtr raw, IntPtr screen); + static d_gtk_menu_set_screen gtk_menu_set_screen = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_set_screen")); public new Gdk.Screen Screen { get { @@ -47,8 +47,8 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_menu_set_active (IntPtr raw, uint index_); + delegate void d_gtk_menu_set_active(IntPtr raw, uint index_); + static d_gtk_menu_set_active gtk_menu_set_active = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_set_active")); public void SetActive (uint index_) { diff --git a/Source/Libs/GtkSharp/MenuItem.cs b/Source/Libs/GtkSharp/MenuItem.cs index 618dabb85..03469951e 100755 --- a/Source/Libs/GtkSharp/MenuItem.cs +++ b/Source/Libs/GtkSharp/MenuItem.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class MenuItem { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_menu_item_new_with_mnemonic (IntPtr label); + delegate IntPtr d_gtk_menu_item_new_with_mnemonic(IntPtr label); + static d_gtk_menu_item_new_with_mnemonic gtk_menu_item_new_with_mnemonic = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_item_new_with_mnemonic")); public MenuItem (string label) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/MessageDialog.cs b/Source/Libs/GtkSharp/MessageDialog.cs index 0480931df..f291cd741 100755 --- a/Source/Libs/GtkSharp/MessageDialog.cs +++ b/Source/Libs/GtkSharp/MessageDialog.cs @@ -20,11 +20,11 @@ namespace Gtk { public partial class MessageDialog { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_message_dialog_new (IntPtr parent_window, DialogFlags flags, MessageType type, ButtonsType bt, IntPtr msg, IntPtr args); + delegate IntPtr d_gtk_message_dialog_new(IntPtr parent_window, DialogFlags flags, MessageType type, ButtonsType bt, IntPtr msg, IntPtr args); + static d_gtk_message_dialog_new gtk_message_dialog_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_message_dialog_new")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_message_dialog_new_with_markup (IntPtr parent_window, DialogFlags flags, MessageType type, ButtonsType bt, IntPtr msg, IntPtr args); + delegate IntPtr d_gtk_message_dialog_new_with_markup(IntPtr parent_window, DialogFlags flags, MessageType type, ButtonsType bt, IntPtr msg, IntPtr args); + static d_gtk_message_dialog_new_with_markup gtk_message_dialog_new_with_markup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_message_dialog_new_with_markup")); public MessageDialog (Gtk.Window parent_window, DialogFlags flags, MessageType type, ButtonsType bt, bool use_markup, string format, params object[] args) { diff --git a/Source/Libs/GtkSharp/NativeDialog.cs b/Source/Libs/GtkSharp/NativeDialog.cs index a13bf0d01..57c9f365b 100755 --- a/Source/Libs/GtkSharp/NativeDialog.cs +++ b/Source/Libs/GtkSharp/NativeDialog.cs @@ -27,32 +27,32 @@ namespace Gtk { public NativeDialog (IntPtr raw) : base(raw) { } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_native_dialog_show (IntPtr self); + delegate void d_gtk_native_dialog_show(IntPtr self); + static d_gtk_native_dialog_show gtk_native_dialog_show = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_show")); public void Show () { gtk_native_dialog_show (Handle); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_native_dialog_hide (IntPtr self); + delegate void d_gtk_native_dialog_hide(IntPtr self); + static d_gtk_native_dialog_hide gtk_native_dialog_hide = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_hide")); public void Hide () { gtk_native_dialog_hide (Handle); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_native_dialog_destroy (IntPtr self); + delegate void d_gtk_native_dialog_destroy(IntPtr self); + static d_gtk_native_dialog_destroy gtk_native_dialog_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_destroy")); public void Destroy () { gtk_native_dialog_destroy (Handle); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_native_dialog_get_visible (IntPtr self); + delegate bool d_gtk_native_dialog_get_visible(IntPtr self); + static d_gtk_native_dialog_get_visible gtk_native_dialog_get_visible = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_get_visible")); public bool Visible { get { @@ -60,11 +60,11 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_native_dialog_set_modal (IntPtr self, bool modal); + delegate void d_gtk_native_dialog_set_modal(IntPtr self, bool modal); + static d_gtk_native_dialog_set_modal gtk_native_dialog_set_modal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_set_modal")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_native_dialog_get_modal (IntPtr self); + delegate bool d_gtk_native_dialog_get_modal(IntPtr self); + static d_gtk_native_dialog_get_modal gtk_native_dialog_get_modal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_get_modal")); public bool Modal { set { @@ -75,11 +75,11 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_native_dialog_set_title (IntPtr self, string title); + delegate void d_gtk_native_dialog_set_title(IntPtr self, string title); + static d_gtk_native_dialog_set_title gtk_native_dialog_set_title = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_set_title")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern string gtk_native_dialog_get_title (IntPtr self); + delegate string d_gtk_native_dialog_get_title(IntPtr self); + static d_gtk_native_dialog_get_title gtk_native_dialog_get_title = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_get_title")); public string Title { set { @@ -90,14 +90,14 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_native_dialog_set_transient_for (IntPtr self, IntPtr parent); + delegate void d_gtk_native_dialog_set_transient_for(IntPtr self, IntPtr parent); + static d_gtk_native_dialog_set_transient_for gtk_native_dialog_set_transient_for = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_set_transient_for")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_native_dialog_get_transient_for (IntPtr self); + delegate IntPtr d_gtk_native_dialog_get_transient_for(IntPtr self); + static d_gtk_native_dialog_get_transient_for gtk_native_dialog_get_transient_for = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_get_transient_for")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int gtk_native_dialog_run (IntPtr self); + delegate int d_gtk_native_dialog_run(IntPtr self); + static d_gtk_native_dialog_run gtk_native_dialog_run = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_native_dialog_run")); public int Run () { diff --git a/Source/Libs/GtkSharp/Notebook.cs b/Source/Libs/GtkSharp/Notebook.cs index 812b340c4..5db200fa4 100755 --- a/Source/Libs/GtkSharp/Notebook.cs +++ b/Source/Libs/GtkSharp/Notebook.cs @@ -32,8 +32,8 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern int gtk_notebook_page_num (IntPtr handle, IntPtr child); + delegate int d_gtk_notebook_page_num(IntPtr handle, IntPtr child); + static d_gtk_notebook_page_num gtk_notebook_page_num = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_notebook_page_num")); public int PageNum (Widget child) { diff --git a/Source/Libs/GtkSharp/Plug.cs b/Source/Libs/GtkSharp/Plug.cs index 62f684300..edfa71015 100755 --- a/Source/Libs/GtkSharp/Plug.cs +++ b/Source/Libs/GtkSharp/Plug.cs @@ -26,8 +26,8 @@ namespace Gtk { public partial class Plug { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_plug_new(UIntPtr socket_id); + delegate IntPtr d_gtk_plug_new(UIntPtr socket_id); + static d_gtk_plug_new gtk_plug_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_plug_new")); public Plug (ulong socket_id) : base (IntPtr.Zero) { @@ -39,8 +39,8 @@ namespace Gtk { Raw = gtk_plug_new (new UIntPtr (socket_id)); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_plug_new_for_display(IntPtr display, UIntPtr socket_id); + delegate IntPtr d_gtk_plug_new_for_display(IntPtr display, UIntPtr socket_id); + static d_gtk_plug_new_for_display gtk_plug_new_for_display = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_plug_new_for_display")); public Plug (Gdk.Display display, ulong socket_id) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/Printer.cs b/Source/Libs/GtkSharp/Printer.cs index 18eab7b88..8ba815cc4 100755 --- a/Source/Libs/GtkSharp/Printer.cs +++ b/Source/Libs/GtkSharp/Printer.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class Printer { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_enumerate_printers (GtkSharp.PrinterFuncNative func, IntPtr func_data, GLib.DestroyNotify destroy, bool wait); + delegate void d_gtk_enumerate_printers(GtkSharp.PrinterFuncNative func, IntPtr func_data, GLib.DestroyNotify destroy, bool wait); + static d_gtk_enumerate_printers gtk_enumerate_printers = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_enumerate_printers")); public static void EnumeratePrinters (Gtk.PrinterFunc func, bool wait) { diff --git a/Source/Libs/GtkSharp/RadioAction.cs b/Source/Libs/GtkSharp/RadioAction.cs index a033f7b87..7042955a1 100755 --- a/Source/Libs/GtkSharp/RadioAction.cs +++ b/Source/Libs/GtkSharp/RadioAction.cs @@ -25,11 +25,11 @@ namespace Gtk public partial class RadioAction { - [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_radio_action_get_group(IntPtr raw); + delegate IntPtr d_gtk_radio_action_get_group(IntPtr raw); + static d_gtk_radio_action_get_group gtk_radio_action_get_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_action_get_group")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_radio_action_set_group(IntPtr raw, IntPtr list); + delegate void d_gtk_radio_action_set_group(IntPtr raw, IntPtr list); + static d_gtk_radio_action_set_group gtk_radio_action_set_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_action_set_group")); [GLib.Property ("group")] public RadioAction[] Group { diff --git a/Source/Libs/GtkSharp/RadioButton.cs b/Source/Libs/GtkSharp/RadioButton.cs index 6fb7a8836..cc7d5308d 100755 --- a/Source/Libs/GtkSharp/RadioButton.cs +++ b/Source/Libs/GtkSharp/RadioButton.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class RadioButton { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_radio_button_new_with_mnemonic (IntPtr group, IntPtr label); + delegate IntPtr d_gtk_radio_button_new_with_mnemonic(IntPtr group, IntPtr label); + static d_gtk_radio_button_new_with_mnemonic gtk_radio_button_new_with_mnemonic = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_button_new_with_mnemonic")); // creates a new group for this RadioButton public RadioButton (string label) @@ -36,11 +36,11 @@ namespace Gtk { GLib.Marshaller.Free (native); } - [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_radio_button_get_group(IntPtr raw); + delegate IntPtr d_gtk_radio_button_get_group(IntPtr raw); + static d_gtk_radio_button_get_group gtk_radio_button_get_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_button_get_group")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_radio_button_set_group(IntPtr raw, IntPtr list); + delegate void d_gtk_radio_button_set_group(IntPtr raw, IntPtr list); + static d_gtk_radio_button_set_group gtk_radio_button_set_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_button_set_group")); [GLib.Property ("group")] public RadioButton[] Group { diff --git a/Source/Libs/GtkSharp/RadioMenuItem.cs b/Source/Libs/GtkSharp/RadioMenuItem.cs index eddb569b6..e27845d9e 100755 --- a/Source/Libs/GtkSharp/RadioMenuItem.cs +++ b/Source/Libs/GtkSharp/RadioMenuItem.cs @@ -43,8 +43,8 @@ namespace Gtk { GLib.Marshaller.Free (label_as_native); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_radio_menu_item_new_with_mnemonic(IntPtr group, IntPtr label); + delegate IntPtr d_gtk_radio_menu_item_new_with_mnemonic(IntPtr group, IntPtr label); + static d_gtk_radio_menu_item_new_with_mnemonic gtk_radio_menu_item_new_with_mnemonic = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_menu_item_new_with_mnemonic")); public RadioMenuItem (RadioMenuItem[] group, string label) : base (IntPtr.Zero) { @@ -71,11 +71,11 @@ namespace Gtk { GLib.Marshaller.Free (native_label); } - [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_radio_menu_item_get_group(IntPtr raw); + delegate IntPtr d_gtk_radio_menu_item_get_group(IntPtr raw); + static d_gtk_radio_menu_item_get_group gtk_radio_menu_item_get_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_menu_item_get_group")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_radio_menu_item_set_group(IntPtr raw, IntPtr list); + delegate void d_gtk_radio_menu_item_set_group(IntPtr raw, IntPtr list); + static d_gtk_radio_menu_item_set_group gtk_radio_menu_item_set_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_menu_item_set_group")); [GLib.Property ("group")] public RadioMenuItem[] Group { diff --git a/Source/Libs/GtkSharp/RadioToolButton.cs b/Source/Libs/GtkSharp/RadioToolButton.cs index 7fc1bc4ef..48c4076cc 100755 --- a/Source/Libs/GtkSharp/RadioToolButton.cs +++ b/Source/Libs/GtkSharp/RadioToolButton.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class RadioToolButton { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_radio_tool_button_new (IntPtr group); + delegate IntPtr d_gtk_radio_tool_button_new(IntPtr group); + static d_gtk_radio_tool_button_new gtk_radio_tool_button_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_tool_button_new")); public RadioToolButton (RadioToolButton[] group) : base (IntPtr.Zero) { @@ -46,8 +46,8 @@ namespace Gtk { Raw = gtk_radio_tool_button_new(native_group); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_radio_tool_button_new_from_stock (IntPtr group, IntPtr stock_id); + delegate IntPtr d_gtk_radio_tool_button_new_from_stock(IntPtr group, IntPtr stock_id); + static d_gtk_radio_tool_button_new_from_stock gtk_radio_tool_button_new_from_stock = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_tool_button_new_from_stock")); public RadioToolButton (RadioToolButton[] group, string stock_id) : base (IntPtr.Zero) { @@ -72,11 +72,11 @@ namespace Gtk { GLib.Marshaller.Free (stock_id_as_native); } - [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_radio_tool_button_get_group(IntPtr raw); + delegate IntPtr d_gtk_radio_tool_button_get_group(IntPtr raw); + static d_gtk_radio_tool_button_get_group gtk_radio_tool_button_get_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_tool_button_get_group")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_radio_tool_button_set_group(IntPtr raw, IntPtr list); + delegate void d_gtk_radio_tool_button_set_group(IntPtr raw, IntPtr list); + static d_gtk_radio_tool_button_set_group gtk_radio_tool_button_set_group = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_radio_tool_button_set_group")); [GLib.Property ("group")] public RadioToolButton[] Group { diff --git a/Source/Libs/GtkSharp/SelectionData.cs b/Source/Libs/GtkSharp/SelectionData.cs index dd5d46c6a..6a29b4371 100755 --- a/Source/Libs/GtkSharp/SelectionData.cs +++ b/Source/Libs/GtkSharp/SelectionData.cs @@ -25,11 +25,11 @@ namespace Gtk { public partial class SelectionData { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - private static extern IntPtr gtk_selection_data_get_text (IntPtr selection_data); + delegate IntPtr d_gtk_selection_data_get_text(IntPtr selection_data); + static d_gtk_selection_data_get_text gtk_selection_data_get_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_selection_data_get_text")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - private static extern void gtk_selection_data_set_text (IntPtr selection_data, IntPtr str, int len); + delegate void d_gtk_selection_data_set_text(IntPtr selection_data, IntPtr str, int len); + static d_gtk_selection_data_set_text gtk_selection_data_set_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_selection_data_set_text")); public string Text { get { @@ -45,8 +45,8 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - private static extern IntPtr gtk_selection_data_get_data (IntPtr selection_data); + delegate IntPtr d_gtk_selection_data_get_data(IntPtr selection_data); + static d_gtk_selection_data_get_data gtk_selection_data_get_data = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_selection_data_get_data")); public byte[] Data { get { @@ -61,8 +61,8 @@ namespace Gtk { Set(type, format, data, data.Length); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_selection_data_get_targets(IntPtr raw, out IntPtr targets, out int n_atoms); + delegate bool d_gtk_selection_data_get_targets(IntPtr raw, out IntPtr targets, out int n_atoms); + static d_gtk_selection_data_get_targets gtk_selection_data_get_targets = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_selection_data_get_targets")); public Gdk.Atom [] Targets { get { diff --git a/Source/Libs/GtkSharp/SpinButton.cs b/Source/Libs/GtkSharp/SpinButton.cs index b6d215089..af2f84e70 100755 --- a/Source/Libs/GtkSharp/SpinButton.cs +++ b/Source/Libs/GtkSharp/SpinButton.cs @@ -26,8 +26,8 @@ namespace Gtk { public partial class SpinButton { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_spin_button_new_with_range (double min, double max, double step); + delegate IntPtr d_gtk_spin_button_new_with_range(double min, double max, double step); + static d_gtk_spin_button_new_with_range gtk_spin_button_new_with_range = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_spin_button_new_with_range")); public SpinButton (double min, double max, double step) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/StatusIcon.cs b/Source/Libs/GtkSharp/StatusIcon.cs index 86c11b771..b0ba2febd 100755 --- a/Source/Libs/GtkSharp/StatusIcon.cs +++ b/Source/Libs/GtkSharp/StatusIcon.cs @@ -38,8 +38,8 @@ namespace Gtk { static MenuPositionFuncNative StatusIconPositionMenuFunc = null; - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_menu_popup (IntPtr menu, IntPtr parent_menu_shell, IntPtr parent_menu_item, MenuPositionFuncNative func, IntPtr data, uint button, uint activate_time); + delegate void d_gtk_menu_popup(IntPtr menu, IntPtr parent_menu_shell, IntPtr parent_menu_item, MenuPositionFuncNative func, IntPtr data, uint button, uint activate_time); + static d_gtk_menu_popup gtk_menu_popup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_menu_popup")); public void PresentMenu (Menu menu, uint button, uint activate_time) { @@ -84,8 +84,8 @@ namespace Gtk { } } - [DllImport(Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_status_icon_get_geometry(IntPtr raw, out IntPtr screen, IntPtr area, out int orientation); + delegate bool d_gtk_status_icon_get_geometry(IntPtr raw, out IntPtr screen, IntPtr area, out int orientation); + static d_gtk_status_icon_get_geometry gtk_status_icon_get_geometry = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_status_icon_get_geometry")); public bool GetGeometry(out Gdk.Screen screen, out Gdk.Rectangle area, out Gtk.Orientation orientation) { diff --git a/Source/Libs/GtkSharp/Stock.cs b/Source/Libs/GtkSharp/Stock.cs index 2dc4c0b52..ff1d1cd2a 100755 --- a/Source/Libs/GtkSharp/Stock.cs +++ b/Source/Libs/GtkSharp/Stock.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class Stock { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_stock_list_ids (); + delegate IntPtr d_gtk_stock_list_ids(); + static d_gtk_stock_list_ids gtk_stock_list_ids = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_list_ids")); public static string[] ListIds () { @@ -49,8 +49,8 @@ namespace Gtk { public IntPtr TranslationDomain; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_stock_lookup (IntPtr stock_id, out ConstStockItem item); + delegate bool d_gtk_stock_lookup(IntPtr stock_id, out ConstStockItem item); + static d_gtk_stock_lookup gtk_stock_lookup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_lookup")); public static Gtk.StockItem Lookup (string stock_id) { ConstStockItem const_item; diff --git a/Source/Libs/GtkSharp/StockManager.cs b/Source/Libs/GtkSharp/StockManager.cs index 34e4b1a4a..de08a9b79 100755 --- a/Source/Libs/GtkSharp/StockManager.cs +++ b/Source/Libs/GtkSharp/StockManager.cs @@ -26,8 +26,8 @@ namespace Gtk { public class StockManager { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_stock_add_static(ref Gtk.StockItem items, uint n_items); + delegate void d_gtk_stock_add_static(ref Gtk.StockItem items, uint n_items); + static d_gtk_stock_add_static gtk_stock_add_static = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_add_static")); [Obsolete ("Use StockManager.Add instead")] public static void AddStatic(Gtk.StockItem items, uint n_items) @@ -55,8 +55,8 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_stock_lookup (IntPtr stock_id, out ConstStockItem item); + delegate bool d_gtk_stock_lookup(IntPtr stock_id, out ConstStockItem item); + static d_gtk_stock_lookup gtk_stock_lookup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_lookup")); public static bool Lookup (string stock_id, ref Gtk.StockItem item) { @@ -76,11 +76,11 @@ namespace Gtk { return Lookup (stock_id, ref item); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_stock_add(ref Gtk.StockItem item, uint n_items); + delegate void d_gtk_stock_add(ref Gtk.StockItem item, uint n_items); + static d_gtk_stock_add gtk_stock_add = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_add")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_stock_add(Gtk.StockItem[] items, uint n_items); + delegate void d_gtk_stock_add2(Gtk.StockItem[] items, uint n_items); + static d_gtk_stock_add2 gtk_stock_add2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_stock_add")); [Obsolete ("Use the StockItem or StockItem[] overload instead.")] public static void Add (Gtk.StockItem items, uint n_items) @@ -95,7 +95,7 @@ namespace Gtk { public static void Add (Gtk.StockItem[] items) { - gtk_stock_add (items, (uint) items.Length); + gtk_stock_add2 (items, (uint) items.Length); } } diff --git a/Source/Libs/GtkSharp/Style.cs b/Source/Libs/GtkSharp/Style.cs deleted file mode 100755 index c04d5b4b3..000000000 --- a/Source/Libs/GtkSharp/Style.cs +++ /dev/null @@ -1,200 +0,0 @@ -// -// Gtk.Style.cs - Gtk Style class customizations -// -// Authors: Rachel Hestilow -// Radek Doulik -// Mike Kestner -// -// Copyright (C) 2002, 2003 Rachel Hestilow, Radek Doulik -// 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. - -namespace Gtk { - - using System; - using System.Runtime.InteropServices; - - [Obsolete ("Replaced by StyleContext")] - public partial class Style { - - [DllImport("gtksharpglue-3")] - static extern IntPtr gtksharp_gtk_style_get_bg (IntPtr style, int i); - - public Gdk.Color Background (StateType state) - { - IntPtr raw = gtksharp_gtk_style_get_bg (Handle, (int) state); - return Gdk.Color.New (raw); - } - - public Gdk.Color[] Backgrounds { - get { - Gdk.Color[] ret = new Gdk.Color[5]; - for (int i = 0; i < 5; i++) - ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_bg (Handle, i)); - return ret; - } - } - - [DllImport("gtksharpglue-3")] - static extern IntPtr gtksharp_gtk_style_get_fg (IntPtr style, int i); - - public Gdk.Color Foreground (StateType state) - { - IntPtr raw = gtksharp_gtk_style_get_fg (Handle, (int) state); - return Gdk.Color.New (raw); - } - - public Gdk.Color[] Foregrounds { - get { - Gdk.Color[] ret = new Gdk.Color[5]; - for (int i = 0; i < 5; i++) - ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_fg (Handle, i)); - return ret; - } - } - - [DllImport("gtksharpglue-3")] - static extern IntPtr gtksharp_gtk_style_get_text (IntPtr style, int i); - - public Gdk.Color Text (StateType state) - { - IntPtr raw = gtksharp_gtk_style_get_text (Handle, (int) state); - return Gdk.Color.New (raw); - } - - public Gdk.Color[] TextColors { - get { - Gdk.Color[] ret = new Gdk.Color[5]; - for (int i = 0; i < 5; i++) - ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_text (Handle, i)); - return ret; - } - } - - [DllImport("gtksharpglue-3")] - static extern IntPtr gtksharp_gtk_style_get_base (IntPtr style, int i); - - public Gdk.Color Base (StateType state) - { - IntPtr raw = gtksharp_gtk_style_get_base (Handle, (int) state); - return Gdk.Color.New (raw); - } - - public Gdk.Color[] BaseColors { - get { - Gdk.Color[] ret = new Gdk.Color[5]; - for (int i = 0; i < 5; i++) - ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_base (Handle, i)); - return ret; - } - } - - [DllImport("gtksharpglue-3")] - static extern IntPtr gtksharp_gtk_style_get_light (IntPtr style, int i); - - public Gdk.Color Light (StateType state) - { - IntPtr raw = gtksharp_gtk_style_get_light (Handle, (int) state); - return Gdk.Color.New (raw); - } - - public Gdk.Color[] LightColors { - get { - Gdk.Color[] ret = new Gdk.Color[5]; - for (int i = 0; i < 5; i++) - ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_light (Handle, i)); - return ret; - } - } - - [DllImport("gtksharpglue-3")] - static extern IntPtr gtksharp_gtk_style_get_mid (IntPtr style, int i); - - public Gdk.Color Mid (StateType state) - { - IntPtr raw = gtksharp_gtk_style_get_mid (Handle, (int) state); - return Gdk.Color.New (raw); - } - - public Gdk.Color[] MidColors { - get { - Gdk.Color[] ret = new Gdk.Color[5]; - for (int i = 0; i < 5; i++) - ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_mid (Handle, i)); - return ret; - } - } - - [DllImport("gtksharpglue-3")] - static extern IntPtr gtksharp_gtk_style_get_dark (IntPtr style, int i); - - public Gdk.Color Dark (StateType state) - { - IntPtr raw = gtksharp_gtk_style_get_dark (Handle, (int) state); - return Gdk.Color.New (raw); - } - - public Gdk.Color[] DarkColors { - get { - Gdk.Color[] ret = new Gdk.Color[5]; - for (int i = 0; i < 5; i++) - ret[i] = Gdk.Color.New (gtksharp_gtk_style_get_dark (Handle, i)); - return ret; - } - } - - [DllImport ("gtksharpglue-3")] - static extern int gtksharp_gtk_style_get_thickness (IntPtr style, int x_axis); - [DllImport ("gtksharpglue-3")] - static extern void gtksharp_gtk_style_set_thickness (IntPtr style, int value); - - public int XThickness { - get { - return gtksharp_gtk_style_get_thickness (Handle, 0); - } - - set { - gtksharp_gtk_style_set_thickness (Handle, value); - } - } - - public int YThickness { - get { - return gtksharp_gtk_style_get_thickness (Handle, 1); - } - - set { - gtksharp_gtk_style_set_thickness (Handle, -value); - } - } - - [DllImport ("gtksharpglue-3")] - static extern IntPtr gtksharp_gtk_style_get_font_description (IntPtr style); - - public Pango.FontDescription FontDescription { - get { - IntPtr Raw = gtksharp_gtk_style_get_font_description (Handle); - - if (Raw == IntPtr.Zero) - return null; - Pango.FontDescription ret = (Pango.FontDescription) GLib.Opaque.GetOpaque (Raw, typeof (Pango.FontDescription), false); - if (ret == null) - ret = new Pango.FontDescription (Raw); - return ret; - } - } - } -} diff --git a/Source/Libs/GtkSharp/Target.cs b/Source/Libs/GtkSharp/Target.cs index bf35d6db2..522749d2f 100755 --- a/Source/Libs/GtkSharp/Target.cs +++ b/Source/Libs/GtkSharp/Target.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class Target { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_target_table_new_from_list(IntPtr list, out int n_targets); + delegate IntPtr d_gtk_target_table_new_from_list(IntPtr list, out int n_targets); + static d_gtk_target_table_new_from_list gtk_target_table_new_from_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_target_table_new_from_list")); public static Gtk.TargetEntry[] TableNewFromList(Gtk.TargetList list) { int n_targets; diff --git a/Source/Libs/GtkSharp/TargetList.cs b/Source/Libs/GtkSharp/TargetList.cs index e906f8bab..e6da69cad 100755 --- a/Source/Libs/GtkSharp/TargetList.cs +++ b/Source/Libs/GtkSharp/TargetList.cs @@ -23,8 +23,8 @@ namespace Gtk { public partial class TargetList { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_target_list_new(Gtk.TargetEntry[] targets, uint n_targets); + delegate IntPtr d_gtk_target_list_new(Gtk.TargetEntry[] targets, uint n_targets); + static d_gtk_target_list_new gtk_target_list_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_target_list_new")); public TargetList() : base(gtk_target_list_new(null, 0)) {} diff --git a/Source/Libs/GtkSharp/TextBuffer.cs b/Source/Libs/GtkSharp/TextBuffer.cs index 531fcaca7..c4c5ffbb0 100755 --- a/Source/Libs/GtkSharp/TextBuffer.cs +++ b/Source/Libs/GtkSharp/TextBuffer.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class TextBuffer { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_text_buffer_set_text (IntPtr raw, IntPtr text, int len); + delegate void d_gtk_text_buffer_set_text(IntPtr raw, IntPtr text, int len); + static d_gtk_text_buffer_set_text gtk_text_buffer_set_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_set_text")); public void Clear () { @@ -46,8 +46,8 @@ namespace Gtk { gtk_text_buffer_paste_clipboard(Handle, clipboard.Handle, IntPtr.Zero, true); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_text_buffer_insert (IntPtr raw, ref Gtk.TextIter iter, IntPtr text, int len); + delegate void d_gtk_text_buffer_insert(IntPtr raw, ref Gtk.TextIter iter, IntPtr text, int len); + static d_gtk_text_buffer_insert gtk_text_buffer_insert = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_insert")); [Obsolete ("Replaced by 'ref TextIter iter' overload")] public void Insert (TextIter iter, string text) @@ -109,8 +109,8 @@ namespace Gtk { Text = text; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_text_buffer_insert_interactive(IntPtr raw, ref Gtk.TextIter iter, IntPtr text, int len, bool default_editable); + delegate bool d_gtk_text_buffer_insert_interactive(IntPtr raw, ref Gtk.TextIter iter, IntPtr text, int len, bool default_editable); + static d_gtk_text_buffer_insert_interactive gtk_text_buffer_insert_interactive = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_insert_interactive")); public bool InsertInteractive(ref Gtk.TextIter iter, string text, bool default_editable) { @@ -120,8 +120,8 @@ namespace Gtk { return result; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_text_buffer_insert_interactive_at_cursor(IntPtr raw, IntPtr text, int len, bool default_editable); + delegate bool d_gtk_text_buffer_insert_interactive_at_cursor(IntPtr raw, IntPtr text, int len, bool default_editable); + static d_gtk_text_buffer_insert_interactive_at_cursor gtk_text_buffer_insert_interactive_at_cursor = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_insert_interactive_at_cursor")); public bool InsertInteractiveAtCursor(string text, bool default_editable) { @@ -131,8 +131,8 @@ namespace Gtk { return result; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_text_buffer_insert_at_cursor(IntPtr raw, IntPtr text, int len); + delegate void d_gtk_text_buffer_insert_at_cursor(IntPtr raw, IntPtr text, int len); + static d_gtk_text_buffer_insert_at_cursor gtk_text_buffer_insert_at_cursor = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_insert_at_cursor")); public void InsertAtCursor(string text) { @@ -141,8 +141,8 @@ namespace Gtk { GLib.Marshaller.Free (native); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_text_buffer_serialize (IntPtr raw, IntPtr content_buffer, IntPtr format, ref Gtk.TextIter start, ref Gtk.TextIter end, out UIntPtr length); + delegate IntPtr d_gtk_text_buffer_serialize(IntPtr raw, IntPtr content_buffer, IntPtr format, ref Gtk.TextIter start, ref Gtk.TextIter end, out UIntPtr length); + static d_gtk_text_buffer_serialize gtk_text_buffer_serialize = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_serialize")); public byte[] Serialize(Gtk.TextBuffer content_buffer, Gdk.Atom format, Gtk.TextIter start, Gtk.TextIter end) { @@ -156,11 +156,11 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_text_buffer_get_serialize_formats(IntPtr raw, out int n_formats); + delegate IntPtr d_gtk_text_buffer_get_serialize_formats(IntPtr raw, out int n_formats); + static d_gtk_text_buffer_get_serialize_formats gtk_text_buffer_get_serialize_formats = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_get_serialize_formats")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_text_buffer_get_deserialize_formats(IntPtr raw, out int n_formats); + delegate IntPtr d_gtk_text_buffer_get_deserialize_formats(IntPtr raw, out int n_formats); + static d_gtk_text_buffer_get_deserialize_formats gtk_text_buffer_get_deserialize_formats = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_buffer_get_deserialize_formats")); public Gdk.Atom[] DeserializeFormats { get { diff --git a/Source/Libs/GtkSharp/TextChildAnchor.cs b/Source/Libs/GtkSharp/TextChildAnchor.cs index 1de538dc0..3e97a9a73 100755 --- a/Source/Libs/GtkSharp/TextChildAnchor.cs +++ b/Source/Libs/GtkSharp/TextChildAnchor.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class TextChildAnchor { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_text_child_anchor_get_widgets (IntPtr raw); + delegate IntPtr d_gtk_text_child_anchor_get_widgets(IntPtr raw); + static d_gtk_text_child_anchor_get_widgets gtk_text_child_anchor_get_widgets = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_child_anchor_get_widgets")); public Widget[] Widgets { get { diff --git a/Source/Libs/GtkSharp/TextIter.cs b/Source/Libs/GtkSharp/TextIter.cs index a27b09edd..0bcbc8c6f 100755 --- a/Source/Libs/GtkSharp/TextIter.cs +++ b/Source/Libs/GtkSharp/TextIter.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial struct TextIter { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint gtk_text_iter_get_char(ref Gtk.TextIter raw); + delegate uint d_gtk_text_iter_get_char(ref Gtk.TextIter raw); + static d_gtk_text_iter_get_char gtk_text_iter_get_char = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_iter_get_char")); public string Char { get { @@ -34,8 +34,8 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_text_iter_get_marks (ref TextIter iter); + delegate IntPtr d_gtk_text_iter_get_marks(ref TextIter iter); + static d_gtk_text_iter_get_marks gtk_text_iter_get_marks = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_iter_get_marks")); public TextMark[] Marks { get { @@ -50,8 +50,8 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_text_iter_get_tags (ref TextIter iter); + delegate IntPtr d_gtk_text_iter_get_tags(ref TextIter iter); + static d_gtk_text_iter_get_tags gtk_text_iter_get_tags = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_iter_get_tags")); public TextTag[] Tags { get { @@ -66,8 +66,8 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_text_iter_get_toggled_tags (ref TextIter iter, bool toggled_on); + delegate IntPtr d_gtk_text_iter_get_toggled_tags(ref TextIter iter, bool toggled_on); + static d_gtk_text_iter_get_toggled_tags gtk_text_iter_get_toggled_tags = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_iter_get_toggled_tags")); public TextTag[] GetToggledTags (bool toggled_on) { diff --git a/Source/Libs/GtkSharp/TextView.cs b/Source/Libs/GtkSharp/TextView.cs index 0172716ba..301c925d3 100755 --- a/Source/Libs/GtkSharp/TextView.cs +++ b/Source/Libs/GtkSharp/TextView.cs @@ -26,8 +26,8 @@ namespace Gtk { public partial class TextView { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_text_view_new_with_buffer (IntPtr buffer); + delegate IntPtr d_gtk_text_view_new_with_buffer(IntPtr buffer); + static d_gtk_text_view_new_with_buffer gtk_text_view_new_with_buffer = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_text_view_new_with_buffer")); public TextView (TextBuffer buffer) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/TreeModelAdapter.cs b/Source/Libs/GtkSharp/TreeModelAdapter.cs index 3a17f344e..bd87e0bb0 100755 --- a/Source/Libs/GtkSharp/TreeModelAdapter.cs +++ b/Source/Libs/GtkSharp/TreeModelAdapter.cs @@ -25,10 +25,10 @@ namespace Gtk { public partial class TreeModelAdapter { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); + delegate bool d_gtk_tree_model_iter_children2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); + static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); public bool IterChildren (out Gtk.TreeIter iter) { - bool raw_ret = gtk_tree_model_iter_children (Handle, out iter, IntPtr.Zero); + bool raw_ret = gtk_tree_model_iter_children2 (Handle, out iter, IntPtr.Zero); bool ret = raw_ret; return ret; } @@ -39,10 +39,10 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_model_iter_nth_child (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); + delegate bool d_gtk_tree_model_iter_nth_child2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); + static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); public bool IterNthChild (out Gtk.TreeIter iter, int n) { - bool raw_ret = gtk_tree_model_iter_nth_child (Handle, out iter, IntPtr.Zero, n); + bool raw_ret = gtk_tree_model_iter_nth_child2 (Handle, out iter, IntPtr.Zero, n); bool ret = raw_ret; return ret; } diff --git a/Source/Libs/GtkSharp/TreeModelFilter.cs b/Source/Libs/GtkSharp/TreeModelFilter.cs index 438141308..029438ff5 100755 --- a/Source/Libs/GtkSharp/TreeModelFilter.cs +++ b/Source/Libs/GtkSharp/TreeModelFilter.cs @@ -25,10 +25,10 @@ namespace Gtk { public partial class TreeModelFilter { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); + delegate bool d_gtk_tree_model_iter_children2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); + static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); public bool IterChildren (out Gtk.TreeIter iter) { - bool raw_ret = gtk_tree_model_iter_children (Handle, out iter, IntPtr.Zero); + bool raw_ret = gtk_tree_model_iter_children2 (Handle, out iter, IntPtr.Zero); bool ret = raw_ret; return ret; } @@ -39,10 +39,10 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_model_iter_nth_child (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); + delegate bool d_gtk_tree_model_iter_nth_child2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); + static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); public bool IterNthChild (out Gtk.TreeIter iter, int n) { - bool raw_ret = gtk_tree_model_iter_nth_child (Handle, out iter, IntPtr.Zero, n); + bool raw_ret = gtk_tree_model_iter_nth_child2 (Handle, out iter, IntPtr.Zero, n); bool ret = raw_ret; return ret; } @@ -83,8 +83,8 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_model_filter_set_modify_func(IntPtr raw, int n_columns, IntPtr[] types, GtkSharp.TreeModelFilterModifyFuncNative func, IntPtr data, GLib.DestroyNotify destroy); + delegate void d_gtk_tree_model_filter_set_modify_func(IntPtr raw, int n_columns, IntPtr[] types, GtkSharp.TreeModelFilterModifyFuncNative func, IntPtr data, GLib.DestroyNotify destroy); + static d_gtk_tree_model_filter_set_modify_func gtk_tree_model_filter_set_modify_func = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_filter_set_modify_func")); public void SetModifyFunc (int n_columns, GLib.GType[] types, TreeModelFilterModifyFunc func) { @@ -96,8 +96,8 @@ namespace Gtk { gtk_tree_model_filter_set_modify_func (Handle, n_columns, native_types, func_wrapper.NativeDelegate, (IntPtr) gch, GLib.DestroyHelper.NotifyHandler); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_model_filter_convert_child_iter_to_iter (IntPtr raw, out Gtk.TreeIter filter_iter, ref Gtk.TreeIter child_iter); + delegate bool d_gtk_tree_model_filter_convert_child_iter_to_iter(IntPtr raw, out Gtk.TreeIter filter_iter, ref Gtk.TreeIter child_iter); + static d_gtk_tree_model_filter_convert_child_iter_to_iter gtk_tree_model_filter_convert_child_iter_to_iter = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_filter_convert_child_iter_to_iter")); public TreeIter ConvertChildIterToIter (Gtk.TreeIter child_iter) { diff --git a/Source/Libs/GtkSharp/TreeModelSort.cs b/Source/Libs/GtkSharp/TreeModelSort.cs index 1bfe76d7e..77276b98a 100755 --- a/Source/Libs/GtkSharp/TreeModelSort.cs +++ b/Source/Libs/GtkSharp/TreeModelSort.cs @@ -25,10 +25,10 @@ namespace Gtk { public partial class TreeModelSort { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); + delegate bool d_gtk_tree_model_iter_children2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); + static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); public bool IterChildren (out Gtk.TreeIter iter) { - bool raw_ret = gtk_tree_model_iter_children (Handle, out iter, IntPtr.Zero); + bool raw_ret = gtk_tree_model_iter_children2 (Handle, out iter, IntPtr.Zero); bool ret = raw_ret; return ret; } @@ -39,10 +39,10 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_model_iter_nth_child (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); + delegate bool d_gtk_tree_model_iter_nth_child2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); + static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); public bool IterNthChild (out Gtk.TreeIter iter, int n) { - bool raw_ret = gtk_tree_model_iter_nth_child (Handle, out iter, IntPtr.Zero, n); + bool raw_ret = gtk_tree_model_iter_nth_child2 (Handle, out iter, IntPtr.Zero, n); bool ret = raw_ret; return ret; } diff --git a/Source/Libs/GtkSharp/TreePath.cs b/Source/Libs/GtkSharp/TreePath.cs index 42fe9d47f..f620ca733 100755 --- a/Source/Libs/GtkSharp/TreePath.cs +++ b/Source/Libs/GtkSharp/TreePath.cs @@ -21,8 +21,8 @@ namespace Gtk { public partial class TreePath { // Patch submitted by malte on bug #49518 - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_tree_path_get_indices(IntPtr raw); + delegate IntPtr d_gtk_tree_path_get_indices(IntPtr raw); + static d_gtk_tree_path_get_indices gtk_tree_path_get_indices = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_path_get_indices")); public int [] Indices { get { diff --git a/Source/Libs/GtkSharp/TreeSelection.cs b/Source/Libs/GtkSharp/TreeSelection.cs index d03b55883..2d8fb1cfa 100755 --- a/Source/Libs/GtkSharp/TreeSelection.cs +++ b/Source/Libs/GtkSharp/TreeSelection.cs @@ -25,12 +25,12 @@ namespace Gtk { public partial class TreeSelection { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_tree_selection_get_selected_rows (IntPtr raw, IntPtr model); + delegate IntPtr d_gtk_tree_selection_get_selected_rows2(IntPtr raw, IntPtr model); + static d_gtk_tree_selection_get_selected_rows2 gtk_tree_selection_get_selected_rows2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_selection_get_selected_rows")); public TreePath[] GetSelectedRows () { - IntPtr list_ptr = gtk_tree_selection_get_selected_rows (Handle, IntPtr.Zero); + IntPtr list_ptr = gtk_tree_selection_get_selected_rows2 (Handle, IntPtr.Zero); if (list_ptr == IntPtr.Zero) return new TreePath [0]; @@ -38,8 +38,8 @@ namespace Gtk { return (TreePath[]) GLib.Marshaller.ListToArray (list, typeof (Gtk.TreePath)); } - [DllImport (Global.GtkNativeDll, EntryPoint="gtk_tree_selection_get_selected", CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_selection_get_selected_without_model (IntPtr raw, IntPtr model, out Gtk.TreeIter iter); + delegate bool d_gtk_tree_selection_get_selected_without_model(IntPtr raw, IntPtr model, out Gtk.TreeIter iter); + static d_gtk_tree_selection_get_selected_without_model gtk_tree_selection_get_selected_without_model = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_selection_get_selected_without_model")); public bool GetSelected (out Gtk.TreeIter iter) { diff --git a/Source/Libs/GtkSharp/TreeStore.cs b/Source/Libs/GtkSharp/TreeStore.cs index 9cfe85b2e..6164a47fe 100755 --- a/Source/Libs/GtkSharp/TreeStore.cs +++ b/Source/Libs/GtkSharp/TreeStore.cs @@ -27,16 +27,16 @@ namespace Gtk { public partial class TreeStore { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_append (IntPtr raw, out TreeIter iter, ref TreeIter parent); + delegate void d_gtk_tree_store_append(IntPtr raw, out TreeIter iter, ref TreeIter parent); + static d_gtk_tree_store_append gtk_tree_store_append = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_append")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_append (IntPtr raw, out TreeIter iter, IntPtr parent); + delegate void d_gtk_tree_store_append2(IntPtr raw, out TreeIter iter, IntPtr parent); + static d_gtk_tree_store_append2 gtk_tree_store_append2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_append")); public TreeIter AppendNode () { TreeIter iter; - gtk_tree_store_append (Handle, out iter, IntPtr.Zero); + gtk_tree_store_append2 (Handle, out iter, IntPtr.Zero); return iter; } @@ -47,11 +47,11 @@ namespace Gtk { return iter; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_insert (IntPtr raw, out TreeIter iter, ref TreeIter parent, int position); + delegate void d_gtk_tree_store_insert(IntPtr raw, out TreeIter iter, ref TreeIter parent, int position); + static d_gtk_tree_store_insert gtk_tree_store_insert = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_insert (IntPtr raw, out TreeIter iter, IntPtr parent, int position); + delegate void d_gtk_tree_store_insert2(IntPtr raw, out TreeIter iter, IntPtr parent, int position); + static d_gtk_tree_store_insert2 gtk_tree_store_insert2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert")); public TreeIter InsertNode (TreeIter parent, int position) { @@ -63,15 +63,15 @@ namespace Gtk { public TreeIter InsertNode (int position) { TreeIter iter; - gtk_tree_store_insert (Handle, out iter, IntPtr.Zero, position); + gtk_tree_store_insert2 (Handle, out iter, IntPtr.Zero, position); return iter; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_prepend (IntPtr raw, out TreeIter iter, ref TreeIter parent); + delegate void d_gtk_tree_store_prepend(IntPtr raw, out TreeIter iter, ref TreeIter parent); + static d_gtk_tree_store_prepend gtk_tree_store_prepend = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_prepend")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_prepend (IntPtr raw, out TreeIter iter, IntPtr parent); + delegate void d_gtk_tree_store_prepend2(IntPtr raw, out TreeIter iter, IntPtr parent); + static d_gtk_tree_store_prepend2 gtk_tree_store_prepend2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_prepend")); public TreeIter PrependNode (TreeIter parent) { @@ -83,20 +83,20 @@ namespace Gtk { public TreeIter PrependNode () { TreeIter iter; - gtk_tree_store_prepend (Handle, out iter, IntPtr.Zero); + gtk_tree_store_prepend2 (Handle, out iter, IntPtr.Zero); return iter; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_insert_before (IntPtr raw, out TreeIter iter, ref TreeIter parent, ref TreeIter sibling); + delegate void d_gtk_tree_store_insert_before(IntPtr raw, out TreeIter iter, ref TreeIter parent, ref TreeIter sibling); + static d_gtk_tree_store_insert_before gtk_tree_store_insert_before = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_before")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_insert_before (IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling); + delegate void d_gtk_tree_store_insert_before2(IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling); + static d_gtk_tree_store_insert_before2 gtk_tree_store_insert_before2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_before")); public TreeIter InsertNodeBefore (TreeIter sibling) { TreeIter iter; - gtk_tree_store_insert_before (Handle, out iter, IntPtr.Zero, ref sibling); + gtk_tree_store_insert_before2 (Handle, out iter, IntPtr.Zero, ref sibling); return iter; } @@ -107,16 +107,16 @@ namespace Gtk { return iter; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_insert_after (IntPtr raw, out TreeIter iter, ref TreeIter parent, ref TreeIter sibling); + delegate void d_gtk_tree_store_insert_after(IntPtr raw, out TreeIter iter, ref TreeIter parent, ref TreeIter sibling); + static d_gtk_tree_store_insert_after gtk_tree_store_insert_after = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_after")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_insert_after (IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling); + delegate void d_gtk_tree_store_insert_after2(IntPtr raw, out TreeIter iter, IntPtr parent, ref TreeIter sibling); + static d_gtk_tree_store_insert_after2 gtk_tree_store_insert_after2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_after")); public TreeIter InsertNodeAfter (TreeIter sibling) { TreeIter iter; - gtk_tree_store_insert_after (Handle, out iter, IntPtr.Zero, ref sibling); + gtk_tree_store_insert_after2 (Handle, out iter, IntPtr.Zero, ref sibling); return iter; } @@ -127,10 +127,10 @@ namespace Gtk { return iter; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_model_iter_children (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); + delegate bool d_gtk_tree_model_iter_children2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent); + static d_gtk_tree_model_iter_children2 gtk_tree_model_iter_children2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_children")); public bool IterChildren (out Gtk.TreeIter iter) { - bool raw_ret = gtk_tree_model_iter_children (Handle, out iter, IntPtr.Zero); + bool raw_ret = gtk_tree_model_iter_children2 (Handle, out iter, IntPtr.Zero); bool ret = raw_ret; return ret; } @@ -141,10 +141,10 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_model_iter_nth_child (IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); + delegate bool d_gtk_tree_model_iter_nth_child2(IntPtr raw, out Gtk.TreeIter iter, IntPtr parent, int n); + static d_gtk_tree_model_iter_nth_child2 gtk_tree_model_iter_nth_child2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_model_iter_nth_child")); public bool IterNthChild (out Gtk.TreeIter iter, int n) { - bool raw_ret = gtk_tree_model_iter_nth_child (Handle, out iter, IntPtr.Zero, n); + bool raw_ret = gtk_tree_model_iter_nth_child2 (Handle, out iter, IntPtr.Zero, n); bool ret = raw_ret; return ret; } @@ -222,11 +222,11 @@ namespace Gtk { return iter; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_insert_with_valuesv(IntPtr raw, out TreeIter iter, IntPtr parent, int position, int[] columns, GLib.Value[] values, int n_values); + delegate void d_gtk_tree_store_insert_with_valuesv(IntPtr raw, out TreeIter iter, IntPtr parent, int position, int[] columns, GLib.Value[] values, int n_values); + static d_gtk_tree_store_insert_with_valuesv gtk_tree_store_insert_with_valuesv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_with_valuesv")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_insert_with_valuesv(IntPtr raw, out TreeIter iter, ref TreeIter parent, int position, int[] columns, GLib.Value[] values, int n_values); + delegate void d_gtk_tree_store_insert_with_valuesv2(IntPtr raw, out TreeIter iter, ref TreeIter parent, int position, int[] columns, GLib.Value[] values, int n_values); + static d_gtk_tree_store_insert_with_valuesv2 gtk_tree_store_insert_with_valuesv2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_insert_with_valuesv")); public TreeIter InsertWithValues (int position, params object[] values) { @@ -254,7 +254,7 @@ namespace Gtk { TreeIter iter; if (hasParent) - gtk_tree_store_insert_with_valuesv (Handle, out iter, ref parent, position, columns, vals, n_values); + gtk_tree_store_insert_with_valuesv2 (Handle, out iter, ref parent, position, columns, vals, n_values); else gtk_tree_store_insert_with_valuesv (Handle, out iter, IntPtr.Zero, position, columns, vals, n_values); @@ -264,8 +264,8 @@ namespace Gtk { return iter; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_tree_store_set_valuesv(IntPtr raw, ref TreeIter iter, int[] columns, GLib.Value[] values, int n_values); + delegate void d_gtk_tree_store_set_valuesv(IntPtr raw, ref TreeIter iter, int[] columns, GLib.Value[] values, int n_values); + static d_gtk_tree_store_set_valuesv gtk_tree_store_set_valuesv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_store_set_valuesv")); public void SetValues (TreeIter iter, params object[] values) { diff --git a/Source/Libs/GtkSharp/TreeView.cs b/Source/Libs/GtkSharp/TreeView.cs index 9c4d0a9a3..7e0ed04b8 100755 --- a/Source/Libs/GtkSharp/TreeView.cs +++ b/Source/Libs/GtkSharp/TreeView.cs @@ -48,23 +48,11 @@ namespace Gtk { } */ - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_view_get_path_at_pos (IntPtr raw, - int x, - int y, - out IntPtr path, - out IntPtr column, - out int cell_x, - out int cell_y); + delegate bool d_gtk_tree_view_get_path_at_pos(IntPtr raw, int x, int y, out IntPtr path, out IntPtr column, out int cell_x, out int cell_y); + static d_gtk_tree_view_get_path_at_pos gtk_tree_view_get_path_at_pos = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_view_get_path_at_pos")); - [DllImport (Global.GtkNativeDll, EntryPoint="gtk_tree_view_get_path_at_pos", CallingConvention = CallingConvention.Cdecl)] - static extern bool gtk_tree_view_get_path_at_pos_intptr (IntPtr raw, - int x, - int y, - out IntPtr path, - out IntPtr column, - IntPtr cell_x, - IntPtr cell_y); + delegate bool d_gtk_tree_view_get_path_at_pos_intptr(IntPtr raw, int x, int y, out IntPtr path, out IntPtr column, IntPtr cell_x, IntPtr cell_y); + static d_gtk_tree_view_get_path_at_pos_intptr gtk_tree_view_get_path_at_pos_intptr = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_view_get_path_at_pos_intptr")); public bool GetPathAtPos (int x, int y, out Gtk.TreePath path, out Gtk.TreeViewColumn column, out int cell_x, out int cell_y) { diff --git a/Source/Libs/GtkSharp/UIManager.cs b/Source/Libs/GtkSharp/UIManager.cs index 2e7c68664..8a33aa315 100755 --- a/Source/Libs/GtkSharp/UIManager.cs +++ b/Source/Libs/GtkSharp/UIManager.cs @@ -37,16 +37,16 @@ namespace Gtk { return AddUiFromString (new System.IO.StreamReader (s).ReadToEnd ()); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern uint gtk_ui_manager_new_merge_id (IntPtr raw); + delegate uint d_gtk_ui_manager_new_merge_id(IntPtr raw); + static d_gtk_ui_manager_new_merge_id gtk_ui_manager_new_merge_id = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_ui_manager_new_merge_id")); public uint NewMergeId () { return gtk_ui_manager_new_merge_id (Handle); } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_ui_manager_get_toplevels (IntPtr raw, int types); + delegate IntPtr d_gtk_ui_manager_get_toplevels(IntPtr raw, int types); + static d_gtk_ui_manager_get_toplevels gtk_ui_manager_get_toplevels = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_ui_manager_get_toplevels")); public Widget[] GetToplevels (Gtk.UIManagerItemType types) { IntPtr raw_ret = gtk_ui_manager_get_toplevels (Handle, (int) types); @@ -58,8 +58,8 @@ namespace Gtk { return result; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_ui_manager_get_action_groups (IntPtr raw); + delegate IntPtr d_gtk_ui_manager_get_action_groups(IntPtr raw); + static d_gtk_ui_manager_get_action_groups gtk_ui_manager_get_action_groups = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_ui_manager_get_action_groups")); public ActionGroup[] ActionGroups { get { diff --git a/Source/Libs/GtkSharp/VScale.cs b/Source/Libs/GtkSharp/VScale.cs index 70620ccb2..35a9cec82 100755 --- a/Source/Libs/GtkSharp/VScale.cs +++ b/Source/Libs/GtkSharp/VScale.cs @@ -25,8 +25,8 @@ namespace Gtk { public partial class VScale { - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_vscale_new_with_range (double min, double max, double step); + delegate IntPtr d_gtk_vscale_new_with_range(double min, double max, double step); + static d_gtk_vscale_new_with_range gtk_vscale_new_with_range = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_vscale_new_with_range")); public VScale (double min, double max, double step) : base (IntPtr.Zero) { diff --git a/Source/Libs/GtkSharp/Widget.cs b/Source/Libs/GtkSharp/Widget.cs index 8df24f58a..7d61477ef 100755 --- a/Source/Libs/GtkSharp/Widget.cs +++ b/Source/Libs/GtkSharp/Widget.cs @@ -58,11 +58,11 @@ namespace Gtk { [UnmanagedFunctionPointer (CallingConvention.Cdecl)] delegate void ClosureMarshal (IntPtr closure, IntPtr return_val, uint n_param_vals, IntPtr param_values, IntPtr invocation_hint, IntPtr marshal_data); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_closure_new_simple (int closure_size, IntPtr dummy); + delegate IntPtr d_g_closure_new_simple(int closure_size, IntPtr dummy); + static d_g_closure_new_simple g_closure_new_simple = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_new_simple")); - [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern void g_closure_set_marshal (IntPtr closure, ClosureMarshal marshaler); + delegate void d_g_closure_set_marshal(IntPtr closure, ClosureMarshal marshaler); + static d_g_closure_set_marshal g_closure_set_marshal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_closure_set_marshal")); static IntPtr CreateClosure (ClosureMarshal marshaler) { IntPtr raw_closure = g_closure_new_simple (Marshal.SizeOf (typeof (GClosure)), IntPtr.Zero); @@ -70,8 +70,8 @@ namespace Gtk { return raw_closure; } - [DllImport ("libgobject-2.0-0.dll", CallingConvention = CallingConvention.Cdecl)] - static extern uint g_signal_newv (IntPtr signal_name, IntPtr gtype, GLib.Signal.Flags signal_flags, IntPtr closure, IntPtr accumulator, IntPtr accu_data, IntPtr c_marshaller, IntPtr return_type, uint n_params, [MarshalAs (UnmanagedType.LPArray)] IntPtr[] param_types); + delegate uint d_g_signal_newv(IntPtr signal_name, IntPtr gtype, GLib.Signal.Flags signal_flags, IntPtr closure, IntPtr accumulator, IntPtr accu_data, IntPtr c_marshaller, IntPtr return_type, uint n_params, [MarshalAs (UnmanagedType.LPArray)] IntPtr[] param_types); + static d_g_signal_newv g_signal_newv = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GObject), "g_signal_newv")); static uint RegisterSignal (string signal_name, GLib.GType gtype, GLib.Signal.Flags signal_flags, GLib.GType return_type, GLib.GType[] param_types, ClosureMarshal marshaler) { @@ -170,11 +170,11 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_binding_set_by_class (IntPtr class_ptr); + delegate IntPtr d_gtk_binding_set_by_class(IntPtr class_ptr); + static d_gtk_binding_set_by_class gtk_binding_set_by_class = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_binding_set_by_class")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_binding_entry_add_signall (IntPtr binding_set, uint keyval, Gdk.ModifierType modifiers, IntPtr signal_name, IntPtr binding_args); + delegate void d_gtk_binding_entry_add_signall(IntPtr binding_set, uint keyval, Gdk.ModifierType modifiers, IntPtr signal_name, IntPtr binding_args); + static d_gtk_binding_entry_add_signall gtk_binding_entry_add_signall = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_binding_entry_add_signall")); [StructLayout(LayoutKind.Sequential)] struct GtkBindingArg { @@ -242,11 +242,11 @@ namespace Gtk { return ret; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_widget_class_find_style_property (IntPtr class_ptr, IntPtr property_name); + delegate IntPtr d_gtk_widget_class_find_style_property(IntPtr class_ptr, IntPtr property_name); + static d_gtk_widget_class_find_style_property gtk_widget_class_find_style_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_widget_class_find_style_property")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_widget_style_get_property (IntPtr inst, IntPtr property_name, ref GLib.Value value); + delegate IntPtr d_gtk_widget_style_get_property(IntPtr inst, IntPtr property_name, ref GLib.Value value); + static d_gtk_widget_style_get_property gtk_widget_style_get_property = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_widget_style_get_property")); internal GLib.Value StyleGetPropertyValue (string property_name) { @@ -264,8 +264,8 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_widget_list_mnemonic_labels (IntPtr raw); + delegate IntPtr d_gtk_widget_list_mnemonic_labels(IntPtr raw); + static d_gtk_widget_list_mnemonic_labels gtk_widget_list_mnemonic_labels = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_widget_list_mnemonic_labels")); public Widget[] ListMnemonicLabels () { @@ -406,8 +406,8 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - private static extern void gtk_widget_destroy (IntPtr raw); + delegate void d_gtk_widget_destroy(IntPtr raw); + static d_gtk_widget_destroy gtk_widget_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_widget_destroy")); public virtual void Destroy () { diff --git a/Source/Libs/GtkSharp/Window.cs b/Source/Libs/GtkSharp/Window.cs index 7e0831b19..f224629b5 100755 --- a/Source/Libs/GtkSharp/Window.cs +++ b/Source/Libs/GtkSharp/Window.cs @@ -31,11 +31,11 @@ namespace Gtk { this.Title = title; } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_window_get_default_icon_list(); + delegate IntPtr d_gtk_window_get_default_icon_list(); + static d_gtk_window_get_default_icon_list gtk_window_get_default_icon_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_window_get_default_icon_list")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_window_set_default_icon_list(IntPtr list); + delegate void d_gtk_window_set_default_icon_list(IntPtr list); + static d_gtk_window_set_default_icon_list gtk_window_set_default_icon_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_window_set_default_icon_list")); public static Gdk.Pixbuf[] DefaultIconList { get { @@ -56,11 +56,11 @@ namespace Gtk { } } - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr gtk_window_get_icon_list(IntPtr raw); + delegate IntPtr d_gtk_window_get_icon_list(IntPtr raw); + static d_gtk_window_get_icon_list gtk_window_get_icon_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_window_get_icon_list")); - [DllImport (Global.GtkNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void gtk_window_set_icon_list(IntPtr raw, IntPtr list); + delegate void d_gtk_window_set_icon_list(IntPtr raw, IntPtr list); + static d_gtk_window_set_icon_list gtk_window_set_icon_list = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_window_set_icon_list")); public Gdk.Pixbuf[] IconList { get { diff --git a/Source/Libs/GtkSharp/linux-arm/libgtk-3-0.dll.so b/Source/Libs/GtkSharp/linux-arm/libgtk-3-0.dll.so deleted file mode 100755 index 9b572874bfc4193dab5e22b3846fc03eefc4d705..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5008 zcma)AU2I&%6`s4hCUzirar5IsS~gOUf{3q|pDKY?D30S)5jLqD_W||ca=m+PFWL2O z?_Rg|6B26GN+7{Qe;z2cRq=pmK>Lt~2&I)J(mbF%m{O^cioomjN{Q-+ZG}WsRV?2( zbB}jeIglftd*+)tb7tnu&pGQC$Hq@Pj-!N<>WCs*?NRCp$V?iagz9-hWmF1n`_(?S zS3bT=DdAqIkW(>ttf2yQ1G;3G1UcHisdG^8s1!P6z);cc34B`sEwqu>fXQs<825o6 z0F(BC_k!;x0PQwHe+TfrAKVY#qid8p0Qqh3x4`$rbzdhq=cJ`z=4dK77p|Kw66%W! z_d@Om?*enagW#R$8jXOG@#=5vGTuwV>N}|K?KLAZ=^J4 z#-3t-0QN8G7W1LL_=GhX@CC3v-Y3Aey_bQ7GAL}3t@%77jgYi|z6&o}ID_&nust4q zbtQK2fa+6|z(TZF5dfJ1H^H6pp@9Y4_NLG-#Qs0kfIG(d4XEpo;_ozS9?~u5lcDem z^My!xGZ4!2@N ziiPQ%w(j|1=r1X%qq-XTx$|ny5A#3wLk>`gyt#7uysDOGqOK~>o32*bBaA!`eTjnk zye@0=oOWy;cs4pe^tf9syIJVw{m3_6l@}1i{k1ieV>=LZ!!K~AcyC^b<)v6&jwSCf z+qYu*Yt$!j5iU~V0$#wLCU8k>l-P)il(>ACC~^KTQ{v*TQeu0q;Y{sE-!)3u`3EH~ z)OAW+=8q|Hf!8T9@Fpe3*|WM*zxC*GX0lt(Kdc z?e@P#pL^26nyJ4T+rFM%?n$n#)K#Xx-meB4co%nn*gDi;o%8m@#_sG&{hxxL8r}Gp zRsMTiPN4oHDL*;7(ayf#X#e2-Mk<@cy3XBP&Aik|v<}ssw?;Qqy4G-Nuw7ZH7cswL zhHIZ(e;4zdisu9`@9tk;sV7@2^;0|4;Y2iON1dqEogdZeM`7np^#46LrE2w_bgljd z%6|gmW^>s)((U$r^NaS2n1iO*aGu7BUZLlGw+&lae}Wn*B1^?7hT>Bw_=J z`3ET(M}6K0gSi`KKMm$?oBcG{L_YCdQZZVaeKYOM7&@_mv6v+HG^uw{SLsg@yJlgjC?Ss&#rn>YAWxWngp9d_lj3<%f@w^-A zRnrzu;KWg%@4BI0#n>$CbFe(1YKHJ{!UD}_wEPNGR?OY}Rmi=Mw zS2d<-UZ2ii0?YcD`~4PJ&L4BX*SqxJv2X@9{swH1_cX4wZSTV_{Y_wdJ}s-Ax8?IL z{C^8`ynfiX$2$Nl_k+3LcYuXx@34h4z(;{QLwr1kkGYSz+2LFm72L8q?B9{(&_6y)9G-#hl$&PqBVHJKeUwJ2OtCLhf& zluApgJpDqDi`e}bx?3$)z8QD>#x=U`@b=$VeL&A(Jy|Tv^G;8WOpJMB&z@rPdFr`m zM<&jUa_ZHxH|Njii-GcfIDYoz$hdd*^yzbBQ{L3b$?-8sT01GMPFr=-YqDamD~r}E zfMKm?rMI`w%{xi)*Jsd@pzAz*hx~gxCDy+Mw$pf%uS*Kebor~f^^U&{lv`aYMgBBo z6dE}vr8&Pkr`-I~JXDN~Lgj`*k#(j}DMrerlaz~J6Zq;WxrpU1eq7`il^e{NZ8vK1 zPXMhZWf=2Ig`9F{%P^pS0Jw0K(pLN^3JcQ#_JZuz_wi!D3ev$`K7NQ>MX|U+=T_?}!7W1JV`3zX}7>~(|GWl2sLY=kr z_zseH8u!OWuksRP_y1o|rN^Xv9?W65KE^RJ=OZNL7f`|M2kzDJm;aZMHtMoW{u!8l zq8{^tt=s5vUTD&KjF0?3&RUEiv@Pz(%V5rr_82Eu@#Fsp%0e>kYp4)CzSlRP*F8V> z`5l;c_57f>1wH2OLel4TR6vJEL=*MwTuin`d?$K?G>*O73&C?kducGw6vq@AL~8jH VIz1+_$GqRxtHPOo79~j0`x49LL`47q diff --git a/Source/Libs/GtkSharp/linux-x64/libgtk-3-0.dll.so b/Source/Libs/GtkSharp/linux-x64/libgtk-3-0.dll.so deleted file mode 100755 index cde1f5254900a2a7ea9e68da0c689f329f255271..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7240 zcmeHMU1%It6h50x+B9u`8f}~YfTI>{A37~9{l#d0nq&$|TVnz(7^jonO|rN@b$3>p z;!m&&{V`yDkow?@4^r?&(1(@^O=&5<2#Sc}g9M}ywP1=U)rYL-+_~RoW-^iDgCOLD zx#ynWd+)h-cFsL{t*f`YDi$L^oSq_~CaOJ7n--j1t2>O^Xdf-(b{(x%x;68n1-*3o0Rb$6q>YRKii3q#nv~a=Lw8uip|6P#QEttJV>9G4qQKQ?DF~T&tKZ|g2tKU%viTM~#Ic z*u=CE;t47K4e5knAJayNCuBcAk45munb$0H_+dxR0$hX(rWWU7!FO&8r%VW6)wlh36F zoZ(E$lSNDH#3@G{IGOb66lK!GqwWjacA3SzxkIRg^!AXQN;0;GrQZken>4>g#}|Ci z(~XAmC}&9a8ZhJI%R2{{_3`D50`B|x{;jdj+^w}P)V#9NAnVO3x2pW5b>>#>O_-52 z+4>&K2Cd1Oi=wmtzIE=7yPi!tv`PI?d3wZbeB=#fGjy}@kv5vA+5WgFPVVkkZnn;` zy>(+QZk?O8Zp=Jw#co?)&ABb?Fs2=@5{HZVn`m9ZYE;^8ooW5Hj(dYLpL**;>(5M; z*WBWErl(vk->#YFZfxi#yE;hpo5rF(^wS6{5UI5XR$E#2QfDawOA%O#z)}R3BCr&J zr3n0QBY?aUc_wm5N3RI9otwMeZ8iU-)_`2^41NSMxHD876HhApDU}O zuIPbr9hlZhEbel%T3+Xw)B75))VM`sxl0LL(aA2xx$LpkJxjXKpDTOgU())V2&(xY z4zrqmRm=a>v?jIJ{|@2a93Bz(gPzXL1I8A^GyQxYrj0s_ZRF- zkRK=PN047l*ta0Rh7i9Xe;Fa}LH_c}{ss99?~x*p^RA-)5!8>kUn>2TG=_ubGl=tP z$2s<~*?&FZ{08|AT-PxCEY*)wBjKLr7slmw7`iu$JkIxQ>|ap7dBOeL(|^dXruuST ztLYx!VuB#=Z&gHm8Z>{(fB9qHqneN32PPHl_?^o1%KUDe)h@W=mN7Z$Pm>*S-p+vzgx}}j3GePqu7Te9* z2`RD^xiFH<+oPHMu#>TqZoW{oozf{v}oxA%3~U55`!HONjD^Y)mNOG?S-;PJ!leTO=k%cUS_ z^zs6QUMB-gv8MUl$qMv{BTj;V1Gpq1dMzM<0F1pe~#^CO~}tq=nVp1hk-QK;tE$zkl%hnD*%6A z(eyf~tAc$xWRH9lSnBD12#-I(LKz?HM?L@?*2ntc^E`Lt8;bZKZ@~W#!up_r-(}lI zpFQ#mOPn%5&!gsP@IPRI#2(`#55fOg@E&0uutOX_Vp~~1?2)fb%cK|#)y_At2mY8v zetSY*qX)n_fd|+DUk%wK|7p?o&@e>$G3qvHy{G#ly$$$)Bc&O5b?f(YS CdGwwD diff --git a/Source/Libs/GtkSharp/linux-x86/libgtk-3-0.dll.so b/Source/Libs/GtkSharp/linux-x86/libgtk-3-0.dll.so deleted file mode 100755 index 4f2ba8b00f4859f5974c24dee88b66684f26470c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6508 zcmeHLU2IfU5T5PwQ?W`Z3lynx#RlPln+gpS6Jvj9D@n^=+ki26v)$dc8+P~N?ya_l zM9OMnDUB6h^g%;{n)vfpBQfv*EKztcsWm3V7fFz04NZiI*l1<_zH|4qw^)qv&17dY zcV^DanRCvZv-jMYR~lQId_JFO@QYt4)%r!ML0?_wYO2MM1+q?7O1aW&d(wULT%1p# zRFuAau}Jx97bnp?1zeEV7l9hk8_*NSAQP#FD}}c}HCBQrYTfQ@P8j0ffc-JN?1A1p zeim&+_UGD213)ZMns;=_2iI3E-}}x}SGyLb9{J<@@!Q9~uKScau7~!d#bNn~bRqCQ zV146v6Q{2pKXmzpeHC8}-+b`;w?99K=2=kTkqq#AJn|aw^sT`FQ=5A%%6@#z9IU+4FTzUiY0tEOLDcnwyVpFF`5tFv`L~-_MbQs9wuuntj$y_e?+F56Q z_8~N;FBCtQ0Ts!OGJv_0^i9Z}q+!>HE1_dWWu|Ln=9m2unt}75z~}H$PI~wVpIa|F z4-Xx=;f}GiWAIvfBCtC*mcCGWDKj$ctd(Cf!=KY<_I*4C&L2Sk4zGjt7YDDkotrEg z%%msgox8r;cln!1Copt;iY~{UMOeq{R(S(Q;{p^SP>4Vw0)+?^B2b7xAp(U66e93Hi9i)T`>!BhV2&09k}?nBS2A;~ z2SAxytpsJBi*H|*S2BBGE`o1uCI5OSXP2WhbH@o#=BO>8i$LE6-VfwgHii;0M3#V@ zh5s^8=7URt%sudhZJ$6pzPxR87o-yQQOLi8s=jFZFTng;19PY5hK47Nb;yd>8(Ykc z$l~q+%*_dIwE!{Tq?C+F0k}p2>j?y|o#0nd5#iijnUN9U+6aEPN}yuk%FMWD@>;)& z211ozv|nZ8B308eBa6M6mKkBl*eilx?Vw2ew9K7!_mI>tZW_-$bY&DO06I?od?w2L zlHgZ62F9R7nLFp^p`?DbgEM)$UsWEcaltRkBp({pFi&pgc*b_+=U;>q!WoTtw>k2%x1RuQLJ^tHh*YWYGldeqFgY)|kTrI|@ zOZqzly4B-<95T-m!H4z#0IK8XL;SLkb=`t`b(Rb?0(^+yBF}^jw5^4#?O6xe09o%R z>l&Lp_G@6j(<8J0^N_uDlMv(?e*sZ{DA*AU;2`wgI*NpnPRi-+>M}zzQzEgPxD{fN zB!$98*tWW3c4shVg&jMYvVy&R60+k5V-Y73HaFMQRLyOqiZ50$nGE)$BH|?br7IbX zN33vfJl>Bk9!XVeW|>-6)1JE4MyqkhHdb@2zM9Qucf_#{hAgM2H*vu1?3=4K%+_$q zwt9kzFv~mJp50N`y1fCdDEnw{%`H3Y>sqXxO-*f$?N)nTeM=+8_@^pSzR2U2lV%l$ zYHPifp1Z41tOU&}4RMgU%T20aC1$EW?gTqQouo^9G?%cQh}oU!H9LEwvG9gySd`Qg zO!bHv?oXhnOP!>vc`=eqMeW2a!GbOsiP2t6HKchk=9t~KBc>DS!&9x%jP$ts;~KeJ zyZP*mIt`e+Rr{_%`ILlK&ZEB~U~DFDND&ZsT5{ z9pB5uYVi42hWg*qmiG(aj{bzl|c-Bb%?U)u3KPUPLCfwqKafV`h*$M-ui z0A7#Fc47yR_Zj&Ucn}Tn-fH?atys`J8X02^m9V4p6(B5{at>_b+2fcRD)BM)h8_%!n&lW?yHRZJ JnC|4U`wLt5OECZd diff --git a/Source/Libs/PangoSharp/AttrBackground.cs b/Source/Libs/PangoSharp/AttrBackground.cs index c7ff77e5a..3015c083d 100755 --- a/Source/Libs/PangoSharp/AttrBackground.cs +++ b/Source/Libs/PangoSharp/AttrBackground.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrBackground : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_background_new (ushort red, ushort green, ushort blue); + delegate IntPtr d_pango_attr_background_new(ushort red, ushort green, ushort blue); + static d_pango_attr_background_new pango_attr_background_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_background_new")); public AttrBackground (ushort red, ushort green, ushort blue) : this (pango_attr_background_new (red, green, blue)) {} diff --git a/Source/Libs/PangoSharp/AttrFallback.cs b/Source/Libs/PangoSharp/AttrFallback.cs index c9c34aace..7a5f2be7c 100755 --- a/Source/Libs/PangoSharp/AttrFallback.cs +++ b/Source/Libs/PangoSharp/AttrFallback.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrFallback : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_fallback_new (bool fallback); + delegate IntPtr d_pango_attr_fallback_new(bool fallback); + static d_pango_attr_fallback_new pango_attr_fallback_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_fallback_new")); public AttrFallback (bool fallback) : this (pango_attr_fallback_new (fallback)) {} diff --git a/Source/Libs/PangoSharp/AttrFamily.cs b/Source/Libs/PangoSharp/AttrFamily.cs index 2e588cacf..cc77fc305 100755 --- a/Source/Libs/PangoSharp/AttrFamily.cs +++ b/Source/Libs/PangoSharp/AttrFamily.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrFamily : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_family_new (IntPtr family); + delegate IntPtr d_pango_attr_family_new(IntPtr family); + static d_pango_attr_family_new pango_attr_family_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_family_new")); public AttrFamily (string family) : base (NewAttrFamily (family)) {} diff --git a/Source/Libs/PangoSharp/AttrFontDesc.cs b/Source/Libs/PangoSharp/AttrFontDesc.cs index c7ebafaa3..00e2a3361 100755 --- a/Source/Libs/PangoSharp/AttrFontDesc.cs +++ b/Source/Libs/PangoSharp/AttrFontDesc.cs @@ -23,11 +23,11 @@ namespace Pango { public class AttrFontDesc : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_font_desc_new (IntPtr font_desc); + delegate IntPtr d_pango_attr_font_desc_new(IntPtr font_desc); + static d_pango_attr_font_desc_new pango_attr_font_desc_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_font_desc_new")); - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_font_description_copy(IntPtr raw); + delegate IntPtr d_pango_font_description_copy(IntPtr raw); + static d_pango_font_description_copy pango_font_description_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_description_copy")); public AttrFontDesc (Pango.FontDescription font_desc) : this (pango_attr_font_desc_new (pango_font_description_copy (font_desc.Handle))) {} diff --git a/Source/Libs/PangoSharp/AttrForeground.cs b/Source/Libs/PangoSharp/AttrForeground.cs index b9259d8e6..c02b3ea4c 100755 --- a/Source/Libs/PangoSharp/AttrForeground.cs +++ b/Source/Libs/PangoSharp/AttrForeground.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrForeground : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_foreground_new (ushort red, ushort green, ushort blue); + delegate IntPtr d_pango_attr_foreground_new(ushort red, ushort green, ushort blue); + static d_pango_attr_foreground_new pango_attr_foreground_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_foreground_new")); public AttrForeground (ushort red, ushort green, ushort blue) : this (pango_attr_foreground_new (red, green, blue)) {} diff --git a/Source/Libs/PangoSharp/AttrGravity.cs b/Source/Libs/PangoSharp/AttrGravity.cs index 1db9caf12..5a5beadec 100755 --- a/Source/Libs/PangoSharp/AttrGravity.cs +++ b/Source/Libs/PangoSharp/AttrGravity.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrGravity : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_gravity_new (int gravity); + delegate IntPtr d_pango_attr_gravity_new(int gravity); + static d_pango_attr_gravity_new pango_attr_gravity_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_gravity_new")); public AttrGravity (Gravity gravity) : this (pango_attr_gravity_new ((int) gravity)) {} diff --git a/Source/Libs/PangoSharp/AttrGravityHint.cs b/Source/Libs/PangoSharp/AttrGravityHint.cs index 804aeef16..be22d62f6 100755 --- a/Source/Libs/PangoSharp/AttrGravityHint.cs +++ b/Source/Libs/PangoSharp/AttrGravityHint.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrGravityHint : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_gravity_hint_new (int hint); + delegate IntPtr d_pango_attr_gravity_hint_new(int hint); + static d_pango_attr_gravity_hint_new pango_attr_gravity_hint_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_gravity_hint_new")); public AttrGravityHint (GravityHint hint) : this (pango_attr_gravity_hint_new ((int) hint)) {} diff --git a/Source/Libs/PangoSharp/AttrIterator.cs b/Source/Libs/PangoSharp/AttrIterator.cs index c371ca948..fa94ccd17 100755 --- a/Source/Libs/PangoSharp/AttrIterator.cs +++ b/Source/Libs/PangoSharp/AttrIterator.cs @@ -25,8 +25,8 @@ namespace Pango { public partial class AttrIterator { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_attr_iterator_get_font(IntPtr raw, IntPtr desc, out IntPtr language, out IntPtr extra_attrs); + delegate void d_pango_attr_iterator_get_font(IntPtr raw, IntPtr desc, out IntPtr language, out IntPtr extra_attrs); + static d_pango_attr_iterator_get_font pango_attr_iterator_get_font = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_iterator_get_font")); public void GetFont (out Pango.FontDescription desc, out Pango.Language language, out Pango.Attribute[] extra_attrs) { @@ -46,8 +46,8 @@ namespace Pango { extra_attrs [i++] = Pango.Attribute.GetAttribute (raw_attr); } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_iterator_get_attrs (IntPtr raw); + delegate IntPtr d_pango_attr_iterator_get_attrs(IntPtr raw); + static d_pango_attr_iterator_get_attrs pango_attr_iterator_get_attrs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_iterator_get_attrs")); public Pango.Attribute[] Attrs { get { diff --git a/Source/Libs/PangoSharp/AttrLanguage.cs b/Source/Libs/PangoSharp/AttrLanguage.cs index 11ba85bed..e92159a87 100755 --- a/Source/Libs/PangoSharp/AttrLanguage.cs +++ b/Source/Libs/PangoSharp/AttrLanguage.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrLanguage : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_language_new (IntPtr language); + delegate IntPtr d_pango_attr_language_new(IntPtr language); + static d_pango_attr_language_new pango_attr_language_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_language_new")); public AttrLanguage (Pango.Language language) : this (pango_attr_language_new (language.Handle)) {} diff --git a/Source/Libs/PangoSharp/AttrLetterSpacing.cs b/Source/Libs/PangoSharp/AttrLetterSpacing.cs index 63b99c730..e1b41595a 100755 --- a/Source/Libs/PangoSharp/AttrLetterSpacing.cs +++ b/Source/Libs/PangoSharp/AttrLetterSpacing.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrLetterSpacing : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_letter_spacing_new (int letter_spacing); + delegate IntPtr d_pango_attr_letter_spacing_new(int letter_spacing); + static d_pango_attr_letter_spacing_new pango_attr_letter_spacing_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_letter_spacing_new")); public AttrLetterSpacing (int letter_spacing) : this (pango_attr_letter_spacing_new (letter_spacing)) {} diff --git a/Source/Libs/PangoSharp/AttrList.cs b/Source/Libs/PangoSharp/AttrList.cs index b9eb15844..486aa3963 100755 --- a/Source/Libs/PangoSharp/AttrList.cs +++ b/Source/Libs/PangoSharp/AttrList.cs @@ -25,19 +25,19 @@ namespace Pango { public partial class AttrList { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attribute_copy (IntPtr raw); + delegate IntPtr d_pango_attribute_copy(IntPtr raw); + static d_pango_attribute_copy pango_attribute_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attribute_copy")); - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_attr_list_insert (IntPtr raw, IntPtr attr); + delegate void d_pango_attr_list_insert(IntPtr raw, IntPtr attr); + static d_pango_attr_list_insert pango_attr_list_insert = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_list_insert")); public void Insert (Pango.Attribute attr) { pango_attr_list_insert (Handle, pango_attribute_copy (attr.Handle)); } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_attr_list_insert_before (IntPtr raw, IntPtr attr); + delegate void d_pango_attr_list_insert_before(IntPtr raw, IntPtr attr); + static d_pango_attr_list_insert_before pango_attr_list_insert_before = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_list_insert_before")); public void InsertBefore (Pango.Attribute attr) { diff --git a/Source/Libs/PangoSharp/AttrRise.cs b/Source/Libs/PangoSharp/AttrRise.cs index f6291aeb7..4e6574632 100755 --- a/Source/Libs/PangoSharp/AttrRise.cs +++ b/Source/Libs/PangoSharp/AttrRise.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrRise : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_rise_new (int rise); + delegate IntPtr d_pango_attr_rise_new(int rise); + static d_pango_attr_rise_new pango_attr_rise_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_rise_new")); public AttrRise (int rise) : this (pango_attr_rise_new (rise)) {} diff --git a/Source/Libs/PangoSharp/AttrScale.cs b/Source/Libs/PangoSharp/AttrScale.cs index e429ceca6..666381342 100755 --- a/Source/Libs/PangoSharp/AttrScale.cs +++ b/Source/Libs/PangoSharp/AttrScale.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrScale : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_scale_new (double scale); + delegate IntPtr d_pango_attr_scale_new(double scale); + static d_pango_attr_scale_new pango_attr_scale_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_scale_new")); public AttrScale (double scale) : this (pango_attr_scale_new (scale)) {} diff --git a/Source/Libs/PangoSharp/AttrShape.cs b/Source/Libs/PangoSharp/AttrShape.cs index 13291aee9..a86ad2b59 100755 --- a/Source/Libs/PangoSharp/AttrShape.cs +++ b/Source/Libs/PangoSharp/AttrShape.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrShape : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_shape_new (ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect); + delegate IntPtr d_pango_attr_shape_new(ref Pango.Rectangle ink_rect, ref Pango.Rectangle logical_rect); + static d_pango_attr_shape_new pango_attr_shape_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_shape_new")); public AttrShape (Pango.Rectangle ink_rect, Pango.Rectangle logical_rect) : this (pango_attr_shape_new (ref ink_rect, ref logical_rect)) {} diff --git a/Source/Libs/PangoSharp/AttrSize.cs b/Source/Libs/PangoSharp/AttrSize.cs index e4ccbfce8..f64512591 100755 --- a/Source/Libs/PangoSharp/AttrSize.cs +++ b/Source/Libs/PangoSharp/AttrSize.cs @@ -23,11 +23,11 @@ namespace Pango { public class AttrSize : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_size_new (int size); + delegate IntPtr d_pango_attr_size_new(int size); + static d_pango_attr_size_new pango_attr_size_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_size_new")); - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_size_new_absolute (int size); + delegate IntPtr d_pango_attr_size_new_absolute(int size); + static d_pango_attr_size_new_absolute pango_attr_size_new_absolute = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_size_new_absolute")); public AttrSize (int size) : this (pango_attr_size_new (size)) {} diff --git a/Source/Libs/PangoSharp/AttrStretch.cs b/Source/Libs/PangoSharp/AttrStretch.cs index c8d4b2469..ec1cb1ee9 100755 --- a/Source/Libs/PangoSharp/AttrStretch.cs +++ b/Source/Libs/PangoSharp/AttrStretch.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrStretch : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_stretch_new (Pango.Stretch stretch); + delegate IntPtr d_pango_attr_stretch_new(Pango.Stretch stretch); + static d_pango_attr_stretch_new pango_attr_stretch_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_stretch_new")); public AttrStretch (Pango.Stretch stretch) : this (pango_attr_stretch_new (stretch)) {} diff --git a/Source/Libs/PangoSharp/AttrStrikethrough.cs b/Source/Libs/PangoSharp/AttrStrikethrough.cs index c66006904..ce9f70da8 100755 --- a/Source/Libs/PangoSharp/AttrStrikethrough.cs +++ b/Source/Libs/PangoSharp/AttrStrikethrough.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrStrikethrough : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_strikethrough_new (bool strikethrough); + delegate IntPtr d_pango_attr_strikethrough_new(bool strikethrough); + static d_pango_attr_strikethrough_new pango_attr_strikethrough_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_strikethrough_new")); public AttrStrikethrough (bool strikethrough) : this (pango_attr_strikethrough_new (strikethrough)) {} diff --git a/Source/Libs/PangoSharp/AttrStrikethroughColor.cs b/Source/Libs/PangoSharp/AttrStrikethroughColor.cs index da6df9a28..5526cc0a5 100755 --- a/Source/Libs/PangoSharp/AttrStrikethroughColor.cs +++ b/Source/Libs/PangoSharp/AttrStrikethroughColor.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrStrikethroughColor : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_strikethrough_color_new (ushort red, ushort green, ushort blue); + delegate IntPtr d_pango_attr_strikethrough_color_new(ushort red, ushort green, ushort blue); + static d_pango_attr_strikethrough_color_new pango_attr_strikethrough_color_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_strikethrough_color_new")); public AttrStrikethroughColor (ushort red, ushort green, ushort blue) : this (pango_attr_strikethrough_color_new (red, green, blue)) {} diff --git a/Source/Libs/PangoSharp/AttrStyle.cs b/Source/Libs/PangoSharp/AttrStyle.cs index a60b77958..c1ad501cb 100755 --- a/Source/Libs/PangoSharp/AttrStyle.cs +++ b/Source/Libs/PangoSharp/AttrStyle.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrStyle : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_style_new (Pango.Style style); + delegate IntPtr d_pango_attr_style_new(Pango.Style style); + static d_pango_attr_style_new pango_attr_style_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_style_new")); public AttrStyle (Pango.Style style) : this (pango_attr_style_new (style)) {} diff --git a/Source/Libs/PangoSharp/AttrUnderline.cs b/Source/Libs/PangoSharp/AttrUnderline.cs index d2b3a846c..f155d8445 100755 --- a/Source/Libs/PangoSharp/AttrUnderline.cs +++ b/Source/Libs/PangoSharp/AttrUnderline.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrUnderline : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_underline_new (Pango.Underline underline); + delegate IntPtr d_pango_attr_underline_new(Pango.Underline underline); + static d_pango_attr_underline_new pango_attr_underline_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_underline_new")); public AttrUnderline (Pango.Underline underline) : this (pango_attr_underline_new (underline)) {} diff --git a/Source/Libs/PangoSharp/AttrUnderlineColor.cs b/Source/Libs/PangoSharp/AttrUnderlineColor.cs index 0840b23ea..854d58f09 100755 --- a/Source/Libs/PangoSharp/AttrUnderlineColor.cs +++ b/Source/Libs/PangoSharp/AttrUnderlineColor.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrUnderlineColor : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_underline_color_new (ushort red, ushort green, ushort blue); + delegate IntPtr d_pango_attr_underline_color_new(ushort red, ushort green, ushort blue); + static d_pango_attr_underline_color_new pango_attr_underline_color_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_underline_color_new")); public AttrUnderlineColor (ushort red, ushort green, ushort blue) : this (pango_attr_underline_color_new (red, green, blue)) {} diff --git a/Source/Libs/PangoSharp/AttrVariant.cs b/Source/Libs/PangoSharp/AttrVariant.cs index 53aca0fc1..d7c3d4bcc 100755 --- a/Source/Libs/PangoSharp/AttrVariant.cs +++ b/Source/Libs/PangoSharp/AttrVariant.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrVariant : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_variant_new (Pango.Variant variant); + delegate IntPtr d_pango_attr_variant_new(Pango.Variant variant); + static d_pango_attr_variant_new pango_attr_variant_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_variant_new")); public AttrVariant (Pango.Variant variant) : this (pango_attr_variant_new (variant)) {} diff --git a/Source/Libs/PangoSharp/AttrWeight.cs b/Source/Libs/PangoSharp/AttrWeight.cs index 9d7a416c2..0c64c72ca 100755 --- a/Source/Libs/PangoSharp/AttrWeight.cs +++ b/Source/Libs/PangoSharp/AttrWeight.cs @@ -23,8 +23,8 @@ namespace Pango { public class AttrWeight : Attribute { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attr_weight_new (Pango.Weight weight); + delegate IntPtr d_pango_attr_weight_new(Pango.Weight weight); + static d_pango_attr_weight_new pango_attr_weight_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attr_weight_new")); public AttrWeight (Pango.Weight weight) : this (pango_attr_weight_new (weight)) {} diff --git a/Source/Libs/PangoSharp/Attribute.cs b/Source/Libs/PangoSharp/Attribute.cs index 3f6114ff6..14da10020 100755 --- a/Source/Libs/PangoSharp/Attribute.cs +++ b/Source/Libs/PangoSharp/Attribute.cs @@ -93,8 +93,8 @@ namespace Pango { Dispose (); } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_attribute_destroy (IntPtr raw); + delegate void d_pango_attribute_destroy(IntPtr raw); + static d_pango_attribute_destroy pango_attribute_destroy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attribute_destroy")); public void Dispose () { @@ -149,15 +149,15 @@ namespace Pango { } } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_attribute_copy (IntPtr raw); + delegate IntPtr d_pango_attribute_copy(IntPtr raw); + static d_pango_attribute_copy pango_attribute_copy = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attribute_copy")); public Pango.Attribute Copy () { return GetAttribute (pango_attribute_copy (raw)); } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool pango_attribute_equal (IntPtr raw1, IntPtr raw2); + delegate bool d_pango_attribute_equal(IntPtr raw1, IntPtr raw2); + static d_pango_attribute_equal pango_attribute_equal = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_attribute_equal")); public bool Equal (Pango.Attribute attr2) { return pango_attribute_equal (raw, attr2.raw); diff --git a/Source/Libs/PangoSharp/Context.cs b/Source/Libs/PangoSharp/Context.cs index a3c79cc14..bb38f4523 100755 --- a/Source/Libs/PangoSharp/Context.cs +++ b/Source/Libs/PangoSharp/Context.cs @@ -25,14 +25,14 @@ namespace Pango { public partial class Context { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_context_list_families(IntPtr raw, out IntPtr families, out int n_families); + delegate void d_pango_context_list_families2(IntPtr raw, out IntPtr families, out int n_families); + static d_pango_context_list_families2 pango_context_list_families2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_context_list_families")); public FontFamily [] Families { get { int count; IntPtr array_ptr; - pango_context_list_families (Handle, out array_ptr, out count); + pango_context_list_families2 (Handle, out array_ptr, out count); if (array_ptr == IntPtr.Zero) return new FontFamily [0]; FontFamily [] result = new FontFamily [count]; @@ -46,8 +46,8 @@ namespace Pango { } } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_context_list_families(IntPtr raw, IntPtr families, out int n_families); + delegate void d_pango_context_list_families(IntPtr raw, IntPtr families, out int n_families); + static d_pango_context_list_families pango_context_list_families = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_context_list_families")); [Obsolete] public int ListFamilies(Pango.FontFamily families) { diff --git a/Source/Libs/PangoSharp/Coverage.cs b/Source/Libs/PangoSharp/Coverage.cs index b37189a2d..adb765bc8 100755 --- a/Source/Libs/PangoSharp/Coverage.cs +++ b/Source/Libs/PangoSharp/Coverage.cs @@ -25,8 +25,8 @@ namespace Pango { public partial class Coverage { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_coverage_to_bytes (IntPtr raw, out IntPtr bytes, out int n_bytes); + delegate void d_pango_coverage_to_bytes(IntPtr raw, out IntPtr bytes, out int n_bytes); + static d_pango_coverage_to_bytes pango_coverage_to_bytes = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_coverage_to_bytes")); public void ToBytes(out byte[] bytes) { diff --git a/Source/Libs/PangoSharp/FontFamily.cs b/Source/Libs/PangoSharp/FontFamily.cs index 2b46a317b..30b0aaf98 100755 --- a/Source/Libs/PangoSharp/FontFamily.cs +++ b/Source/Libs/PangoSharp/FontFamily.cs @@ -25,14 +25,14 @@ namespace Pango { public partial class FontFamily { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_font_family_list_faces(IntPtr raw, out IntPtr faces, out int n_faces); + delegate void d_pango_font_family_list_faces2(IntPtr raw, out IntPtr faces, out int n_faces); + static d_pango_font_family_list_faces2 pango_font_family_list_faces2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_family_list_faces")); public FontFace [] Faces { get { int count; IntPtr array_ptr; - pango_font_family_list_faces (Handle, out array_ptr, out count); + pango_font_family_list_faces2 (Handle, out array_ptr, out count); if (array_ptr == IntPtr.Zero) return new FontFace [0]; FontFace [] result = new FontFace [count]; @@ -46,8 +46,8 @@ namespace Pango { } } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_font_family_list_faces(IntPtr raw, IntPtr faces, out int n_faces); + delegate void d_pango_font_family_list_faces(IntPtr raw, IntPtr faces, out int n_faces); + static d_pango_font_family_list_faces pango_font_family_list_faces = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_family_list_faces")); [Obsolete] public int ListFaces(Pango.FontFace faces) { diff --git a/Source/Libs/PangoSharp/FontMap.cs b/Source/Libs/PangoSharp/FontMap.cs index eb6a754b8..3f268d254 100755 --- a/Source/Libs/PangoSharp/FontMap.cs +++ b/Source/Libs/PangoSharp/FontMap.cs @@ -25,14 +25,14 @@ namespace Pango { public partial class FontMap { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_font_map_list_families(IntPtr raw, out IntPtr families, out int n_families); + delegate void d_pango_font_map_list_families2(IntPtr raw, out IntPtr families, out int n_families); + static d_pango_font_map_list_families2 pango_font_map_list_families2 = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_map_list_families")); public FontFamily [] Families { get { int count; IntPtr array_ptr; - pango_font_map_list_families (Handle, out array_ptr, out count); + pango_font_map_list_families2 (Handle, out array_ptr, out count); if (array_ptr == IntPtr.Zero) return new FontFamily [0]; FontFamily [] result = new FontFamily [count]; @@ -46,8 +46,8 @@ namespace Pango { } } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_font_map_list_families(IntPtr raw, IntPtr families, out int n_families); + delegate void d_pango_font_map_list_families(IntPtr raw, IntPtr families, out int n_families); + static d_pango_font_map_list_families pango_font_map_list_families = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_font_map_list_families")); [Obsolete] public int ListFamilies(Pango.FontFamily families) { diff --git a/Source/Libs/PangoSharp/Global.cs b/Source/Libs/PangoSharp/Global.cs index c51d84722..d5be46d1c 100755 --- a/Source/Libs/PangoSharp/Global.cs +++ b/Source/Libs/PangoSharp/Global.cs @@ -25,22 +25,17 @@ namespace Pango { public partial class Global { - internal const string PangoNativeDll = "libpango-1.0-0.dll"; - - [DllImport (PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool pango_scan_int(IntPtr pos, out int out_param); - [Obsolete] public static bool ScanInt(string pos, out int out_param) { IntPtr native = GLib.Marshaller.StringToPtrGStrdup (pos); - bool raw_ret = pango_scan_int(native, out out_param); + bool raw_ret = pango_scan_int(ref native, out out_param); GLib.Marshaller.Free (native); bool ret = raw_ret; return ret; } - [DllImport (PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool pango_parse_markup (IntPtr markup, int length, uint accel_marker, out IntPtr attr_list_handle, out IntPtr text, out uint accel_char, IntPtr err); + delegate bool d_pango_parse_markup(IntPtr markup, int length, uint accel_marker, out IntPtr attr_list_handle, out IntPtr text, out uint accel_char, IntPtr err); + static d_pango_parse_markup pango_parse_markup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_parse_markup")); public static bool ParseMarkup (string markup, char accel_marker, out Pango.AttrList attrs, out string text, out char accel_char) { diff --git a/Source/Libs/PangoSharp/GlyphItem.cs b/Source/Libs/PangoSharp/GlyphItem.cs index b21202e95..865876c2b 100755 --- a/Source/Libs/PangoSharp/GlyphItem.cs +++ b/Source/Libs/PangoSharp/GlyphItem.cs @@ -25,8 +25,8 @@ namespace Pango { public partial struct GlyphItem { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_glyph_item_apply_attrs(ref Pango.GlyphItem raw, IntPtr text, IntPtr list); + delegate IntPtr d_pango_glyph_item_apply_attrs(ref Pango.GlyphItem raw, IntPtr text, IntPtr list); + static d_pango_glyph_item_apply_attrs pango_glyph_item_apply_attrs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_glyph_item_apply_attrs")); public GlyphItem[] ApplyAttrs (string text, Pango.AttrList list) { diff --git a/Source/Libs/PangoSharp/Layout.cs b/Source/Libs/PangoSharp/Layout.cs index 4c7a28083..f188e45e9 100755 --- a/Source/Libs/PangoSharp/Layout.cs +++ b/Source/Libs/PangoSharp/Layout.cs @@ -26,8 +26,8 @@ namespace Pango { public partial class Layout { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_layout_get_lines(IntPtr raw); + delegate IntPtr d_pango_layout_get_lines(IntPtr raw); + static d_pango_layout_get_lines pango_layout_get_lines = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_get_lines")); public LayoutLine[] Lines { get { @@ -43,8 +43,8 @@ namespace Pango { } } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_layout_set_markup_with_accel (IntPtr raw, IntPtr markup, int length, uint accel_marker, out uint accel_char); + delegate void d_pango_layout_set_markup_with_accel(IntPtr raw, IntPtr markup, int length, uint accel_marker, out uint accel_char); + static d_pango_layout_set_markup_with_accel pango_layout_set_markup_with_accel = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_set_markup_with_accel")); public void SetMarkupWithAccel (string markup, char accel_marker, out char accel_char) { @@ -55,8 +55,8 @@ namespace Pango { accel_char = GLib.Marshaller.GUnicharToChar (ucs4_accel_char); } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_layout_get_log_attrs (IntPtr raw, out IntPtr attrs, out int n_attrs); + delegate void d_pango_layout_get_log_attrs(IntPtr raw, out IntPtr attrs, out int n_attrs); + static d_pango_layout_get_log_attrs pango_layout_get_log_attrs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_get_log_attrs")); public LogAttr [] LogAttrs { get { @@ -76,8 +76,8 @@ namespace Pango { } } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_layout_set_text (IntPtr raw, IntPtr text, int length); + delegate void d_pango_layout_set_text(IntPtr raw, IntPtr text, int length); + static d_pango_layout_set_text pango_layout_set_text = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_set_text")); public void SetText (string text) { @@ -86,8 +86,8 @@ namespace Pango { GLib.Marshaller.Free (native_text); } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_layout_set_markup (IntPtr raw, IntPtr markup, int length); + delegate void d_pango_layout_set_markup(IntPtr raw, IntPtr markup, int length); + static d_pango_layout_set_markup pango_layout_set_markup = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_set_markup")); public void SetMarkup (string markup) { diff --git a/Source/Libs/PangoSharp/LayoutLine.cs b/Source/Libs/PangoSharp/LayoutLine.cs index fb984411b..cc737f086 100755 --- a/Source/Libs/PangoSharp/LayoutLine.cs +++ b/Source/Libs/PangoSharp/LayoutLine.cs @@ -26,8 +26,8 @@ namespace Pango { public partial class LayoutLine { #if NOT_BROKEN - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_layout_line_get_x_ranges(IntPtr raw, int start_index, int end_index, out IntPtr ranges_handle, out int n_ranges); + delegate void d_pango_layout_line_get_x_ranges(IntPtr raw, int start_index, int end_index, out IntPtr ranges_handle, out int n_ranges); + static d_pango_layout_line_get_x_ranges pango_layout_line_get_x_ranges = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_layout_line_get_x_ranges")); #endif public void GetXRanges(int start_index, int end_index, out int[][] ranges) diff --git a/Source/Libs/PangoSharp/PangoSharp.csproj b/Source/Libs/PangoSharp/PangoSharp.csproj index 26eba73c8..30a71b6e0 100755 --- a/Source/Libs/PangoSharp/PangoSharp.csproj +++ b/Source/Libs/PangoSharp/PangoSharp.csproj @@ -23,11 +23,6 @@ - - - - - PreserveNewest - + diff --git a/Source/Libs/PangoSharp/PangoSharp.dll.config b/Source/Libs/PangoSharp/PangoSharp.dll.config deleted file mode 100644 index 83d72fd80..000000000 --- a/Source/Libs/PangoSharp/PangoSharp.dll.config +++ /dev/null @@ -1,3 +0,0 @@ - - - diff --git a/Source/Libs/PangoSharp/ScriptIter.cs b/Source/Libs/PangoSharp/ScriptIter.cs index ada5780fd..8482b487d 100755 --- a/Source/Libs/PangoSharp/ScriptIter.cs +++ b/Source/Libs/PangoSharp/ScriptIter.cs @@ -27,8 +27,8 @@ namespace Pango { public ScriptIter(IntPtr raw) : base(raw) {} - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr pango_script_iter_new(IntPtr text, int length); + delegate IntPtr d_pango_script_iter_new(IntPtr text, int length); + static d_pango_script_iter_new pango_script_iter_new = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_script_iter_new")); public ScriptIter (string text) { @@ -36,8 +36,8 @@ namespace Pango { Raw = pango_script_iter_new (native_text, -1); } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_script_iter_free (IntPtr raw); + delegate void d_pango_script_iter_free(IntPtr raw); + static d_pango_script_iter_free pango_script_iter_free = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_script_iter_free")); ~ScriptIter () { @@ -46,11 +46,11 @@ namespace Pango { Raw = IntPtr.Zero; } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_script_iter_get_range (IntPtr raw, out IntPtr start, out IntPtr end, out Pango.Script script); + delegate void d_pango_script_iter_get_range(IntPtr raw, out IntPtr start, out IntPtr end, out Pango.Script script); + static d_pango_script_iter_get_range pango_script_iter_get_range = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_script_iter_get_range")); - [DllImport ("libglib-2.0-0", CallingConvention = CallingConvention.Cdecl)] - static extern IntPtr g_utf8_pointer_to_offset (IntPtr str, IntPtr pos); + delegate IntPtr d_g_utf8_pointer_to_offset(IntPtr str, IntPtr pos); + static d_g_utf8_pointer_to_offset g_utf8_pointer_to_offset = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.GLib), "g_utf8_pointer_to_offset")); public void GetRange (out int start, out int len, out Pango.Script script) { @@ -62,8 +62,8 @@ namespace Pango { len = (int)g_utf8_pointer_to_offset (start_ptr, end_ptr); } - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern bool pango_script_iter_next (IntPtr raw); + delegate bool d_pango_script_iter_next(IntPtr raw); + static d_pango_script_iter_next pango_script_iter_next = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_script_iter_next")); public bool Next () { diff --git a/Source/Libs/PangoSharp/TabArray.cs b/Source/Libs/PangoSharp/TabArray.cs index 0d33d8283..4810579a6 100755 --- a/Source/Libs/PangoSharp/TabArray.cs +++ b/Source/Libs/PangoSharp/TabArray.cs @@ -25,8 +25,8 @@ namespace Pango { public partial class TabArray { - [DllImport (Global.PangoNativeDll, CallingConvention = CallingConvention.Cdecl)] - static extern void pango_tab_array_get_tabs (IntPtr raw, out IntPtr alignments, out IntPtr locations); + delegate void d_pango_tab_array_get_tabs(IntPtr raw, out IntPtr alignments, out IntPtr locations); + static d_pango_tab_array_get_tabs pango_tab_array_get_tabs = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(Library.Pango), "pango_tab_array_get_tabs")); public void GetTabs (out TabAlign[] alignments, out int[] locations) { diff --git a/Source/Libs/PangoSharp/linux-arm/libpango-1.0-0.dll.so b/Source/Libs/PangoSharp/linux-arm/libpango-1.0-0.dll.so deleted file mode 100755 index 2307a18c526ee4179ddcfb7ec7cd1621bb92f397..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5012 zcma)AU1(g#6`s4hiY3R1Hj4k6sLdK2aEW!bNmJ~kC0Lf_U?RmqRv$tiZm)K)q>cBl zyH}0$6bO_S5=b8U2Wcu%@=#hQ?1LXnaf>0UDIpI^6KJ4@?vEC1>W57+G!)bA_s!g+ zoowaQ2c3K7n>ll4=FHDIt5>F`PdkpIgyQOmBH9>G>Pg7MNqk~z;7OHI3AF83``BKt z-=mc9AXLbSh%=sP!??jt40*Xhgzq!kJFAl5kqJGby!AV&86>ukNCw`F~BjOys1?Ikyl9(BL ziv1DTzoc8thx+0Z)}+7}!1j1eVB6knz(Oe$I%I1;&q*UB?Vs<%D;7?nd>d?!M_>Ip za`1>6QnSE9v{x1YnF8Mc_r_1^b7b3_L%R_Be_sRc80R;lu0e{wlc;%Ax0p|g!pjwN zq4E|Wl;>rGO0bx#hC#(!sQ85dtqUd8?^s*#bH&NoxpSdk375;N5EQCGsQfTkp+zsB zo6l(Lo?of>tBUHVu7-Z*yjt=r*_Zta2grrqQmJ%aRZ9zDUzO+0SF7w%2|W*eiGpHQ zm$i9LJ2DSk_KS<9vB%xCTP?Y1=x6=VH{F#N5JWb#MU*335Ol?lajtlG-i+ksNM4B~ z?=jmuk$fHXFX7>}w1c^&%xU;}Rt<;AKkOfh&}_yc?9*qD`Eu{pkA%CG31k ziA!~j5*NBoiA%giiGi{ZMu16^SNfH^!D|yb;lct`dB+rUu)lA zf1^Iw`D6RT7;eYaH=4;0UT=Q*&&zEoZ&>BaR{5e;zF?K#vC6+hIh|f>tJKGBrDj_g z_krYzu^aId>y1&?t8=Y`YHeSu+kMzcueVfsqn$kQ2R%PI$Jeob(M5lU{gcVHc2cdi zx4PYbh(7n^7S>Gtt;qJL>9v9Q=6XY=h8x3bq=mO}_eY&WE!H`|ooVh)uQ&cG`02^! z->mXqqH+xNA4~bE$!0hGeyjWK_gjf{9P2uF<4Wq)R;+WV;rwQ@sgkvpQ-kgDdLxhd zIH78dfn=@m zHp;&So7a{r|6jV(zHj}f`wHfu=_fc(FMx?Z0Q3Fl`^a~Y?+)Vv&oN^QpJm1lp6AgB zv+g1oCe$c`0=lR?7YI27c`qd28ODnZ><#1CaWLZ(V*u~RFJOe_BanI_%zwsWb5yK7QcO=ah2@#es?0nPYROX3nU4VuQ|*Gm_Zr>~jvp z4>}L^jIv`yTt6wUy=c~NFjs5*Vz7ytT&KaN!1WtUFZSY-#6QlR6xWf{?3cmj-In+e zM|>dFBS*!f$j|#gitF7l`)RO=_S{c{P4pAr#T6sA**DY9tf3bl7>`MEPvd$Qb(Q|a zv75HT66&+=*U=*Jm#2kT=8qGjj`q6ayczv#(fURIlkI~rq~`kc31z(w*6RUFJmX2^ zcs%ch2GzWUV>oft=eurbP%%Es`W&o}?cy)qk{?;v0j7Q4DMN$mJqwF{zW>txdldL) zk;Fdlo1s1GDhh%f+)h1yq|aMJEd7bwQBMl-pX4jNQPjV%?LUL%yztic`;+?OPu}Lo zFg3ySuT329DYVP^aez+(i~k+?|12=y0TSEkFFD`L3_0HC+xxvs`}4MiucE7+&ji4- zKg|EC#x%|A)A>VSSwHi?p90JIWB&J6pZ>cRPQk{XfbH>~!Iie{eblGF1#Hi!W3}_P z{HqV&wlK#VhJAay1Hf`WnE!nhScvuxTQ~)L6u38jQhfv1w)cpo&;E~U+{^!t1IvCf z|C_S(Xa$?#$d;0XbsX1?M;^g#{B(A+QR;R8y@im#T*Oy7_ z6~M68vr^nU=jXk|_{+0sNz!#LzC#Yaof7Nc1KX**$=M}^X1e^v+ zGOQT6B&8+4x}@CfY7r_%h85*jf;{U?p_~tuOD8E8zbNq4Q*sf@UHrhvt|&KHGTUy{ zqMrd;P0BFl7jhZpE|y?G{{V2|Dy6OXVOYt{FNZ;u_uwvxc@v*|UL)oSWd7!qYsIIH zde=^3!-@m(h`=@#>$9{CJd^cauHD>C^=2SS~- z^!N^vcN+IQMz8!TB;y&G>oYH#852-_56oe>KE^RJ=OZNLmr%j%2kzDJm;alQHtMoW z{sEYNq8{^t&K>kPFEnXA#z+1yXEVYO+7{>f8kqB=J;uom`~%ko2U>yzSlRQ z*FQh@`5BmY_57gMfgW>rA?foLDxkw7qKSHTE+$(ez7xGs8pq!4h2XiNy(E}tien0m ZBDMT3ogR_cW8QD;y$ommPLv=;@4t0KNC*G` diff --git a/Source/Libs/PangoSharp/linux-x64/libpango-1.0-0.dll.so b/Source/Libs/PangoSharp/linux-x64/libpango-1.0-0.dll.so deleted file mode 100755 index f4114fc9cc0816a245a00bb1ed1d9aa36704533b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 7240 zcmeHMU1%It6h50x+Vm$sjkZmHpraOSA3DaC{t3}d(j-$z+87gP#W0=hZjy!lX?G{m z6pO(sw3c8MmHJpg5quH)(o)6Lmg0+`s3?7qfK*~Fm?BE`A?rDJ?w8C=Hd1^Lggs^F z-1D7t?$5b*GUuMY*xuDq5s45eN>7qVL^7WoP8Hl_zOTD2oy#Ws zoWXR`)0NiP@#Btk;G|P0l9Wyj9(A(AxowY|O=clyHVG1!)-JM>3CDHFwg(FZZw3ry z6V%zYzqQTYZf-Ys>ghA9;8^3I#63ag z_yUJKRcELk{4Me$4P)b;9X za3gD?`5o5vTN72Ui_PA9)|p%GI(BK*E;R$isUfp&lbi^mfopY}Vl*$a|6wtl*x9SP z**eSq*45dlb!Nu8I{lOtxnX@Z>o#(S5#8ZR>2R_B#+#S18I3+>oofDWIk);{J~h_a z=G!b4S6}DnbZ4qwz|TW$K%~|lSgov}OyvlaBT$Y&IRfPf zlp|1%!2de}$UBi|B8PPJvLH(?E40#MbNPFXmXWuw(=zhg4O&Ltx?ao3bLHM51pV)` z#hl2O^uV|dOz9*Rcexp@UoOT>7d%EQG;h>g?ovXRbh3+aKJZ|5&yptWXN%tW=e0d2 zf@(g9!;F?+()vHOtVP}Hf5&id4v&cYL1$ar6UG+4iEcG^^L?c$Y*$K-@=XHwYrj6q z_ZRF-5RVe}BZyZL_AQ845#krbmk{C}#Fx(PUl3n-j}(2BcNO)IpnZw^rLtc^BRFV2 zhbW(RoMRu%{nrrAZxFBLx`yG0R69y_gnOD_8I{{%=-w>)DBrWOe?j|(1@~{y{sF(4 zYRh@8q`Q2J36i|O6(!*RyEGpW~&j{bxalgm=(V_5#@yReQVzL-%6?&-7n}ciWnX%~O0D;OWxp_<7Ztv6zdqLXSQm?mKIdno#D4w2xS=e9kH1(f zRWFfJU8y?9QpQX5vxf0{_6XNkHfTIN&qo*Or-kuSb)5mmOVwj2o_7oG=+KZEr}+|# z?Plz_6j=&f6iMXl;dE}$N!tlGmoM1P=y8hYGDp)%H<>VZ?cKejw2>;_*iJt0jBz!^ z&5zMg-pM5G#Aqfn#x6cdReJ)aw%yU&(%o*iAJ`|=AUjdW*&|LiAtj%EhYz%L?{8z2 zOF^*c>^j)m(q$j)=y;~R&+cn!?P_Pgf2thmqK{W%3RRz^`V%MzNk{ilW{So9H6yQx zMP^|v<2r-P-Mq&~(8}iAq&b`&H3vsi>BP2Ff|NAk6h_EQjAhx=<8I#5JfF-LQn_qE zuvwQ+rX6u0Qx(okH+kG8Q?1QRj(D;5bY7S}9op>ZWKwbNHOF53Fps9Wp{img7sbfr z4bSi<1`q$gkR(r#Z#8OF`2K)z4)q!OGesur|KM*i{PCRvmwKlVzSGD9Je0U1PAYeR zKfY&kTpP-`{L0MbE65vSj7i_{pVAHR3#{{#^x-Fq1<5twkMAS6)RcuVf7pTdvrcjs z$oP(e8{*6qp1+3@CA1Fym-Im3$d@oa;)nHT*&qNOP^8L*)ed{l~Qd z_{}*>uYtNM;1eN#JE{)D_n4}f!m9^eOlIpmN0r&0UEF6mpP0Mf|B!z1;}}RQLn6uiO8H-r0hzw=*xWPh F|2HV0`N#kO diff --git a/Source/Libs/PangoSharp/linux-x86/libpango-1.0-0.dll.so b/Source/Libs/PangoSharp/linux-x86/libpango-1.0-0.dll.so deleted file mode 100755 index fe2b0b600aa05aa8505c01ceb50173990616337c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 6508 zcmeHLU2IfU5T5M-U|rhu$I>1YVF%XupP>O^_>Oc=K)S5c6WR|RwC9+uQjXmj}85(C&s1&7N zJXd7#QjHU6o&?S+>dQba=q>1p=OGiRhbx8GK@HY`CmP+Z%YF>v-+=uwyzGWPIQ|&g zi0sd`kyZh*MA@>vUA(IoGnoZnJyGs2zj>nU*0qtnKdhvV>!Ceqc}z}_J^*|W*wFO- z_^F?c9Ju(>p6V|Kug$sg-LG@dJPoP?k_CQuKwbu(z71GlHW~qx@@v3KGJr~1AVZ*4 z7A4A6a+uVjq-CyslEDScmvVUoG{VIK=1YZ$<8-CGw3GGSjPE$&B+?0AoK6sNwzh3^ zV)0D8E0Oi%nYL|>NiQ95b32l8t-H6ziT1j5;3gBV#wD5P*zcyhyftg>T0866wQPx! z+aOLn=K3zC(2>pR8K5a0lPxV<8ycN;_F8+ro~d3y2+`3$#wjFOD7ijDc4-1zP$utd zQN3s7;H&X2kycomUWGghLB383w-cn;*hx~vr8PHRKK2Yc9L(RsUJc|X3WdU(U-~o0 z7`fbN`3rd|3^Ra*WAsZX9HUVuw?e@{bxpo=XzDliGnx;Md0ztG=6RZSiZDu#dD zrvHX+B2bDzDFUSklp;`yKq&&H2>g#CP>aw0OUMeCdq-wub^U@gtRg&>2Zz-TinL+xw4OVu_fX3^jprU}8HEafiBq_kg)+A! zgw>9Lu_#gI&gmSKG^}=TDo+oq$^$hT!m?0`p-~MpV!oHjI&M#|M7`AhWZaL(>L5(wT8n zaVOT3O7)>jKvLD3X{L_Tyt{r|lhd?)GpjjH@5T*wSKN2@M;*VrC%w<^=)G5KjIFV( z=XAU27|T1GpWj};ZEGW1QT8$3wzTYMsBdw0G&i?4wK;9|4J}O=168eQEU6)X!+m%kfM$;iabu4s@A#lJ;V&A?^K1-|q5!vHf^2o@$MDyj$;&Hqu+8 zb%uurHeCDxEE;0 zbD3BNzIbG)|1E8KzwrK{9nWjxN8qUgt0?cL2#|eg$8(%`6ubf25}pO}exe=EcVZQI zGcMbS?LgjV_gCxOP! zf)gUwXMj9ydCwa=-YZ0oV}LyI0MOV)U_<=V7=aq!hk|w(AOd7u44C=7g$DY=^ws&x zGuY^8YxpDJc_&~vU1P@;Wprp#Jmn98yuE0rzDe$5_X+fj9qo8dvo?PoyzxoO^}Yh+ z{AkDf?<(xf8qsuT++py>PAmv8;+ _libraries; + private static List<(Library Library, string WindowsLib, string LinuxLib, string OSXLib)> _libdict; + private static IntPtr _temp = FuncLoader.LoadLibrary("libgtk-3.so.0"); + + static GLibrary() + { + _libraries = new Dictionary(); + _libdict = new List<(Library, string, string, string)>(); + _libdict.Add((Library.GLib, "libglib-2.0-0.dll", "libglib-2.0.so.0", "libglib-2.0.0.dylib")); + _libdict.Add((Library.GObject, "libgobject-2.0-0.dll", "libgobject-2.0.so.0", "libgobject-2.0.0.dylib")); + _libdict.Add((Library.Cairo, "libcairo-2.dll", "libcairo.so.2", "libcairo.2.dylib")); + _libdict.Add((Library.Gio, "libgio-2.0-0.dll", "libgio-2.0.so.0", "libgio-2.0.0.dylib")); + _libdict.Add((Library.Atk, "libatk-1.0-0.dll", "libatk-1.0.so.0", "libatk-1.0.0.dylib")); + _libdict.Add((Library.Pango, "libpango-1.0-0.dll", "libpango-1.0.so.0", "libpango-1.0.0.dylib")); + _libdict.Add((Library.Gdk, "libgdk-3-0.dll", "libgdk-3.so.0", "libgdk-quartz-3.0.0.dylib")); + _libdict.Add((Library.GdkPixbuf, "libgdk_pixbuf-2.0-0.dll", "libgdk_pixbuf-2.0.so.0", "libgdk_pixbuf-2.0.dylib")); + _libdict.Add((Library.Gtk, "libgtk-3-0.dll", "libgtk-3.so.0", "libgtk-quartz-3.0.0.dylib")); + } + + public static IntPtr Load(string libname) + { + var index = _libdict.FindIndex((e) => (e.WindowsLib == libname || e.LinuxLib == libname || e.OSXLib == libname)); + + if (index != -1) + return Load(_libdict[index].Library); + + return _temp; + } + + public static IntPtr Load(Library library) + { + IntPtr ret = IntPtr.Zero; + if (!_libraries.TryGetValue(library, out ret)) + { + var i = _libdict.Find((e) => e.Library == library); + var s = i.LinuxLib; + + if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) + s = i.WindowsLib; + else if (RuntimeInformation.IsOSPlatform(OSPlatform.OSX)) + s = i.OSXLib; + + // Console.WriteLine(s); + _libraries[library] = ret = FuncLoader.LoadLibrary(s); + } + + if (ret == IntPtr.Zero) + { + Console.WriteLine("Error: " + library); + throw new Exception(); + } + + return ret; + } +} + +class FuncLoader +{ + private class Windows + { + [DllImport("kernel32", CharSet = CharSet.Ansi, ExactSpelling = true, SetLastError = true)] + public static extern IntPtr GetProcAddress(IntPtr hModule, string procName); + + [DllImport("kernel32", SetLastError = true, CharSet = CharSet.Unicode)] + public static extern IntPtr LoadLibraryW(string lpszLib); + } + + private class Linux + { + [DllImport("libdl.so.2")] + public static extern IntPtr dlopen(string path, int flags); + + [DllImport("libdl.so.2")] + public static extern IntPtr dlsym(IntPtr handle, string symbol); + } + + private class OSX + { + [DllImport("/usr/lib/libSystem.dylib")] + public static extern IntPtr dlopen(string path, int flags); + + [DllImport("/usr/lib/libSystem.dylib")] + public static extern IntPtr dlsym(IntPtr handle, string symbol); + } + + private static bool IsWindows, IsOSX; + + static FuncLoader() + { + IsWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); + IsOSX = RuntimeInformation.IsOSPlatform(OSPlatform.OSX); + } + + public static IntPtr LoadLibrary(string libname) + { + if (IsWindows) + return Windows.LoadLibraryW(libname); + + if (IsOSX) + return OSX.dlopen(libname, 1); + + return Linux.dlopen(libname, 1); + } + + public static IntPtr GetProcAddress(IntPtr library, string function) + { + var ret = IntPtr.Zero; + + if (IsWindows) + ret = Windows.GetProcAddress(library, function); + else if (IsOSX) + ret = OSX.dlsym(library, function); + else + ret = Linux.dlsym(library, function); + + if (ret == IntPtr.Zero) + { + Console.WriteLine("Error: " + function); + throw new Exception(); + } + + return ret; + } +} \ No newline at end of file diff --git a/Source/Tools/GapiCodegen/CodeGenerator.cs b/Source/Tools/GapiCodegen/CodeGenerator.cs index 8cd7d513f..1ff0ae0ab 100755 --- a/Source/Tools/GapiCodegen/CodeGenerator.cs +++ b/Source/Tools/GapiCodegen/CodeGenerator.cs @@ -29,6 +29,8 @@ namespace GtkSharp.Generation { public class CodeGenerator { + public static ulong Counter = 0; + static LogWriter log = new LogWriter ("CodeGenerator"); public static int Main (string[] args) diff --git a/Source/Tools/GapiCodegen/Ctor.cs b/Source/Tools/GapiCodegen/Ctor.cs index 5553cd056..e2b13b146 100755 --- a/Source/Tools/GapiCodegen/Ctor.cs +++ b/Source/Tools/GapiCodegen/Ctor.cs @@ -65,9 +65,9 @@ namespace GtkSharp.Generation { void GenerateImport (StreamWriter sw) { - sw.WriteLine("\t\t[DllImport(\"" + LibraryName + "\", CallingConvention = CallingConvention.Cdecl)]"); - sw.WriteLine("\t\tstatic extern " + Safety + "IntPtr " + CName + "(" + Parameters.ImportSignature + ");"); - sw.WriteLine(); + sw.WriteLine("\t\tdelegate IntPtr d_{0}({1});", CName, Parameters.ImportSignature); + sw.WriteLine("\t\tstatic d_{0} {0} = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(\"{1}\"), \"{0}\"));", CName, LibraryName); + sw.WriteLine(); } void GenerateStatic (GenerationInfo gen_info) diff --git a/Source/Tools/GapiCodegen/EnumGen.cs b/Source/Tools/GapiCodegen/EnumGen.cs index 16081d8e2..154dea1c5 100755 --- a/Source/Tools/GapiCodegen/EnumGen.cs +++ b/Source/Tools/GapiCodegen/EnumGen.cs @@ -117,8 +117,9 @@ namespace GtkSharp.Generation { if (Elem.HasAttribute ("gtype")) { sw.WriteLine (); sw.WriteLine ("\tinternal class " + Name + "GType {"); - sw.WriteLine ("\t\t[DllImport (\"" + LibraryName + "\", CallingConvention = CallingConvention.Cdecl)]"); - sw.WriteLine ("\t\tstatic extern IntPtr " + Elem.GetAttribute ("gtype") + " ();"); + var funcname = Elem.GetAttribute("gtype"); + sw.WriteLine ("\t\tdelegate IntPtr d_" + funcname + "();"); + sw.WriteLine ("\t\tstatic d_" + funcname + " " + funcname + " = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(\"" + LibraryName + "\"), \"" + funcname + "\"));"); sw.WriteLine (); sw.WriteLine ("\t\tpublic static GLib.GType GType {"); sw.WriteLine ("\t\t\tget {"); diff --git a/Source/Tools/GapiCodegen/Method.cs b/Source/Tools/GapiCodegen/Method.cs index 74423b873..dd9071fe7 100755 --- a/Source/Tools/GapiCodegen/Method.cs +++ b/Source/Tools/GapiCodegen/Method.cs @@ -191,11 +191,12 @@ namespace GtkSharp.Generation { string import_sig = IsStatic ? "" : container_type.MarshalType + " raw"; import_sig += !IsStatic && Parameters.Count > 0 ? ", " : ""; import_sig += Parameters.ImportSignature.ToString(); - sw.WriteLine("\t\t[DllImport(\"" + LibraryName + "\", CallingConvention = CallingConvention.Cdecl)]"); - if (retval.MarshalType.StartsWith ("[return:")) - sw.WriteLine("\t\t" + retval.MarshalType + " static extern " + Safety + retval.CSType + " " + CName + "(" + import_sig + ");"); + + if (retval.MarshalType.StartsWith("[return:")) + sw.WriteLine("\t\tdelegate " + retval.CSType + " d_" + CName + "(" + import_sig + ");"); else - sw.WriteLine("\t\tstatic extern " + Safety + retval.MarshalType + " " + CName + "(" + import_sig + ");"); + sw.WriteLine("\t\tdelegate " + retval.MarshalType + " d_" + CName + "(" + import_sig + ");"); + sw.WriteLine("\t\tstatic d_" + CName + " " + CName + " = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(\"" + LibraryName + "\"), \"" + CName + "\"));"); sw.WriteLine(); } diff --git a/Source/Tools/GapiCodegen/OpaqueGen.cs b/Source/Tools/GapiCodegen/OpaqueGen.cs index c0e252620..d9e0b3a84 100755 --- a/Source/Tools/GapiCodegen/OpaqueGen.cs +++ b/Source/Tools/GapiCodegen/OpaqueGen.cs @@ -185,8 +185,8 @@ namespace GtkSharp.Generation { } #endif if (set_gvalue != null) { - sw.WriteLine ("\t\t[DllImport(\"{0}\", CallingConvention = CallingConvention.Cdecl)]", LibraryName); - sw.WriteLine ("\t\tstatic extern void {0}(ref GLib.Value val, IntPtr obj);", set_gvalue.CName); + sw.WriteLine("\t\tdelegate IntPtr d_{0}(ref GLib.Value val, IntPtr obj);", set_gvalue.CName); + sw.WriteLine("\t\tstatic d_{0} {0} = Marshal.GetDelegateForFunctionPointer(FuncLoader.GetProcAddress(GLibrary.Load(\"{1}\"), \"{0}\"));", set_gvalue.CName, LibraryName); sw.WriteLine (); sw.WriteLine ("\t\tpublic void SetGValue (ref GLib.Value val)"); sw.WriteLine ("\t\t{"); diff --git a/build.cake b/build.cake index c6f2802cd..84b3e7bb3 100755 --- a/build.cake +++ b/build.cake @@ -47,19 +47,6 @@ Task("Prepare") DotNetCoreRestore("Source/Libs/GtkSharp.sln"); }); -Task("GenerateLinuxStubs") - .IsDependentOn("Init") - .Does(() => -{ - CreateDirectory("BuildOutput/LinuxStubs"); - System.IO.Directory.SetCurrentDirectory("BuildOutput/LinuxStubs"); - FileWriteText("empty.c", ""); - foreach(var gassembly in list) - gassembly.GenerateLinuxStubs(); - System.IO.Directory.SetCurrentDirectory("../.."); - DeleteDirectory("BuildOutput/LinuxStubs", new DeleteDirectorySettings { Recursive = true, Force = true }); -}); - Task("Clean") .IsDependentOn("Init") .Does(() =>