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

# XmTargetsAreCompatible(3)

A function that tests whether the target types match between a drop site and source object

## NAME

**XmTargetsAreCompatible** — A function that tests whether the target types match between a drop site and source object

## SYNOPSIS

```
#include <Xm/DragDrop.h>
Boolean XmTargetsAreCompatible(
Display *display,
Atom *export_targets,
Cardinal num_export_targets,
Atom *import_targets,
Cardinal num_import_targets);
```

## DESCRIPTION

**XmTargetsAreCompatible** determines whether the import targets of the destination match any of the export targets of a source. If there is at least one target in common, the function returns True.

- *display*

  Specifies the display connection.

- *export\_targets*

  Specifies the list of target atoms associated with the source object. This resource identifies the selection targets the source can convert to.

- *num\_export\_targets*

  Specifies the number of entries in the list of export targets.

- *import\_targets*

  Specifies the list of targets to be checked against the **XmNexportTargets** of the source associated with the specified DragContext

- *num\_import\_targets*

  Specifies the number of entries in the *import\_targets* list.

## RETURN

Returns a Boolean value that indicates whether the destination targets are compatible with the source targets. If there is at least one target in common, the routine returns True; otherwise, returns False.

## RELATED

[**XmDragContext**(3)](/XmDragContext/3.md) and [**XmDropSite**(3)](/XmDropSite/3.md).
