Mir
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
miral::WindowInfo Struct Reference

#include <window_info.h>

Public Types

using AspectRatio = WindowSpecification::AspectRatio
 

Public Member Functions

 WindowInfo ()
 
 WindowInfo (Window const &window, WindowSpecification const &params)
 
 ~WindowInfo ()
 
 WindowInfo (WindowInfo const &that)
 
WindowInfooperator= (WindowInfo const &that)
 
bool can_be_active () const
 
bool can_morph_to (MirWindowType new_type) const
 
bool must_have_parent () const
 
bool must_not_have_parent () const
 
bool is_visible () const
 
void constrain_resize (mir::geometry::Point &requested_pos, mir::geometry::Size &requested_size) const
 
auto window () const -> Window &
 
auto name () const -> std::string
 
auto type () const -> MirWindowType
 
auto state () const -> MirWindowState
 
auto restore_rect () const -> mir::geometry::Rectangle
 
auto parent () const -> Window
 
auto children () const -> std::vector< Window > const &
 
bool has_output_id () const
 
auto output_id () const -> int
 
auto preferred_orientation () const -> MirOrientationMode
 
auto confine_pointer () const -> MirPointerConfinementState
 
auto shell_chrome () const -> MirShellChrome
 
auto userdata () const -> std::shared_ptr< void >
 This can be used by client code to store window manager specific information. More...
 
void userdata (std::shared_ptr< void > userdata)
 
void swap (WindowInfo &rhs)
 
auto depth_layer () const -> MirDepthLayer
 
auto attached_edges () const -> MirPlacementGravity
 Get the edges of the output that the window is attached to (only meaningful for windows in state mir_window_state_attached) More...
 
auto exclusive_rect () const -> mir::optional_value< mir::geometry::Rectangle >
 Mir will try to avoid occluding the area covered by this rectangle (relative to the window) (only meaningful when the window is attached to an edge) More...
 
auto clip_area () const -> mir::optional_value< mir::geometry::Rectangle >
 Mir will not render anything outside this rectangle. More...
 
void clip_area (mir::optional_value< mir::geometry::Rectangle > const &area)
 
auto focus_mode () const -> MirFocusMode
 How the window should gain and lose focus. More...
 
auto min_width () const -> mir::geometry::Width
 These constrain the sizes a window may be resized to (both interactively and pragmatically). Clients can request a min/max size, but it can be overridden by the window management policy. By default, minimum values are 0 and maximum values are std::numeric_limits<int>::max(). More...
 
auto min_height () const -> mir::geometry::Height
 
auto max_width () const -> mir::geometry::Width
 
auto max_height () const -> mir::geometry::Height
 
auto width_inc () const -> mir::geometry::DeltaX
 These control the size increments of the window. This is used in cases like a terminal that can only be resized character-by-character. Current Wayland protocols do not support this property, so it generally wont be requested by clients. By default, both are 1. More...
 
auto height_inc () const -> mir::geometry::DeltaY
 
auto min_aspect () const -> AspectRatio
 These constrain the possible aspect ratio of the window. Current Wayland protocols to not support this property, so it generally wont be requested by clients. By default, min_aspect is {0U, std::numeric_limits<unsigned>::max()} and max_aspect is {std::numeric_limits<unsigned>::max(), 0U}. More...
 
auto max_aspect () const -> AspectRatio
 
auto application_id () const -> std::string
 The D-bus service name and basename of the app's .desktop file See http://standards.freedesktop.org/desktop-entry-spec/. More...
 

Static Public Member Functions

static bool needs_titlebar (MirWindowType type)
 

Friends

class BasicWindowManager
 

Member Typedef Documentation

◆ AspectRatio

Constructor & Destructor Documentation

◆ WindowInfo() [1/3]

miral::WindowInfo::WindowInfo ( )

◆ WindowInfo() [2/3]

miral::WindowInfo::WindowInfo ( Window const &  window,
WindowSpecification const &  params 
)

◆ ~WindowInfo()

miral::WindowInfo::~WindowInfo ( )

◆ WindowInfo() [3/3]

miral::WindowInfo::WindowInfo ( WindowInfo const &  that)
explicit

Member Function Documentation

◆ application_id()

auto miral::WindowInfo::application_id ( ) const -> std::string

The D-bus service name and basename of the app's .desktop file See http://standards.freedesktop.org/desktop-entry-spec/.

Remarks
Since MirAL 2.8

◆ attached_edges()

auto miral::WindowInfo::attached_edges ( ) const -> MirPlacementGravity

Get the edges of the output that the window is attached to (only meaningful for windows in state mir_window_state_attached)

◆ can_be_active()

bool miral::WindowInfo::can_be_active ( ) const

◆ can_morph_to()

bool miral::WindowInfo::can_morph_to ( MirWindowType  new_type) const

◆ children()

auto miral::WindowInfo::children ( ) const -> std::vector< Window > const &

◆ clip_area() [1/2]

auto miral::WindowInfo::clip_area ( ) const -> mir::optional_value< mir::geometry::Rectangle >

Mir will not render anything outside this rectangle.

◆ clip_area() [2/2]

void miral::WindowInfo::clip_area ( mir::optional_value< mir::geometry::Rectangle > const &  area)

◆ confine_pointer()

auto miral::WindowInfo::confine_pointer ( ) const -> MirPointerConfinementState

◆ constrain_resize()

void miral::WindowInfo::constrain_resize ( mir::geometry::Point requested_pos,
mir::geometry::Size requested_size 
) const

◆ depth_layer()

auto miral::WindowInfo::depth_layer ( ) const -> MirDepthLayer

◆ exclusive_rect()

auto miral::WindowInfo::exclusive_rect ( ) const -> mir::optional_value< mir::geometry::Rectangle >

Mir will try to avoid occluding the area covered by this rectangle (relative to the window) (only meaningful when the window is attached to an edge)

◆ focus_mode()

auto miral::WindowInfo::focus_mode ( ) const -> MirFocusMode

How the window should gain and lose focus.

Remarks
Since MirAL 3.3

◆ has_output_id()

bool miral::WindowInfo::has_output_id ( ) const

◆ height_inc()

auto miral::WindowInfo::height_inc ( ) const -> mir::geometry::DeltaY

◆ is_visible()

bool miral::WindowInfo::is_visible ( ) const

◆ max_aspect()

auto miral::WindowInfo::max_aspect ( ) const -> AspectRatio

◆ max_height()

auto miral::WindowInfo::max_height ( ) const -> mir::geometry::Height

◆ max_width()

auto miral::WindowInfo::max_width ( ) const -> mir::geometry::Width

◆ min_aspect()

auto miral::WindowInfo::min_aspect ( ) const -> AspectRatio

These constrain the possible aspect ratio of the window. Current Wayland protocols to not support this property, so it generally wont be requested by clients. By default, min_aspect is {0U, std::numeric_limits<unsigned>::max()} and max_aspect is {std::numeric_limits<unsigned>::max(), 0U}.

◆ min_height()

auto miral::WindowInfo::min_height ( ) const -> mir::geometry::Height

◆ min_width()

auto miral::WindowInfo::min_width ( ) const -> mir::geometry::Width

These constrain the sizes a window may be resized to (both interactively and pragmatically). Clients can request a min/max size, but it can be overridden by the window management policy. By default, minimum values are 0 and maximum values are std::numeric_limits<int>::max().

◆ must_have_parent()

bool miral::WindowInfo::must_have_parent ( ) const

◆ must_not_have_parent()

bool miral::WindowInfo::must_not_have_parent ( ) const

◆ name()

auto miral::WindowInfo::name ( ) const -> std::string

◆ needs_titlebar()

static bool miral::WindowInfo::needs_titlebar ( MirWindowType  type)
static

◆ operator=()

WindowInfo & miral::WindowInfo::operator= ( WindowInfo const &  that)

◆ output_id()

auto miral::WindowInfo::output_id ( ) const -> int

◆ parent()

auto miral::WindowInfo::parent ( ) const -> Window

◆ preferred_orientation()

auto miral::WindowInfo::preferred_orientation ( ) const -> MirOrientationMode

◆ restore_rect()

auto miral::WindowInfo::restore_rect ( ) const -> mir::geometry::Rectangle

◆ shell_chrome()

auto miral::WindowInfo::shell_chrome ( ) const -> MirShellChrome

◆ state()

auto miral::WindowInfo::state ( ) const -> MirWindowState

◆ swap()

void miral::WindowInfo::swap ( WindowInfo rhs)
inline

◆ type()

auto miral::WindowInfo::type ( ) const -> MirWindowType

◆ userdata() [1/2]

auto miral::WindowInfo::userdata ( ) const -> std::shared_ptr< void >

This can be used by client code to store window manager specific information.

◆ userdata() [2/2]

void miral::WindowInfo::userdata ( std::shared_ptr< void >  userdata)

◆ width_inc()

auto miral::WindowInfo::width_inc ( ) const -> mir::geometry::DeltaX

These control the size increments of the window. This is used in cases like a terminal that can only be resized character-by-character. Current Wayland protocols do not support this property, so it generally wont be requested by clients. By default, both are 1.

◆ window()

auto miral::WindowInfo::window ( ) const -> Window &

Friends And Related Function Documentation

◆ BasicWindowManager

friend class BasicWindowManager
friend

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

Copyright © 2012-2023 Canonical Ltd.
Generated on Tue 2 May 10:01:24 UTC 2023
This documentation is licensed under the GPL version 2 or 3.