ROOT  6.06/09
Reference Guide
rrenums.h
Go to the documentation of this file.
1 // @(#)root/ruby:$Id$
2 // Author: Elias Athanasopoulos, May 2004
3 
4 /*
5  * ruby-root global enumeration methods
6  *
7  * ROOT enumerations are Ruby methods in ruby-root and
8  * not constants, in order to keep the low-case 'k'.
9  *
10  * --elathan <elathan@phys.uoa.gr>
11  *
12  * (c) 2003, 2004
13  */
14 
15 static VALUE
16 rr_kWhite (void)
17 {
18  return INT2NUM (kWhite);
19 }
20 
21 static VALUE
22 rr_kBlack (void)
23 {
24  return INT2NUM (kBlack);
25 }
26 
27 static VALUE
28 rr_kRed (void)
29 {
30  return INT2NUM (kRed);
31 }
32 
33 static VALUE
34 rr_kGreen (void)
35 {
36  return INT2NUM (kGreen);
37 }
38 
39 static VALUE
40 rr_kBlue (void)
41 {
42  return INT2NUM (kBlue);
43 }
44 
45 static VALUE
46 rr_kYellow (void)
47 {
48  return INT2NUM (kYellow);
49 }
50 
51 static VALUE
53 {
54  return INT2NUM (kMagenta);
55 }
56 
57 static VALUE
58 rr_kCyan (void)
59 {
60  return INT2NUM (kCyan);
61 }
62 
63 static VALUE
64 rr_kSolid (void)
65 {
66  return INT2NUM (kSolid);
67 }
68 
69 static VALUE
70 rr_kDashed (void)
71 {
72  return INT2NUM (kDashed);
73 }
74 
75 static VALUE
76 rr_kDotted (void)
77 {
78  return INT2NUM (kDotted);
79 }
80 
81 static VALUE
83 {
84  return INT2NUM (kDashDotted);
85 }
86 
87 static VALUE
88 rr_kDot (void)
89 {
90  return INT2NUM (kDot);
91 }
92 
93 static VALUE
94 rr_kPlus (void)
95 {
96  return INT2NUM (kPlus);
97 }
98 
99 static VALUE
100 rr_kStar (void)
101 {
102  return INT2NUM (kStar);
103 }
104 
105 static VALUE
107 {
108  return INT2NUM (kCircle);
109 }
110 
111 static VALUE
113 {
114  return INT2NUM (kMultiply);
115 }
116 
117 static VALUE
119 {
120  return INT2NUM (kFullDotSmall);
121 }
122 
123 static VALUE
125 {
126  return INT2NUM (kFullDotMedium);
127 }
128 
129 static VALUE
131 {
132  return INT2NUM (kFullDotLarge);
133 }
134 
135 
136 static VALUE
138 {
139  return INT2NUM (kFullCircle);
140 }
141 
142 static VALUE
144 {
145  return INT2NUM (kFullSquare);
146 }
147 
148 static VALUE
150 {
151  return INT2NUM (kFullTriangleUp);
152 }
153 
154 static VALUE
156 {
157  return INT2NUM (kFullTriangleDown);
158 }
159 
160 static VALUE
162 {
163  return INT2NUM (kOpenCircle);
164 }
165 
166 static VALUE
168 {
169  return INT2NUM (kOpenSquare);
170 }
171 
172 static VALUE
174 {
175  return INT2NUM (kOpenTriangleUp);
176 }
177 
178 static VALUE
180 {
181  return INT2NUM (kOpenDiamond);
182 }
183 
184 static VALUE
186 {
187  return INT2NUM (kOpenCross);
188 }
189 
190 static VALUE
192 {
193  return INT2NUM (kFullStar);
194 }
195 
196 static VALUE
198 {
199  return INT2NUM (kOpenStar);
200 }
201 
202 void init_global_enums (void)
203 {
204  rb_define_method (rb_cObject, "kWhite", VALUEFUNC (rr_kWhite), 0);
205  rb_define_method (rb_cObject, "kBlack", VALUEFUNC (rr_kBlack), 0);
206  rb_define_method (rb_cObject, "kRed", VALUEFUNC (rr_kRed), 0);
207  rb_define_method (rb_cObject, "kGreen", VALUEFUNC (rr_kGreen), 0);
208  rb_define_method (rb_cObject, "kBlue", VALUEFUNC (rr_kBlue), 0);
209  rb_define_method (rb_cObject, "kYellow", VALUEFUNC (rr_kYellow), 0);
210  rb_define_method (rb_cObject, "kMagenta", VALUEFUNC (rr_kMagenta), 0);
211  rb_define_method (rb_cObject, "kCyan", VALUEFUNC (rr_kCyan), 0);
212  rb_define_method (rb_cObject, "kSolid", VALUEFUNC (rr_kSolid), 0);
213  rb_define_method (rb_cObject, "kDashed", VALUEFUNC (rr_kDashed), 0);
214  rb_define_method (rb_cObject, "kDotted", VALUEFUNC (rr_kDotted), 0);
215  rb_define_method (rb_cObject, "kDashDotted", VALUEFUNC (rr_kDashDotted), 0);
216  rb_define_method (rb_cObject, "kDot", VALUEFUNC (rr_kDot), 0);
217  rb_define_method (rb_cObject, "kPlus", VALUEFUNC (rr_kPlus), 0);
218  rb_define_method (rb_cObject, "kStar", VALUEFUNC (rr_kStar), 0);
219  rb_define_method (rb_cObject, "kCircle", VALUEFUNC (rr_kCircle), 0);
220  rb_define_method (rb_cObject, "kMultiply", VALUEFUNC (rr_kMultiply), 0);
221  rb_define_method (rb_cObject, "kFullDotSmall", VALUEFUNC (rr_kFullDotSmall),
222  0);
223  rb_define_method (rb_cObject, "kFullDotMedium",
225  rb_define_method (rb_cObject, "kFullDotLarge", VALUEFUNC (rr_kFullDotLarge),
226  0);
227  rb_define_method (rb_cObject, "kFullCircle", VALUEFUNC (rr_kFullCircle), 0);
228  rb_define_method (rb_cObject, "kFullSquare", VALUEFUNC (rr_kFullSquare), 0);
229  rb_define_method (rb_cObject, "kFullTriangleUp",
231  rb_define_method (rb_cObject, "kFullTriangleDown",
233  rb_define_method (rb_cObject, "kOpenCircle", VALUEFUNC (rr_kOpenCircle), 0);
234  rb_define_method (rb_cObject, "kOpenSquare", VALUEFUNC (rr_kOpenSquare), 0);
235  rb_define_method (rb_cObject, "kOpenTriangleUp",
237  rb_define_method (rb_cObject, "kOpenDiamond", VALUEFUNC (rr_kOpenDiamond),
238  0);
239  rb_define_method (rb_cObject, "kOpenCross", VALUEFUNC (rr_kOpenCross), 0);
240  rb_define_method (rb_cObject, "kFullStar", VALUEFUNC (rr_kFullStar), 0);
241  rb_define_method (rb_cObject, "kOpenStar", VALUEFUNC (rr_kOpenStar), 0);
242 }
static VALUE rr_kFullTriangleDown(void)
Definition: rrenums.h:155
void init_global_enums(void)
Definition: rrenums.h:202
static VALUE rr_kGreen(void)
Definition: rrenums.h:34
Definition: Rtypes.h:61
static VALUE rr_kBlue(void)
Definition: rrenums.h:40
Definition: Rtypes.h:60
static VALUE rr_kFullDotLarge(void)
Definition: rrenums.h:130
static VALUE rr_kFullDotSmall(void)
Definition: rrenums.h:118
Definition: Rtypes.h:61
Definition: Rtypes.h:61
static VALUE rr_kSolid(void)
Definition: rrenums.h:64
static VALUE rr_kOpenTriangleUp(void)
Definition: rrenums.h:173
static VALUE rr_kCyan(void)
Definition: rrenums.h:58
Definition: Rtypes.h:60
static VALUE rr_kStar(void)
Definition: rrenums.h:100
static VALUE rr_kFullDotMedium(void)
Definition: rrenums.h:124
static VALUE rr_kFullCircle(void)
Definition: rrenums.h:137
static VALUE rr_kDashed(void)
Definition: rrenums.h:70
static VALUE rr_kDotted(void)
Definition: rrenums.h:76
static VALUE rr_kBlack(void)
Definition: rrenums.h:22
static VALUE rr_kCircle(void)
Definition: rrenums.h:106
static VALUE rr_kRed(void)
Definition: rrenums.h:28
static VALUE rr_kWhite(void)
Definition: rrenums.h:16
static VALUE rr_kFullSquare(void)
Definition: rrenums.h:143
static VALUE rr_kMultiply(void)
Definition: rrenums.h:112
static VALUE rr_kFullStar(void)
Definition: rrenums.h:191
static VALUE rr_kDashDotted(void)
Definition: rrenums.h:82
static VALUE rr_kOpenSquare(void)
Definition: rrenums.h:167
Definition: Rtypes.h:61
static VALUE rr_kFullTriangleUp(void)
Definition: rrenums.h:149
static VALUE rr_kOpenCircle(void)
Definition: rrenums.h:161
static VALUE rr_kPlus(void)
Definition: rrenums.h:94
static VALUE rr_kOpenStar(void)
Definition: rrenums.h:197
#define VALUEFUNC(f)
Definition: rrcommon.h:48
Definition: Rtypes.h:61
static VALUE rr_kOpenDiamond(void)
Definition: rrenums.h:179
static VALUE rr_kYellow(void)
Definition: rrenums.h:46
static VALUE rr_kMagenta(void)
Definition: rrenums.h:52
static VALUE rr_kDot(void)
Definition: rrenums.h:88
static VALUE rr_kOpenCross(void)
Definition: rrenums.h:185