Re: Gtk3::Application open signal
- From: Torsten Schoenfeld <kaffeetisch gmx de>
- To: gtk-perl-list gnome org
- Subject: Re: Gtk3::Application open signal
- Date: Sun, 20 May 2018 17:33:59 +0200
On 15.05.2018 11:26, Jeff wrote:
Thanks for this. Very helpful. Where should I have looked to know that
the Perl method names were simply capitalised versions of the C methods?
It's been like this in Gtk2, but it wasn't written down anywhere for the
introspection-based bindings. I added a few words now:
<https://git.gnome.org/browse/perl-Glib-Object-Introspection/commit/?id=2046d7494833aeff538fdbe578ecba0c4788eec9>.
Would this have helped?
I don't understand what is going on in the signal version, though. If
the callback for the open signal is:
sub _open {
my ($app, $files, $nfiles, $arg3) = @_;
print "files: $files, $nfiles, $arg3\n";
use Data::Dumper;
print Dumper($files, $nfiles, $arg3);
}
I get output like:
files: 94684537255296, 1,
$VAR1 = '94684537255296';
$VAR2 = 1;
$VAR3 = '';
What is going on?
Well, the answer should have been that you need to use the following to
get the signal properly marshalled:
Glib::Object::Introspection->setup(
basename => 'Gio',
version => '2.0',
package => 'Glib::IO',
use_generic_signal_marshaller_for => [
['Glib::IO::Application', 'open']
]);
(Or to get Glib::IO to do it for you.)
Unfortunately, there are two bugs that prevent this from working. One
is on our side and is quick to fix:
<https://git.gnome.org/browse/perl-Glib-Object-Introspection/commit/?id=2162a9b16a08fbbc9fd7ef2cc85e482ff149c373>.
The other is on gio's side and needs to go through their patch approval
process before it can go in:
<https://bugzilla.gnome.org/show_bug.cgi?id=796272>. Once this has been
accepted, it also needs to be merged into gobject-introspection to be
effective.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]