Module raw

Source
Expand description

Raw bindings to Windows clipboard.

§General information

All pre & post conditions are stated in description of functions.

§Open clipboard

To access any information inside clipboard it is necessary to open it by means of open().

After that Clipboard cannot be opened any more until close() is called.

Structs§

EnumFormats
Enumerator over available clipboard formats.

Functions§

close
Closes clipboard.
count_formats
Retrieves number of currently available formats on clipboard.
empty
Empties clipboard.
format_name
Returns format name based on it’s code.
format_name_big
Returns format name based on it’s code (allocating variant suitable for big names)
get
Copies raw bytes from clipboard with specified format
get_bitmap
Reads bitmap image, appending image to the out vector and returning number of bytes read on success.
get_clipboard_data
Retrieves raw pointer to clipboard data.
get_file_list
Retrieves file list from clipboard, appending each element to the provided storage.
get_html
Retrieves HTML using format code created by register_raw_format or register_format with argument HTML Format
get_owner
Retrieves the window handle of the current owner of the clipboard.
get_string
Copies raw bytes from clipboard with specified format, appending to out buffer.
get_vec
Copies raw bytes from clipboard with specified format, appending to out buffer.
is_format_avail
Determines whenever provided clipboard format is available on clipboard or not.
open
Opens clipboard.
open_for
Opens clipboard associating it with specified window handle.
register_format
Registers a new clipboard format with specified name.
register_raw_format
Registers a new clipboard format with specified name as C wide string (meaning it must have null char at the end).
seq_num
Retrieves clipboard sequence number.
set
Copies raw bytes onto clipboard with specified format, returning whether it was successful.
set_bitmap
Sets bitmap (header + RGB) onto clipboard, from raw bytes.
set_bitmap_with
Sets bitmap (header + RGB) onto clipboard, from raw bytes.
set_file_list
Set list of file paths to clipboard.
set_file_list_with
Set list of file paths to clipboard.
set_html
Sets HTML using format code created by register_raw_format or register_format with argument HTML Format
set_html_with
Sets HTML using format code created by register_raw_format or register_format with argument HTML Format
set_string
Copies unicode string onto clipboard, performing necessary conversions, returning true on success.
set_string_with
Copies unicode string onto clipboard, performing necessary conversions, returning true on success.
set_without_clear
Copies raw bytes onto the clipboard with the specified format, returning whether it was successful.
size
Retrieves size of clipboard data for specified format.
size_unsafe
Retrieves size of clipboard data for specified format.
which_format_avail
Returns the first available format in the specified list.