win32-clipboard 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGES +4 -0
- data/lib/win32/clipboard.rb +2 -2
- data/lib/win32/windows/functions.rb +9 -2
- data/test/test_clipboard.rb +1 -1
- data/win32-clipboard.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9de821de27a89d47b900c8107d9414bf1b55f12e
|
4
|
+
data.tar.gz: 5b8a1bff4c1dc00adfed808e4ebe95d796972f40
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3bee364da37395f10308a3ae1e46091dd07a4f67009df7a4ea44e13fc67ccdb3063fe2507866e09a37e54cec0ba712f6cc81dc39c96c1345e8f5ded358bc4701
|
7
|
+
data.tar.gz: f863bf39bdd43f8efa720affae4c2a80e30eb268badf6f288938c1c28bf842f4bbe19722c66bb88271c98d01eb9c55615f4adb769b03d6b1b9dec71cbf93a52c
|
data/CHANGES
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
== 0.6.1 - 20-Jan-2014
|
2
|
+
* Use 32-bit versions of GetWindowLong and SetWindowLong functions on 32-bit
|
3
|
+
versions of Ruby. Thanks go to Orgad Shaneh for the spot.
|
4
|
+
|
1
5
|
== 0.6.0 - 12-Jan-2014
|
2
6
|
* Converted code to use FFI.
|
3
7
|
* Now requires Ruby 1.9.1 or later and Windows Vista or later.
|
data/lib/win32/clipboard.rb
CHANGED
@@ -16,7 +16,7 @@ module Win32
|
|
16
16
|
extend Windows::Structs
|
17
17
|
|
18
18
|
# The version of this library
|
19
|
-
VERSION = '0.6.
|
19
|
+
VERSION = '0.6.1'
|
20
20
|
|
21
21
|
# Clipboard formats
|
22
22
|
|
@@ -154,7 +154,7 @@ module Win32
|
|
154
154
|
case format
|
155
155
|
when UNICODETEXT
|
156
156
|
clip_data.encode!('UTF-16LE')
|
157
|
-
|
157
|
+
clip_data << "\0".encode('UTF-16LE')
|
158
158
|
buf = clip_data
|
159
159
|
extra = 4
|
160
160
|
when TEXT, OEMTEXT
|
@@ -33,7 +33,6 @@ module Windows
|
|
33
33
|
attach_function :EnumClipboardFormats, [:uint], :uint
|
34
34
|
attach_function :GetClipboardData, [:uint], :handle
|
35
35
|
attach_function :GetClipboardFormatName, :GetClipboardFormatNameA, [:uint, :pointer, :int], :int
|
36
|
-
attach_function :GetWindowLongPtr, :GetWindowLongPtrA, [:hwnd, :int], :long
|
37
36
|
attach_function :IsClipboardFormatAvailable, [:uint], :bool
|
38
37
|
attach_function :OpenClipboard, [:hwnd], :bool
|
39
38
|
attach_function :PeekMessage, :PeekMessageA, [:pointer, :hwnd, :uint, :uint, :uint], :bool
|
@@ -41,9 +40,17 @@ module Windows
|
|
41
40
|
attach_function :RegisterClipboardFormat, :RegisterClipboardFormatA, [:string], :uint
|
42
41
|
attach_function :SetClipboardData, [:uint, :handle], :handle
|
43
42
|
attach_function :SetClipboardViewer, [:hwnd], :hwnd
|
44
|
-
attach_function :SetWindowLongPtr, :SetWindowLongPtrA, [:hwnd, :int, :uintptr_t], :long
|
45
43
|
attach_function :TranslateMessage, [:pointer], :bool
|
46
44
|
|
45
|
+
# Use Long on 32-bit Ruby, LongPtr on 64-bit Ruby
|
46
|
+
begin
|
47
|
+
attach_function :GetWindowLongPtr, :GetWindowLongPtrA, [:hwnd, :int], :long
|
48
|
+
attach_function :SetWindowLongPtr, :SetWindowLongPtrA, [:hwnd, :int, :uintptr_t], :long
|
49
|
+
rescue FFI::NotFoundError
|
50
|
+
attach_function :GetWindowLongPtr, :GetWindowLongA, [:hwnd, :int], :long
|
51
|
+
attach_function :SetWindowLongPtr, :SetWindowLongA, [:hwnd, :int, :uintptr_t], :long
|
52
|
+
end
|
53
|
+
|
47
54
|
ffi_lib :shell32
|
48
55
|
|
49
56
|
attach_function :DragQueryFileA, [:hdrop, :uint, :pointer, :uint], :uint
|
data/test/test_clipboard.rb
CHANGED
data/win32-clipboard.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: win32-clipboard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel J. Berger
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-01-
|
12
|
+
date: 2014-01-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: ffi
|