introduce IsSupported in <namespace>.Global

This commit is contained in:
lytico 2021-07-19 20:13:14 +02:00
parent 6b4cf555e0
commit 882140fd9d
8 changed files with 48 additions and 2 deletions

View file

@ -40,6 +40,9 @@ namespace Atk {
GLib.Marshaller.Free (native_event_type);
return id;
}
public static bool IsSupported => GLibrary.IsSupported(Library.Atk);
}
}

View file

@ -0,0 +1,11 @@
namespace Cairo
{
public partial class Global
{
public static bool IsSupported => GLibrary.IsSupported(Library.Cairo);
}
}

View file

@ -85,6 +85,9 @@ namespace GLib {
{
return Marshaller.PtrToStringGFree (g_format_size_for_display (size));
}
public static bool IsSupported => GLibrary.IsSupported(Library.GLib);
}
}

View file

@ -160,6 +160,9 @@ namespace Gdk {
result [i] = (VisualType) tmp [i];
return result;
}
public static bool IsSupported => GLibrary.IsSupported(Library.Gdk);
}
}

View file

@ -0,0 +1,11 @@
namespace Gio
{
public partial class Global
{
public static bool IsSupported => GLibrary.IsSupported(Library.Gio);
}
}

View file

@ -20,8 +20,6 @@ namespace Gtk {
public partial class Global {
internal const string GtkNativeDll = "libgtk-3-0.dll";
public static bool ShowUri (string uri)
{
return ShowUri (null, uri);
@ -31,6 +29,9 @@ namespace Gtk {
{
return ShowUri (screen, uri, Gtk.Global.CurrentEventTime);
}
public static bool IsSupported => GLibrary.IsSupported(Library.Gtk);
}
}

View file

@ -0,0 +1,11 @@
namespace GtkSource
{
public partial class Global
{
public static bool IsSupported => GLibrary.IsSupported(Library.GtkSource);
}
}

View file

@ -50,6 +50,9 @@ namespace Pango {
attrs = new Pango.AttrList (attrs_handle);
return result;
}
public static bool IsSupported => GLibrary.IsSupported(Library.Pango);
}
}