1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 12:48:10 +00:00
serenity/Userland/Services/WindowServer/KeymapSwitcher.h

39 lines
722 B
C++

/*
* Copyright (c) 2021, Timur Sultanov <SultanovTS@yandex.ru>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/String.h>
#include <AK/Vector.h>
#include <AK/WeakPtr.h>
#include <LibCore/Object.h>
#include <LibKeyboard/CharacterMap.h>
#include <WindowServer/WMClientConnection.h>
namespace WindowServer {
class KeymapSwitcher final : public Core::Object {
C_OBJECT(KeymapSwitcher)
public:
virtual ~KeymapSwitcher() override;
void refresh();
void next_keymap();
Function<void(String const& keymap)> on_keymap_change;
String get_current_keymap() const;
private:
KeymapSwitcher();
Vector<AK::String> m_keymaps;
void setkeymap(AK::String const&);
};
}