win32-clipboard 0.6.3 → 0.6.4

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