19 #ifndef MIRAL_WINDOW_H 20 #define MIRAL_WINDOW_H 24 #include <mir/geometry/point.h> 25 #include <mir/geometry/size.h> 31 namespace scene {
class Surface; }
41 Window(
Application const& application, std::shared_ptr<mir::scene::Surface>
const& surface);
44 auto top_left()
const -> mir::geometry::Point;
45 auto size()
const -> mir::geometry::Size;
49 operator bool()
const;
51 void resize(mir::geometry::Size
const& size);
53 void move_to(mir::geometry::Point top_left);
56 operator std::weak_ptr<mir::scene::Surface>()
const;
57 operator std::shared_ptr<mir::scene::Surface>()
const;
61 std::shared_ptr <Self>
self;
64 friend bool operator==(std::shared_ptr<mir::scene::Surface>
const& lhs,
Window const& rhs);
65 friend bool operator==(
Window const& lhs, std::shared_ptr<mir::scene::Surface>
const& rhs);
69 bool operator==(std::shared_ptr<mir::scene::Surface>
const& lhs,
Window const& rhs);
70 bool operator==(
Window const& lhs, std::shared_ptr<mir::scene::Surface>
const& rhs);
73 inline bool operator!=(std::shared_ptr<mir::scene::Surface>
const& lhs,
Window const& rhs) {
return !(lhs == rhs); }
74 inline bool operator!=(
Window const& lhs, std::shared_ptr<mir::scene::Surface>
const& rhs) {
return !(lhs == rhs); }
77 #endif //MIRAL_WINDOW_H Definition: active_outputs.h:25
Handle class to manage a Mir surface. It may be null (e.g. default initialized)
Definition: window.h:37
bool operator!=(Window const &lhs, std::shared_ptr< mir::scene::Surface > const &rhs)
Definition: window.h:74
std::shared_ptr< mir::scene::Session > Application
Definition: application.h:31
bool operator==(Window const &lhs, std::shared_ptr< mir::scene::Surface > const &rhs)
Mir Abstraction Layer.
Definition: active_outputs.h:27