movewin 1.0 → 1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/ext/movewin/winutils.c +5 -1
- data/lib/movewin.rb +17 -1
- metadata +29 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
|
4
|
-
|
5
|
-
SHA512:
|
6
|
-
|
7
|
-
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
data.tar.gz: ec2cca34dab2420bdb554f23048fb78fdaf79896
|
4
|
+
metadata.gz: 18f6fcbe38d203cc912c2aa9bd88aa20f320a4d7
|
5
|
+
SHA512:
|
6
|
+
data.tar.gz: 6cddcf1dccd2db60492e6da76cf1295f42312cbe2a86c3d3af4aed313e6acb6cad4b17a97980c856a6361e07fb66e751f16884c0e5d6c5337bfced9dbe5c21e3
|
7
|
+
metadata.gz: 677a6c4e31858049864754f19ca139413b458ac13d785224f557cb25f718ad88a95b5e8a7b07663b1af6be4d4b88f8add1e13f79a46bb9cacef8e3f013cc9729
|
data/ext/movewin/winutils.c
CHANGED
@@ -194,7 +194,11 @@ AXUIElementRef AXWindowFromCGWindow(CFDictionaryRef window, int minIdx) {
|
|
194
194
|
AXUIElementCopyAttributeValue(
|
195
195
|
appWindow, kAXTitleAttribute, (CFTypeRef *)&actualWindowTitle
|
196
196
|
);
|
197
|
-
if(
|
197
|
+
if( !actualWindowTitle ||
|
198
|
+
CFStringCompare(targetWindowName, actualWindowTitle, 0) != 0)
|
199
|
+
{
|
200
|
+
continue;
|
201
|
+
}
|
198
202
|
|
199
203
|
/* Position and size must match */
|
200
204
|
actualPosition = AXWindowGetPosition(appWindow);
|
data/lib/movewin.rb
CHANGED
@@ -36,8 +36,24 @@
|
|
36
36
|
require 'movewin/movewin_ext'
|
37
37
|
|
38
38
|
module MoveWin
|
39
|
-
VERSION = '1.
|
39
|
+
VERSION = '1.1'
|
40
|
+
|
41
|
+
# Individual accessors for display size components
|
42
|
+
def self.display_width; MoveWin.display_size[0]; end
|
43
|
+
def self.display_height; MoveWin.display_size[1]; end
|
44
|
+
|
40
45
|
class Window
|
46
|
+
# Individual accessors and mutators for window position and size components
|
47
|
+
def x; self.position[0]; end
|
48
|
+
def y; self.position[1]; end
|
49
|
+
def width; self.size[0]; end
|
50
|
+
def height; self.size[1]; end
|
51
|
+
def x=(x); self.move!(x, self.position[1]); end
|
52
|
+
def y=(y); self.move!(self.position[0], y); end
|
53
|
+
def width=(width); self.resize!(width, self.size[1]); end
|
54
|
+
def height=(height); self.resize!(self[0], height); end
|
55
|
+
|
56
|
+
# Combined accessor and mutator for all window bounds together
|
41
57
|
def bounds
|
42
58
|
self.position + self.size
|
43
59
|
end
|
metadata
CHANGED
@@ -1,49 +1,56 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: movewin
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: "1.1"
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Andrew Ho
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
11
|
+
|
12
|
+
date: 2014-09-06 00:00:00 Z
|
12
13
|
dependencies: []
|
14
|
+
|
13
15
|
description: List and move OS X windows from Ruby via the OS X accessibility APIs.
|
14
16
|
email: andrew@zeuscat.com
|
15
17
|
executables: []
|
16
|
-
|
18
|
+
|
19
|
+
extensions:
|
17
20
|
- ext/movewin/extconf.rb
|
18
21
|
extra_rdoc_files: []
|
19
|
-
|
20
|
-
|
22
|
+
|
23
|
+
files:
|
24
|
+
- lib/movewin.rb
|
21
25
|
- ext/movewin/movewin_ext.c
|
22
26
|
- ext/movewin/winutils.c
|
23
27
|
- ext/movewin/winutils.h
|
24
|
-
-
|
28
|
+
- ext/movewin/extconf.rb
|
25
29
|
homepage: https://github.com/andrewgho/movewin-ruby
|
26
|
-
licenses:
|
30
|
+
licenses:
|
27
31
|
- BSD-3-Clause
|
28
32
|
metadata: {}
|
33
|
+
|
29
34
|
post_install_message:
|
30
35
|
rdoc_options: []
|
31
|
-
|
36
|
+
|
37
|
+
require_paths:
|
32
38
|
- lib
|
33
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
34
|
-
requirements:
|
35
|
-
-
|
36
|
-
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
version: '0'
|
39
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- &id001
|
42
|
+
- ">="
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
version: "0"
|
45
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- *id001
|
43
48
|
requirements: []
|
49
|
+
|
44
50
|
rubyforge_project:
|
45
|
-
rubygems_version: 2.
|
51
|
+
rubygems_version: 2.0.5
|
46
52
|
signing_key:
|
47
53
|
specification_version: 4
|
48
54
|
summary: List and move OS X windows from Ruby
|
49
55
|
test_files: []
|
56
|
+
|