Mir
Public Member Functions | List of all members
KioskWindowManagerPolicy Class Reference

#include <kiosk_window_manager.h>

Inheritance diagram for KioskWindowManagerPolicy:
[legend]

Public Member Functions

 KioskWindowManagerPolicy (miral::WindowManagerTools const &tools, std::shared_ptr< SplashSession > const &)
 
auto place_new_window (miral::ApplicationInfo const &app_info, miral::WindowSpecification const &request) -> miral::WindowSpecification override
 Customize initial window placement. More...
 
void advise_focus_gained (miral::WindowInfo const &info) override
 Notification that a window has gained focus. 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_modify_window (miral::WindowInfo &window_info, miral::WindowSpecification const &modifications) override
 request from client to modify the window specification. 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...
 
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::CanonicalWindowManagerPolicy
 CanonicalWindowManagerPolicy (WindowManagerTools const &tools)
 
void handle_window_ready (WindowInfo &window_info) override
 Tries to focus on the newly ready window. More...
 
void handle_modify_window (WindowInfo &window_info, WindowSpecification const &modifications) override
 Applies the requested modifications. More...
 
void handle_raise_window (WindowInfo &window_info) override
 Tries to focus on the newly ready window. More...
 
void handle_request_drag_and_drop (WindowInfo &window_info) override
 request from client to initiate drag and drop More...
 
void advise_focus_gained (WindowInfo const &info) override
 Raises the window (and any children) More...
 
auto confirm_inherited_move (WindowInfo const &window_info, Displacement movement) -> Rectangle override
 Move the child window with the parent. More...
 
auto confirm_placement_on_display (WindowInfo const &window_info, MirWindowState new_state, Rectangle const &new_placement) -> Rectangle 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 void advise_end ()
 after any related calls end More...
 
virtual ~WindowManagementPolicy ()=default
 
 WindowManagementPolicy ()=default
 
 WindowManagementPolicy (WindowManagementPolicy const &)=delete
 
WindowManagementPolicyoperator= (WindowManagementPolicy const &)=delete
 
virtual void advise_new_app (ApplicationInfo &application)
 Notification that a new application has connected. More...
 
virtual void advise_delete_app (ApplicationInfo const &application)
 Notification that an application has disconnected. More...
 
virtual void advise_new_window (WindowInfo const &window_info)
 Notification that a window has been created. More...
 
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...
 
virtual void advise_output_create (Output const &output)
 
virtual void advise_output_update (Output const &updated, Output const &original)
 
virtual void advise_output_delete (Output const &output)
 
virtual void advise_application_zone_create (Zone const &application_zone)
 
virtual void advise_application_zone_update (Zone const &updated, Zone const &original)
 
virtual void advise_application_zone_delete (Zone const &application_zone)
 

Additional Inherited Members

- Protected Attributes inherited from miral::CanonicalWindowManagerPolicy
WindowManagerTools tools
 

Constructor & Destructor Documentation

◆ KioskWindowManagerPolicy()

KioskWindowManagerPolicy::KioskWindowManagerPolicy ( miral::WindowManagerTools const &  tools,
std::shared_ptr< SplashSession > const &  splash 
)

Member Function Documentation

◆ advise_focus_gained()

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

Notification that a window has gained focus.

Parameters
window_infothe window

Reimplemented from miral::WindowManagementPolicy.

◆ confirm_placement_on_display()

Rectangle KioskWindowManagerPolicy::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 KioskWindowManagerPolicy::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 KioskWindowManagerPolicy::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 KioskWindowManagerPolicy::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_request_drag_and_drop()

void KioskWindowManagerPolicy::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 KioskWindowManagerPolicy::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 KioskWindowManagerPolicy::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 KioskWindowManagerPolicy::handle_touch_event ( MirTouchEvent const *  event)
overridevirtual

touch event handler

Parameters
eventthe event
Returns
whether the policy has consumed the event

Implements miral::WindowManagementPolicy.

◆ place_new_window()

auto KioskWindowManagerPolicy::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

Reimplemented from miral::CanonicalWindowManagerPolicy.


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

Copyright © 2012-2022 Canonical Ltd.
Generated on śro, 1 cze 2022, 16:52:55 UTC
This documentation is licensed under the GPL version 2 or 3.