X11/CursorFont.pm untested

filter: Statementstmt 0.0% 0 / 19 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 5 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 25 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 # Copyright 2011, 2012, 2013, 2014, 2017 Kevin Ryde
2  
3 # This file is part of X11-Protocol-Other.
4 #
5 # X11-Protocol-Other is free software; you can redistribute it and/or
6 # modify it under the terms of the GNU General Public License as published
7 # by the Free Software Foundation; either version 3, or (at your option) any
8 # later version.
9 #
10 # X11-Protocol-Other is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
13 # Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License along
16 # with X11-Protocol-Other. If not, see <http://www.gnu.org/licenses/>.
17  
18 BEGIN { require 5 }
19 package X11::CursorFont;
20 use strict;
21 use vars qw($VERSION @ISA @EXPORT_OK %CURSOR_GLYPH @CURSOR_NAME);
22  
23 use Exporter;
24 @ISA = ('Exporter');
25 @EXPORT_OK = qw(%CURSOR_GLYPH @CURSOR_NAME);
26  
27 # uncomment this to run the ### lines
28 #use Smart::Comments;
29  
30 $VERSION = 31;
31  
32 %CURSOR_GLYPH
33 = (
34 # (shell-command "perl -n -e '/define XC_([^ ]*).*?([0-9]+)/ and $1 ne q{num_glyphs} and printf qq{ %-25s => %s,\n},$1,$2' </usr/include/X11/cursorfont.h" 'insert)
35  
36 X_cursor => 0,
37 arrow => 2,
38 based_arrow_down => 4,
39 based_arrow_up => 6,
40 boat => 8,
41 bogosity => 10,
42 bottom_left_corner => 12,
43 bottom_right_corner => 14,
44 bottom_side => 16,
45 bottom_tee => 18,
46 box_spiral => 20,
47 center_ptr => 22,
48 circle => 24,
49 clock => 26,
50 coffee_mug => 28,
51 cross => 30,
52 cross_reverse => 32,
53 crosshair => 34,
54 diamond_cross => 36,
55 dot => 38,
56 dotbox => 40,
57 double_arrow => 42,
58 draft_large => 44,
59 draft_small => 46,
60 draped_box => 48,
61 exchange => 50,
62 fleur => 52,
63 gobbler => 54,
64 gumby => 56,
65 hand1 => 58,
66 hand2 => 60,
67 heart => 62,
68 icon => 64,
69 iron_cross => 66,
70 left_ptr => 68,
71 left_side => 70,
72 left_tee => 72,
73 leftbutton => 74,
74 ll_angle => 76,
75 lr_angle => 78,
76 man => 80,
77 middlebutton => 82,
78 mouse => 84,
79 pencil => 86,
80 pirate => 88,
81 plus => 90,
82 question_arrow => 92,
83 right_ptr => 94,
84 right_side => 96,
85 right_tee => 98,
86 rightbutton => 100,
87 rtl_logo => 102,
88 sailboat => 104,
89 sb_down_arrow => 106,
90 sb_h_double_arrow => 108,
91 sb_left_arrow => 110,
92 sb_right_arrow => 112,
93 sb_up_arrow => 114,
94 sb_v_double_arrow => 116,
95 shuttle => 118,
96 sizing => 120,
97 spider => 122,
98 spraycan => 124,
99 star => 126,
100 target => 128,
101 tcross => 130,
102 top_left_arrow => 132,
103 top_left_corner => 134,
104 top_right_corner => 136,
105 top_side => 138,
106 top_tee => 140,
107 trek => 142,
108 ul_angle => 144,
109 umbrella => 146,
110 ur_angle => 148,
111 watch => 150,
112 xterm => 152,
113 );
114 ### %CURSOR_GLYPH
115  
116 @CURSOR_NAME[values %CURSOR_GLYPH] = keys %CURSOR_GLYPH;
117 $#CURSOR_NAME |= 1; # odd number of entries
118 ### @CURSOR_NAME
119  
120 # or for explicit CURSOR_NAME list ... but that fills in the odd elements
121 # with undefs, where values/keys leaves them uninitialised
122 # = (
123 # # (shell-command "perl -n -e '/define XC_([^ ]*).*?([0-9]+)/ and $1 ne q{num_glyphs} and do { printf qq{ %-30s # %d\n}, qq{q{$1},}, $i; $i+=2 }' </usr/include/X11/cursorfont.h" 'insert)
124 # );
125  
126 1;
127 __END__