Fix up more of the residual errors that came with the switch

This commit is contained in:
cra0zy 2018-01-19 01:29:05 +01:00
parent f038f6c03e
commit a224a9e161
11 changed files with 17 additions and 15 deletions

View File

@ -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<d_cairo_append_path>(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<d_cairo_ft_font_face_create_for_pattern>(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<d_cairo_ft_font_options_substitute>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_ft_font_options_substitute"));
internal delegate IntPtr d_cairo_ft_scaled_font_lock_face(IntPtr scaled_font);

View File

@ -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<d_gtk_tree_selection_get_selected_without_model>(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<d_gtk_tree_selection_get_selected2>(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);
}
}
}

View File

@ -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<d_gtk_tree_view_get_path_at_pos>(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<d_gtk_tree_view_get_path_at_pos_intptr>(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<d_gtk_tree_view_get_path_at_pos2>(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);

View File

@ -36,7 +36,7 @@
<attr path="/api/namespace/class/method[@cname='pango_version_string']" name="name">VersionString</attr>
<attr path="/api/namespace/class[@cname='PangoAttr_']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='PangoCairo_']" name="name">CairoHelper</attr>
<attr path="/api/namespace/class[@cname='PangoCairo_']/method" name="library">libpangocairo-1.0-0</attr>
<attr path="/api/namespace/class[@cname='PangoCairo_']/method" name="library">libpangocairo-1.0-0.dll</attr>
<attr path="/api/namespace/class[@cname='PangoCairo_']/method[@name='ContextGetFontOptions']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='PangoCairo_']/method[@name='ContextSetFontOptions']" name="hidden">1</attr>
<attr path="/api/namespace/class[@cname='PangoGlobal']/method[@name='ExtentsToPixels']/*/*[@type='PangoRectangle*']" name="pass_as">ref</attr>

View File

@ -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;
}

View File

@ -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)

View File

@ -7,6 +7,7 @@ enum Library
Gio,
Atk,
Pango,
PangoCairo,
Gdk,
GdkPixbuf,
Gtk

View File

@ -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;
}

View File

@ -10,6 +10,6 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="GtkSharp" Version="3.22.24.26" />
<PackageReference Include="GtkSharp" Version="3.22.24.27" />
</ItemGroup>
</Project>

View File

@ -10,6 +10,6 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="GtkSharp" Version="3.22.24.26" />
<PackageReference Include="GtkSharp" Version="3.22.24.27" />
</ItemGroup>
</Project>

View File

@ -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", "");