win32-clipboard 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bae3c43870e2b279fd8fecf2402d492635e84937
4
- data.tar.gz: 890236829d55f6cbf2c60ced0422f5cbd8214b0d
3
+ metadata.gz: 9de821de27a89d47b900c8107d9414bf1b55f12e
4
+ data.tar.gz: 5b8a1bff4c1dc00adfed808e4ebe95d796972f40
5
5
  SHA512:
6
- metadata.gz: 57ab34d912770a26f94b5f368a6a0efd4f7023d939bf42bf9f39d9e6a521afdabc4c4cec340fe01b13ac7f61e78d1f3006a0a1ccd07548c35d2f7c49f96ac9f6
7
- data.tar.gz: 7bd917b7b196049f28173bb8aef3b8075eee2ab7a0c4221db791f6adc3306cf85e37ad93a14fa654f4ce728d5fc0b07064f1e721a19bea0e34b7e2d59fdf00d2
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.
@@ -16,7 +16,7 @@ module Win32
16
16
  extend Windows::Structs
17
17
 
18
18
  # The version of this library
19
- VERSION = '0.6.0'
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
- clip_data << "\0".encode('UTF-16LE')
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
@@ -14,7 +14,7 @@ include Win32
14
14
 
15
15
  class TC_Win32_ClipBoard < Test::Unit::TestCase
16
16
  test "version is set to expected value" do
17
- assert_equal('0.6.0', Clipboard::VERSION)
17
+ assert_equal('0.6.1', Clipboard::VERSION)
18
18
  end
19
19
 
20
20
  test "data method basic functionality" do
@@ -2,7 +2,7 @@ require "rubygems"
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = 'win32-clipboard'
5
- spec.version = '0.6.0'
5
+ spec.version = '0.6.1'
6
6
  spec.authors = ['Daniel J. Berger', 'Park Heesob']
7
7
  spec.license = 'Artistic 2.0'
8
8
  spec.email = 'djberg96@gmail.com'
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.0
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 00:00:00.000000000 Z
12
+ date: 2014-01-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: ffi