lib/WL/screenshooter.pm untested

filter: Statementstmt 0.0% 0 / 29 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 2 totaltotal 0.0% 0 / 40 CC 2 SCAR 11.0
CC
2
Cov
0%
callback
6.0
shoot
2.0
BEGIN
2.0
CRAP 3.0
1 # DO NOT EDIT, PRETTY PLEASE!
2 # This file is automatically generated by wl-scanner.pl
3 #
4  
5 use strict;
6 use warnings;
7 use utf8;
8  
9 =encoding utf8
10 =cut
11  
12 =head1 NAME
13  
14 WL::screenshooter - Perl binding for screenshooter protocol
15  
16 =head1 SYNOPSIS
17  
18 use WL::screenshooter;
19  
20 =head1 DESCRIPTION
21  
22 B<WL::screenshooter> is a package generated from Wayland protocol definition
23 using L<wl-scanner.pl>. It implements L<WL::Base> subclasses with wrappers
24 for requests, event processing and constants for enums.
25  
26 It is not indended to be used directly. Instead, see L<WL::Connection> to see
27 how to obtain the object instances.
28  
29 To see how to attach event callbacks and issue requests, please refer to
30 L<WL::Base> base class.
31  
32 Until proper documentation is finished, please refer to documentation of C
33 bindings of the generated code (it is intended to be readable) to see what
34 arguments to give to requests and expect from events.
35  
36 Please consider this an alpha quality code, whose API can change at any time,
37 until we reach version 1.0.
38  
39 =cut
40  
41 package WL::screenshooter;
42  
43 our $VERSION = 0.92;
44  
45 package WL::screenshooter;
46  
47 our @ISA = qw/WL::Base/;
48 our $VERSION = 1;
49 our $INTERFACE = 'screenshooter';
50  
51 # Requests
52 use constant REQUEST_SHOOT => 0;
53  
54 sub shoot
55 {
56 my $self = shift;
57 my $file;
58 my $retval;
59  
60 $self->call (REQUEST_SHOOT, pack ('L L',
61 shift->{id},
62 shift->{id}), $file);
63  
64 return $retval;
65 }
66  
67 # Events
68 use constant EVENT_DONE => 0;
69  
70 sub callback
71 {
72 my $self = shift;
73 my $opcode = shift;
74  
75 if ($opcode == EVENT_DONE) {
76 return $self->done ();
77 } else {
78 die 'Bad opcode';
79 }
80 }
81  
82  
83 =head1 BUGS
84  
85 The interface documentation for the bindings is lacking.
86  
87 Only client part implemented, not server.
88  
89 =head1 SEE ALSO
90  
91 =over
92  
93 =item *
94  
95 L<http://wayland.freedesktop.org/> -- Wayland project web site
96  
97 =item *
98  
99 L<wl-draw.pl> -- Example Wayland client
100  
101 =item *
102  
103 L<wl-scanner.pl> -- Tool that generated this module
104  
105 =item *
106  
107 L<WL::Base> -- Base class for Wayland objects
108  
109 =item *
110  
111 L<WL::Connection> -- Estabilish a Wayland connection
112  
113 =back
114  
115 =head1 COPYRIGHT
116  
117 Copyright 2013, 2014 Lubomir Rintel
118  
119 This program is free software; you can redistribute it and/or modify it
120 under the same terms as Perl itself.
121  
122 =head1 AUTHORS
123  
124 Lubomir Rintel C<lkundrak@v3.sk>
125  
126 =cut
127