---
name: "XEmptyRegion"
section: "3"
platform: "linux"
package: "libx11"
version: "1.8.14-1"
release: "Arch Linux 2026-11-01"
platforms: ["linux"]
url: "https://new.carta.tech/XEmptyRegion"
---

# XEmptyRegion(3)

determine if regions are empty or equal

## NAME

XEmptyRegion, XEqualRegion, XPointInRegion, XRectInRegion - determine if regions are empty or equal

## SYNTAX

Bool XEmptyRegion(Region *r*);

Bool XEqualRegion(Region *r1*, Region *r2*);

Bool XPointInRegion(Region *r*, int *x*, int *y*);

int XRectInRegion(Region *r*, int *x*, int *y*, unsigned int *width*, unsigned int *height*);

## ARGUMENTS

- *r*

  Specifies the region.

- *r1*

  - *r2*

  Specify the two regions.

- *width*

  - *height*

  Specify the width and height, which define the rectangle.

- *x*

  - *y*

  Specify the x and y coordinates, which define the point or the coordinates of the upper-left corner of the rectangle.

## DESCRIPTION

The **XEmptyRegion** function returns **True** if the region is empty.

The **XEqualRegion** function returns **True** if the two regions have the same offset, size, and shape.

The **XPointInRegion** function returns **True** if the point (x, y) is contained in the region r.

The **XRectInRegion** function returns **RectangleIn** if the rectangle is entirely in the specified region, **RectangleOut** if the rectangle is entirely out of the specified region, and **RectanglePart** if the rectangle is partially in the specified region.

## SEE ALSO

[**XCreateRegion**(3)](/XCreateRegion/3.md), [**XIntersectRegion**(3)](/XIntersectRegion/3.md)\
 *Xlib - C Language X Interface*
