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

Handle class to manage a Mir surface. It may be null (e.g. default initialized) More...

#include <window.h>

Public Member Functions

 Window ()
 
 Window (Application const &application, std::shared_ptr< mir::scene::Surface > const &surface)
 
 ~Window ()
 
auto top_left () const -> mir::geometry::Point
 The position of the top-left corner of the window frame. More...
 
auto size () const -> mir::geometry::Size
 The size of the window frame. Units are logical screen coordinates (not necessarily device pixels). Any decorations are included in the size. More...
 
auto application () const -> Application
 The application that created this window. More...
 
 operator bool () const
 Indicates that the Window isn't null. More...
 
void resize (mir::geometry::Size const &size)
 Not for external use, use WindowManagerTools::modify_window() instead. More...
 
void move_to (mir::geometry::Point top_left)
 
 operator std::weak_ptr< mir::scene::Surface > () const
 Access to the underlying Mir surface. More...
 
 operator std::shared_ptr< mir::scene::Surface > () const
 

Friends

bool operator== (Window const &lhs, Window const &rhs)
 
bool operator== (std::shared_ptr< mir::scene::Surface > const &lhs, Window const &rhs)
 
bool operator== (Window const &lhs, std::shared_ptr< mir::scene::Surface > const &rhs)
 
bool operator< (Window const &lhs, Window const &rhs)
 

Detailed Description

Handle class to manage a Mir surface. It may be null (e.g. default initialized)

Constructor & Destructor Documentation

◆ Window() [1/2]

miral::Window::Window ( )

◆ Window() [2/2]

miral::Window::Window ( Application const &  application,
std::shared_ptr< mir::scene::Surface > const &  surface 
)

◆ ~Window()

miral::Window::~Window ( )

Member Function Documentation

◆ application()

auto miral::Window::application ( ) const -> Application

The application that created this window.

◆ move_to()

void miral::Window::move_to ( mir::geometry::Point  top_left)

◆ operator bool()

miral::Window::operator bool ( ) const

Indicates that the Window isn't null.

◆ operator std::shared_ptr< mir::scene::Surface >()

miral::Window::operator std::shared_ptr< mir::scene::Surface > ( ) const

◆ operator std::weak_ptr< mir::scene::Surface >()

miral::Window::operator std::weak_ptr< mir::scene::Surface > ( ) const

Access to the underlying Mir surface.

◆ resize()

void miral::Window::resize ( mir::geometry::Size const &  size)

Not for external use, use WindowManagerTools::modify_window() instead.

◆ size()

auto miral::Window::size ( ) const -> mir::geometry::Size

The size of the window frame. Units are logical screen coordinates (not necessarily device pixels). Any decorations are included in the size.

◆ top_left()

auto miral::Window::top_left ( ) const -> mir::geometry::Point

The position of the top-left corner of the window frame.

Friends And Related Function Documentation

◆ operator<

bool operator< ( Window const &  lhs,
Window const &  rhs 
)
friend

◆ operator== [1/3]

bool operator== ( std::shared_ptr< mir::scene::Surface > const &  lhs,
Window const &  rhs 
)
friend

◆ operator== [2/3]

bool operator== ( Window const &  lhs,
std::shared_ptr< mir::scene::Surface > const &  rhs 
)
friend

◆ operator== [3/3]

bool operator== ( Window const &  lhs,
Window const &  rhs 
)
friend

The documentation for this class 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.