---
name: "XmTextCopy"
section: "3"
platform: "linux"
package: "openmotif"
version: "2.3.8-4"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XmTextCopy"
---

# XmTextCopy(3)

A Text function that copies the primary selection to the clipboard

## NAME

**XmTextCopy** — A Text function that copies the primary selection to the clipboard

## SYNOPSIS

```
#include <Xm/Text.h>
Boolean XmTextCopy(
Widget widget,
Time time);
```

## DESCRIPTION

**XmTextCopy** copies the primary selected text to the clipboard.

This routine calls the **XmNconvertCallback** procedures, possibly multiple times, with the *selection* member of the **XmConvertCallbackStruct** set to **CLIPBOARD** and with the *parm* member set to **XmCOPY**.

- *widget*

  Specifies the Text widget ID.

- *time*

  Specifies the server time at which the selection value is to be modified. This should be the time of the event which triggered this request. One source of a valid time stamp is the function **XtLastTimestampProcessed()**.

For a complete definition of Text and its associated resources, see [**XmText**(3)](/XmText/3.md).

## RETURN

This function returns False if the primary selection is NULL, if the *widget* does not own the primary selection, if the function is unable to gain ownership of the clipboard selection, or if no data is placed on the clipboard. Otherwise, it returns True.

## RELATED

[**XmText**(3)](/XmText/3.md).
