Re: Gtk3::Application open signal

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:
 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:

    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:
 The other is on gio's side and needs to go through their patch approval
process before it can go in:
<>.  Once this has been
accepted, it also needs to be merged into gobject-introspection to be

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]