Gtk3.pm

filter: Statementstmt 31.2% 5 / 16 Branchbran 0.0% 0 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 1 / 2 Podpod 100% 1 / 1 totaltotal 28.0% 7 / 25 CC 4 SCAR 27.9
CC
4
Cov
23%
Inline
20.0
BEGIN
1.0
CRAP 16.2
↑ Summary Gtk3/GdkQuartz.pm »
1 1 ▶use Renard::Incunabula::Common::Setup;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 package Intertangle::API::Gtk3;
3 # ABSTRACT: Provides helpers for dealing with Gtk3 code
4 1 $Intertangle::API::Gtk3::VERSION = '0.006';
5 sub Inline {
6 0 ▶ return unless $_[-1] eq 'C';
Subroutine Inline: not called CC=4 SCAR=30.0
Pod documented
Branch: 1 branch
BranchTrueFalseTotal
unless $_[-1] eq "C" 0 0 0
7  
8 0 my $gtk3_pkg = 'gtk+-3.0';
9  
10 0 require ExtUtils::PkgConfig;
11 0 require Intertangle::API::Glib;
12 0 require Hash::Merge;
13 0 my $glib = Intertangle::API::Glib->Inline($_[-1]);
14  
15 0 ▶ my @nosearch = $^O eq 'MSWin32' ? (':nosearch') : ();
Branch: 1 branch
BranchTrueFalseTotal
$^O eq 'MSWin32' ? : 0 0 0
16 0 ▶ my @search = $^O eq 'MSWin32' ? ( ':search' ) : ();
Branch: 1 branch
BranchTrueFalseTotal
$^O eq 'MSWin32' ? : 0 0 0
17 my $gtk = {
18 CCFLAGSEX => join(" ", delete $glib->{CCFLAGSEX}, ExtUtils::PkgConfig->cflags($gtk3_pkg)),
19 0 LIBS => join(" ", @nosearch, delete $glib->{LIBS}, ExtUtils::PkgConfig->libs($gtk3_pkg), @search),
20 AUTO_INCLUDE => <<C,
21 #include <gtk/gtk.h>
22 C
23 };
24  
25 0 my $merge = Hash::Merge->new('RETAINMENT_PRECEDENT');
26 0 $merge->merge( $glib, $gtk );
27 }
28  
29 1 1;
30  
31 __END__
32  
33 =pod
34  
35 =encoding UTF-8
36  
37 =head1 NAME
38  
39 Intertangle::API::Gtk3 - Provides helpers for dealing with Gtk3 code
40  
41 =head1 VERSION
42  
43 version 0.006
44  
45 =head1 METHODS
46  
47 =head2 Inline
48  
49 use Inline C with => qw(Intertangle::API::Gtk3);
50  
51 Returns the flags needed to configure L<Inline::C> to use with
52 C<gtk+-3.0>.
53  
54 =head1 SEE ALSO
55  
56 =head1 AUTHOR
57  
58 Zakariyya Mughal <zmughal@cpan.org>
59  
60 =head1 COPYRIGHT AND LICENSE
61  
62 This software is copyright (c) 2017 by Zakariyya Mughal.
63  
64 This is free software; you can redistribute it and/or modify it under
65 the same terms as the Perl 5 programming language system itself.
66  
67 =cut
↑ Summary Gtk3/GdkQuartz.pm »