General Terminal

GtGetClipboard

Read clipboard text

Syntax

Signature
const char *GtGetClipboard( void );

Arguments

No arguments.

Return value

UTF-8 text from the clipboard, or an empty string when the driver supplies no text.

Description

Copy the returned text before reading this function again if you need to keep it. The library owns the returned buffer.

Example

gtgetclipboard.c
#include "xdev-wtui.h"

#include <stdio.h>

int main( void )
{
   printf( "Clipboard: %s\n", GtGetClipboard() );

   return 0;
}

See also