gir.core
gir.core copied to clipboard
Support extracting an interface instance from a GObject.Value
Support extracting an interface instance from a GObject.Value.
Disfunct sample (as the event is not raised for some reason):
var application = Gtk.Application.New("org.gir.core", Gio.ApplicationFlags.FlagsNone);
application.OnActivate += (sender, args) =>
{
var window = Gtk.ApplicationWindow.New((Gtk.Application) sender);
window.Title = "Gtk4 Window";
window.SetDefaultSize(300, 300);
window.Show();
};
application.OnOpen += (sender, signalArgs) =>
{
var files = signalArgs.Files;
};
return application.Run(1, new []{ "Test.pdf"});
The first argument is expected to be program name:
https://docs.gtk.org/gio/method.Application.run.html
This function sets the prgname (g_set_prgname()), if not already set, to the basename of argv[0].
So your sample doesn't work because for Gio.Application there's nothing to open.