Mir
Public Member Functions | List of all members
miral::Zone Class Reference

A rectangular area of the display. Not tied to a specific output. More...

#include <zone.h>

Public Member Functions

 Zone (Rectangle const &extents)
 Create a new zone with the given extents. More...
 
 Zone (Zone const &other)
 Makes a copy of the underlying private data. More...
 
Zoneoperator= (Zone const &other)
 Copies private data by value. More...
 
 ~Zone ()
 
auto operator== (Zone const &other) const -> bool
 Returns false if any properties are different (even if they are the same zone) Will always return false if they are different zones (even if they have the same extents) More...
 
auto is_same_zone (Zone const &other) const -> bool
 Multiple zone objects with different extents may be the "same" zone. For example, the arguments of miral::WindowManagementPolicy::advise_output_update() are old and new instances of the same zone, so updated.is_same_zone(original) will return true even though the extents may not be equal. More...
 
auto extents () const -> Rectangle
 The area of this zone in global display coordinates. More...
 
void extents (Rectangle const &extents)
 Set the extents of this zone Does not make this a different zone. More...
 

Detailed Description

A rectangular area of the display. Not tied to a specific output.

Constructor & Destructor Documentation

◆ Zone() [1/2]

miral::Zone::Zone ( Rectangle const &  extents)

Create a new zone with the given extents.

◆ Zone() [2/2]

miral::Zone::Zone ( Zone const &  other)

Makes a copy of the underlying private data.

◆ ~Zone()

miral::Zone::~Zone ( )

Member Function Documentation

◆ extents() [1/2]

auto miral::Zone::extents ( ) const -> Rectangle

The area of this zone in global display coordinates.

◆ extents() [2/2]

void miral::Zone::extents ( Rectangle const &  extents)

Set the extents of this zone Does not make this a different zone.

◆ is_same_zone()

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

Multiple zone objects with different extents may be the "same" zone. For example, the arguments of miral::WindowManagementPolicy::advise_output_update() are old and new instances of the same zone, so updated.is_same_zone(original) will return true even though the extents may not be equal.

◆ operator=()

Zone& miral::Zone::operator= ( Zone const &  other)

Copies private data by value.

◆ operator==()

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

Returns false if any properties are different (even if they are the same zone) Will always return false if they are different zones (even if they have the same extents)


The documentation for this class was generated from the following file:

Copyright © 2012-2022 Canonical Ltd.
Generated on śro, 1 cze 2022, 16:52:55 UTC
This documentation is licensed under the GPL version 2 or 3.