lib/WL/scaler.pm untested

filter: Statementstmt 0.0% 0 / 70 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 17 Podpod 0.0% 0 / 6 totaltotal 0.0% 0 / 93 CC 1 SCAR 6.9
CC
1
Cov
0%
destroy
2.0
get_viewport
2.0
destroy
2.0
CRAP 2.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::scaler - Perl binding for scaler protocol
15  
16 =head1 SYNOPSIS
17  
18 use WL::scaler;
19  
20 =head1 DESCRIPTION
21  
22 B<WL::scaler> 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::scaler;
42  
43 our $VERSION = 0.92;
44  
45 package WL::wl_scaler;
46  
47 our @ISA = qw/WL::Base/;
48 our $VERSION = 2;
49 our $INTERFACE = 'wl_scaler';
50  
51 # Requests
52 use constant REQUEST_DESTROY => 0;
53 use constant REQUEST_GET_VIEWPORT => 1;
54  
55 sub destroy
56 {
57 my $self = shift;
58 my $file;
59 my $retval;
60  
61 $self->call (REQUEST_DESTROY, pack ('',
62 ), $file);
63  
64 return $retval;
65 }
66  
67 sub get_viewport
68 {
69 my $self = shift;
70 my $file;
71 my $retval;
72  
73 $self->call (REQUEST_GET_VIEWPORT, pack ('L L',
74 ($retval = new WL::wl_viewport ($self->{conn}))->{id},
75 shift->{id}), $file);
76  
77 return $retval;
78 }
79  
80 # Enums
81 use constant ERROR_VIEWPORT_EXISTS => 0;
82  
83 package WL::wl_viewport;
84  
85 our @ISA = qw/WL::Base/;
86 our $VERSION = 2;
87 our $INTERFACE = 'wl_viewport';
88  
89 # Requests
90 use constant REQUEST_DESTROY => 0;
91 use constant REQUEST_SET => 1;
92 use constant REQUEST_SET_SOURCE => 2;
93 use constant REQUEST_SET_DESTINATION => 3;
94  
95 sub destroy
96 {
97 my $self = shift;
98 my $file;
99 my $retval;
100  
101 $self->call (REQUEST_DESTROY, pack ('',
102 ), $file);
103  
104 return $retval;
105 }
106  
107 sub set
108 {
109 my $self = shift;
110 my $file;
111 my $retval;
112  
113 $self->call (REQUEST_SET, pack ('l l l l l l',
114 $self->nv2fixed ($_),
115 $self->nv2fixed ($_),
116 $self->nv2fixed ($_),
117 $self->nv2fixed ($_),
118 shift,
119 shift), $file);
120  
121 return $retval;
122 }
123  
124 sub set_source
125 {
126 my $self = shift;
127 my $file;
128 my $retval;
129  
130 $self->call (REQUEST_SET_SOURCE, pack ('l l l l',
131 $self->nv2fixed ($_),
132 $self->nv2fixed ($_),
133 $self->nv2fixed ($_),
134 $self->nv2fixed ($_)), $file);
135  
136 return $retval;
137 }
138  
139 sub set_destination
140 {
141 my $self = shift;
142 my $file;
143 my $retval;
144  
145 $self->call (REQUEST_SET_DESTINATION, pack ('l l',
146 shift,
147 shift), $file);
148  
149 return $retval;
150 }
151  
152 # Enums
153 use constant ERROR_BAD_VALUE => 0;
154  
155  
156 =head1 BUGS
157  
158 The interface documentation for the bindings is lacking.
159  
160 Only client part implemented, not server.
161  
162 =head1 SEE ALSO
163  
164 =over
165  
166 =item *
167  
168 L<http://wayland.freedesktop.org/> -- Wayland project web site
169  
170 =item *
171  
172 L<wl-draw.pl> -- Example Wayland client
173  
174 =item *
175  
176 L<wl-scanner.pl> -- Tool that generated this module
177  
178 =item *
179  
180 L<WL::Base> -- Base class for Wayland objects
181  
182 =item *
183  
184 L<WL::Connection> -- Estabilish a Wayland connection
185  
186 =back
187  
188 =head1 COPYRIGHT
189  
190 Copyright 2013, 2014 Lubomir Rintel
191  
192 This program is free software; you can redistribute it and/or modify it
193 under the same terms as Perl itself.
194  
195 Copyright notice from the protocol definition file:
196  
197 Copyright © 2013-2014 Collabora, Ltd.
198
199 Permission to use, copy, modify, distribute, and sell this
200 software and its documentation for any purpose is hereby granted
201 without fee, provided that the above copyright notice appear in
202 all copies and that both that copyright notice and this permission
203 notice appear in supporting documentation, and that the name of
204 the copyright holders not be used in advertising or publicity
205 pertaining to distribution of the software without specific,
206 written prior permission. The copyright holders make no
207 representations about the suitability of this software for any
208 purpose. It is provided "as is" without express or implied
209 warranty.
210
211 THE COPYRIGHT HOLDERS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
212 SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
213 FITNESS, IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY
214 SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
215 WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
216 AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
217 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
218 THIS SOFTWARE.
219  
220 =head1 AUTHORS
221  
222 Lubomir Rintel C<lkundrak@v3.sk>
223  
224 =cut
225