Mir
Classes | Public Member Functions | List of all members
TilingWindowManagerPolicy Class Reference

#include <tiling_window_manager.h>

Inheritance diagram for TilingWindowManagerPolicy:
[legend]

Public Member Functions

 TilingWindowManagerPolicy (miral::WindowManagerTools const &tools, std::shared_ptr< SplashSession > const &spinner, miral::InternalClientLauncher const &launcher)
 
auto place_new_window (miral::ApplicationInfo const &app_info, miral::WindowSpecification const &request_parameters) -> miral::WindowSpecification override
 Customize initial window placement. More...
 
void handle_window_ready (miral::WindowInfo &window_info) override
 notification that the first buffer has been posted More...
 
void handle_modify_window (miral::WindowInfo &window_info, miral::WindowSpecification const &modifications) override
 request from client to modify the window specification. More...
 
bool handle_keyboard_event (MirKeyboardEvent const *event) override
 keyboard event handler More...
 
bool handle_touch_event (MirTouchEvent const *event) override
 touch event handler More...
 
bool handle_pointer_event (MirPointerEvent const *event) override
 pointer event handler More...
 
void handle_raise_window (miral::WindowInfo &window_info) override
 request from client to raise the window More...
 
void advise_end () override
 after any related calls end More...
 
void advise_new_window (miral::WindowInfo const &window_info) override
 Notification that a window has been created. More...
 
void advise_focus_gained (miral::WindowInfo const &info) override
 Notification that a window has gained focus. More...
 
void advise_new_app (miral::ApplicationInfo &application) override
 Notification that a new application has connected. More...
 
void advise_delete_app (miral::ApplicationInfo const &application) override
 Notification that an application has disconnected. More...
 
void handle_request_drag_and_drop (miral::WindowInfo &window_info) override
 request from client to initiate drag and drop More...
 
void handle_request_move (miral::WindowInfo &window_info, MirInputEvent const *input_event) override
 request from client to initiate move More...
 
void handle_request_resize (miral::WindowInfo &window_info, MirInputEvent const *input_event, MirResizeEdge edge) override
 request from client to initiate resize More...
 
auto confirm_inherited_move (miral::WindowInfo const &window_info, Displacement movement) -> Rectangle override
 Confirm (and optionally adjust) the motion of a child window when the parent is moved. More...
 
Rectangle confirm_placement_on_display (const miral::WindowInfo &window_info, MirWindowState new_state, Rectangle const &new_placement) override
 Confirm (and optionally adjust) the placement of a window on the display. More...
 
- Public Member Functions inherited from miral::WindowManagementPolicy
virtual void advise_begin ()
 before any related calls begin More...
 
virtual ~WindowManagementPolicy ()=default
 
 WindowManagementPolicy ()=default
 
 WindowManagementPolicy (WindowManagementPolicy const &)=delete
 
WindowManagementPolicyoperator= (WindowManagementPolicy const &)=delete
 
virtual void advise_focus_lost (WindowInfo const &window_info)
 Notification that a window has lost focus. More...
 
virtual void advise_state_change (WindowInfo const &window_info, MirWindowState state)
 Notification that a window is about to change state. More...
 
virtual void advise_move_to (WindowInfo const &window_info, Point top_left)
 Notification that a window is about to move. More...
 
virtual void advise_resize (WindowInfo const &window_info, Size const &new_size)
 Notification that a window is about to resize. More...
 
virtual void advise_delete_window (WindowInfo const &window_info)
 Notification that a window is about to be destroyed. More...
 
virtual void advise_raise (std::vector< Window > const &windows)
 Notification that windows are being raised to the top. More...
 
virtual void advise_adding_to_workspace (std::shared_ptr< Workspace > const &workspace, std::vector< Window > const &windows)
 Notification that windows are being added to a workspace. More...
 
virtual void advise_removing_from_workspace (std::shared_ptr< Workspace > const &workspace, std::vector< Window > const &windows)
 Notification that windows are being removed from a workspace. More...
 

Constructor & Destructor Documentation

◆ TilingWindowManagerPolicy()

TilingWindowManagerPolicy::TilingWindowManagerPolicy ( miral::WindowManagerTools const &  tools,
std::shared_ptr< SplashSession > const &  spinner,
miral::InternalClientLauncher const &  launcher 
)
explicit

Member Function Documentation

◆ advise_delete_app()

void TilingWindowManagerPolicy::advise_delete_app ( miral::ApplicationInfo const &  application)
overridevirtual

Notification that an application has disconnected.

Parameters
applicationthe application

Reimplemented from miral::WindowManagementPolicy.

◆ advise_end()

void TilingWindowManagerPolicy::advise_end ( )
overridevirtual

after any related calls end

Reimplemented from miral::WindowManagementPolicy.

◆ advise_focus_gained()

void TilingWindowManagerPolicy::advise_focus_gained ( miral::WindowInfo const &  window_info)
overridevirtual

Notification that a window has gained focus.

Parameters
window_infothe window

Reimplemented from miral::WindowManagementPolicy.

◆ advise_new_app()

void TilingWindowManagerPolicy::advise_new_app ( miral::ApplicationInfo application)
overridevirtual

Notification that a new application has connected.

Parameters
applicationthe application

Reimplemented from miral::WindowManagementPolicy.

◆ advise_new_window()

void TilingWindowManagerPolicy::advise_new_window ( miral::WindowInfo const &  window_info)
overridevirtual

Notification that a window has been created.

Parameters
window_infothe window

Reimplemented from miral::WindowManagementPolicy.

◆ confirm_inherited_move()

auto TilingWindowManagerPolicy::confirm_inherited_move ( miral::WindowInfo const &  window_info,
Displacement  movement 
) -> Rectangle
overridevirtual

Confirm (and optionally adjust) the motion of a child window when the parent is moved.

Parameters
window_infothe window
movementthe movement of the parent
Returns
the confirmed placement of the window

Implements miral::WindowManagementPolicy.

◆ confirm_placement_on_display()

Rectangle TilingWindowManagerPolicy::confirm_placement_on_display ( const miral::WindowInfo window_info,
MirWindowState  new_state,
Rectangle const &  new_placement 
)
overridevirtual

Confirm (and optionally adjust) the placement of a window on the display.

Called when (re)placing fullscreen, maximized, horizontally maximised and vertically maximized windows to allow adjustment for decorations.

Parameters
window_infothe window
new_statethe new state
new_placementthe suggested placement
Returns
the confirmed placement of the window

Implements miral::WindowManagementPolicy.

◆ handle_keyboard_event()

bool TilingWindowManagerPolicy::handle_keyboard_event ( MirKeyboardEvent const *  event)
overridevirtual

keyboard event handler

Parameters
eventthe event
Returns
whether the policy has consumed the event

Implements miral::WindowManagementPolicy.

◆ handle_modify_window()

void TilingWindowManagerPolicy::handle_modify_window ( miral::WindowInfo window_info,
miral::WindowSpecification const &  modifications 
)
overridevirtual

request from client to modify the window specification.

Note
the request has already been validated against the type definition
Parameters
window_infothe window
modificationsthe requested changes

Implements miral::WindowManagementPolicy.

◆ handle_pointer_event()

bool TilingWindowManagerPolicy::handle_pointer_event ( MirPointerEvent const *  event)
overridevirtual

pointer event handler

Parameters
eventthe event
Returns
whether the policy has consumed the event

Implements miral::WindowManagementPolicy.

◆ handle_raise_window()

void TilingWindowManagerPolicy::handle_raise_window ( miral::WindowInfo window_info)
overridevirtual

request from client to raise the window

Note
the request has already been validated against the requesting event
Parameters
window_infothe window

Implements miral::WindowManagementPolicy.

◆ handle_request_drag_and_drop()

void TilingWindowManagerPolicy::handle_request_drag_and_drop ( miral::WindowInfo window_info)
overridevirtual

request from client to initiate drag and drop

Note
the request has already been validated against the requesting event
Parameters
window_infothe window

Implements miral::WindowManagementPolicy.

◆ handle_request_move()

void TilingWindowManagerPolicy::handle_request_move ( miral::WindowInfo window_info,
MirInputEvent const *  input_event 
)
overridevirtual

request from client to initiate move

Note
the request has already been validated against the requesting event
Parameters
window_infothe window
input_eventthe requesting event

Implements miral::WindowManagementPolicy.

◆ handle_request_resize()

void TilingWindowManagerPolicy::handle_request_resize ( miral::WindowInfo window_info,
MirInputEvent const *  input_event,
MirResizeEdge  edge 
)
overridevirtual

request from client to initiate resize

Note
the request has already been validated against the requesting event
Parameters
window_infothe window
input_eventthe requesting event
edgethe edge(s) being dragged

Implements miral::WindowManagementPolicy.

◆ handle_touch_event()

bool TilingWindowManagerPolicy::handle_touch_event ( MirTouchEvent const *  event)
overridevirtual

touch event handler

Parameters
eventthe event
Returns
whether the policy has consumed the event

Implements miral::WindowManagementPolicy.

◆ handle_window_ready()

void TilingWindowManagerPolicy::handle_window_ready ( miral::WindowInfo window_info)
overridevirtual

notification that the first buffer has been posted

Parameters
window_infothe window

Implements miral::WindowManagementPolicy.

◆ place_new_window()

auto TilingWindowManagerPolicy::place_new_window ( miral::ApplicationInfo const &  app_info,
miral::WindowSpecification const &  requested_specification 
) -> miral::WindowSpecification
overridevirtual

Customize initial window placement.

Parameters
app_infothe application requesting a new window
requested_specificationthe requested specification (updated with default placement)
Returns
the customized specification

Implements miral::WindowManagementPolicy.


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

Copyright © 2012-2018 Canonical Ltd.
Generated on Thu 12 Jul 10:49:10 UTC 2018