THIS PROJECT IS NOW DEPRECATED AS GIR.CORE NOW INCLUDES THESE FEATURES
Extensions library for gir.core
gir.core provides C# bindings for GObject based libraries like GTK, and while it is an awesome tool, it's not complete. It misses some methods that you might want to use in your apps, and this is the case for Nickvision applications. The goal of GirExt is to provide missing parts and helper functions to make writing gir.core apps easier today.
Currently implemented:
- Gdk
- Clipboard
- ReadTextAsync
- Helpers[1]
- GdkExt.RGBA
- Parse
- ToString
- GdkExt.RGBA
- Clipboard
- Gtk
- AlertDialog
- ChooseAsync
- ColorDialog
- ChooseRgbaAsync (returns GdkExt.RGBA)
- FileDialog
- OpenAsync
- OpenMultipleAsync
- SaveAsync
- SelectFolderAsync
- SelectMultipleFoldersAsync
- FileLauncher
- LaunchAsync
- OpenContainingFolderAsync
- UriLauncher
- LaunchAsync
- Helpers[1]
- ColorDialog
- GetExtRgba
- SetExtRgba
- FlowBox
- GetSelectedChildrenIndices
- ListBox
- GetSelectedRowsIndices
- ColorDialog
- AlertDialog
- External[2]
- Unity[3]
- LauncherEntry
- GetForDesktopID
- SetProgressVisible
- SetProgress
- LauncherEntry
- Unity[3]
[1] Helpers are functions that do not follow gir.core API, they are workarounds created to avoid complexity that is required for proper implementation of related methods.
[2] External are bindings for libraries that are not a part of gir.core, but may be useful when creating GTK apps.
[3] Linux-only.
If you develop apps with gir.core and found something missing that is not implemented here, feel free to open an issue with request or send a PR with your implementation.
using static Nickvision.GirExt.GtkExt;
...
try
{
var file = await fileDialog.OpenAsync(window);
var fileLauncher = Gtk.FileLauncher.New(file);
await fileLauncher.LaunchAsync(window);
}
catch
{
Console.WriteLine("Failed to open a file.");
}