x_do 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -6,6 +6,10 @@ FFI ruby bindings for libxdo, which injects keystrokes and mouse events into X e
6
6
 
7
7
  The gem requires libxdo on your machine to compile. On an Ubuntu system, you can get it by installing the libxdo-dev package.
8
8
 
9
+ == Documentation
10
+
11
+ Up-to-date RDocs are available at http://rdoc.info/github/pwnall/x_do/frames
12
+
9
13
  == Testing
10
14
 
11
15
  Tests require that xdotool is installed and on your path. On an Ubuntu system, you can get it by installing the xdotool package.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.1.1
data/lib/x_do/keyboard.rb CHANGED
@@ -19,32 +19,32 @@ class Keyboard
19
19
  attr_accessor :xdo
20
20
 
21
21
  # Types a string into the current window.
22
- def type_string(string, delay = 0.12)
23
- XDo::FFILib.xdo_type @_xdo_pointer, 0, string, (delay * 100_000).to_i
22
+ def type_string(string, delay = 0.012)
23
+ XDo::FFILib.xdo_type @_xdo_pointer, 0, string, (delay * 1_000_000).to_i
24
24
  end
25
25
 
26
26
  # Sends a keysequence to this window.
27
27
  #
28
28
  # Examples: "alt+Return", "Alt_L+Tab", "l", "semicolon"
29
- def type_keysequence(keysequence, delay = 0.12)
29
+ def type_keysequence(keysequence, delay = 0.012)
30
30
  XDo::FFILib.xdo_keysequence @_xdo_pointer, 0, keysequence,
31
- (delay * 100_000).to_i
31
+ (delay * 1_000_000).to_i
32
32
  end
33
33
 
34
34
  # Presses a keysequence in this window.
35
35
  #
36
36
  # Examples: "alt+Return", "Alt_L+Tab", "l", "semicolon"
37
- def press_keysequence(keysequence, delay = 0.12)
37
+ def press_keysequence(keysequence, delay = 0.012)
38
38
  XDo::FFILib.xdo_keysequence_down @_xdo_pointer, 0, keysequence,
39
- (delay * 100_000).to_i
39
+ (delay * 1_000_000).to_i
40
40
  end
41
41
 
42
42
  # Releases a keysequence in this window.
43
43
  #
44
44
  # Examples: "alt+Return", "Alt_L+Tab", "l", "semicolon"
45
- def release_keysequence(keysequence, delay = 0.12)
45
+ def release_keysequence(keysequence, delay = 0.012)
46
46
  XDo::FFILib.xdo_keysequence_up @_xdo_pointer, 0, keysequence,
47
- (delay * 100_000).to_i
47
+ (delay * 1_000_000).to_i
48
48
  end
49
49
  end # class XDo::Keyboard
50
50
 
data/lib/x_do/window.rb CHANGED
@@ -120,32 +120,33 @@ class Window
120
120
  end
121
121
 
122
122
  # Types a string into this window.
123
- def type_string(string, delay = 0.12)
124
- XDo::FFILib.xdo_type @_xdo_pointer, @_window, string, (delay * 100_000).to_i
123
+ def type_string(string, delay = 0.012)
124
+ XDo::FFILib.xdo_type @_xdo_pointer, @_window, string,
125
+ (delay * 1_000_000).to_i
125
126
  end
126
127
 
127
128
  # Sends a keysequence to this window.
128
129
  #
129
130
  # Examples: "alt+Return", "Alt_L+Tab", "l", "semicolon"
130
- def type_keysequence(keysequence, delay = 0.12)
131
+ def type_keysequence(keysequence, delay = 0.012)
131
132
  XDo::FFILib.xdo_keysequence @_xdo_pointer, @_window, keysequence,
132
- (delay * 100_000).to_i
133
+ (delay * 1_000_000).to_i
133
134
  end
134
135
 
135
136
  # Presses a keysequence in this window.
136
137
  #
137
138
  # Examples: "alt+Return", "Alt_L+Tab", "l", "semicolon"
138
- def press_keysequence(keysequence, delay = 0.12)
139
+ def press_keysequence(keysequence, delay = 0.012)
139
140
  XDo::FFILib.xdo_keysequence_down @_xdo_pointer, @_window, keysequence,
140
- (delay * 100_000).to_i
141
+ (delay * 1_000_000).to_i
141
142
  end
142
143
 
143
144
  # Releases a keysequence in this window.
144
145
  #
145
146
  # Examples: "alt+Return", "Alt_L+Tab", "l", "semicolon"
146
- def release_keysequence(keysequence, delay = 0.12)
147
+ def release_keysequence(keysequence, delay = 0.012)
147
148
  XDo::FFILib.xdo_keysequence_up @_xdo_pointer, @_window, keysequence,
148
- (delay * 100_000).to_i
149
+ (delay * 1_000_000).to_i
149
150
  end
150
151
 
151
152
  # Creates a wrapper for an X Window handle.
data/x_do.gemspec ADDED
@@ -0,0 +1,102 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = %q{x_do}
8
+ s.version = "0.1.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Victor Costan"]
12
+ s.date = %q{2011-04-22}
13
+ s.description = %q{Wraps libxdo using ffi, for high performance}
14
+ s.email = %q{victor@costan.us}
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".project",
22
+ ".rspec",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE.txt",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "lib/x_do.rb",
30
+ "lib/x_do/context.rb",
31
+ "lib/x_do/ffi_autogen.rb",
32
+ "lib/x_do/ffi_functions.rb",
33
+ "lib/x_do/ffi_lib.rb",
34
+ "lib/x_do/ffi_lib_ext.rb",
35
+ "lib/x_do/keyboard.rb",
36
+ "lib/x_do/mouse.rb",
37
+ "lib/x_do/window.rb",
38
+ "spec/spec_helper.rb",
39
+ "spec/support/stdlib.rb",
40
+ "spec/x_do/context_spec.rb",
41
+ "spec/x_do/ffi_lib_ext_spec.rb",
42
+ "spec/x_do/keyboard_spec.rb",
43
+ "spec/x_do/mouse_spec.rb",
44
+ "spec/x_do/window_spec.rb",
45
+ "tasks/ffi_codegen.rb",
46
+ "x_do.gemspec"
47
+ ]
48
+ s.homepage = %q{http://github.com/pwnall/x_do}
49
+ s.licenses = ["MIT"]
50
+ s.require_paths = ["lib"]
51
+ s.rubygems_version = %q{1.7.2}
52
+ s.summary = %q{Ruby FFI for libxdo (X mouse / keypress injector)}
53
+ s.test_files = [
54
+ "spec/spec_helper.rb",
55
+ "spec/support/stdlib.rb",
56
+ "spec/x_do/context_spec.rb",
57
+ "spec/x_do/ffi_lib_ext_spec.rb",
58
+ "spec/x_do/keyboard_spec.rb",
59
+ "spec/x_do/mouse_spec.rb",
60
+ "spec/x_do/window_spec.rb"
61
+ ]
62
+
63
+ if s.respond_to? :specification_version then
64
+ s.specification_version = 3
65
+
66
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
67
+ s.add_runtime_dependency(%q<ffi>, [">= 1.0.0"])
68
+ s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
69
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
70
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
71
+ s.add_development_dependency(%q<rcov>, [">= 0"])
72
+ s.add_runtime_dependency(%q<ffi>, [">= 1.0.0"])
73
+ s.add_development_dependency(%q<rspec>, ["~> 2.5.0"])
74
+ s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
75
+ s.add_development_dependency(%q<jeweler>, ["~> 1.5.2"])
76
+ s.add_development_dependency(%q<rcov>, [">= 0"])
77
+ else
78
+ s.add_dependency(%q<ffi>, [">= 1.0.0"])
79
+ s.add_dependency(%q<rspec>, ["~> 2.5.0"])
80
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
81
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
82
+ s.add_dependency(%q<rcov>, [">= 0"])
83
+ s.add_dependency(%q<ffi>, [">= 1.0.0"])
84
+ s.add_dependency(%q<rspec>, ["~> 2.5.0"])
85
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
86
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
87
+ s.add_dependency(%q<rcov>, [">= 0"])
88
+ end
89
+ else
90
+ s.add_dependency(%q<ffi>, [">= 1.0.0"])
91
+ s.add_dependency(%q<rspec>, ["~> 2.5.0"])
92
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
93
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
94
+ s.add_dependency(%q<rcov>, [">= 0"])
95
+ s.add_dependency(%q<ffi>, [">= 1.0.0"])
96
+ s.add_dependency(%q<rspec>, ["~> 2.5.0"])
97
+ s.add_dependency(%q<bundler>, ["~> 1.0.0"])
98
+ s.add_dependency(%q<jeweler>, ["~> 1.5.2"])
99
+ s.add_dependency(%q<rcov>, [">= 0"])
100
+ end
101
+ end
102
+
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: x_do
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Victor Costan
@@ -209,6 +209,7 @@ files:
209
209
  - spec/x_do/mouse_spec.rb
210
210
  - spec/x_do/window_spec.rb
211
211
  - tasks/ffi_codegen.rb
212
+ - x_do.gemspec
212
213
  homepage: http://github.com/pwnall/x_do
213
214
  licenses:
214
215
  - MIT