Fix up more of the residual errors that came with the switch
This commit is contained in:
parent
f038f6c03e
commit
a224a9e161
11 changed files with 17 additions and 15 deletions
|
@ -41,8 +41,6 @@ namespace Cairo
|
||||||
|
|
||||||
internal static class NativeMethods
|
internal static class NativeMethods
|
||||||
{
|
{
|
||||||
const string cairo = "libcairo-2.dll";
|
|
||||||
|
|
||||||
internal delegate void d_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 = FuncLoader.LoadFunction<d_cairo_append_path>(FuncLoader.GetProcAddress(GLibrary.Load(Library.Cairo), "cairo_append_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 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 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 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);
|
internal delegate IntPtr d_cairo_ft_scaled_font_lock_face(IntPtr scaled_font);
|
||||||
|
|
|
@ -38,12 +38,12 @@ namespace Gtk {
|
||||||
return (TreePath[]) GLib.Marshaller.ListToArray (list, typeof (Gtk.TreePath));
|
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);
|
delegate bool d_gtk_tree_selection_get_selected2(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"));
|
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)
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -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);
|
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"));
|
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);
|
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_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"));
|
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)
|
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 pathHandle;
|
||||||
IntPtr columnHandle;
|
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)
|
if (raw_ret)
|
||||||
path = (Gtk.TreePath) GLib.Opaque.GetOpaque (pathHandle, typeof (Gtk.TreePath), true);
|
path = (Gtk.TreePath) GLib.Opaque.GetOpaque (pathHandle, typeof (Gtk.TreePath), true);
|
||||||
else
|
else
|
||||||
|
@ -88,7 +88,7 @@ namespace Gtk {
|
||||||
{
|
{
|
||||||
IntPtr pathHandle;
|
IntPtr pathHandle;
|
||||||
IntPtr columnHandle;
|
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) {
|
if (raw_ret) {
|
||||||
path = (Gtk.TreePath) GLib.Opaque.GetOpaque (pathHandle, typeof (Gtk.TreePath), true);
|
path = (Gtk.TreePath) GLib.Opaque.GetOpaque (pathHandle, typeof (Gtk.TreePath), true);
|
||||||
column = (Gtk.TreeViewColumn) GLib.Object.GetObject (columnHandle, false);
|
column = (Gtk.TreeViewColumn) GLib.Object.GetObject (columnHandle, false);
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
<attr path="/api/namespace/class/method[@cname='pango_version_string']" name="name">VersionString</attr>
|
<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='PangoAttr_']" name="hidden">1</attr>
|
||||||
<attr path="/api/namespace/class[@cname='PangoCairo_']" name="name">CairoHelper</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='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='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>
|
<attr path="/api/namespace/class[@cname='PangoGlobal']/method[@name='ExtentsToPixels']/*/*[@type='PangoRectangle*']" name="pass_as">ref</attr>
|
||||||
|
|
|
@ -62,6 +62,8 @@ class FuncLoader
|
||||||
|
|
||||||
if (ret == IntPtr.Zero)
|
if (ret == IntPtr.Zero)
|
||||||
Console.WriteLine("[WARNING] Function not found: " + function);
|
Console.WriteLine("[WARNING] Function not found: " + function);
|
||||||
|
else
|
||||||
|
Console.WriteLine("Function found: " + function);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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.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.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.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)
|
public static IntPtr Load(string libname)
|
||||||
|
|
|
@ -7,6 +7,7 @@ enum Library
|
||||||
Gio,
|
Gio,
|
||||||
Atk,
|
Atk,
|
||||||
Pango,
|
Pango,
|
||||||
|
PangoCairo,
|
||||||
Gdk,
|
Gdk,
|
||||||
GdkPixbuf,
|
GdkPixbuf,
|
||||||
Gtk
|
Gtk
|
||||||
|
|
|
@ -18,7 +18,7 @@ namespace Samples
|
||||||
private MainWindow(Builder builder) : base(builder.GetObject("MainWindow").Handle)
|
private MainWindow(Builder builder) : base(builder.GetObject("MainWindow").Handle)
|
||||||
{
|
{
|
||||||
builder.Autoconnect(this);
|
builder.Autoconnect(this);
|
||||||
|
|
||||||
DeleteEvent += Window_DeleteEvent;
|
DeleteEvent += Window_DeleteEvent;
|
||||||
_button1.Clicked += Button1_Clicked;
|
_button1.Clicked += Button1_Clicked;
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="GtkSharp" Version="3.22.24.26" />
|
<PackageReference Include="GtkSharp" Version="3.22.24.27" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -10,6 +10,6 @@
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="GtkSharp" Version="3.22.24.26" />
|
<PackageReference Include="GtkSharp" Version="3.22.24.27" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
// VARS
|
// VARS
|
||||||
|
|
||||||
Settings.Cake = Context;
|
Settings.Cake = Context;
|
||||||
Settings.Version = "3.22.24.26";
|
Settings.Version = "3.22.24.27";
|
||||||
Settings.BuildTarget = Argument("BuildTarget", "Default");
|
Settings.BuildTarget = Argument("BuildTarget", "Default");
|
||||||
Settings.Assembly = Argument("Assembly", "");
|
Settings.Assembly = Argument("Assembly", "");
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue