rum 0.0.1-x86-mingw32

Sign up to get free protection for your applications and to get access to all the features.
Files changed (75) hide show
  1. data/CHANGELOG +3 -0
  2. data/README +30 -0
  3. data/Rakefile +134 -0
  4. data/bin/rum-client +124 -0
  5. data/doc/basic.rb +10 -0
  6. data/doc/doc.html +602 -0
  7. data/doc/example.rb +59 -0
  8. data/doc/reference.rb +415 -0
  9. data/doc/resources/bg.png +0 -0
  10. data/doc/resources/bottom.png +0 -0
  11. data/doc/resources/build.rb +235 -0
  12. data/doc/resources/doc.haml +167 -0
  13. data/doc/resources/emacs-auto-completion.png +0 -0
  14. data/doc/resources/flash.png +0 -0
  15. data/doc/resources/highlight.css +94 -0
  16. data/doc/resources/intro.rb +17 -0
  17. data/doc/resources/left.png +0 -0
  18. data/doc/resources/logo.png +0 -0
  19. data/doc/resources/screen.css +420 -0
  20. data/doc/resources/screenshot.png +0 -0
  21. data/doc/resources/top.png +0 -0
  22. data/ext/mac/keyboard_hook/English.lproj/InfoPlist.strings +0 -0
  23. data/ext/mac/keyboard_hook/Event.h +17 -0
  24. data/ext/mac/keyboard_hook/Event.m +18 -0
  25. data/ext/mac/keyboard_hook/EventTap.h +11 -0
  26. data/ext/mac/keyboard_hook/EventTap.m +77 -0
  27. data/ext/mac/keyboard_hook/Info.plist +26 -0
  28. data/ext/mac/keyboard_hook/KeyboardHook.xcodeproj/TemplateIcon.icns +0 -0
  29. data/ext/mac/keyboard_hook/KeyboardHook.xcodeproj/project.pbxproj +323 -0
  30. data/ext/mac/keyboard_hook/KeyboardHook_Prefix.pch +7 -0
  31. data/ext/mac/keyboard_hook/version.plist +16 -0
  32. data/ext/windows/keyboard_hook/extconf.rb +2 -0
  33. data/ext/windows/keyboard_hook/keyboard_hook.c +126 -0
  34. data/ext/windows/system/autohotkey_stuff.c +255 -0
  35. data/ext/windows/system/autohotkey_stuff.h +2 -0
  36. data/ext/windows/system/clipboard_watcher.c +58 -0
  37. data/ext/windows/system/clipboard_watcher.h +2 -0
  38. data/ext/windows/system/extconf.rb +3 -0
  39. data/ext/windows/system/input_box.c +239 -0
  40. data/ext/windows/system/input_box.h +4 -0
  41. data/ext/windows/system/system.c +273 -0
  42. data/lib/rum.rb +4 -0
  43. data/lib/rum/apps.rb +4 -0
  44. data/lib/rum/barrel.rb +157 -0
  45. data/lib/rum/barrel/emacs.rb +44 -0
  46. data/lib/rum/barrel/emacs_client.rb +74 -0
  47. data/lib/rum/core.rb +125 -0
  48. data/lib/rum/dsl.rb +109 -0
  49. data/lib/rum/gui.rb +93 -0
  50. data/lib/rum/help.rb +128 -0
  51. data/lib/rum/hotkey_core.rb +479 -0
  52. data/lib/rum/mac.rb +18 -0
  53. data/lib/rum/mac/app.rb +4 -0
  54. data/lib/rum/mac/apps.rb +19 -0
  55. data/lib/rum/mac/gui.rb +26 -0
  56. data/lib/rum/mac/gui/growl.rb +54 -0
  57. data/lib/rum/mac/irb/completion.rb +207 -0
  58. data/lib/rum/mac/keyboard_hook.rb +73 -0
  59. data/lib/rum/mac/layouts.rb +146 -0
  60. data/lib/rum/mac/system.rb +45 -0
  61. data/lib/rum/remote.rb +48 -0
  62. data/lib/rum/server.rb +92 -0
  63. data/lib/rum/windows.rb +23 -0
  64. data/lib/rum/windows/app.rb +72 -0
  65. data/lib/rum/windows/apps.rb +25 -0
  66. data/lib/rum/windows/gui.rb +116 -0
  67. data/lib/rum/windows/keyboard.rb +80 -0
  68. data/lib/rum/windows/keyboard_hook.rb +20 -0
  69. data/lib/rum/windows/keyboard_hook.so +0 -0
  70. data/lib/rum/windows/layouts.rb +232 -0
  71. data/lib/rum/windows/system.rb +310 -0
  72. data/lib/rum/windows/system.so +0 -0
  73. data/lib/rum/windows/system_foreign_functions.rb +129 -0
  74. data/rum.gemspec +14 -0
  75. metadata +156 -0
@@ -0,0 +1,17 @@
1
+ require 'rum'
2
+
3
+ Rum.layout.modifier 'caps'
4
+ 'caps'.do '(cmd (tab))'
5
+ 'caps shift'.do { active_window.close }
6
+
7
+ require 'rum/apps'
8
+ 'caps h'.do { puts 'Hello from Rum!' }
9
+ 'caps p'.do { Photoshop.activate }
10
+ 'caps down'.do(Photoshop) { Photoshop.next_blend_mode }
11
+ 'caps b'.do { Chrome.activate_and_focus_address_bar }
12
+ 'caps s'.do { Emacs.eval '(slime-repl)'; Emacs.activate }
13
+ 'caps c'.do { Clipboard.append }
14
+ 'ctrl shift h'.do { type 'hi' }
15
+ # Caveat: Some hotkey actions are not yet available on the Mac.
16
+
17
+ Rum.start
Binary file
Binary file
@@ -0,0 +1,420 @@
1
+ p {
2
+ margin: 1em 0;
3
+ }
4
+
5
+ a {
6
+ color: #161616;
7
+ }
8
+
9
+ h1 {
10
+ font-family: helvetica, arial;
11
+ color: #232323;
12
+ color: #3b3b3b;
13
+ margin-top: 0em;
14
+ margin-bottom: 1em;
15
+ font-size: 2em; /* Browser default */
16
+ }
17
+
18
+ h2 {
19
+ font-family: helvetica, arial;
20
+ color: #232323;
21
+ color: #3b3b3b;
22
+ font-style: italic;
23
+ font-size: 1.2em;
24
+ /* margin-bottom: 1em; */
25
+ /* margin-top: 1.1em; */
26
+ }
27
+
28
+ ul {
29
+ padding-left: 2.3em;
30
+ }
31
+
32
+ h3 {
33
+ font-family: helvetica, arial;
34
+ color: #232323;
35
+ color: #3b3b3b;
36
+ font-style: italic;
37
+ font-size: 1em;
38
+ /* margin-bottom: 1em; */
39
+ /* margin-top: 1.1em; */
40
+ }
41
+
42
+
43
+ #wrapper {
44
+ /* font-family: "lucida grande", "calibri", sans-serif; */
45
+ font-family: helvetica, arial;
46
+ width: 770px;
47
+ margin: 0 0 0 385px;
48
+ /* etwas enger. todo */
49
+ margin-left: 380px;
50
+ margin-left: 310px;
51
+ padding-top: 60px;
52
+
53
+ }
54
+
55
+ #logo {
56
+ position: fixed;
57
+ /* float:left; */
58
+ margin: 40 0 0 40;
59
+ }
60
+
61
+ #nav {
62
+ position: fixed;
63
+ margin-top: 280px;
64
+ }
65
+
66
+ #nav a {
67
+ font-family: helvetica, arial;
68
+ /* font-family: georgia; */
69
+ font-size: 1.4em;
70
+ text-decoration: none;
71
+ color: #3B3B3B;
72
+ color: #5C5C5C;
73
+ /* color:black; */
74
+ }
75
+
76
+ #nav ul {
77
+ list-style-type: none;
78
+ padding: 0 0 0 50px;
79
+ /* width: 200px; */
80
+ width: 180px;
81
+ }
82
+
83
+ #nav ul li {
84
+ text-align: right;
85
+ margin-bottom: 0.4em;
86
+ margin-bottom: 0.3em;
87
+ padding-bottom: 0.4em;
88
+ /* border-bottom: 2px solid #EDEDED; */
89
+ }
90
+
91
+ #intro {
92
+ font-family: georgia;
93
+ font-size: 1.5em;
94
+ font-style: italic;
95
+ line-height: 1.6em;
96
+ color: #111111;
97
+ margin-bottom: 52px;
98
+ }
99
+
100
+ #flash {
101
+ float: left;
102
+ margin: 5px 10px 0 -20;
103
+ }
104
+
105
+ #sshot-sub {
106
+ font-family: menlo,consolas,inconsolata,"Bitstream Vera Sans Mono",monospace;
107
+ font-style: italic;
108
+ font-size: 1.1em;
109
+ line-height: 1.3em;
110
+ color: #424242;
111
+ margin-bottom: 1.3em;
112
+ width: 400px;
113
+ }
114
+
115
+ #intro-code {
116
+ margin-top: 75px;
117
+ margin-bottom: 0px;
118
+ width: 757px;
119
+
120
+ }
121
+
122
+ #intro-code-sub {
123
+ /* font-family: "lucida grande", "calibri", sans-serif; */
124
+ color: #282828;
125
+ font-size: 1.1em;
126
+ line-height: 1.5em;
127
+ width: 550px;
128
+ margin: 30px 0 0px 40px;
129
+ }
130
+
131
+ pre, .code {
132
+ font-family: menlo,consolas,inconsolata,"Bitstream Vera Sans Mono",monospace;
133
+ }
134
+
135
+ .code {
136
+ font-size: 0.9em;
137
+ background-color: #f4f4f5;
138
+ border: 1px solid #d9d9d9;
139
+ padding: 0em 0.2em;
140
+ }
141
+
142
+ #inf_ruby_setup {
143
+ margin-top: 0.4em;
144
+ background-color: #F2F2F4;
145
+ display: table;
146
+ padding: 0.5em 0.9em;
147
+ width: auto;
148
+ }
149
+ #guide {
150
+ color: #161616;
151
+ width: 680px;
152
+ line-height: 1.4em;
153
+ }
154
+
155
+ #guide h1 {
156
+ padding-top: 2em;
157
+ }
158
+
159
+ .clear {
160
+ clear: both;
161
+ }
162
+
163
+ #gem {
164
+ clear: both;
165
+ margin-top: 2.5em;
166
+ margin-bottom: 1.7em;
167
+ position: relative;
168
+ }
169
+
170
+ #regulargem {
171
+ float:left;
172
+ margin-right: 0.6em;
173
+ display: inline;
174
+ /* height: 100%; */
175
+ }
176
+
177
+ #macgem {
178
+ float:left;
179
+ display: inline;
180
+ text-align: center;
181
+ }
182
+
183
+ #macgem div {
184
+ margin-top: 0.45em;
185
+ /* margin-left: 0.7em; */
186
+ /* font-weight: bold; */
187
+ }
188
+
189
+ .onthemac {
190
+ font-size: 0.8em;
191
+ font-size: 1em;
192
+ color: #656565;
193
+ color: #a3a3a3;
194
+
195
+ /* padding: 0 0.4em; */
196
+ /* font-style: italic; */
197
+ padding: 0 0em;
198
+ /* background-color: #ffefed; */
199
+ /* background-color: #F4F4F4; */
200
+ /* background-color: #F5F5F5; */
201
+ }
202
+
203
+ #gem .code {
204
+ font-size: 1.4em;
205
+ background-color: #f2f2f4;
206
+ padding: 0.2em 0.5em;
207
+ }
208
+
209
+ #installation ul, #installation h3 {
210
+ /* margin: 0; */
211
+ /* padding: 0; */
212
+ }
213
+
214
+ #current_version {
215
+ font-family: helvetica, arial;
216
+ color: #3b3b3b;
217
+ font-weight: bold;
218
+ }
219
+
220
+ #changelog {
221
+ font-size: 0.9em;
222
+ margin-left: 0.4em;
223
+ }
224
+
225
+ #platforms h3 {
226
+ margin-bottom: 0.5em;
227
+ }
228
+ #platforms ul {
229
+ margin-top: 0;
230
+ }
231
+
232
+ #growl {
233
+ margin-top: 2.1em;
234
+ }
235
+
236
+ #growl-explanation {
237
+ margin-left: 2.3em;
238
+ }
239
+
240
+
241
+ #basic {
242
+ width: 770px;
243
+ }
244
+
245
+ #basic pre {
246
+ background-color: #F2F2F4;
247
+ padding: 1.5em 2em 1.9em;
248
+ line-height: 1.3em;
249
+ }
250
+
251
+ #example {
252
+ width: 770px;
253
+ }
254
+
255
+ #example pre {
256
+ background-color: #F2F2F4;
257
+ padding: 1.5em 2em 1.9em;
258
+ line-height: 1.3em;
259
+ }
260
+
261
+
262
+ #growl-explanation > h3 {
263
+ margin-bottom: 0;
264
+ }
265
+
266
+ #top {
267
+ height: 29px;
268
+ background: url(top.png) #f4f3ea;
269
+ }
270
+
271
+ #content {
272
+ color: #272626;
273
+ padding: 35px 90px 15px 90px;
274
+ background: url(bg.png) #f4f3ea;
275
+ line-height: 1.2em;
276
+
277
+ }
278
+
279
+ #bottom {
280
+ height: 14px;
281
+ background: url(bottom.png) no-repeat #f4f3ea;
282
+ }
283
+
284
+ .heading-medium {
285
+ font-size: 1.3em;
286
+ }
287
+
288
+ .heading-large {
289
+ border-bottom:1px dotted;
290
+ padding-bottom: 0.1em;
291
+ margin-bottom: -0.7em;
292
+ display: table;
293
+ font-size: 1.3em;
294
+ }
295
+
296
+ #coding ul li{
297
+ list-style-type: disc;
298
+ }
299
+
300
+ #auto-completion {
301
+ margin-left: 2.3em;
302
+ margin-bottom: 1.8em;
303
+ }
304
+
305
+ #auto-completion h4 {
306
+ font-family: helvetica, arial;
307
+ color: #3b3b3b;
308
+ font-style: italic;
309
+ margin: 1em 0 0.8em;
310
+ }
311
+
312
+ #auto-completion img {
313
+ margin: 0;
314
+ }
315
+
316
+ #auto-completion p {
317
+ margin-bottom: 0em;
318
+ margin-top: 0.7em;
319
+ }
320
+
321
+ .chapter {
322
+ font-family: helvetica, arial;
323
+ line-height: 1.3em;
324
+ }
325
+
326
+ .chapter .highlight {
327
+ background-color: #f8f8f8;
328
+ padding: 1em 1em;
329
+ margin: 0;
330
+ margin-top: -0.4em;
331
+ -moz-border-radius: 9px;
332
+ -webkit-border-radius: 9px;
333
+ }
334
+
335
+ #table_of_contents {
336
+ margin-top: 2em;
337
+ background-color: #f7f7f7;
338
+ padding: 1.5em 0 0.5em 1.7em;
339
+ width: 15em;
340
+ -moz-border-radius: 16px;
341
+ -webkit-border-radius: 16px;
342
+ }
343
+
344
+ #table_of_contents li {
345
+ list-style-type: none;
346
+ margin-top: 0.17em;
347
+ margin-left: -2.2em;
348
+ }
349
+
350
+ #table_of_contents ul {
351
+ margin-top: 0.6em;
352
+ }
353
+
354
+ #table_of_contents h1 {
355
+ font-size:1em;
356
+ margin-bottom: 0;
357
+ color: #585858;
358
+ }
359
+
360
+ #table_of_contents a {
361
+ text-decoration: none;
362
+ color: #525252;
363
+ font-size: 0.95em;
364
+ }
365
+
366
+ .chapter h1 {
367
+ color: #232323;
368
+ color: #3b3b3b;
369
+ margin-bottom: 1.2em;
370
+ margin-top: 0.7em;
371
+ padding-top: 0.93em;
372
+ }
373
+
374
+ .chapter h2 {
375
+ font-style: normal;
376
+ font-size: 1.5em;
377
+ text-decoration: underline;
378
+ margin: 1.2em 0;
379
+ font-style: normal;
380
+ }
381
+
382
+ .chapter h3 {
383
+ font-style: normal;
384
+ font-size: 1.3em;
385
+ margin: 1.2em 0;
386
+ }
387
+
388
+ .chapter p {
389
+ -# margin: 0.4em 0;
390
+ }
391
+
392
+
393
+ .prefix {
394
+ float:left;
395
+ margin-left: -4em;
396
+ color: #c0c0c0;
397
+ /* color: #bdbdbd; */
398
+ text-align: right;
399
+ width: 4em;
400
+ }
401
+
402
+ .comment {
403
+ font-style: italic;
404
+ /* background-color: #f5f5e4; */
405
+ /* color: #ff5656; */
406
+ /* color: #ea3d00; */
407
+ /* color: #78702b; */
408
+ /* color: #737373; */
409
+ color: #545454
410
+ }
411
+
412
+ #development {
413
+ margin-top: 4.5em;
414
+ line-height: 1.3em;
415
+ }
416
+
417
+ #footer {
418
+ margin-bottom: 10em;
419
+ }
420
+
Binary file
@@ -0,0 +1,17 @@
1
+ #import <Cocoa/Cocoa.h>
2
+
3
+ @interface Event : NSObject {
4
+ CGEventRef eventRef;
5
+ CGEventTapProxy tapProxy;
6
+ CGEventType type;
7
+ BOOL down;
8
+ }
9
+
10
+ @property CGEventRef eventRef;
11
+ @property CGEventTapProxy tapProxy;
12
+ @property CGEventType type;
13
+ @property BOOL down;
14
+
15
+ -(id)initWithEventRef:(CGEventRef)eventRef tapProxy:(CGEventTapProxy)tapProxy type:(CGEventType)type down:(BOOL)down;
16
+
17
+ @end