Struct

AstalWlRectangle

Description

struct AstalWlRectangle {
  gint x;
  gint y;
  gint width;
  gint height;
}

A simple 2D axis-aligned rectangle with integer coordinates. Used throughout the AstalWl library to represent output geometry, window bounds, and other screen regions.

Structure members
x

No description available.

y

No description available.

width

No description available.

height

No description available.

Functions

astal_wl_rectangle_intersect

Computes the intersection of two rectangles. If no intersection exists, result is set to a zero rectangle and false is returned.

Instance methods

astal_wl_rectangle_init_zero

Creates a zero-sized rectangle at position (0,0).

astal_wl_rectangle_copy

Creates an exact copy of this rectangle.

astal_wl_rectangle_normalize

Normalizes the rectangle to ensure positive width and height. If width or height are negative, adjusts the origin (x,y) so the rectangle always represents a valid region with top-left origin and positive extent.