Home

Clipboard Operations

AppGraphics provides the following functions for interacting with the Windows clipboard. Currently, only text clipboard operations are supported.

getclipboardtextlength

C size_t getclipboardtextlength ( )
Fortran function getclipboardtextlength ( )

Description

Returns the current length of text in the Windows clipboard

Return Value

C size_t
Fortran integer(kind=c_size_t)

The current length of the string in the clipboard excluding a null character

getfromclipboard

C size_t getfromclipboard (buffer, buffer_length)
Fortran function getfromclipboard (buffer)

Description

Retrieves the contents of text in the Windows clipboard

Parameters

Parameter C Type Fortran Type Description
buffer char * character(*), intent(out) An allocated buffer to receive the contents of the clipboard
buffer_length size_t NA The size of the buffer

Return Value

C size_t
Fortran integer(kind=c_size_t)

The amount of text copied into the buffer

sendtoclipboard

C void sendtoclipboard (text)
Fortran subroutine sendtoclipboard (text)

Description

Sends the specified string to the Windows clipboard

Parameters

Parameter C Type Fortran Type Description
text char * character(*), intent(in) A string to place in the Windows clipboard