Program Listing for File kiosk_window_manager.h¶
↰ Return to documentation for file (/home/docs/checkouts/readthedocs.org/user_builds/canonical-mir-documentation/checkouts/2.30/include/miral/miral/kiosk_window_manager.h)
/*
* Copyright © Canonical Ltd.
*
* This program is free software: you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 or 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef MIRAL_KIOSK_WINDOW_MANAGER_H
#define MIRAL_KIOSK_WINDOW_MANAGER_H
#include <miral/canonical_window_manager.h>
namespace miral
{
class KioskWindowManagerPolicy : public CanonicalWindowManagerPolicy
{
public:
KioskWindowManagerPolicy(WindowManagerTools const& tools);
KioskWindowManagerPolicy(WindowManagerTools const& tools, MirWindowState target_state);
auto place_new_window(ApplicationInfo const& app_info, WindowSpecification const& request)
-> WindowSpecification override;
bool handle_keyboard_event(MirKeyboardEvent const* event) override;
bool handle_touch_event(MirTouchEvent const* event) override;
bool handle_pointer_event(MirPointerEvent const* event) override;
void handle_modify_window(WindowInfo& window_info, WindowSpecification const& modifications) override;
void handle_request_move(WindowInfo& window_info, MirInputEvent const* input_event) override;
void handle_request_resize(WindowInfo& window_info, MirInputEvent const* input_event, MirResizeEdge edge) override;
protected:
MirWindowState const target_state;
};
}
#endif /* MIRAL_KIOSK_WINDOW_MANAGER_H */