From a224a9e161bf52890691c5610a712fd47fd99f4b Mon Sep 17 00:00:00 2001 From: cra0zy Date: Fri, 19 Jan 2018 01:29:05 +0100 Subject: [PATCH] Fix up more of the residual errors that came with the switch --- Source/Libs/CairoSharp/NativeMethods.cs | 4 +--- Source/Libs/GtkSharp/TreeSelection.cs | 6 +++--- Source/Libs/GtkSharp/TreeView.cs | 8 ++++---- Source/Libs/PangoSharp/PangoSharp.metadata | 2 +- Source/Libs/Shared/FuncLoader.cs | 2 ++ Source/Libs/Shared/GLibrary.cs | 1 + Source/Libs/Shared/Library.cs | 1 + Source/Samples/MainWindow.cs | 2 +- .../GtkSharp.Application.CSharp/GtkNamespace.csproj | 2 +- .../GtkSharp.Application.VBNet/GtkNamespace.vbproj | 2 +- build.cake | 2 +- 11 files changed, 17 insertions(+), 15 deletions(-) diff --git a/Source/Libs/CairoSharp/NativeMethods.cs b/Source/Libs/CairoSharp/NativeMethods.cs index 3a218f753..78dc1fad9 100755 --- a/Source/Libs/CairoSharp/NativeMethods.cs +++ b/Source/Libs/CairoSharp/NativeMethods.cs @@ -41,8 +41,6 @@ namespace Cairo internal static class NativeMethods { - const string cairo = "libcairo-2.dll"; - internal delegate void d_cairo_append_path(IntPtr cr, IntPtr path); internal static d_cairo_append_path cairo_append_path = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_append_path")); @@ -222,7 +220,7 @@ namespace Cairo 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 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_font_face_create_for_pattern")); - internal delegate void d_cairo_ft_font_options_substitute(FontOptions options, IntPtr pattern); + internal delegate void d_cairo_ft_font_options_substitute(IntPtr options, IntPtr pattern); internal static d_cairo_ft_font_options_substitute cairo_ft_font_options_substitute = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_font_options_substitute")); internal delegate IntPtr d_cairo_ft_scaled_font_lock_face(IntPtr scaled_font); diff --git a/Source/Libs/GtkSharp/TreeSelection.cs b/Source/Libs/GtkSharp/TreeSelection.cs index edcbb512c..3a483ca53 100755 --- a/Source/Libs/GtkSharp/TreeSelection.cs +++ b/Source/Libs/GtkSharp/TreeSelection.cs @@ -38,12 +38,12 @@ namespace Gtk { return (TreePath[]) GLib.Marshaller.ListToArray (list, typeof (Gtk.TreePath)); } - 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 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_selection_get_selected_without_model")); + delegate bool d_gtk_tree_selection_get_selected2(IntPtr raw, IntPtr model, out Gtk.TreeIter iter); + static d_gtk_tree_selection_get_selected2 gtk_tree_selection_get_selected2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_selection_get_selected")); public bool GetSelected (out Gtk.TreeIter iter) { - return gtk_tree_selection_get_selected_without_model (Handle, IntPtr.Zero, out iter); + return gtk_tree_selection_get_selected2 (Handle, IntPtr.Zero, out iter); } } } diff --git a/Source/Libs/GtkSharp/TreeView.cs b/Source/Libs/GtkSharp/TreeView.cs index c150f9f73..04e8fabe7 100755 --- a/Source/Libs/GtkSharp/TreeView.cs +++ b/Source/Libs/GtkSharp/TreeView.cs @@ -51,8 +51,8 @@ namespace Gtk { 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 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_view_get_path_at_pos")); - 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 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_view_get_path_at_pos_intptr")); + delegate bool d_gtk_tree_view_get_path_at_pos2(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_pos2 gtk_tree_view_get_path_at_pos2 = FuncLoader.LoadFunction(FuncLoader.GetProcAddress(GLibrary.Load(Library.Gtk), "gtk_tree_view_get_path_at_pos")); public bool GetPathAtPos (int x, int y, out Gtk.TreePath path, out Gtk.TreeViewColumn column, out int cell_x, out int cell_y) { @@ -75,7 +75,7 @@ namespace Gtk { { IntPtr pathHandle; IntPtr columnHandle; - bool raw_ret = gtk_tree_view_get_path_at_pos_intptr (Handle, x, y, out pathHandle, out columnHandle, IntPtr.Zero, IntPtr.Zero); + bool raw_ret = gtk_tree_view_get_path_at_pos2 (Handle, x, y, out pathHandle, out columnHandle, IntPtr.Zero, IntPtr.Zero); if (raw_ret) path = (Gtk.TreePath) GLib.Opaque.GetOpaque (pathHandle, typeof (Gtk.TreePath), true); else @@ -88,7 +88,7 @@ namespace Gtk { { IntPtr pathHandle; IntPtr columnHandle; - bool raw_ret = gtk_tree_view_get_path_at_pos_intptr (Handle, x, y, out pathHandle, out columnHandle, IntPtr.Zero, IntPtr.Zero); + bool raw_ret = gtk_tree_view_get_path_at_pos2 (Handle, x, y, out pathHandle, out columnHandle, IntPtr.Zero, IntPtr.Zero); if (raw_ret) { path = (Gtk.TreePath) GLib.Opaque.GetOpaque (pathHandle, typeof (Gtk.TreePath), true); column = (Gtk.TreeViewColumn) GLib.Object.GetObject (columnHandle, false); diff --git a/Source/Libs/PangoSharp/PangoSharp.metadata b/Source/Libs/PangoSharp/PangoSharp.metadata index 1db221d1b..60c4f2e03 100755 --- a/Source/Libs/PangoSharp/PangoSharp.metadata +++ b/Source/Libs/PangoSharp/PangoSharp.metadata @@ -36,7 +36,7 @@ VersionString 1 CairoHelper - libpangocairo-1.0-0 + libpangocairo-1.0-0.dll 1 1 ref diff --git a/Source/Libs/Shared/FuncLoader.cs b/Source/Libs/Shared/FuncLoader.cs index d94c6710a..1c5d72fdd 100644 --- a/Source/Libs/Shared/FuncLoader.cs +++ b/Source/Libs/Shared/FuncLoader.cs @@ -62,6 +62,8 @@ class FuncLoader if (ret == IntPtr.Zero) Console.WriteLine("[WARNING] Function not found: " + function); + else + Console.WriteLine("Function found: " + function); return ret; } diff --git a/Source/Libs/Shared/GLibrary.cs b/Source/Libs/Shared/GLibrary.cs index 71b6bba30..87dae281e 100644 --- a/Source/Libs/Shared/GLibrary.cs +++ b/Source/Libs/Shared/GLibrary.cs @@ -22,6 +22,7 @@ class GLibrary _libdict.Add((Library.Gdk, "libgdk-3-0.dll", "libgdk-3.so.0", "libgdk-3.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-3.0.dylib")); + _libdict.Add((Library.PangoCairo, "libpangocairo-1.0-0.dll", "libpangocairo-1.0.so.0", "libpangocairo-1.0.0.dylib")); } public static IntPtr Load(string libname) diff --git a/Source/Libs/Shared/Library.cs b/Source/Libs/Shared/Library.cs index 78c8a0afc..a5da66c57 100644 --- a/Source/Libs/Shared/Library.cs +++ b/Source/Libs/Shared/Library.cs @@ -7,6 +7,7 @@ enum Library Gio, Atk, Pango, + PangoCairo, Gdk, GdkPixbuf, Gtk diff --git a/Source/Samples/MainWindow.cs b/Source/Samples/MainWindow.cs index a435042de..071748690 100644 --- a/Source/Samples/MainWindow.cs +++ b/Source/Samples/MainWindow.cs @@ -18,7 +18,7 @@ namespace Samples private MainWindow(Builder builder) : base(builder.GetObject("MainWindow").Handle) { builder.Autoconnect(this); - + DeleteEvent += Window_DeleteEvent; _button1.Clicked += Button1_Clicked; } diff --git a/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/GtkNamespace.csproj b/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/GtkNamespace.csproj index 055cde234..77df7d600 100755 --- a/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/GtkNamespace.csproj +++ b/Source/Templates/GtkSharp.Template.CSharp/content/GtkSharp.Application.CSharp/GtkNamespace.csproj @@ -10,6 +10,6 @@ - + diff --git a/Source/Templates/GtkSharp.Template.VBNet/content/GtkSharp.Application.VBNet/GtkNamespace.vbproj b/Source/Templates/GtkSharp.Template.VBNet/content/GtkSharp.Application.VBNet/GtkNamespace.vbproj index 055cde234..77df7d600 100755 --- a/Source/Templates/GtkSharp.Template.VBNet/content/GtkSharp.Application.VBNet/GtkNamespace.vbproj +++ b/Source/Templates/GtkSharp.Template.VBNet/content/GtkSharp.Application.VBNet/GtkNamespace.vbproj @@ -10,6 +10,6 @@ - + diff --git a/build.cake b/build.cake index 4df54b752..2bd76376e 100755 --- a/build.cake +++ b/build.cake @@ -6,7 +6,7 @@ // VARS Settings.Cake = Context; -Settings.Version = "3.22.24.26"; +Settings.Version = "3.22.24.27"; Settings.BuildTarget = Argument("BuildTarget", "Default"); Settings.Assembly = Argument("Assembly", "");