Class Win32::Clipboard
In: lib/win32/clipboard.rb
Parent: Object

Methods

Included Modules

Windows::Clipboard Windows::Memory Windows::Error

Classes and Modules

Class Win32::Clipboard::Error

Constants

VERSION = '0.4.3'
TEXT = CF_TEXT   Clipboard data types
OEMTEXT = CF_OEMTEXT
UNICODETEXT = CF_UNICODETEXT

External Aliases

data -> get_data

Public Class methods

Returns the data currently in the clipboard. If format is specified, it will attempt to retrieve the data in that format. The default is Clipboard::TEXT.

Empties the contents of the clipboard.

Returns whether or not format (an int) is currently available.

Returns the corresponding name for the given format_num, or nil if it does not exist. You cannot specify any of the predefined clipboard formats (or nil is returned), only registered formats.

Returns a hash of all the current formats, with the format number as the key and the format name as the value for that key.

Returns the number of different data formats currently on the clipboard.

Registers the given format (a String) as a clipboard format, which can then be used as a valid clipboard format.

If a registered format with the specified name already exists, a new format is not registered and the return value identifies the existing format. This enables more than one application to copy and paste data using the same registered clipboard format. Note that the format name comparison is case-insensitive.

Registered clipboard formats are identified by values in the range 0xC000 through 0xFFFF.

Sets the clipboard contents to the data that you specify. You may optionally specify a clipboard format. The default is Clipboard::TEXT.

[Validate]