revdev 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,23 @@
1
+ *.gem
2
+ *.rbc
3
+ *.o
4
+ *.so
5
+ *.dll
6
+ *~
7
+ .bundle
8
+ .config
9
+ .yardoc
10
+ Gemfile.lock
11
+ InstalledFiles
12
+ Makefile
13
+ _yardoc
14
+ core
15
+ coverage
16
+ doc/
17
+ lib/bundler/man
18
+ pkg
19
+ rdoc
20
+ spec/reports
21
+ test/tmp
22
+ test/version_tmp
23
+ tmp
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in revdev.gemspec
4
+ gemspec
5
+
data/LICENSE ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2012 Keiichiro Ui
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Revdev
2
+
3
+ revdev is a ruby binding to handling event devices.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```rb
10
+ gem 'revdev'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ ```sh
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+
21
+ ```sh
22
+ $ gem install revdev
23
+ ```
24
+
25
+ ## Usage
26
+
27
+ TODO: Write usage instructions here
28
+
29
+ ## Contributing
30
+
31
+ 1. Fork it
32
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
33
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
34
+ 4. Push to the branch (`git push origin my-new-feature`)
35
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,65 @@
1
+ #!/usr/bin/env rake
2
+ # -*- coding:utf-8; mode:ruby; -*-
3
+
4
+ require "bundler/gem_tasks"
5
+ require 'rake/testtask'
6
+ require 'rake/clean'
7
+
8
+ NAME = 'revdev'
9
+ MAKEFILES = Dir.glob "ext/**/Makefile"
10
+
11
+ ## dir
12
+ directory "lib/#{NAME}"
13
+
14
+ ## so file
15
+ file "lib/#{NAME}/#{NAME}.so" =>
16
+ (Dir.glob("ext/#{NAME}/*.{rb,c}") << "lib/#{NAME}")do
17
+
18
+ Dir.chdir "ext/#{NAME}" do
19
+ ruby "extconf.rb"
20
+ sh "make"
21
+ end
22
+
23
+ cp "ext/#{NAME}/#{NAME}.so", "lib/#{NAME}"
24
+
25
+ end
26
+
27
+ ## make_clean
28
+ desc "do `make clean` with all Makefiles"
29
+ task :make_clean do
30
+ MAKEFILES.each do |file|
31
+ dir = File.dirname file
32
+ puts "cd #{dir}"
33
+ Dir.chdir dir do
34
+ sh "make clean"
35
+ end
36
+ end
37
+ end
38
+
39
+ ## clobber
40
+ CLOBBER.include "lib/**/*.so"
41
+
42
+ ## clean
43
+ CLEAN.include MAKEFILES
44
+ task :clean => :make_clean
45
+
46
+ ## test
47
+ desc "Run tests"
48
+ task :test => "lib/#{NAME}/#{NAME}.so"
49
+
50
+ class Rake::SudoTestTask < Rake::TestTask
51
+ def define
52
+ desc "Run tests" + (@name==:test ? "" : " for #{@name}") + " as root"
53
+ task @name do
54
+ sh %!sudo env PATH="#{ENV['PATH']}" ruby #{ruby_opts_string} #{run_code} #{file_list_string} #{option_list}!
55
+ end
56
+ self
57
+ end
58
+ end
59
+
60
+ Rake::TestTask.new :test do |t|
61
+ t.verbose = true
62
+ end
63
+
64
+ ## default
65
+ task :default => :test
data/bin/device_name ADDED
@@ -0,0 +1,38 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- coding:utf-8; mode:ruby; -*-
3
+
4
+ require "revdev"
5
+ require "optparse"
6
+
7
+ USAGE=<<__EOF
8
+ usage:
9
+ #{$0} event_device [ event_device [ ... ] ]
10
+
11
+ display device name(s) for event_device(s)
12
+
13
+ example:
14
+ #{$0} /dev/input/event*
15
+ __EOF
16
+
17
+ def main
18
+ include Revdev
19
+
20
+ if ARGV.length == 0
21
+ puts USAGE
22
+ exit false
23
+ end
24
+
25
+ STDOUT.sync = true
26
+ ARGV.each do |devname|
27
+ begin
28
+ evdev = EventDevice.new devname
29
+ print "#{devname} : "
30
+ puts evdev.device_name
31
+ rescue => e
32
+ p e
33
+ end
34
+ end
35
+
36
+ end
37
+
38
+ main if ($0 == __FILE__)
data/bin/key_dump ADDED
@@ -0,0 +1,66 @@
1
+ #!/usr/bin/env ruby
2
+ # -*- coding:utf-8; mode:ruby; -*-
3
+
4
+ require "revdev"
5
+ require "optparse"
6
+
7
+ USAGE = <<__EOF
8
+ usage:
9
+ $ #{$0} event_device
10
+ display the infomation about event_device.
11
+
12
+ example:
13
+ $ #{$0} /dev/input/event2
14
+
15
+ options:
16
+ -t EV_XXX, --type EV_XXX:
17
+ restrict event type (EV_XXX) to display
18
+
19
+ -g, --grab:
20
+ grab event.
21
+ __EOF
22
+
23
+ def main
24
+ include Revdev
25
+
26
+ spec_type = nil
27
+ is_grab = false
28
+ OptionParser.new do |opt|
29
+ opt.on '-t TYPE', '--type TYPE', String do |type|
30
+ spec_type = type
31
+ end
32
+ opt.on '-g', '--grab' do
33
+ is_grab = true
34
+ end
35
+ opt.parse! ARGV
36
+ end
37
+
38
+ if ARGV.length != 1
39
+ puts USAGE
40
+ exit false
41
+ end
42
+
43
+ evdev = EventDevice.new ARGV.first
44
+ puts "## Device Name: #{evdev.device_name}"
45
+ puts "spec_type: #{spec_type}" if $DEBUG
46
+
47
+ trap :INT do
48
+ puts "# recieve :INT"
49
+ evdev.ungrab if is_grab
50
+ exit true
51
+ end
52
+
53
+ evdev.grab if is_grab
54
+
55
+ loop do
56
+ ie = evdev.read_input_event
57
+ next if spec_type and spec_type != ie.hr_type.to_s
58
+ t = ie.hr_type ? "#{ie.hr_type.to_s}(#{ie.type})" : ie.type
59
+ c = ie.hr_code ? "#{ie.hr_code.to_s}(#{ie.code})" : ie.code
60
+ v = ie.hr_value ? "#{ie.hr_value.to_s}(#{ie.value})" : ie.value
61
+ puts "type:#{t} code:#{c} value:#{v}"
62
+ end
63
+
64
+ end
65
+
66
+ main
@@ -0,0 +1,3 @@
1
+ require "mkmf"
2
+
3
+ create_makefile "revdev/revdev"
@@ -0,0 +1,988 @@
1
+ // -*- coding:utf-8; mode:c; -*-
2
+
3
+ #include <stdlib.h>
4
+ #include <stdio.h>
5
+ #include <linux/input.h>
6
+
7
+ #include <ruby.h>
8
+ #include <rubyio.h>
9
+
10
+ #define NAME "Revdev"
11
+ #define BUFF_SIZE 255
12
+
13
+ #define FALSE 0
14
+ #define TRUE !FALSE
15
+
16
+ #define AttrAccessor(klass,name) rb_define_attr(klass,name,TRUE,TRUE)
17
+
18
+ // #define FILENO fileno(RFILE(file)->fptr->f);
19
+
20
+ VALUE module_revdev;
21
+ VALUE class_event_device;
22
+ VALUE class_input_event;
23
+ VALUE class_input_id;
24
+ VALUE class_input_absinfo;
25
+ VALUE class_input_keymap_entry;
26
+ VALUE class_ff_replay;
27
+ VALUE class_ff_trigger;
28
+ VALUE class_ff_envelope;
29
+ VALUE class_ff_constant_effect;
30
+ VALUE class_ff_ramp_effect;
31
+ VALUE class_ff_condition_effect;
32
+ VALUE class_ff_periodic_effect;
33
+ VALUE class_ff_rumble_effect;
34
+ VALUE class_ff_effect;
35
+
36
+ VALUE input_event_raw_initialize(VALUE self, VALUE byte)
37
+ {
38
+ struct input_event *ie;
39
+ struct timeval t;
40
+
41
+ ie = RSTRING(byte)->ptr;
42
+ t = ie->time;
43
+
44
+ rb_iv_set(self, "@time", rb_time_new(t.tv_sec, t.tv_usec));
45
+ rb_iv_set(self, "@type", INT2FIX(ie->type));
46
+ rb_iv_set(self, "@code", INT2FIX(ie->code));
47
+ rb_iv_set(self, "@value", INT2NUM(ie->value));
48
+
49
+ return self;
50
+ }
51
+
52
+ VALUE input_event_to_byte_string(VALUE self)
53
+ {
54
+ struct input_event ie;
55
+ struct timeval *t;
56
+
57
+ Data_Get_Struct(rb_iv_get(self, "@time"), struct time_object, t);
58
+ ie.time = *t;
59
+
60
+ ie.type = FIX2UINT(rb_iv_get(self, "@type"));
61
+ ie.code = FIX2UINT(rb_iv_get(self, "@code"));
62
+ ie.value = NUM2LONG(rb_iv_get(self, "@value"));
63
+
64
+ return rb_str_new(&ie, sizeof(struct input_event));
65
+ }
66
+
67
+ VALUE input_id_raw_initialize(VALUE self, VALUE byte)
68
+ {
69
+ struct input_id *ii;
70
+ ii = RSTRING(byte)->ptr;
71
+
72
+ rb_iv_set(self, "@bustype", INT2FIX(ii->bustype));
73
+ rb_iv_set(self, "@vendor", INT2FIX(ii->vendor));
74
+ rb_iv_set(self, "@product", INT2FIX(ii->product));
75
+ rb_iv_set(self, "@version", INT2FIX(ii->version));
76
+
77
+ return self;
78
+ }
79
+ VALUE input_id_to_byte_string(VALUE self)
80
+ {
81
+ struct input_id ii;
82
+
83
+ ii.bustype = FIX2UINT(rb_iv_get(self, "@bustype"));
84
+ ii.vendor = FIX2UINT(rb_iv_get(self, "@vendor"));
85
+ ii.product = FIX2UINT(rb_iv_get(self, "@product"));
86
+ ii.version = FIX2UINT(rb_iv_get(self, "@version"));
87
+
88
+ return rb_str_new(&ii, sizeof(struct input_id));
89
+ }
90
+
91
+ void Init_revdev(void)
92
+ {
93
+ module_revdev = rb_define_module(NAME);
94
+
95
+ /* module EventDevice */
96
+ class_event_device =
97
+ rb_define_class_under(module_revdev, "EventDevice", rb_cObject);
98
+
99
+ /* class InputEvent */
100
+ class_input_event =
101
+ rb_define_class_under(module_revdev, "InputEvent", rb_cObject);
102
+ rb_define_const(class_input_event, "SIZEOF", INT2NUM(sizeof(struct input_event)));
103
+ rb_define_method(class_input_event, "raw_initialize",
104
+ input_event_raw_initialize, 1);
105
+ rb_define_method(class_input_event, "to_byte_string",
106
+ input_event_to_byte_string, 0);
107
+
108
+ /* class InputId */
109
+ class_input_id =
110
+ rb_define_class_under(module_revdev, "InputId", rb_cObject);
111
+ rb_define_const(class_input_id, "SIZEOF",
112
+ INT2NUM(sizeof(struct input_id)));
113
+ rb_define_method(class_input_id, "raw_initialize",
114
+ input_id_raw_initialize, 1);
115
+ rb_define_method(class_input_id, "to_byte_string",
116
+ input_id_to_byte_string, 0);
117
+
118
+
119
+ /*
120
+ follwing code generated by
121
+ $ tail -990 /usr/include/linux/input.h | head -774 | sed -e 's/#define \([A-Z0-9_]*\) *[^\/]*[^\/]/rb_define_const(class_input_event, "\1", INT2NUM(\1));/'
122
+ */
123
+
124
+ // import request constants for ioctl(2) on <input.h>
125
+ /* Get driver version */
126
+ rb_define_const(module_revdev, "EVIOCGVERSION", LONG2FIX(EVIOCGVERSION));
127
+ /* get device ID */
128
+ rb_define_const(module_revdev, "EVIOCGID", LONG2FIX(EVIOCGID));
129
+ /* get repeat settings */
130
+ rb_define_const(module_revdev, "EVIOCGREP", LONG2FIX(EVIOCGREP));
131
+ /* set repeat settings */
132
+ rb_define_const(module_revdev, "EVIOCSREP", LONG2FIX(EVIOCSREP));
133
+ /* get keycode */
134
+ rb_define_const(module_revdev, "EVIOCGKEYCODE", LONG2FIX(EVIOCGKEYCODE));
135
+ rb_define_const(module_revdev, "EVIOCGKEYCODE_V2", LONG2FIX(EVIOCGKEYCODE_V2));
136
+ /* set keycode */
137
+ rb_define_const(module_revdev, "EVIOCSKEYCODE", LONG2FIX(EVIOCSKEYCODE));
138
+ rb_define_const(module_revdev, "EVIOCSKEYCODE_V2", LONG2FIX(EVIOCSKEYCODE_V2));
139
+
140
+ /* get device name */
141
+ rb_define_const(module_revdev, "EVIOCGNAME", LONG2FIX(EVIOCGNAME(BUFF_SIZE)));
142
+ /* get physical location */
143
+ rb_define_const(module_revdev, "EVIOCGPHYS", LONG2FIX(EVIOCGPHYS(BUFF_SIZE)));
144
+ /* get unique identifier */
145
+ rb_define_const(module_revdev, "EVIOCGUNIQ", LONG2FIX(EVIOCGUNIQ(BUFF_SIZE)));
146
+ /* get device properties */
147
+ rb_define_const(module_revdev, "EVIOCGPROP", LONG2FIX(EVIOCGPROP(BUFF_SIZE)));
148
+ /* get global key state */
149
+ rb_define_const(module_revdev, "EVIOCGKEY", LONG2FIX(EVIOCGKEY(BUFF_SIZE)));
150
+ /* get all LEDs */
151
+ rb_define_const(module_revdev, "EVIOCGLED", LONG2FIX(EVIOCGLED(BUFF_SIZE)));
152
+ /* get all sounds status */
153
+ rb_define_const(module_revdev, "EVIOCGSND", LONG2FIX(EVIOCGSND(BUFF_SIZE)));
154
+ /* get all switch states */
155
+ rb_define_const(module_revdev, "EVIOCGSW", LONG2FIX(EVIOCGSW(BUFF_SIZE)));
156
+
157
+ /* get event bits */
158
+ // rb_define_const(module_revdev, "EVIOCGBIT(ev,len)", LONG2FIX());
159
+ /* get abs value/limits */
160
+ // rb_define_const(module_revdev, "EVIOCGABS(abs)", LONG2FIX());
161
+ /* set abs value/limits */
162
+ // rb_define_const(module_revdev, "EVIOCSABS(abs)", LONG2FIX());
163
+ /* send a force effect to a force feedback device */
164
+ rb_define_const(module_revdev, "EVIOCSFF", LONG2FIX(EVIOCSFF));
165
+ /* Erase a force effect */
166
+ rb_define_const(module_revdev, "EVIOCRMFF", LONG2FIX(EVIOCRMFF));
167
+ /* Report number of effects playable at the same time */
168
+ rb_define_const(module_revdev, "EVIOCGEFFECTS", LONG2FIX(EVIOCGEFFECTS));
169
+
170
+ /* Grab/Release device */
171
+ rb_define_const(module_revdev, "EVIOCGRAB", LONG2FIX(EVIOCGRAB));
172
+
173
+ /*
174
+ * Device properties and quirks
175
+ */
176
+
177
+ rb_define_const(module_revdev, "INPUT_PROP_POINTER", INT2NUM(INPUT_PROP_POINTER));/* needs a pointer */
178
+ rb_define_const(module_revdev, "INPUT_PROP_DIRECT", INT2NUM(INPUT_PROP_DIRECT));/* direct input devices */
179
+ rb_define_const(module_revdev, "INPUT_PROP_BUTTONPAD", INT2NUM(INPUT_PROP_BUTTONPAD));/* has button(s) under pad */
180
+ rb_define_const(module_revdev, "INPUT_PROP_SEMI_MT", INT2NUM(INPUT_PROP_SEMI_MT));/* touch rectangle only */
181
+
182
+ rb_define_const(module_revdev, "INPUT_PROP_MAX", INT2NUM(INPUT_PROP_MAX));
183
+ rb_define_const(module_revdev, "INPUT_PROP_CNT", INT2NUM(INPUT_PROP_CNT));
184
+
185
+ /*
186
+ * Event types
187
+ */
188
+
189
+ rb_define_const(module_revdev, "EV_SYN", INT2NUM(EV_SYN));
190
+ rb_define_const(module_revdev, "EV_KEY", INT2NUM(EV_KEY));
191
+ rb_define_const(module_revdev, "EV_REL", INT2NUM(EV_REL));
192
+ rb_define_const(module_revdev, "EV_ABS", INT2NUM(EV_ABS));
193
+ rb_define_const(module_revdev, "EV_MSC", INT2NUM(EV_MSC));
194
+ rb_define_const(module_revdev, "EV_SW", INT2NUM(EV_SW));
195
+ rb_define_const(module_revdev, "EV_LED", INT2NUM(EV_LED));
196
+ rb_define_const(module_revdev, "EV_SND", INT2NUM(EV_SND));
197
+ rb_define_const(module_revdev, "EV_REP", INT2NUM(EV_REP));
198
+ rb_define_const(module_revdev, "EV_FF", INT2NUM(EV_FF));
199
+ rb_define_const(module_revdev, "EV_PWR", INT2NUM(EV_PWR));
200
+ rb_define_const(module_revdev, "EV_FF_STATUS", INT2NUM(EV_FF_STATUS));
201
+ rb_define_const(module_revdev, "EV_MAX", INT2NUM(EV_MAX));
202
+ rb_define_const(module_revdev, "EV_CNT", INT2NUM(EV_CNT));
203
+
204
+ /*
205
+ * Synchronization events.
206
+ */
207
+
208
+ rb_define_const(module_revdev, "SYN_REPORT", INT2NUM(SYN_REPORT));
209
+ rb_define_const(module_revdev, "SYN_CONFIG", INT2NUM(SYN_CONFIG));
210
+ rb_define_const(module_revdev, "SYN_MT_REPORT", INT2NUM(SYN_MT_REPORT));
211
+ rb_define_const(module_revdev, "SYN_DROPPED", INT2NUM(SYN_DROPPED));
212
+
213
+ /*
214
+ * Keys and buttons
215
+ *
216
+ * Most of the keys/buttons are modeled after USB HUT 1.12
217
+ * (see http://www.usb.org/developers/hidpage).
218
+ * Abbreviations in the comments:
219
+ * AC - Application Control
220
+ * AL - Application Launch Button
221
+ * SC - System Control
222
+ */
223
+
224
+ rb_define_const(module_revdev, "KEY_RESERVED", INT2NUM(KEY_RESERVED));
225
+ rb_define_const(module_revdev, "KEY_ESC", INT2NUM(KEY_ESC));
226
+ rb_define_const(module_revdev, "KEY_1", INT2NUM(KEY_1));
227
+ rb_define_const(module_revdev, "KEY_2", INT2NUM(KEY_2));
228
+ rb_define_const(module_revdev, "KEY_3", INT2NUM(KEY_3));
229
+ rb_define_const(module_revdev, "KEY_4", INT2NUM(KEY_4));
230
+ rb_define_const(module_revdev, "KEY_5", INT2NUM(KEY_5));
231
+ rb_define_const(module_revdev, "KEY_6", INT2NUM(KEY_6));
232
+ rb_define_const(module_revdev, "KEY_7", INT2NUM(KEY_7));
233
+ rb_define_const(module_revdev, "KEY_8", INT2NUM(KEY_8));
234
+ rb_define_const(module_revdev, "KEY_9", INT2NUM(KEY_9));
235
+ rb_define_const(module_revdev, "KEY_0", INT2NUM(KEY_0));
236
+ rb_define_const(module_revdev, "KEY_MINUS", INT2NUM(KEY_MINUS));
237
+ rb_define_const(module_revdev, "KEY_EQUAL", INT2NUM(KEY_EQUAL));
238
+ rb_define_const(module_revdev, "KEY_BACKSPACE", INT2NUM(KEY_BACKSPACE));
239
+ rb_define_const(module_revdev, "KEY_TAB", INT2NUM(KEY_TAB));
240
+ rb_define_const(module_revdev, "KEY_Q", INT2NUM(KEY_Q));
241
+ rb_define_const(module_revdev, "KEY_W", INT2NUM(KEY_W));
242
+ rb_define_const(module_revdev, "KEY_E", INT2NUM(KEY_E));
243
+ rb_define_const(module_revdev, "KEY_R", INT2NUM(KEY_R));
244
+ rb_define_const(module_revdev, "KEY_T", INT2NUM(KEY_T));
245
+ rb_define_const(module_revdev, "KEY_Y", INT2NUM(KEY_Y));
246
+ rb_define_const(module_revdev, "KEY_U", INT2NUM(KEY_U));
247
+ rb_define_const(module_revdev, "KEY_I", INT2NUM(KEY_I));
248
+ rb_define_const(module_revdev, "KEY_O", INT2NUM(KEY_O));
249
+ rb_define_const(module_revdev, "KEY_P", INT2NUM(KEY_P));
250
+ rb_define_const(module_revdev, "KEY_LEFTBRACE", INT2NUM(KEY_LEFTBRACE));
251
+ rb_define_const(module_revdev, "KEY_RIGHTBRACE", INT2NUM(KEY_RIGHTBRACE));
252
+ rb_define_const(module_revdev, "KEY_ENTER", INT2NUM(KEY_ENTER));
253
+ rb_define_const(module_revdev, "KEY_LEFTCTRL", INT2NUM(KEY_LEFTCTRL));
254
+ rb_define_const(module_revdev, "KEY_A", INT2NUM(KEY_A));
255
+ rb_define_const(module_revdev, "KEY_S", INT2NUM(KEY_S));
256
+ rb_define_const(module_revdev, "KEY_D", INT2NUM(KEY_D));
257
+ rb_define_const(module_revdev, "KEY_F", INT2NUM(KEY_F));
258
+ rb_define_const(module_revdev, "KEY_G", INT2NUM(KEY_G));
259
+ rb_define_const(module_revdev, "KEY_H", INT2NUM(KEY_H));
260
+ rb_define_const(module_revdev, "KEY_J", INT2NUM(KEY_J));
261
+ rb_define_const(module_revdev, "KEY_K", INT2NUM(KEY_K));
262
+ rb_define_const(module_revdev, "KEY_L", INT2NUM(KEY_L));
263
+ rb_define_const(module_revdev, "KEY_SEMICOLON", INT2NUM(KEY_SEMICOLON));
264
+ rb_define_const(module_revdev, "KEY_APOSTROPHE", INT2NUM(KEY_APOSTROPHE));
265
+ rb_define_const(module_revdev, "KEY_GRAVE", INT2NUM(KEY_GRAVE));
266
+ rb_define_const(module_revdev, "KEY_LEFTSHIFT", INT2NUM(KEY_LEFTSHIFT));
267
+ rb_define_const(module_revdev, "KEY_BACKSLASH", INT2NUM(KEY_BACKSLASH));
268
+ rb_define_const(module_revdev, "KEY_Z", INT2NUM(KEY_Z));
269
+ rb_define_const(module_revdev, "KEY_X", INT2NUM(KEY_X));
270
+ rb_define_const(module_revdev, "KEY_C", INT2NUM(KEY_C));
271
+ rb_define_const(module_revdev, "KEY_V", INT2NUM(KEY_V));
272
+ rb_define_const(module_revdev, "KEY_B", INT2NUM(KEY_B));
273
+ rb_define_const(module_revdev, "KEY_N", INT2NUM(KEY_N));
274
+ rb_define_const(module_revdev, "KEY_M", INT2NUM(KEY_M));
275
+ rb_define_const(module_revdev, "KEY_COMMA", INT2NUM(KEY_COMMA));
276
+ rb_define_const(module_revdev, "KEY_DOT", INT2NUM(KEY_DOT));
277
+ rb_define_const(module_revdev, "KEY_SLASH", INT2NUM(KEY_SLASH));
278
+ rb_define_const(module_revdev, "KEY_RIGHTSHIFT", INT2NUM(KEY_RIGHTSHIFT));
279
+ rb_define_const(module_revdev, "KEY_KPASTERISK", INT2NUM(KEY_KPASTERISK));
280
+ rb_define_const(module_revdev, "KEY_LEFTALT", INT2NUM(KEY_LEFTALT));
281
+ rb_define_const(module_revdev, "KEY_SPACE", INT2NUM(KEY_SPACE));
282
+ rb_define_const(module_revdev, "KEY_CAPSLOCK", INT2NUM(KEY_CAPSLOCK));
283
+ rb_define_const(module_revdev, "KEY_F1", INT2NUM(KEY_F1));
284
+ rb_define_const(module_revdev, "KEY_F2", INT2NUM(KEY_F2));
285
+ rb_define_const(module_revdev, "KEY_F3", INT2NUM(KEY_F3));
286
+ rb_define_const(module_revdev, "KEY_F4", INT2NUM(KEY_F4));
287
+ rb_define_const(module_revdev, "KEY_F5", INT2NUM(KEY_F5));
288
+ rb_define_const(module_revdev, "KEY_F6", INT2NUM(KEY_F6));
289
+ rb_define_const(module_revdev, "KEY_F7", INT2NUM(KEY_F7));
290
+ rb_define_const(module_revdev, "KEY_F8", INT2NUM(KEY_F8));
291
+ rb_define_const(module_revdev, "KEY_F9", INT2NUM(KEY_F9));
292
+ rb_define_const(module_revdev, "KEY_F10", INT2NUM(KEY_F10));
293
+ rb_define_const(module_revdev, "KEY_NUMLOCK", INT2NUM(KEY_NUMLOCK));
294
+ rb_define_const(module_revdev, "KEY_SCROLLLOCK", INT2NUM(KEY_SCROLLLOCK));
295
+ rb_define_const(module_revdev, "KEY_KP7", INT2NUM(KEY_KP7));
296
+ rb_define_const(module_revdev, "KEY_KP8", INT2NUM(KEY_KP8));
297
+ rb_define_const(module_revdev, "KEY_KP9", INT2NUM(KEY_KP9));
298
+ rb_define_const(module_revdev, "KEY_KPMINUS", INT2NUM(KEY_KPMINUS));
299
+ rb_define_const(module_revdev, "KEY_KP4", INT2NUM(KEY_KP4));
300
+ rb_define_const(module_revdev, "KEY_KP5", INT2NUM(KEY_KP5));
301
+ rb_define_const(module_revdev, "KEY_KP6", INT2NUM(KEY_KP6));
302
+ rb_define_const(module_revdev, "KEY_KPPLUS", INT2NUM(KEY_KPPLUS));
303
+ rb_define_const(module_revdev, "KEY_KP1", INT2NUM(KEY_KP1));
304
+ rb_define_const(module_revdev, "KEY_KP2", INT2NUM(KEY_KP2));
305
+ rb_define_const(module_revdev, "KEY_KP3", INT2NUM(KEY_KP3));
306
+ rb_define_const(module_revdev, "KEY_KP0", INT2NUM(KEY_KP0));
307
+ rb_define_const(module_revdev, "KEY_KPDOT", INT2NUM(KEY_KPDOT));
308
+
309
+ rb_define_const(module_revdev, "KEY_ZENKAKUHANKAKU", INT2NUM(KEY_ZENKAKUHANKAKU));
310
+ rb_define_const(module_revdev, "KEY_102ND", INT2NUM(KEY_102ND));
311
+ rb_define_const(module_revdev, "KEY_F11", INT2NUM(KEY_F11));
312
+ rb_define_const(module_revdev, "KEY_F12", INT2NUM(KEY_F12));
313
+ rb_define_const(module_revdev, "KEY_RO", INT2NUM(KEY_RO));
314
+ rb_define_const(module_revdev, "KEY_KATAKANA", INT2NUM(KEY_KATAKANA));
315
+ rb_define_const(module_revdev, "KEY_HIRAGANA", INT2NUM(KEY_HIRAGANA));
316
+ rb_define_const(module_revdev, "KEY_HENKAN", INT2NUM(KEY_HENKAN));
317
+ rb_define_const(module_revdev, "KEY_KATAKANAHIRAGANA", INT2NUM(KEY_KATAKANAHIRAGANA));
318
+ rb_define_const(module_revdev, "KEY_MUHENKAN", INT2NUM(KEY_MUHENKAN));
319
+ rb_define_const(module_revdev, "KEY_KPJPCOMMA", INT2NUM(KEY_KPJPCOMMA));
320
+ rb_define_const(module_revdev, "KEY_KPENTER", INT2NUM(KEY_KPENTER));
321
+ rb_define_const(module_revdev, "KEY_RIGHTCTRL", INT2NUM(KEY_RIGHTCTRL));
322
+ rb_define_const(module_revdev, "KEY_KPSLASH", INT2NUM(KEY_KPSLASH));
323
+ rb_define_const(module_revdev, "KEY_SYSRQ", INT2NUM(KEY_SYSRQ));
324
+ rb_define_const(module_revdev, "KEY_RIGHTALT", INT2NUM(KEY_RIGHTALT));
325
+ rb_define_const(module_revdev, "KEY_LINEFEED", INT2NUM(KEY_LINEFEED));
326
+ rb_define_const(module_revdev, "KEY_HOME", INT2NUM(KEY_HOME));
327
+ rb_define_const(module_revdev, "KEY_UP", INT2NUM(KEY_UP));
328
+ rb_define_const(module_revdev, "KEY_PAGEUP", INT2NUM(KEY_PAGEUP));
329
+ rb_define_const(module_revdev, "KEY_LEFT", INT2NUM(KEY_LEFT));
330
+ rb_define_const(module_revdev, "KEY_RIGHT", INT2NUM(KEY_RIGHT));
331
+ rb_define_const(module_revdev, "KEY_END", INT2NUM(KEY_END));
332
+ rb_define_const(module_revdev, "KEY_DOWN", INT2NUM(KEY_DOWN));
333
+ rb_define_const(module_revdev, "KEY_PAGEDOWN", INT2NUM(KEY_PAGEDOWN));
334
+ rb_define_const(module_revdev, "KEY_INSERT", INT2NUM(KEY_INSERT));
335
+ rb_define_const(module_revdev, "KEY_DELETE", INT2NUM(KEY_DELETE));
336
+ rb_define_const(module_revdev, "KEY_MACRO", INT2NUM(KEY_MACRO));
337
+ rb_define_const(module_revdev, "KEY_MUTE", INT2NUM(KEY_MUTE));
338
+ rb_define_const(module_revdev, "KEY_VOLUMEDOWN", INT2NUM(KEY_VOLUMEDOWN));
339
+ rb_define_const(module_revdev, "KEY_VOLUMEUP", INT2NUM(KEY_VOLUMEUP));
340
+ rb_define_const(module_revdev, "KEY_POWER", INT2NUM(KEY_POWER));/* SC System Power Down */
341
+ rb_define_const(module_revdev, "KEY_KPEQUAL", INT2NUM(KEY_KPEQUAL));
342
+ rb_define_const(module_revdev, "KEY_KPPLUSMINUS", INT2NUM(KEY_KPPLUSMINUS));
343
+ rb_define_const(module_revdev, "KEY_PAUSE", INT2NUM(KEY_PAUSE));
344
+ rb_define_const(module_revdev, "KEY_SCALE", INT2NUM(KEY_SCALE));/* AL Compiz Scale (Expose) */
345
+
346
+ rb_define_const(module_revdev, "KEY_KPCOMMA", INT2NUM(KEY_KPCOMMA));
347
+ rb_define_const(module_revdev, "KEY_HANGEUL", INT2NUM(KEY_HANGEUL));
348
+ rb_define_const(module_revdev, "KEY_HANGUEL", INT2NUM(KEY_HANGUEL));
349
+ rb_define_const(module_revdev, "KEY_HANJA", INT2NUM(KEY_HANJA));
350
+ rb_define_const(module_revdev, "KEY_YEN", INT2NUM(KEY_YEN));
351
+ rb_define_const(module_revdev, "KEY_LEFTMETA", INT2NUM(KEY_LEFTMETA));
352
+ rb_define_const(module_revdev, "KEY_RIGHTMETA", INT2NUM(KEY_RIGHTMETA));
353
+ rb_define_const(module_revdev, "KEY_COMPOSE", INT2NUM(KEY_COMPOSE));
354
+
355
+ rb_define_const(module_revdev, "KEY_STOP", INT2NUM(KEY_STOP));/* AC Stop */
356
+ rb_define_const(module_revdev, "KEY_AGAIN", INT2NUM(KEY_AGAIN));
357
+ rb_define_const(module_revdev, "KEY_PROPS", INT2NUM(KEY_PROPS));/* AC Properties */
358
+ rb_define_const(module_revdev, "KEY_UNDO", INT2NUM(KEY_UNDO));/* AC Undo */
359
+ rb_define_const(module_revdev, "KEY_FRONT", INT2NUM(KEY_FRONT));
360
+ rb_define_const(module_revdev, "KEY_COPY", INT2NUM(KEY_COPY));/* AC Copy */
361
+ rb_define_const(module_revdev, "KEY_OPEN", INT2NUM(KEY_OPEN));/* AC Open */
362
+ rb_define_const(module_revdev, "KEY_PASTE", INT2NUM(KEY_PASTE));/* AC Paste */
363
+ rb_define_const(module_revdev, "KEY_FIND", INT2NUM(KEY_FIND));/* AC Search */
364
+ rb_define_const(module_revdev, "KEY_CUT", INT2NUM(KEY_CUT));/* AC Cut */
365
+ rb_define_const(module_revdev, "KEY_HELP", INT2NUM(KEY_HELP));/* AL Integrated Help Center */
366
+ rb_define_const(module_revdev, "KEY_MENU", INT2NUM(KEY_MENU));/* Menu (show menu) */
367
+ rb_define_const(module_revdev, "KEY_CALC", INT2NUM(KEY_CALC));/* AL Calculator */
368
+ rb_define_const(module_revdev, "KEY_SETUP", INT2NUM(KEY_SETUP));
369
+ rb_define_const(module_revdev, "KEY_SLEEP", INT2NUM(KEY_SLEEP));/* SC System Sleep */
370
+ rb_define_const(module_revdev, "KEY_WAKEUP", INT2NUM(KEY_WAKEUP));/* System Wake Up */
371
+ rb_define_const(module_revdev, "KEY_FILE", INT2NUM(KEY_FILE));/* AL Local Machine Browser */
372
+ rb_define_const(module_revdev, "KEY_SENDFILE", INT2NUM(KEY_SENDFILE));
373
+ rb_define_const(module_revdev, "KEY_DELETEFILE", INT2NUM(KEY_DELETEFILE));
374
+ rb_define_const(module_revdev, "KEY_XFER", INT2NUM(KEY_XFER));
375
+ rb_define_const(module_revdev, "KEY_PROG1", INT2NUM(KEY_PROG1));
376
+ rb_define_const(module_revdev, "KEY_PROG2", INT2NUM(KEY_PROG2));
377
+ rb_define_const(module_revdev, "KEY_WWW", INT2NUM(KEY_WWW));/* AL Internet Browser */
378
+ rb_define_const(module_revdev, "KEY_MSDOS", INT2NUM(KEY_MSDOS));
379
+ rb_define_const(module_revdev, "KEY_COFFEE", INT2NUM(KEY_COFFEE));/* AL Terminal Lock/Screensaver */
380
+ rb_define_const(module_revdev, "KEY_SCREENLOCK", INT2NUM(KEY_SCREENLOCK));
381
+ rb_define_const(module_revdev, "KEY_DIRECTION", INT2NUM(KEY_DIRECTION));
382
+ rb_define_const(module_revdev, "KEY_CYCLEWINDOWS", INT2NUM(KEY_CYCLEWINDOWS));
383
+ rb_define_const(module_revdev, "KEY_MAIL", INT2NUM(KEY_MAIL));
384
+ rb_define_const(module_revdev, "KEY_BOOKMARKS", INT2NUM(KEY_BOOKMARKS));/* AC Bookmarks */
385
+ rb_define_const(module_revdev, "KEY_COMPUTER", INT2NUM(KEY_COMPUTER));
386
+ rb_define_const(module_revdev, "KEY_BACK", INT2NUM(KEY_BACK));/* AC Back */
387
+ rb_define_const(module_revdev, "KEY_FORWARD", INT2NUM(KEY_FORWARD));/* AC Forward */
388
+ rb_define_const(module_revdev, "KEY_CLOSECD", INT2NUM(KEY_CLOSECD));
389
+ rb_define_const(module_revdev, "KEY_EJECTCD", INT2NUM(KEY_EJECTCD));
390
+ rb_define_const(module_revdev, "KEY_EJECTCLOSECD", INT2NUM(KEY_EJECTCLOSECD));
391
+ rb_define_const(module_revdev, "KEY_NEXTSONG", INT2NUM(KEY_NEXTSONG));
392
+ rb_define_const(module_revdev, "KEY_PLAYPAUSE", INT2NUM(KEY_PLAYPAUSE));
393
+ rb_define_const(module_revdev, "KEY_PREVIOUSSONG", INT2NUM(KEY_PREVIOUSSONG));
394
+ rb_define_const(module_revdev, "KEY_STOPCD", INT2NUM(KEY_STOPCD));
395
+ rb_define_const(module_revdev, "KEY_RECORD", INT2NUM(KEY_RECORD));
396
+ rb_define_const(module_revdev, "KEY_REWIND", INT2NUM(KEY_REWIND));
397
+ rb_define_const(module_revdev, "KEY_PHONE", INT2NUM(KEY_PHONE));/* Media Select Telephone */
398
+ rb_define_const(module_revdev, "KEY_ISO", INT2NUM(KEY_ISO));
399
+ rb_define_const(module_revdev, "KEY_CONFIG", INT2NUM(KEY_CONFIG));/* AL Consumer Control Configuration */
400
+ rb_define_const(module_revdev, "KEY_HOMEPAGE", INT2NUM(KEY_HOMEPAGE));/* AC Home */
401
+ rb_define_const(module_revdev, "KEY_REFRESH", INT2NUM(KEY_REFRESH));/* AC Refresh */
402
+ rb_define_const(module_revdev, "KEY_EXIT", INT2NUM(KEY_EXIT));/* AC Exit */
403
+ rb_define_const(module_revdev, "KEY_MOVE", INT2NUM(KEY_MOVE));
404
+ rb_define_const(module_revdev, "KEY_EDIT", INT2NUM(KEY_EDIT));
405
+ rb_define_const(module_revdev, "KEY_SCROLLUP", INT2NUM(KEY_SCROLLUP));
406
+ rb_define_const(module_revdev, "KEY_SCROLLDOWN", INT2NUM(KEY_SCROLLDOWN));
407
+ rb_define_const(module_revdev, "KEY_KPLEFTPAREN", INT2NUM(KEY_KPLEFTPAREN));
408
+ rb_define_const(module_revdev, "KEY_KPRIGHTPAREN", INT2NUM(KEY_KPRIGHTPAREN));
409
+ rb_define_const(module_revdev, "KEY_NEW", INT2NUM(KEY_NEW));/* AC New */
410
+ rb_define_const(module_revdev, "KEY_REDO", INT2NUM(KEY_REDO));/* AC Redo/Repeat */
411
+
412
+ rb_define_const(module_revdev, "KEY_F13", INT2NUM(KEY_F13));
413
+ rb_define_const(module_revdev, "KEY_F14", INT2NUM(KEY_F14));
414
+ rb_define_const(module_revdev, "KEY_F15", INT2NUM(KEY_F15));
415
+ rb_define_const(module_revdev, "KEY_F16", INT2NUM(KEY_F16));
416
+ rb_define_const(module_revdev, "KEY_F17", INT2NUM(KEY_F17));
417
+ rb_define_const(module_revdev, "KEY_F18", INT2NUM(KEY_F18));
418
+ rb_define_const(module_revdev, "KEY_F19", INT2NUM(KEY_F19));
419
+ rb_define_const(module_revdev, "KEY_F20", INT2NUM(KEY_F20));
420
+ rb_define_const(module_revdev, "KEY_F21", INT2NUM(KEY_F21));
421
+ rb_define_const(module_revdev, "KEY_F22", INT2NUM(KEY_F22));
422
+ rb_define_const(module_revdev, "KEY_F23", INT2NUM(KEY_F23));
423
+ rb_define_const(module_revdev, "KEY_F24", INT2NUM(KEY_F24));
424
+
425
+ rb_define_const(module_revdev, "KEY_PLAYCD", INT2NUM(KEY_PLAYCD));
426
+ rb_define_const(module_revdev, "KEY_PAUSECD", INT2NUM(KEY_PAUSECD));
427
+ rb_define_const(module_revdev, "KEY_PROG3", INT2NUM(KEY_PROG3));
428
+ rb_define_const(module_revdev, "KEY_PROG4", INT2NUM(KEY_PROG4));
429
+ rb_define_const(module_revdev, "KEY_DASHBOARD", INT2NUM(KEY_DASHBOARD));/* AL Dashboard */
430
+ rb_define_const(module_revdev, "KEY_SUSPEND", INT2NUM(KEY_SUSPEND));
431
+ rb_define_const(module_revdev, "KEY_CLOSE", INT2NUM(KEY_CLOSE));/* AC Close */
432
+ rb_define_const(module_revdev, "KEY_PLAY", INT2NUM(KEY_PLAY));
433
+ rb_define_const(module_revdev, "KEY_FASTFORWARD", INT2NUM(KEY_FASTFORWARD));
434
+ rb_define_const(module_revdev, "KEY_BASSBOOST", INT2NUM(KEY_BASSBOOST));
435
+ rb_define_const(module_revdev, "KEY_PRINT", INT2NUM(KEY_PRINT));/* AC Print */
436
+ rb_define_const(module_revdev, "KEY_HP", INT2NUM(KEY_HP));
437
+ rb_define_const(module_revdev, "KEY_CAMERA", INT2NUM(KEY_CAMERA));
438
+ rb_define_const(module_revdev, "KEY_SOUND", INT2NUM(KEY_SOUND));
439
+ rb_define_const(module_revdev, "KEY_QUESTION", INT2NUM(KEY_QUESTION));
440
+ rb_define_const(module_revdev, "KEY_EMAIL", INT2NUM(KEY_EMAIL));
441
+ rb_define_const(module_revdev, "KEY_CHAT", INT2NUM(KEY_CHAT));
442
+ rb_define_const(module_revdev, "KEY_SEARCH", INT2NUM(KEY_SEARCH));
443
+ rb_define_const(module_revdev, "KEY_CONNECT", INT2NUM(KEY_CONNECT));
444
+ rb_define_const(module_revdev, "KEY_FINANCE", INT2NUM(KEY_FINANCE));/* AL Checkbook/Finance */
445
+ rb_define_const(module_revdev, "KEY_SPORT", INT2NUM(KEY_SPORT));
446
+ rb_define_const(module_revdev, "KEY_SHOP", INT2NUM(KEY_SHOP));
447
+ rb_define_const(module_revdev, "KEY_ALTERASE", INT2NUM(KEY_ALTERASE));
448
+ rb_define_const(module_revdev, "KEY_CANCEL", INT2NUM(KEY_CANCEL));/* AC Cancel */
449
+ rb_define_const(module_revdev, "KEY_BRIGHTNESSDOWN", INT2NUM(KEY_BRIGHTNESSDOWN));
450
+ rb_define_const(module_revdev, "KEY_BRIGHTNESSUP", INT2NUM(KEY_BRIGHTNESSUP));
451
+ rb_define_const(module_revdev, "KEY_MEDIA", INT2NUM(KEY_MEDIA));
452
+
453
+ rb_define_const(module_revdev, "KEY_SWITCHVIDEOMODE", INT2NUM(KEY_SWITCHVIDEOMODE));/* Cycle between available video
454
+ outputs (Monitor/LCD/TV-out/etc) */
455
+ rb_define_const(module_revdev, "KEY_KBDILLUMTOGGLE", INT2NUM(KEY_KBDILLUMTOGGLE));
456
+ rb_define_const(module_revdev, "KEY_KBDILLUMDOWN", INT2NUM(KEY_KBDILLUMDOWN));
457
+ rb_define_const(module_revdev, "KEY_KBDILLUMUP", INT2NUM(KEY_KBDILLUMUP));
458
+
459
+ rb_define_const(module_revdev, "KEY_SEND", INT2NUM(KEY_SEND));/* AC Send */
460
+ rb_define_const(module_revdev, "KEY_REPLY", INT2NUM(KEY_REPLY));/* AC Reply */
461
+ rb_define_const(module_revdev, "KEY_FORWARDMAIL", INT2NUM(KEY_FORWARDMAIL));/* AC Forward Msg */
462
+ rb_define_const(module_revdev, "KEY_SAVE", INT2NUM(KEY_SAVE));/* AC Save */
463
+ rb_define_const(module_revdev, "KEY_DOCUMENTS", INT2NUM(KEY_DOCUMENTS));
464
+
465
+ rb_define_const(module_revdev, "KEY_BATTERY", INT2NUM(KEY_BATTERY));
466
+
467
+ rb_define_const(module_revdev, "KEY_BLUETOOTH", INT2NUM(KEY_BLUETOOTH));
468
+ rb_define_const(module_revdev, "KEY_WLAN", INT2NUM(KEY_WLAN));
469
+ rb_define_const(module_revdev, "KEY_UWB", INT2NUM(KEY_UWB));
470
+
471
+ rb_define_const(module_revdev, "KEY_UNKNOWN", INT2NUM(KEY_UNKNOWN));
472
+
473
+ rb_define_const(module_revdev, "KEY_VIDEO_NEXT", INT2NUM(KEY_VIDEO_NEXT));/* drive next video source */
474
+ rb_define_const(module_revdev, "KEY_VIDEO_PREV", INT2NUM(KEY_VIDEO_PREV));/* drive previous video source */
475
+ rb_define_const(module_revdev, "KEY_BRIGHTNESS_CYCLE", INT2NUM(KEY_BRIGHTNESS_CYCLE));/* brightness up, after max is min */
476
+ rb_define_const(module_revdev, "KEY_BRIGHTNESS_ZERO", INT2NUM(KEY_BRIGHTNESS_ZERO));/* brightness off, use ambient */
477
+ rb_define_const(module_revdev, "KEY_DISPLAY_OFF", INT2NUM(KEY_DISPLAY_OFF));/* display device to off state */
478
+
479
+ rb_define_const(module_revdev, "KEY_WIMAX", INT2NUM(KEY_WIMAX));
480
+ rb_define_const(module_revdev, "KEY_RFKILL", INT2NUM(KEY_RFKILL));/* Key that controls all radios */
481
+
482
+ /* Code 255 is reserved for special needs of AT keyboard driver */
483
+
484
+ rb_define_const(module_revdev, "BTN_MISC", INT2NUM(BTN_MISC));
485
+ rb_define_const(module_revdev, "BTN_0", INT2NUM(BTN_0));
486
+ rb_define_const(module_revdev, "BTN_1", INT2NUM(BTN_1));
487
+ rb_define_const(module_revdev, "BTN_2", INT2NUM(BTN_2));
488
+ rb_define_const(module_revdev, "BTN_3", INT2NUM(BTN_3));
489
+ rb_define_const(module_revdev, "BTN_4", INT2NUM(BTN_4));
490
+ rb_define_const(module_revdev, "BTN_5", INT2NUM(BTN_5));
491
+ rb_define_const(module_revdev, "BTN_6", INT2NUM(BTN_6));
492
+ rb_define_const(module_revdev, "BTN_7", INT2NUM(BTN_7));
493
+ rb_define_const(module_revdev, "BTN_8", INT2NUM(BTN_8));
494
+ rb_define_const(module_revdev, "BTN_9", INT2NUM(BTN_9));
495
+
496
+ rb_define_const(module_revdev, "BTN_MOUSE", INT2NUM(BTN_MOUSE));
497
+ rb_define_const(module_revdev, "BTN_LEFT", INT2NUM(BTN_LEFT));
498
+ rb_define_const(module_revdev, "BTN_RIGHT", INT2NUM(BTN_RIGHT));
499
+ rb_define_const(module_revdev, "BTN_MIDDLE", INT2NUM(BTN_MIDDLE));
500
+ rb_define_const(module_revdev, "BTN_SIDE", INT2NUM(BTN_SIDE));
501
+ rb_define_const(module_revdev, "BTN_EXTRA", INT2NUM(BTN_EXTRA));
502
+ rb_define_const(module_revdev, "BTN_FORWARD", INT2NUM(BTN_FORWARD));
503
+ rb_define_const(module_revdev, "BTN_BACK", INT2NUM(BTN_BACK));
504
+ rb_define_const(module_revdev, "BTN_TASK", INT2NUM(BTN_TASK));
505
+
506
+ rb_define_const(module_revdev, "BTN_JOYSTICK", INT2NUM(BTN_JOYSTICK));
507
+ rb_define_const(module_revdev, "BTN_TRIGGER", INT2NUM(BTN_TRIGGER));
508
+ rb_define_const(module_revdev, "BTN_THUMB", INT2NUM(BTN_THUMB));
509
+ rb_define_const(module_revdev, "BTN_THUMB2", INT2NUM(BTN_THUMB2));
510
+ rb_define_const(module_revdev, "BTN_TOP", INT2NUM(BTN_TOP));
511
+ rb_define_const(module_revdev, "BTN_TOP2", INT2NUM(BTN_TOP2));
512
+ rb_define_const(module_revdev, "BTN_PINKIE", INT2NUM(BTN_PINKIE));
513
+ rb_define_const(module_revdev, "BTN_BASE", INT2NUM(BTN_BASE));
514
+ rb_define_const(module_revdev, "BTN_BASE2", INT2NUM(BTN_BASE2));
515
+ rb_define_const(module_revdev, "BTN_BASE3", INT2NUM(BTN_BASE3));
516
+ rb_define_const(module_revdev, "BTN_BASE4", INT2NUM(BTN_BASE4));
517
+ rb_define_const(module_revdev, "BTN_BASE5", INT2NUM(BTN_BASE5));
518
+ rb_define_const(module_revdev, "BTN_BASE6", INT2NUM(BTN_BASE6));
519
+ rb_define_const(module_revdev, "BTN_DEAD", INT2NUM(BTN_DEAD));
520
+
521
+ rb_define_const(module_revdev, "BTN_GAMEPAD", INT2NUM(BTN_GAMEPAD));
522
+ rb_define_const(module_revdev, "BTN_A", INT2NUM(BTN_A));
523
+ rb_define_const(module_revdev, "BTN_B", INT2NUM(BTN_B));
524
+ rb_define_const(module_revdev, "BTN_C", INT2NUM(BTN_C));
525
+ rb_define_const(module_revdev, "BTN_X", INT2NUM(BTN_X));
526
+ rb_define_const(module_revdev, "BTN_Y", INT2NUM(BTN_Y));
527
+ rb_define_const(module_revdev, "BTN_Z", INT2NUM(BTN_Z));
528
+ rb_define_const(module_revdev, "BTN_TL", INT2NUM(BTN_TL));
529
+ rb_define_const(module_revdev, "BTN_TR", INT2NUM(BTN_TR));
530
+ rb_define_const(module_revdev, "BTN_TL2", INT2NUM(BTN_TL2));
531
+ rb_define_const(module_revdev, "BTN_TR2", INT2NUM(BTN_TR2));
532
+ rb_define_const(module_revdev, "BTN_SELECT", INT2NUM(BTN_SELECT));
533
+ rb_define_const(module_revdev, "BTN_START", INT2NUM(BTN_START));
534
+ rb_define_const(module_revdev, "BTN_MODE", INT2NUM(BTN_MODE));
535
+ rb_define_const(module_revdev, "BTN_THUMBL", INT2NUM(BTN_THUMBL));
536
+ rb_define_const(module_revdev, "BTN_THUMBR", INT2NUM(BTN_THUMBR));
537
+
538
+ rb_define_const(module_revdev, "BTN_DIGI", INT2NUM(BTN_DIGI));
539
+ rb_define_const(module_revdev, "BTN_TOOL_PEN", INT2NUM(BTN_TOOL_PEN));
540
+ rb_define_const(module_revdev, "BTN_TOOL_RUBBER", INT2NUM(BTN_TOOL_RUBBER));
541
+ rb_define_const(module_revdev, "BTN_TOOL_BRUSH", INT2NUM(BTN_TOOL_BRUSH));
542
+ rb_define_const(module_revdev, "BTN_TOOL_PENCIL", INT2NUM(BTN_TOOL_PENCIL));
543
+ rb_define_const(module_revdev, "BTN_TOOL_AIRBRUSH", INT2NUM(BTN_TOOL_AIRBRUSH));
544
+ rb_define_const(module_revdev, "BTN_TOOL_FINGER", INT2NUM(BTN_TOOL_FINGER));
545
+ rb_define_const(module_revdev, "BTN_TOOL_MOUSE", INT2NUM(BTN_TOOL_MOUSE));
546
+ rb_define_const(module_revdev, "BTN_TOOL_LENS", INT2NUM(BTN_TOOL_LENS));
547
+ rb_define_const(module_revdev, "BTN_TOUCH", INT2NUM(BTN_TOUCH));
548
+ rb_define_const(module_revdev, "BTN_STYLUS", INT2NUM(BTN_STYLUS));
549
+ rb_define_const(module_revdev, "BTN_STYLUS2", INT2NUM(BTN_STYLUS2));
550
+ rb_define_const(module_revdev, "BTN_TOOL_DOUBLETAP", INT2NUM(BTN_TOOL_DOUBLETAP));
551
+ rb_define_const(module_revdev, "BTN_TOOL_TRIPLETAP", INT2NUM(BTN_TOOL_TRIPLETAP));
552
+ rb_define_const(module_revdev, "BTN_TOOL_QUADTAP", INT2NUM(BTN_TOOL_QUADTAP));/* Four fingers on trackpad */
553
+
554
+ rb_define_const(module_revdev, "BTN_WHEEL", INT2NUM(BTN_WHEEL));
555
+ rb_define_const(module_revdev, "BTN_GEAR_DOWN", INT2NUM(BTN_GEAR_DOWN));
556
+ rb_define_const(module_revdev, "BTN_GEAR_UP", INT2NUM(BTN_GEAR_UP));
557
+
558
+ rb_define_const(module_revdev, "KEY_OK", INT2NUM(KEY_OK));
559
+ rb_define_const(module_revdev, "KEY_SELECT", INT2NUM(KEY_SELECT));
560
+ rb_define_const(module_revdev, "KEY_GOTO", INT2NUM(KEY_GOTO));
561
+ rb_define_const(module_revdev, "KEY_CLEAR", INT2NUM(KEY_CLEAR));
562
+ rb_define_const(module_revdev, "KEY_POWER2", INT2NUM(KEY_POWER2));
563
+ rb_define_const(module_revdev, "KEY_OPTION", INT2NUM(KEY_OPTION));
564
+ rb_define_const(module_revdev, "KEY_INFO", INT2NUM(KEY_INFO));/* AL OEM Features/Tips/Tutorial */
565
+ rb_define_const(module_revdev, "KEY_TIME", INT2NUM(KEY_TIME));
566
+ rb_define_const(module_revdev, "KEY_VENDOR", INT2NUM(KEY_VENDOR));
567
+ rb_define_const(module_revdev, "KEY_ARCHIVE", INT2NUM(KEY_ARCHIVE));
568
+ rb_define_const(module_revdev, "KEY_PROGRAM", INT2NUM(KEY_PROGRAM));/* Media Select Program Guide */
569
+ rb_define_const(module_revdev, "KEY_CHANNEL", INT2NUM(KEY_CHANNEL));
570
+ rb_define_const(module_revdev, "KEY_FAVORITES", INT2NUM(KEY_FAVORITES));
571
+ rb_define_const(module_revdev, "KEY_EPG", INT2NUM(KEY_EPG));
572
+ rb_define_const(module_revdev, "KEY_PVR", INT2NUM(KEY_PVR));/* Media Select Home */
573
+ rb_define_const(module_revdev, "KEY_MHP", INT2NUM(KEY_MHP));
574
+ rb_define_const(module_revdev, "KEY_LANGUAGE", INT2NUM(KEY_LANGUAGE));
575
+ rb_define_const(module_revdev, "KEY_TITLE", INT2NUM(KEY_TITLE));
576
+ rb_define_const(module_revdev, "KEY_SUBTITLE", INT2NUM(KEY_SUBTITLE));
577
+ rb_define_const(module_revdev, "KEY_ANGLE", INT2NUM(KEY_ANGLE));
578
+ rb_define_const(module_revdev, "KEY_ZOOM", INT2NUM(KEY_ZOOM));
579
+ rb_define_const(module_revdev, "KEY_MODE", INT2NUM(KEY_MODE));
580
+ rb_define_const(module_revdev, "KEY_KEYBOARD", INT2NUM(KEY_KEYBOARD));
581
+ rb_define_const(module_revdev, "KEY_SCREEN", INT2NUM(KEY_SCREEN));
582
+ rb_define_const(module_revdev, "KEY_PC", INT2NUM(KEY_PC));/* Media Select Computer */
583
+ rb_define_const(module_revdev, "KEY_TV", INT2NUM(KEY_TV));/* Media Select TV */
584
+ rb_define_const(module_revdev, "KEY_TV2", INT2NUM(KEY_TV2));/* Media Select Cable */
585
+ rb_define_const(module_revdev, "KEY_VCR", INT2NUM(KEY_VCR));/* Media Select VCR */
586
+ rb_define_const(module_revdev, "KEY_VCR2", INT2NUM(KEY_VCR2));/* VCR Plus */
587
+ rb_define_const(module_revdev, "KEY_SAT", INT2NUM(KEY_SAT));/* Media Select Satellite */
588
+ rb_define_const(module_revdev, "KEY_SAT2", INT2NUM(KEY_SAT2));
589
+ rb_define_const(module_revdev, "KEY_CD", INT2NUM(KEY_CD));/* Media Select CD */
590
+ rb_define_const(module_revdev, "KEY_TAPE", INT2NUM(KEY_TAPE));/* Media Select Tape */
591
+ rb_define_const(module_revdev, "KEY_RADIO", INT2NUM(KEY_RADIO));
592
+ rb_define_const(module_revdev, "KEY_TUNER", INT2NUM(KEY_TUNER));/* Media Select Tuner */
593
+ rb_define_const(module_revdev, "KEY_PLAYER", INT2NUM(KEY_PLAYER));
594
+ rb_define_const(module_revdev, "KEY_TEXT", INT2NUM(KEY_TEXT));
595
+ rb_define_const(module_revdev, "KEY_DVD", INT2NUM(KEY_DVD));/* Media Select DVD */
596
+ rb_define_const(module_revdev, "KEY_AUX", INT2NUM(KEY_AUX));
597
+ rb_define_const(module_revdev, "KEY_MP3", INT2NUM(KEY_MP3));
598
+ rb_define_const(module_revdev, "KEY_AUDIO", INT2NUM(KEY_AUDIO));/* AL Audio Browser */
599
+ rb_define_const(module_revdev, "KEY_VIDEO", INT2NUM(KEY_VIDEO));/* AL Movie Browser */
600
+ rb_define_const(module_revdev, "KEY_DIRECTORY", INT2NUM(KEY_DIRECTORY));
601
+ rb_define_const(module_revdev, "KEY_LIST", INT2NUM(KEY_LIST));
602
+ rb_define_const(module_revdev, "KEY_MEMO", INT2NUM(KEY_MEMO));/* Media Select Messages */
603
+ rb_define_const(module_revdev, "KEY_CALENDAR", INT2NUM(KEY_CALENDAR));
604
+ rb_define_const(module_revdev, "KEY_RED", INT2NUM(KEY_RED));
605
+ rb_define_const(module_revdev, "KEY_GREEN", INT2NUM(KEY_GREEN));
606
+ rb_define_const(module_revdev, "KEY_YELLOW", INT2NUM(KEY_YELLOW));
607
+ rb_define_const(module_revdev, "KEY_BLUE", INT2NUM(KEY_BLUE));
608
+ rb_define_const(module_revdev, "KEY_CHANNELUP", INT2NUM(KEY_CHANNELUP));/* Channel Increment */
609
+ rb_define_const(module_revdev, "KEY_CHANNELDOWN", INT2NUM(KEY_CHANNELDOWN));/* Channel Decrement */
610
+ rb_define_const(module_revdev, "KEY_FIRST", INT2NUM(KEY_FIRST));
611
+ rb_define_const(module_revdev, "KEY_LAST", INT2NUM(KEY_LAST));/* Recall Last */
612
+ rb_define_const(module_revdev, "KEY_AB", INT2NUM(KEY_AB));
613
+ rb_define_const(module_revdev, "KEY_NEXT", INT2NUM(KEY_NEXT));
614
+ rb_define_const(module_revdev, "KEY_RESTART", INT2NUM(KEY_RESTART));
615
+ rb_define_const(module_revdev, "KEY_SLOW", INT2NUM(KEY_SLOW));
616
+ rb_define_const(module_revdev, "KEY_SHUFFLE", INT2NUM(KEY_SHUFFLE));
617
+ rb_define_const(module_revdev, "KEY_BREAK", INT2NUM(KEY_BREAK));
618
+ rb_define_const(module_revdev, "KEY_PREVIOUS", INT2NUM(KEY_PREVIOUS));
619
+ rb_define_const(module_revdev, "KEY_DIGITS", INT2NUM(KEY_DIGITS));
620
+ rb_define_const(module_revdev, "KEY_TEEN", INT2NUM(KEY_TEEN));
621
+ rb_define_const(module_revdev, "KEY_TWEN", INT2NUM(KEY_TWEN));
622
+ rb_define_const(module_revdev, "KEY_VIDEOPHONE", INT2NUM(KEY_VIDEOPHONE));/* Media Select Video Phone */
623
+ rb_define_const(module_revdev, "KEY_GAMES", INT2NUM(KEY_GAMES));/* Media Select Games */
624
+ rb_define_const(module_revdev, "KEY_ZOOMIN", INT2NUM(KEY_ZOOMIN));/* AC Zoom In */
625
+ rb_define_const(module_revdev, "KEY_ZOOMOUT", INT2NUM(KEY_ZOOMOUT));/* AC Zoom Out */
626
+ rb_define_const(module_revdev, "KEY_ZOOMRESET", INT2NUM(KEY_ZOOMRESET));/* AC Zoom */
627
+ rb_define_const(module_revdev, "KEY_WORDPROCESSOR", INT2NUM(KEY_WORDPROCESSOR));/* AL Word Processor */
628
+ rb_define_const(module_revdev, "KEY_EDITOR", INT2NUM(KEY_EDITOR));/* AL Text Editor */
629
+ rb_define_const(module_revdev, "KEY_SPREADSHEET", INT2NUM(KEY_SPREADSHEET));/* AL Spreadsheet */
630
+ rb_define_const(module_revdev, "KEY_GRAPHICSEDITOR", INT2NUM(KEY_GRAPHICSEDITOR));/* AL Graphics Editor */
631
+ rb_define_const(module_revdev, "KEY_PRESENTATION", INT2NUM(KEY_PRESENTATION));/* AL Presentation App */
632
+ rb_define_const(module_revdev, "KEY_DATABASE", INT2NUM(KEY_DATABASE));/* AL Database App */
633
+ rb_define_const(module_revdev, "KEY_NEWS", INT2NUM(KEY_NEWS));/* AL Newsreader */
634
+ rb_define_const(module_revdev, "KEY_VOICEMAIL", INT2NUM(KEY_VOICEMAIL));/* AL Voicemail */
635
+ rb_define_const(module_revdev, "KEY_ADDRESSBOOK", INT2NUM(KEY_ADDRESSBOOK));/* AL Contacts/Address Book */
636
+ rb_define_const(module_revdev, "KEY_MESSENGER", INT2NUM(KEY_MESSENGER));/* AL Instant Messaging */
637
+ rb_define_const(module_revdev, "KEY_DISPLAYTOGGLE", INT2NUM(KEY_DISPLAYTOGGLE));/* Turn display (LCD) on and off */
638
+ rb_define_const(module_revdev, "KEY_SPELLCHECK", INT2NUM(KEY_SPELLCHECK));/* AL Spell Check */
639
+ rb_define_const(module_revdev, "KEY_LOGOFF", INT2NUM(KEY_LOGOFF));/* AL Logoff */
640
+
641
+ rb_define_const(module_revdev, "KEY_DOLLAR", INT2NUM(KEY_DOLLAR));
642
+ rb_define_const(module_revdev, "KEY_EURO", INT2NUM(KEY_EURO));
643
+
644
+ rb_define_const(module_revdev, "KEY_FRAMEBACK", INT2NUM(KEY_FRAMEBACK));/* Consumer - transport controls */
645
+ rb_define_const(module_revdev, "KEY_FRAMEFORWARD", INT2NUM(KEY_FRAMEFORWARD));
646
+ rb_define_const(module_revdev, "KEY_CONTEXT_MENU", INT2NUM(KEY_CONTEXT_MENU));/* GenDesc - system context menu */
647
+ rb_define_const(module_revdev, "KEY_MEDIA_REPEAT", INT2NUM(KEY_MEDIA_REPEAT));/* Consumer - transport control */
648
+ rb_define_const(module_revdev, "KEY_10CHANNELSUP", INT2NUM(KEY_10CHANNELSUP));/* 10 channels up (10+) */
649
+ rb_define_const(module_revdev, "KEY_10CHANNELSDOWN", INT2NUM(KEY_10CHANNELSDOWN));/* 10 channels down (10-) */
650
+ rb_define_const(module_revdev, "KEY_IMAGES", INT2NUM(KEY_IMAGES));/* AL Image Browser */
651
+
652
+ rb_define_const(module_revdev, "KEY_DEL_EOL", INT2NUM(KEY_DEL_EOL));
653
+ rb_define_const(module_revdev, "KEY_DEL_EOS", INT2NUM(KEY_DEL_EOS));
654
+ rb_define_const(module_revdev, "KEY_INS_LINE", INT2NUM(KEY_INS_LINE));
655
+ rb_define_const(module_revdev, "KEY_DEL_LINE", INT2NUM(KEY_DEL_LINE));
656
+
657
+ rb_define_const(module_revdev, "KEY_FN", INT2NUM(KEY_FN));
658
+ rb_define_const(module_revdev, "KEY_FN_ESC", INT2NUM(KEY_FN_ESC));
659
+ rb_define_const(module_revdev, "KEY_FN_F1", INT2NUM(KEY_FN_F1));
660
+ rb_define_const(module_revdev, "KEY_FN_F2", INT2NUM(KEY_FN_F2));
661
+ rb_define_const(module_revdev, "KEY_FN_F3", INT2NUM(KEY_FN_F3));
662
+ rb_define_const(module_revdev, "KEY_FN_F4", INT2NUM(KEY_FN_F4));
663
+ rb_define_const(module_revdev, "KEY_FN_F5", INT2NUM(KEY_FN_F5));
664
+ rb_define_const(module_revdev, "KEY_FN_F6", INT2NUM(KEY_FN_F6));
665
+ rb_define_const(module_revdev, "KEY_FN_F7", INT2NUM(KEY_FN_F7));
666
+ rb_define_const(module_revdev, "KEY_FN_F8", INT2NUM(KEY_FN_F8));
667
+ rb_define_const(module_revdev, "KEY_FN_F9", INT2NUM(KEY_FN_F9));
668
+ rb_define_const(module_revdev, "KEY_FN_F10", INT2NUM(KEY_FN_F10));
669
+ rb_define_const(module_revdev, "KEY_FN_F11", INT2NUM(KEY_FN_F11));
670
+ rb_define_const(module_revdev, "KEY_FN_F12", INT2NUM(KEY_FN_F12));
671
+ rb_define_const(module_revdev, "KEY_FN_1", INT2NUM(KEY_FN_1));
672
+ rb_define_const(module_revdev, "KEY_FN_2", INT2NUM(KEY_FN_2));
673
+ rb_define_const(module_revdev, "KEY_FN_D", INT2NUM(KEY_FN_D));
674
+ rb_define_const(module_revdev, "KEY_FN_E", INT2NUM(KEY_FN_E));
675
+ rb_define_const(module_revdev, "KEY_FN_F", INT2NUM(KEY_FN_F));
676
+ rb_define_const(module_revdev, "KEY_FN_S", INT2NUM(KEY_FN_S));
677
+ rb_define_const(module_revdev, "KEY_FN_B", INT2NUM(KEY_FN_B));
678
+
679
+ rb_define_const(module_revdev, "KEY_BRL_DOT1", INT2NUM(KEY_BRL_DOT1));
680
+ rb_define_const(module_revdev, "KEY_BRL_DOT2", INT2NUM(KEY_BRL_DOT2));
681
+ rb_define_const(module_revdev, "KEY_BRL_DOT3", INT2NUM(KEY_BRL_DOT3));
682
+ rb_define_const(module_revdev, "KEY_BRL_DOT4", INT2NUM(KEY_BRL_DOT4));
683
+ rb_define_const(module_revdev, "KEY_BRL_DOT5", INT2NUM(KEY_BRL_DOT5));
684
+ rb_define_const(module_revdev, "KEY_BRL_DOT6", INT2NUM(KEY_BRL_DOT6));
685
+ rb_define_const(module_revdev, "KEY_BRL_DOT7", INT2NUM(KEY_BRL_DOT7));
686
+ rb_define_const(module_revdev, "KEY_BRL_DOT8", INT2NUM(KEY_BRL_DOT8));
687
+ rb_define_const(module_revdev, "KEY_BRL_DOT9", INT2NUM(KEY_BRL_DOT9));
688
+ rb_define_const(module_revdev, "KEY_BRL_DOT10", INT2NUM(KEY_BRL_DOT10));
689
+
690
+ rb_define_const(module_revdev, "KEY_NUMERIC_0", INT2NUM(KEY_NUMERIC_0));/* used by phones, remote controls, */
691
+ rb_define_const(module_revdev, "KEY_NUMERIC_1", INT2NUM(KEY_NUMERIC_1));/* and other keypads */
692
+ rb_define_const(module_revdev, "KEY_NUMERIC_2", INT2NUM(KEY_NUMERIC_2));
693
+ rb_define_const(module_revdev, "KEY_NUMERIC_3", INT2NUM(KEY_NUMERIC_3));
694
+ rb_define_const(module_revdev, "KEY_NUMERIC_4", INT2NUM(KEY_NUMERIC_4));
695
+ rb_define_const(module_revdev, "KEY_NUMERIC_5", INT2NUM(KEY_NUMERIC_5));
696
+ rb_define_const(module_revdev, "KEY_NUMERIC_6", INT2NUM(KEY_NUMERIC_6));
697
+ rb_define_const(module_revdev, "KEY_NUMERIC_7", INT2NUM(KEY_NUMERIC_7));
698
+ rb_define_const(module_revdev, "KEY_NUMERIC_8", INT2NUM(KEY_NUMERIC_8));
699
+ rb_define_const(module_revdev, "KEY_NUMERIC_9", INT2NUM(KEY_NUMERIC_9));
700
+ rb_define_const(module_revdev, "KEY_NUMERIC_STAR", INT2NUM(KEY_NUMERIC_STAR));
701
+ rb_define_const(module_revdev, "KEY_NUMERIC_POUND", INT2NUM(KEY_NUMERIC_POUND));
702
+
703
+ rb_define_const(module_revdev, "KEY_CAMERA_FOCUS", INT2NUM(KEY_CAMERA_FOCUS));
704
+ rb_define_const(module_revdev, "KEY_WPS_BUTTON", INT2NUM(KEY_WPS_BUTTON));/* WiFi Protected Setup key */
705
+
706
+ rb_define_const(module_revdev, "KEY_TOUCHPAD_TOGGLE", INT2NUM(KEY_TOUCHPAD_TOGGLE));/* Request switch touchpad on or off */
707
+ rb_define_const(module_revdev, "KEY_TOUCHPAD_ON", INT2NUM(KEY_TOUCHPAD_ON));
708
+ rb_define_const(module_revdev, "KEY_TOUCHPAD_OFF", INT2NUM(KEY_TOUCHPAD_OFF));
709
+
710
+ rb_define_const(module_revdev, "KEY_CAMERA_ZOOMIN", INT2NUM(KEY_CAMERA_ZOOMIN));
711
+ rb_define_const(module_revdev, "KEY_CAMERA_ZOOMOUT", INT2NUM(KEY_CAMERA_ZOOMOUT));
712
+ rb_define_const(module_revdev, "KEY_CAMERA_UP", INT2NUM(KEY_CAMERA_UP));
713
+ rb_define_const(module_revdev, "KEY_CAMERA_DOWN", INT2NUM(KEY_CAMERA_DOWN));
714
+ rb_define_const(module_revdev, "KEY_CAMERA_LEFT", INT2NUM(KEY_CAMERA_LEFT));
715
+ rb_define_const(module_revdev, "KEY_CAMERA_RIGHT", INT2NUM(KEY_CAMERA_RIGHT));
716
+
717
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY", INT2NUM(BTN_TRIGGER_HAPPY));
718
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY1", INT2NUM(BTN_TRIGGER_HAPPY1));
719
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY2", INT2NUM(BTN_TRIGGER_HAPPY2));
720
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY3", INT2NUM(BTN_TRIGGER_HAPPY3));
721
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY4", INT2NUM(BTN_TRIGGER_HAPPY4));
722
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY5", INT2NUM(BTN_TRIGGER_HAPPY5));
723
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY6", INT2NUM(BTN_TRIGGER_HAPPY6));
724
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY7", INT2NUM(BTN_TRIGGER_HAPPY7));
725
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY8", INT2NUM(BTN_TRIGGER_HAPPY8));
726
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY9", INT2NUM(BTN_TRIGGER_HAPPY9));
727
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY10", INT2NUM(BTN_TRIGGER_HAPPY10));
728
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY11", INT2NUM(BTN_TRIGGER_HAPPY11));
729
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY12", INT2NUM(BTN_TRIGGER_HAPPY12));
730
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY13", INT2NUM(BTN_TRIGGER_HAPPY13));
731
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY14", INT2NUM(BTN_TRIGGER_HAPPY14));
732
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY15", INT2NUM(BTN_TRIGGER_HAPPY15));
733
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY16", INT2NUM(BTN_TRIGGER_HAPPY16));
734
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY17", INT2NUM(BTN_TRIGGER_HAPPY17));
735
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY18", INT2NUM(BTN_TRIGGER_HAPPY18));
736
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY19", INT2NUM(BTN_TRIGGER_HAPPY19));
737
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY20", INT2NUM(BTN_TRIGGER_HAPPY20));
738
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY21", INT2NUM(BTN_TRIGGER_HAPPY21));
739
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY22", INT2NUM(BTN_TRIGGER_HAPPY22));
740
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY23", INT2NUM(BTN_TRIGGER_HAPPY23));
741
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY24", INT2NUM(BTN_TRIGGER_HAPPY24));
742
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY25", INT2NUM(BTN_TRIGGER_HAPPY25));
743
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY26", INT2NUM(BTN_TRIGGER_HAPPY26));
744
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY27", INT2NUM(BTN_TRIGGER_HAPPY27));
745
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY28", INT2NUM(BTN_TRIGGER_HAPPY28));
746
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY29", INT2NUM(BTN_TRIGGER_HAPPY29));
747
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY30", INT2NUM(BTN_TRIGGER_HAPPY30));
748
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY31", INT2NUM(BTN_TRIGGER_HAPPY31));
749
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY32", INT2NUM(BTN_TRIGGER_HAPPY32));
750
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY33", INT2NUM(BTN_TRIGGER_HAPPY33));
751
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY34", INT2NUM(BTN_TRIGGER_HAPPY34));
752
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY35", INT2NUM(BTN_TRIGGER_HAPPY35));
753
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY36", INT2NUM(BTN_TRIGGER_HAPPY36));
754
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY37", INT2NUM(BTN_TRIGGER_HAPPY37));
755
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY38", INT2NUM(BTN_TRIGGER_HAPPY38));
756
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY39", INT2NUM(BTN_TRIGGER_HAPPY39));
757
+ rb_define_const(module_revdev, "BTN_TRIGGER_HAPPY40", INT2NUM(BTN_TRIGGER_HAPPY40));
758
+
759
+ /* We avoid low common keys in module aliases so they don't get huge. */
760
+ rb_define_const(module_revdev, "KEY_MIN_INTERESTING", INT2NUM(KEY_MIN_INTERESTING));
761
+ rb_define_const(module_revdev, "KEY_MAX", INT2NUM(KEY_MAX));
762
+ rb_define_const(module_revdev, "KEY_CNT", INT2NUM(KEY_CNT));
763
+
764
+ /*
765
+ * Relative axes
766
+ */
767
+
768
+ rb_define_const(module_revdev, "REL_X", INT2NUM(REL_X));
769
+ rb_define_const(module_revdev, "REL_Y", INT2NUM(REL_Y));
770
+ rb_define_const(module_revdev, "REL_Z", INT2NUM(REL_Z));
771
+ rb_define_const(module_revdev, "REL_RX", INT2NUM(REL_RX));
772
+ rb_define_const(module_revdev, "REL_RY", INT2NUM(REL_RY));
773
+ rb_define_const(module_revdev, "REL_RZ", INT2NUM(REL_RZ));
774
+ rb_define_const(module_revdev, "REL_HWHEEL", INT2NUM(REL_HWHEEL));
775
+ rb_define_const(module_revdev, "REL_DIAL", INT2NUM(REL_DIAL));
776
+ rb_define_const(module_revdev, "REL_WHEEL", INT2NUM(REL_WHEEL));
777
+ rb_define_const(module_revdev, "REL_MISC", INT2NUM(REL_MISC));
778
+ rb_define_const(module_revdev, "REL_MAX", INT2NUM(REL_MAX));
779
+ rb_define_const(module_revdev, "REL_CNT", INT2NUM(REL_CNT));
780
+
781
+ /*
782
+ * Absolute axes
783
+ */
784
+
785
+ rb_define_const(module_revdev, "ABS_X", INT2NUM(ABS_X));
786
+ rb_define_const(module_revdev, "ABS_Y", INT2NUM(ABS_Y));
787
+ rb_define_const(module_revdev, "ABS_Z", INT2NUM(ABS_Z));
788
+ rb_define_const(module_revdev, "ABS_RX", INT2NUM(ABS_RX));
789
+ rb_define_const(module_revdev, "ABS_RY", INT2NUM(ABS_RY));
790
+ rb_define_const(module_revdev, "ABS_RZ", INT2NUM(ABS_RZ));
791
+ rb_define_const(module_revdev, "ABS_THROTTLE", INT2NUM(ABS_THROTTLE));
792
+ rb_define_const(module_revdev, "ABS_RUDDER", INT2NUM(ABS_RUDDER));
793
+ rb_define_const(module_revdev, "ABS_WHEEL", INT2NUM(ABS_WHEEL));
794
+ rb_define_const(module_revdev, "ABS_GAS", INT2NUM(ABS_GAS));
795
+ rb_define_const(module_revdev, "ABS_BRAKE", INT2NUM(ABS_BRAKE));
796
+ rb_define_const(module_revdev, "ABS_HAT0X", INT2NUM(ABS_HAT0X));
797
+ rb_define_const(module_revdev, "ABS_HAT0Y", INT2NUM(ABS_HAT0Y));
798
+ rb_define_const(module_revdev, "ABS_HAT1X", INT2NUM(ABS_HAT1X));
799
+ rb_define_const(module_revdev, "ABS_HAT1Y", INT2NUM(ABS_HAT1Y));
800
+ rb_define_const(module_revdev, "ABS_HAT2X", INT2NUM(ABS_HAT2X));
801
+ rb_define_const(module_revdev, "ABS_HAT2Y", INT2NUM(ABS_HAT2Y));
802
+ rb_define_const(module_revdev, "ABS_HAT3X", INT2NUM(ABS_HAT3X));
803
+ rb_define_const(module_revdev, "ABS_HAT3Y", INT2NUM(ABS_HAT3Y));
804
+ rb_define_const(module_revdev, "ABS_PRESSURE", INT2NUM(ABS_PRESSURE));
805
+ rb_define_const(module_revdev, "ABS_DISTANCE", INT2NUM(ABS_DISTANCE));
806
+ rb_define_const(module_revdev, "ABS_TILT_X", INT2NUM(ABS_TILT_X));
807
+ rb_define_const(module_revdev, "ABS_TILT_Y", INT2NUM(ABS_TILT_Y));
808
+ rb_define_const(module_revdev, "ABS_TOOL_WIDTH", INT2NUM(ABS_TOOL_WIDTH));
809
+
810
+ rb_define_const(module_revdev, "ABS_VOLUME", INT2NUM(ABS_VOLUME));
811
+
812
+ rb_define_const(module_revdev, "ABS_MISC", INT2NUM(ABS_MISC));
813
+
814
+ rb_define_const(module_revdev, "ABS_MT_SLOT", INT2NUM(ABS_MT_SLOT));/* MT slot being modified */
815
+ rb_define_const(module_revdev, "ABS_MT_TOUCH_MAJOR", INT2NUM(ABS_MT_TOUCH_MAJOR));/* Major axis of touching ellipse */
816
+ rb_define_const(module_revdev, "ABS_MT_TOUCH_MINOR", INT2NUM(ABS_MT_TOUCH_MINOR));/* Minor axis (omit if circular) */
817
+ rb_define_const(module_revdev, "ABS_MT_WIDTH_MAJOR", INT2NUM(ABS_MT_WIDTH_MAJOR));/* Major axis of approaching ellipse */
818
+ rb_define_const(module_revdev, "ABS_MT_WIDTH_MINOR", INT2NUM(ABS_MT_WIDTH_MINOR));/* Minor axis (omit if circular) */
819
+ rb_define_const(module_revdev, "ABS_MT_ORIENTATION", INT2NUM(ABS_MT_ORIENTATION));/* Ellipse orientation */
820
+ rb_define_const(module_revdev, "ABS_MT_POSITION_X", INT2NUM(ABS_MT_POSITION_X));/* Center X ellipse position */
821
+ rb_define_const(module_revdev, "ABS_MT_POSITION_Y", INT2NUM(ABS_MT_POSITION_Y));/* Center Y ellipse position */
822
+ rb_define_const(module_revdev, "ABS_MT_TOOL_TYPE", INT2NUM(ABS_MT_TOOL_TYPE));/* Type of touching device */
823
+ rb_define_const(module_revdev, "ABS_MT_BLOB_ID", INT2NUM(ABS_MT_BLOB_ID));/* Group a set of packets as a blob */
824
+ rb_define_const(module_revdev, "ABS_MT_TRACKING_ID", INT2NUM(ABS_MT_TRACKING_ID));/* Unique ID of initiated contact */
825
+ rb_define_const(module_revdev, "ABS_MT_PRESSURE", INT2NUM(ABS_MT_PRESSURE));/* Pressure on contact area */
826
+ rb_define_const(module_revdev, "ABS_MT_DISTANCE", INT2NUM(ABS_MT_DISTANCE));/* Contact hover distance */
827
+
828
+
829
+ rb_define_const(module_revdev, "ABS_MAX", INT2NUM(ABS_MAX));
830
+ rb_define_const(module_revdev, "ABS_CNT", INT2NUM(ABS_CNT));
831
+
832
+ /*
833
+ * Switch events
834
+ */
835
+
836
+ rb_define_const(module_revdev, "SW_LID", INT2NUM(SW_LID));/* set = lid shut */
837
+ rb_define_const(module_revdev, "SW_TABLET_MODE", INT2NUM(SW_TABLET_MODE));/* set = tablet mode */
838
+ rb_define_const(module_revdev, "SW_HEADPHONE_INSERT", INT2NUM(SW_HEADPHONE_INSERT));/* set = inserted */
839
+ rb_define_const(module_revdev, "SW_RFKILL_ALL", INT2NUM(SW_RFKILL_ALL));/* rfkill master switch, type "any"
840
+ set = radio enabled */
841
+ rb_define_const(module_revdev, "SW_RADIO", INT2NUM(SW_RADIO));/* deprecated */
842
+ rb_define_const(module_revdev, "SW_MICROPHONE_INSERT", INT2NUM(SW_MICROPHONE_INSERT));/* set = inserted */
843
+ rb_define_const(module_revdev, "SW_DOCK", INT2NUM(SW_DOCK));/* set = plugged into dock */
844
+ rb_define_const(module_revdev, "SW_LINEOUT_INSERT", INT2NUM(SW_LINEOUT_INSERT));/* set = inserted */
845
+ rb_define_const(module_revdev, "SW_JACK_PHYSICAL_INSERT", INT2NUM(SW_JACK_PHYSICAL_INSERT));/* set = mechanical switch set */
846
+ rb_define_const(module_revdev, "SW_VIDEOOUT_INSERT", INT2NUM(SW_VIDEOOUT_INSERT));/* set = inserted */
847
+ rb_define_const(module_revdev, "SW_CAMERA_LENS_COVER", INT2NUM(SW_CAMERA_LENS_COVER));/* set = lens covered */
848
+ rb_define_const(module_revdev, "SW_KEYPAD_SLIDE", INT2NUM(SW_KEYPAD_SLIDE));/* set = keypad slide out */
849
+ rb_define_const(module_revdev, "SW_FRONT_PROXIMITY", INT2NUM(SW_FRONT_PROXIMITY));/* set = front proximity sensor active */
850
+ rb_define_const(module_revdev, "SW_ROTATE_LOCK", INT2NUM(SW_ROTATE_LOCK));/* set = rotate locked/disabled */
851
+ rb_define_const(module_revdev, "SW_MAX", INT2NUM(SW_MAX));
852
+ rb_define_const(module_revdev, "SW_CNT", INT2NUM(SW_CNT));
853
+
854
+ /*
855
+ * Misc events
856
+ */
857
+
858
+ rb_define_const(module_revdev, "MSC_SERIAL", INT2NUM(MSC_SERIAL));
859
+ rb_define_const(module_revdev, "MSC_PULSELED", INT2NUM(MSC_PULSELED));
860
+ rb_define_const(module_revdev, "MSC_GESTURE", INT2NUM(MSC_GESTURE));
861
+ rb_define_const(module_revdev, "MSC_RAW", INT2NUM(MSC_RAW));
862
+ rb_define_const(module_revdev, "MSC_SCAN", INT2NUM(MSC_SCAN));
863
+ rb_define_const(module_revdev, "MSC_MAX", INT2NUM(MSC_MAX));
864
+ rb_define_const(module_revdev, "MSC_CNT", INT2NUM(MSC_CNT));
865
+
866
+ /*
867
+ * LEDs
868
+ */
869
+
870
+ rb_define_const(module_revdev, "LED_NUML", INT2NUM(LED_NUML));
871
+ rb_define_const(module_revdev, "LED_CAPSL", INT2NUM(LED_CAPSL));
872
+ rb_define_const(module_revdev, "LED_SCROLLL", INT2NUM(LED_SCROLLL));
873
+ rb_define_const(module_revdev, "LED_COMPOSE", INT2NUM(LED_COMPOSE));
874
+ rb_define_const(module_revdev, "LED_KANA", INT2NUM(LED_KANA));
875
+ rb_define_const(module_revdev, "LED_SLEEP", INT2NUM(LED_SLEEP));
876
+ rb_define_const(module_revdev, "LED_SUSPEND", INT2NUM(LED_SUSPEND));
877
+ rb_define_const(module_revdev, "LED_MUTE", INT2NUM(LED_MUTE));
878
+ rb_define_const(module_revdev, "LED_MISC", INT2NUM(LED_MISC));
879
+ rb_define_const(module_revdev, "LED_MAIL", INT2NUM(LED_MAIL));
880
+ rb_define_const(module_revdev, "LED_CHARGING", INT2NUM(LED_CHARGING));
881
+ rb_define_const(module_revdev, "LED_MAX", INT2NUM(LED_MAX));
882
+ rb_define_const(module_revdev, "LED_CNT", INT2NUM(LED_CNT));
883
+
884
+ /*
885
+ * Autorepeat values
886
+ */
887
+
888
+ rb_define_const(module_revdev, "REP_DELAY", INT2NUM(REP_DELAY));
889
+ rb_define_const(module_revdev, "REP_PERIOD", INT2NUM(REP_PERIOD));
890
+ rb_define_const(module_revdev, "REP_MAX", INT2NUM(REP_MAX));
891
+ rb_define_const(module_revdev, "REP_CNT", INT2NUM(REP_CNT));
892
+
893
+ /*
894
+ * Sounds
895
+ */
896
+
897
+ rb_define_const(module_revdev, "SND_CLICK", INT2NUM(SND_CLICK));
898
+ rb_define_const(module_revdev, "SND_BELL", INT2NUM(SND_BELL));
899
+ rb_define_const(module_revdev, "SND_TONE", INT2NUM(SND_TONE));
900
+ rb_define_const(module_revdev, "SND_MAX", INT2NUM(SND_MAX));
901
+ rb_define_const(module_revdev, "SND_CNT", INT2NUM(SND_CNT));
902
+
903
+ /*
904
+ * IDs.
905
+ */
906
+
907
+ rb_define_const(module_revdev, "ID_BUS", INT2NUM(ID_BUS));
908
+ rb_define_const(module_revdev, "ID_VENDOR", INT2NUM(ID_VENDOR));
909
+ rb_define_const(module_revdev, "ID_PRODUCT", INT2NUM(ID_PRODUCT));
910
+ rb_define_const(module_revdev, "ID_VERSION", INT2NUM(ID_VERSION));
911
+
912
+ rb_define_const(module_revdev, "BUS_PCI", INT2NUM(BUS_PCI));
913
+ rb_define_const(module_revdev, "BUS_ISAPNP", INT2NUM(BUS_ISAPNP));
914
+ rb_define_const(module_revdev, "BUS_USB", INT2NUM(BUS_USB));
915
+ rb_define_const(module_revdev, "BUS_HIL", INT2NUM(BUS_HIL));
916
+ rb_define_const(module_revdev, "BUS_BLUETOOTH", INT2NUM(BUS_BLUETOOTH));
917
+ rb_define_const(module_revdev, "BUS_VIRTUAL", INT2NUM(BUS_VIRTUAL));
918
+
919
+ rb_define_const(module_revdev, "BUS_ISA", INT2NUM(BUS_ISA));
920
+ rb_define_const(module_revdev, "BUS_I8042", INT2NUM(BUS_I8042));
921
+ rb_define_const(module_revdev, "BUS_XTKBD", INT2NUM(BUS_XTKBD));
922
+ rb_define_const(module_revdev, "BUS_RS232", INT2NUM(BUS_RS232));
923
+ rb_define_const(module_revdev, "BUS_GAMEPORT", INT2NUM(BUS_GAMEPORT));
924
+ rb_define_const(module_revdev, "BUS_PARPORT", INT2NUM(BUS_PARPORT));
925
+ rb_define_const(module_revdev, "BUS_AMIGA", INT2NUM(BUS_AMIGA));
926
+ rb_define_const(module_revdev, "BUS_ADB", INT2NUM(BUS_ADB));
927
+ rb_define_const(module_revdev, "BUS_I2C", INT2NUM(BUS_I2C));
928
+ rb_define_const(module_revdev, "BUS_HOST", INT2NUM(BUS_HOST));
929
+ rb_define_const(module_revdev, "BUS_GSC", INT2NUM(BUS_GSC));
930
+ rb_define_const(module_revdev, "BUS_ATARI", INT2NUM(BUS_ATARI));
931
+ rb_define_const(module_revdev, "BUS_SPI", INT2NUM(BUS_SPI));
932
+
933
+ /*
934
+ * MT_TOOL types
935
+ */
936
+ rb_define_const(module_revdev, "MT_TOOL_FINGER", INT2NUM(MT_TOOL_FINGER));
937
+ rb_define_const(module_revdev, "MT_TOOL_PEN", INT2NUM(MT_TOOL_PEN));
938
+ rb_define_const(module_revdev, "MT_TOOL_MAX", INT2NUM(MT_TOOL_MAX));
939
+
940
+ /*
941
+ * Values describing the status of a force-feedback effect
942
+ */
943
+ rb_define_const(module_revdev, "FF_STATUS_STOPPED", INT2NUM(FF_STATUS_STOPPED));
944
+ rb_define_const(module_revdev, "FF_STATUS_PLAYING", INT2NUM(FF_STATUS_PLAYING));
945
+ rb_define_const(module_revdev, "FF_STATUS_MAX", INT2NUM(FF_STATUS_MAX));
946
+
947
+
948
+ /*
949
+ * Force feedback effect types
950
+ */
951
+
952
+ rb_define_const(module_revdev, "FF_RUMBLE", INT2NUM(FF_RUMBLE));
953
+ rb_define_const(module_revdev, "FF_PERIODIC", INT2NUM(FF_PERIODIC));
954
+ rb_define_const(module_revdev, "FF_CONSTANT", INT2NUM(FF_CONSTANT));
955
+ rb_define_const(module_revdev, "FF_SPRING", INT2NUM(FF_SPRING));
956
+ rb_define_const(module_revdev, "FF_FRICTION", INT2NUM(FF_FRICTION));
957
+ rb_define_const(module_revdev, "FF_DAMPER", INT2NUM(FF_DAMPER));
958
+ rb_define_const(module_revdev, "FF_INERTIA", INT2NUM(FF_INERTIA));
959
+ rb_define_const(module_revdev, "FF_RAMP", INT2NUM(FF_RAMP));
960
+
961
+ rb_define_const(module_revdev, "FF_EFFECT_MIN", INT2NUM(FF_EFFECT_MIN));
962
+ rb_define_const(module_revdev, "FF_EFFECT_MAX", INT2NUM(FF_EFFECT_MAX));
963
+
964
+ /*
965
+ * Force feedback periodic effect types
966
+ */
967
+
968
+ rb_define_const(module_revdev, "FF_SQUARE", INT2NUM(FF_SQUARE));
969
+ rb_define_const(module_revdev, "FF_TRIANGLE", INT2NUM(FF_TRIANGLE));
970
+ rb_define_const(module_revdev, "FF_SINE", INT2NUM(FF_SINE));
971
+ rb_define_const(module_revdev, "FF_SAW_UP", INT2NUM(FF_SAW_UP));
972
+ rb_define_const(module_revdev, "FF_SAW_DOWN", INT2NUM(FF_SAW_DOWN));
973
+ rb_define_const(module_revdev, "FF_CUSTOM", INT2NUM(FF_CUSTOM));
974
+
975
+ rb_define_const(module_revdev, "FF_WAVEFORM_MIN", INT2NUM(FF_WAVEFORM_MIN));
976
+ rb_define_const(module_revdev, "FF_WAVEFORM_MAX", INT2NUM(FF_WAVEFORM_MAX));
977
+
978
+ /*
979
+ * Set ff device properties
980
+ */
981
+
982
+ rb_define_const(module_revdev, "FF_GAIN", INT2NUM(FF_GAIN));
983
+ rb_define_const(module_revdev, "FF_AUTOCENTER", INT2NUM(FF_AUTOCENTER));
984
+
985
+ rb_define_const(module_revdev, "FF_MAX", INT2NUM(FF_MAX));
986
+ rb_define_const(module_revdev, "FF_CNT", INT2NUM(FF_CNT));
987
+
988
+ }