win32-clipboard 0.6.3 → 0.6.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGES +112 -105
- data/MANIFEST +31 -12
- data/README +106 -112
- data/Rakefile +4 -7
- data/certs/djberg96_pub.pem +21 -0
- data/examples/clipboard_test.rb +28 -28
- data/lib/win32-clipboard.rb +1 -0
- data/lib/win32/clipboard.rb +447 -447
- data/lib/win32/html_clipboard.rb +232 -232
- data/lib/win32/windows/constants.rb +14 -14
- data/lib/win32/windows/functions.rb +66 -66
- data/lib/win32/windows/structs.rb +43 -43
- data/test/lock.rb +18 -18
- data/test/notify.rb +27 -27
- data/test/test_clipboard.rb +176 -176
- data/test/test_clipboard_chain.rb +137 -137
- data/test/test_html_clipboard.rb +50 -50
- data/test/test_image_clipboard.rb +51 -51
- data/win32-clipboard.gemspec +26 -26
- metadata +37 -13
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a9297e2b39196c3dfbee1eb70383f04a4f222c90
|
4
|
+
data.tar.gz: 21ce7f67f1142fd5e5db454e0d8b027a7839eba3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 852420749d165e0aea60897a45d5c397d87f3126a861b3a61a1efb70f34a377704dda2a31abc3e6f6c7361344dff578b79fd26ceba7b5a85cc454bfa4d7de74f
|
7
|
+
data.tar.gz: e707587015884565611e42f682873d75257e76ace821538794a0f14a0f5492bc83a84923302067cef8581cfbec17fd3930d95d7ace051a9c7b438b687e7a269e
|
checksums.yaml.gz.sig
ADDED
Binary file
|
data.tar.gz.sig
ADDED
Binary file
|
data/CHANGES
CHANGED
@@ -1,105 +1,112 @@
|
|
1
|
-
== 0.6.
|
2
|
-
*
|
3
|
-
|
4
|
-
*
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
*
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
*
|
39
|
-
|
40
|
-
*
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
*
|
48
|
-
|
49
|
-
*
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
== 0.4.
|
54
|
-
*
|
55
|
-
|
56
|
-
*
|
57
|
-
*
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
*
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
*
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
*
|
79
|
-
|
80
|
-
|
81
|
-
*
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
*
|
86
|
-
|
87
|
-
|
88
|
-
*
|
89
|
-
*
|
90
|
-
*
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
*
|
96
|
-
*
|
97
|
-
*
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
*
|
103
|
-
|
104
|
-
|
105
|
-
*
|
1
|
+
== 0.6.4 -19-Oct-2015
|
2
|
+
* This gem is now signed, and the gem:create task now signs the gem.
|
3
|
+
* Gem related tasks in the Rakefile now assume Rubygems 2.x.
|
4
|
+
* Updated the gemspec to include cert info and remove rubyforge_project info.
|
5
|
+
* Added a win32-clipboard.rb file for convenience.
|
6
|
+
* Use require_relative where appropriate.
|
7
|
+
|
8
|
+
== 0.6.3 - 7-Feb-2014
|
9
|
+
* Fixed a potential duplication notification issue in the notify_change method.
|
10
|
+
Thanks go to u338steven for the spot and patch.
|
11
|
+
* Fixed a clipboard chaining issue in the notify_change method when there are
|
12
|
+
multiple clipboard instances. Thanks again go to u338steven.
|
13
|
+
|
14
|
+
== 0.6.2 - 27-Jan-2014
|
15
|
+
* Fix and more tests for the internal get_image_data. Thanks go to u338steven
|
16
|
+
for the spot and patches.
|
17
|
+
|
18
|
+
== 0.6.1 - 20-Jan-2014
|
19
|
+
* Use 32-bit versions of GetWindowLong and SetWindowLong functions on 32-bit
|
20
|
+
versions of Ruby. Thanks go to Orgad Shaneh for the spot.
|
21
|
+
|
22
|
+
== 0.6.0 - 12-Jan-2014
|
23
|
+
* Converted code to use FFI.
|
24
|
+
* Now requires Ruby 1.9.1 or later and Windows Vista or later.
|
25
|
+
* The HtmlClipboard class has been added. This lets you get and set data
|
26
|
+
in html format.
|
27
|
+
* Added the get_html_data and set_html_data methods to the Clipboard class.
|
28
|
+
These are wrappers for the HtmlClipboard methods.
|
29
|
+
* You can now set bitmap data properly as well as retrieve it. Thanks go to
|
30
|
+
Tadashi Kba for the patch.
|
31
|
+
|
32
|
+
== 0.5.2 - 14-Jul-2009
|
33
|
+
* Replaced some missing include's that I thought were unnecessary. Thanks go
|
34
|
+
to Liu Song for the spot.
|
35
|
+
* Changed the license to Artistic 2.0, and set that explicitly in the gemspec.
|
36
|
+
|
37
|
+
== 0.5.1 - 26-Apr-2009
|
38
|
+
* Modified the Clipboard.register_format method to return the integer value
|
39
|
+
of the registered format.
|
40
|
+
* Removed some unnecessary include's.
|
41
|
+
|
42
|
+
== 0.5.0 - 24-Apr-2009
|
43
|
+
* Added the Clipboard.notify_change method, which notifies you if any changes
|
44
|
+
have been made to the clipboard.
|
45
|
+
* Added support for copying file lists, bitmaps and Windows metafiles.
|
46
|
+
* Added the Clipboard.clear alias for Clipboard.empty
|
47
|
+
* The previous documentation for the Clipboard.format_available? method was
|
48
|
+
misleading. It has been corrected.
|
49
|
+
* Added rdoc for modules, classes and constants, and added some inline
|
50
|
+
code examples for some methods.
|
51
|
+
* Gemspec update for handling a deprecated method.
|
52
|
+
|
53
|
+
== 0.4.4 - 26-Aug-2008
|
54
|
+
* Some internal refactoring to ensure that the clipboard is closed on failure
|
55
|
+
in a more robust fashion.
|
56
|
+
* Renamed the test file.
|
57
|
+
* Eliminated the custom memcpy function, since windows-pr now does the right
|
58
|
+
thing. This necessitated bumping the minimum required windows-pr version.
|
59
|
+
|
60
|
+
== 0.4.3 - 25-Jul-2007
|
61
|
+
* Changed ClipboardError to Clipboard::Error
|
62
|
+
* Added a Rakefile with tasks for testing and installation.
|
63
|
+
* Removed the install.rb file since installation is now handled by the Rakefile.
|
64
|
+
* Updates to the README and MANIFEST.
|
65
|
+
|
66
|
+
== 0.4.2 - 27-Jan-2007
|
67
|
+
* Fixes for the clipboard_test.rb example program setup code. Thanks go to
|
68
|
+
Harold Hausman for the spot.
|
69
|
+
|
70
|
+
== 0.4.1 - 30-Jul-2006
|
71
|
+
* Now uses the windows-pr package. No API changes.
|
72
|
+
* Made Clipboard.get_data a true alias (instead of a facade).
|
73
|
+
|
74
|
+
== 0.4.0 - 24-Feb-2006
|
75
|
+
* Removed the C version entirely and replaced it with a pure Ruby version
|
76
|
+
that uses the Win32API package.
|
77
|
+
* Added a gemspec.
|
78
|
+
* Added a install.rb file.
|
79
|
+
|
80
|
+
== 0.3.1 - 2-Feb-2006
|
81
|
+
* Unicode fix to handle characters with null bytes. Thanks go to Brian
|
82
|
+
Marick for the spot.
|
83
|
+
|
84
|
+
== 0.3.0 - 26-May-2005
|
85
|
+
* Changed the Clipboard.data= method to Clipboard.set_data because it does,
|
86
|
+
in fact, take up to two arguments. This API change is the main reason for
|
87
|
+
the VERSION bump.
|
88
|
+
* Added Clipboard.get_data method as an alias for Clipboard.data.
|
89
|
+
* Removed the clipboard.rd file. The Clipboard.txt file is now rdoc friendly.
|
90
|
+
* Now Unicode friendly.
|
91
|
+
* Added more tests, including Unicode test.
|
92
|
+
* General code cleanup.
|
93
|
+
|
94
|
+
== 0.2.1 - 28-Feb-2005
|
95
|
+
* Moved the 'examples' directory to the toplevel directory.
|
96
|
+
* Renamed the sample script to 'clipboard_test.rb'.
|
97
|
+
* Made this document and README rdoc friendly.
|
98
|
+
|
99
|
+
== 0.2.0 - 12-Jul-2004
|
100
|
+
* Made Clipboard a class instead of a module.
|
101
|
+
* Moved the ClipboardError class under the Win32 module.
|
102
|
+
* Added the formats() class method.
|
103
|
+
* Added the register_format class method.
|
104
|
+
* Added the format_available? class method.
|
105
|
+
* Added the format_name class method.
|
106
|
+
* Replaced all instances (1) of the deprecated STR2CSTR() function with the
|
107
|
+
StringValuePtr() function. This means that as of version 0.2.0 this package
|
108
|
+
requires Ruby 1.8.0 or later.
|
109
|
+
* Moved the sample script to doc/examples.
|
110
|
+
|
111
|
+
== 0.1.0 - 19-Nov-2003
|
112
|
+
* Initial release
|
data/MANIFEST
CHANGED
@@ -1,12 +1,31 @@
|
|
1
|
-
* MANIFEST
|
2
|
-
* CHANGES
|
3
|
-
* README
|
4
|
-
* Rakefile
|
5
|
-
* win32-clipboard.gemspec
|
6
|
-
* examples/clipboard_test.rb
|
7
|
-
*
|
8
|
-
* lib/win32
|
9
|
-
* lib/win32/
|
10
|
-
* lib/win32/
|
11
|
-
* lib/win32/windows/
|
12
|
-
*
|
1
|
+
* MANIFEST
|
2
|
+
* CHANGES
|
3
|
+
* README
|
4
|
+
* Rakefile
|
5
|
+
* win32-clipboard.gemspec
|
6
|
+
* examples/clipboard_test.rb
|
7
|
+
* certs/djberg96_pub.pem
|
8
|
+
* lib/win32-clipboard.rb
|
9
|
+
* lib/win32/clipboard.rb
|
10
|
+
* lib/win32/html_clipboard.rb
|
11
|
+
* lib/win32/windows/constants.rb
|
12
|
+
* lib/win32/windows/functions.rb
|
13
|
+
* lib/win32/windows/structs.rb
|
14
|
+
* test/lock.rb
|
15
|
+
* test/notify.rb
|
16
|
+
* test/test_clipboard.rb
|
17
|
+
* test/test_clipboard_chain.rb
|
18
|
+
* test/test_html_clipboard.rb
|
19
|
+
* test/test_image_clipboard.rb
|
20
|
+
* test/img/16bit.bmp
|
21
|
+
* test/img/16bit_bitfields.bmp
|
22
|
+
* test/img/16bit_bitfields1.bmp
|
23
|
+
* test/img/16bit_bitfields2.bmp
|
24
|
+
* test/img/1bit.bmp
|
25
|
+
* test/img/24bit.bmp
|
26
|
+
* test/img/32bit.bmp
|
27
|
+
* test/img/32bit_bitfields.bmp
|
28
|
+
* test/img/32bit_bitfields1.bmp
|
29
|
+
* test/img/32bit_bitfields2.bmp
|
30
|
+
* test/img/4bit.bmp
|
31
|
+
* test/img/8bit.bmp
|
data/README
CHANGED
@@ -1,112 +1,106 @@
|
|
1
|
-
== Description
|
2
|
-
win32-clipboard - a Ruby library for interacting with the
|
3
|
-
|
4
|
-
== Installation
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
puts "
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
Clipboard.
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
format
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
==
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
(C) 2003-2014 Daniel J. Berger
|
108
|
-
All Rights Reserved
|
109
|
-
|
110
|
-
== Authors
|
111
|
-
Daniel J. Berger
|
112
|
-
Park Heesob
|
1
|
+
== Description
|
2
|
+
win32-clipboard - a Ruby library for interacting with the MS Windows clipboard.
|
3
|
+
|
4
|
+
== Installation
|
5
|
+
gem install win32-clipboard
|
6
|
+
|
7
|
+
== Synopsis
|
8
|
+
require 'win32/clipboard'
|
9
|
+
include Win32
|
10
|
+
|
11
|
+
puts "Data on clipboard: " + Clipboard.data
|
12
|
+
puts "Number of available formats: " + Clipboard.num_formats.to_s
|
13
|
+
|
14
|
+
puts "Setting data to 'foobar'"
|
15
|
+
Clipboard.set_data("foobar")
|
16
|
+
|
17
|
+
puts "Clipboard now contains: " + Clipboard.data
|
18
|
+
|
19
|
+
puts "Clearing clipboard"
|
20
|
+
Clipboard.empty
|
21
|
+
|
22
|
+
== Class Methods
|
23
|
+
Clipboard.data(format=nil)
|
24
|
+
Returns the data currently in the clipboard. If +format+ is
|
25
|
+
specified, it will attempt to retrieve the data in that format. The
|
26
|
+
default is Clipboard::TEXT. See the 'Constants' section for
|
27
|
+
the supported formats.
|
28
|
+
|
29
|
+
If there is no data in the clipboard, then an empty string is returned.
|
30
|
+
|
31
|
+
Note that this method does implicit conversions on formats with regards
|
32
|
+
to text data. See the MSDN documentation for more details.
|
33
|
+
|
34
|
+
Clipboard.empty
|
35
|
+
Empty the contents of the clipboard
|
36
|
+
|
37
|
+
Clipboard.format_available?(format_number)
|
38
|
+
Returns true if 'format_number' is currently available on the clipboard,
|
39
|
+
false otherwise.
|
40
|
+
|
41
|
+
Clipboard.format_name(format_number)
|
42
|
+
Returns the corresponding name for the given 'format_number', or nil
|
43
|
+
if it does not exist.
|
44
|
+
|
45
|
+
Clipboard.formats
|
46
|
+
Returns a hash of all the current formats, with the format number as the
|
47
|
+
key and the format name as the value for that key.
|
48
|
+
|
49
|
+
Clipboard.get_data(format=nil)
|
50
|
+
Alias for Clipboard.data.
|
51
|
+
|
52
|
+
Clipboard.num_formats
|
53
|
+
Returns the number of different data formats currently on the clipboard.
|
54
|
+
|
55
|
+
Clipboard.register_format(format)
|
56
|
+
Registers the given 'format' (a String) as a clipboard format, which
|
57
|
+
can then be used as a valid clipboard format.
|
58
|
+
|
59
|
+
If a registered format with the specified name already exists, a new
|
60
|
+
format is not registered and the return value identifies the existing
|
61
|
+
format. This enables more than one application to copy and paste data
|
62
|
+
using the same registered clipboard format. Note that the format name
|
63
|
+
comparison is case-insensitive.
|
64
|
+
|
65
|
+
Registered clipboard formats are identified by values in the range 0xC000
|
66
|
+
through 0xFFFF.
|
67
|
+
|
68
|
+
Clipboard.set_data(data, format=nil)
|
69
|
+
Sets the clipboard contents to the data that you specify. You may
|
70
|
+
optionally specify a clipboard format. The default is Clipboard::TEXT.
|
71
|
+
|
72
|
+
See the 'Constants' section for a list of the supported formats.
|
73
|
+
|
74
|
+
== Constants
|
75
|
+
=== Standard Constants
|
76
|
+
VERSION
|
77
|
+
Returns the current version number of this package, as a String.
|
78
|
+
|
79
|
+
=== Clipboard Formats
|
80
|
+
Clipboard::OEMTEXT
|
81
|
+
Text format containing characters in the OEM character set. Each line ends
|
82
|
+
with a carriage return/linefeed (CR-LF) combination. A null character
|
83
|
+
signals the end of the data.
|
84
|
+
|
85
|
+
Clipboard::TEXT
|
86
|
+
Text format. Each line ends with a carriage return/linefeed (CR-LF)
|
87
|
+
combination. A null character signals the end of the data. Use this format
|
88
|
+
for ANSI text.
|
89
|
+
|
90
|
+
Clipboard::UNICODETEXT
|
91
|
+
Unicode text format. Each line ends with a carriage return/linefeed
|
92
|
+
(CR-LF) combination. A null character signals the end of the data.
|
93
|
+
|
94
|
+
== Future Plans
|
95
|
+
Add more formatting option contants and related methods.
|
96
|
+
|
97
|
+
== License
|
98
|
+
Artistic 2.0
|
99
|
+
|
100
|
+
== Copyright
|
101
|
+
(C) 2003-2015 Daniel J. Berger
|
102
|
+
All Rights Reserved
|
103
|
+
|
104
|
+
== Authors
|
105
|
+
Daniel J. Berger
|
106
|
+
Park Heesob
|