lib/WL/workspaces.pm untested

filter: Statementstmt 0.0% 0 / 30 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 / 41 CC 2 SCAR 11.0
CC
2
Cov
0%
callback
6.0
move_surface
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::workspaces - Perl binding for workspaces protocol
15  
16 =head1 SYNOPSIS
17  
18 use WL::workspaces;
19  
20 =head1 DESCRIPTION
21  
22 B<WL::workspaces> 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::workspaces;
42  
43 our $VERSION = 0.92;
44  
45 package WL::workspace_manager;
46  
47 our @ISA = qw/WL::Base/;
48 our $VERSION = 1;
49 our $INTERFACE = 'workspace_manager';
50  
51 # Requests
52 use constant REQUEST_MOVE_SURFACE => 0;
53  
54 sub move_surface
55 {
56 my $self = shift;
57 my $file;
58 my $retval;
59  
60 $self->call (REQUEST_MOVE_SURFACE, pack ('L L',
61 shift->{id},
62 shift), $file);
63  
64 return $retval;
65 }
66  
67 # Events
68 use constant EVENT_STATE => 0;
69  
70 sub callback
71 {
72 my $self = shift;
73 my $opcode = shift;
74  
75 if ($opcode == EVENT_STATE) {
76 @_ = unpack ('L L', shift);
77 return $self->state (shift,
78 shift);
79 } else {
80 die 'Bad opcode';
81 }
82 }
83  
84  
85 =head1 BUGS
86  
87 The interface documentation for the bindings is lacking.
88  
89 Only client part implemented, not server.
90  
91 =head1 SEE ALSO
92  
93 =over
94  
95 =item *
96  
97 L<http://wayland.freedesktop.org/> -- Wayland project web site
98  
99 =item *
100  
101 L<wl-draw.pl> -- Example Wayland client
102  
103 =item *
104  
105 L<wl-scanner.pl> -- Tool that generated this module
106  
107 =item *
108  
109 L<WL::Base> -- Base class for Wayland objects
110  
111 =item *
112  
113 L<WL::Connection> -- Estabilish a Wayland connection
114  
115 =back
116  
117 =head1 COPYRIGHT
118  
119 Copyright 2013, 2014 Lubomir Rintel
120  
121 This program is free software; you can redistribute it and/or modify it
122 under the same terms as Perl itself.
123  
124 =head1 AUTHORS
125  
126 Lubomir Rintel C<lkundrak@v3.sk>
127  
128 =cut
129