Lomiri
Window Class Reference

A slightly higher concept than MirSurface. More...

#include <plugins/WindowManager/Window.h>

Inherits QObject.

Public Slots

void requestState (Mir::State state)
 Requests a change to the specified state.
 
void close ()
 Sends a close request.
 
void activate ()
 Focuses and raises the window.
 

Signals

void closeRequested ()
 
void emptyWindowActivated ()
 
void positionChanged (QPoint position)
 
void requestedPositionChanged (QPoint position)
 
void stateChanged (Mir::State value)
 
void focusedChanged (bool value)
 
void confinesMousePointerChanged (bool value)
 
void surfaceChanged (lomiri::shell::application::MirSurfaceInterface *surface)
 
void allowClientResizeChanged (bool value)
 
void liveChanged (bool value)
 
void focusRequested ()
 Emitted when focus for this window is requested by an external party.
 

Public Member Functions

 Window (int id, QObject *parent=nullptr)
 
QPoint position () const
 
QPoint requestedPosition () const
 
void setRequestedPosition (const QPoint &)
 
Mir::State state () const
 
bool focused () const
 
bool confinesMousePointer () const
 
int id () const
 
lomiri::shell::application::MirSurfaceInterface * surface () const
 
void setSurface (lomiri::shell::application::MirSurfaceInterface *surface)
 
void setFocused (bool value)
 
bool allowClientResize () const
 
void setAllowClientResize (bool)
 
QString toString () const
 

Properties

QPoint position
 Position of the current surface buffer, in pixels.
 
QPoint requestedPosition
 Requested position of the current surface buffer, in pixels.
 
Mir::State state
 State of the surface.
 
bool focused
 Whether the surface is focused. More...
 
bool confinesMousePointer
 Whether the surface wants to confine the mouse pointer within its boundaries. More...
 
int id
 A unique identifier for this window. Useful for telling windows apart in a list model as they get moved around.
 
lomiri::shell::application::MirSurfaceInterface * surface
 Surface backing up this window It might be null if a surface hasn't been created yet (application is starting up) or if the corresponding application has been killed (but can still get restarted to continue from where it left)
 
bool allowClientResize
 Whether to comply to resize requests coming from the client side. More...
 

Detailed Description

A slightly higher concept than MirSurface.

A Window exists before its MirSurface gets created (for splashscreen purposes) and might also hang around after the backing surface is gone (In case the application was killed to free up memory, as it should still remain in the window list since the user did not explicitly close it).

Definition at line 47 of file Window.h.

Property Documentation

◆ allowClientResize

bool Window::allowClientResize
readwrite

Whether to comply to resize requests coming from the client side.

It's true by default

Definition at line 173 of file Window.h.

◆ confinesMousePointer

bool Window::confinesMousePointer
read

Whether the surface wants to confine the mouse pointer within its boundaries.

If true, the surface doesn't want the mouse pointer to leave its boundaries while it's focused.

Definition at line 173 of file Window.h.

◆ focused

bool Window::focused
read

Whether the surface is focused.

It will be true if this surface is MirFocusControllerInterface::focusedSurface

Definition at line 173 of file Window.h.


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