Class Zone

Class Documentation

class Zone

A rectangular area of the display.

For example, the area of an output into which applications are placed.

Public Functions

Zone(Rectangle const &extents)

Construct a new zone with the given extents.

Parameters:

extents – area of the zone

Zone(Zone const &other)

Construct a copy of another zone.

Parameters:

other – zone to copy

Zone &operator=(Zone const &other)

Copy from another zone.

Parameters:

other – zone to copy

~Zone()
auto operator==(Zone const &other) const -> bool

Returns true only if all properties including IDs match.

Returns:

true if it is a match, otherwise false

auto is_same_zone(Zone const &other) const -> bool

Returns true if zone IDs match, even if extents are different.

Returns:

true if zone IDs match, otherwise false

auto extents() const -> Rectangle

The area of this zone in global display coordinates.

Returns:

the extends of the zone

void extents(Rectangle const &extents)

Set the extents of this zone.

This does not make this a different zone, meaning that the miral::Zone::id will remain the same.

Parameters:

extents – the new extends

auto id() const -> int

A unique identifier for this zone, which remains the same regardless of how the zone is resized and moved.

Returns:

the unique id of the zone