mirror of
https://github.com/RGBCube/serenity
synced 2025-05-21 20:05:06 +00:00

This was done with CLion's automatic rename feature and with: find . -name ClientConnection.h | rename 's/ClientConnection\.h/ConnectionFromClient.h/' find . -name ClientConnection.cpp | rename 's/ClientConnection\.cpp/ConnectionFromClient.cpp/'
44 lines
864 B
C++
44 lines
864 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/FileWatcher.h>
|
|
#include <LibCore/Object.h>
|
|
#include <LibKeyboard/CharacterMap.h>
|
|
#include <WindowServer/WMConnectionFromClient.h>
|
|
|
|
namespace WindowServer {
|
|
|
|
class KeymapSwitcher final : public Core::Object {
|
|
C_OBJECT(KeymapSwitcher)
|
|
public:
|
|
virtual ~KeymapSwitcher() override;
|
|
|
|
void next_keymap();
|
|
|
|
Function<void(String const& keymap)> on_keymap_change;
|
|
|
|
String get_current_keymap() const;
|
|
|
|
private:
|
|
void refresh();
|
|
|
|
KeymapSwitcher();
|
|
|
|
Vector<AK::String> m_keymaps;
|
|
|
|
void setkeymap(AK::String const&);
|
|
|
|
RefPtr<Core::FileWatcher> m_file_watcher;
|
|
|
|
const char* m_keyboard_config = "/etc/Keyboard.ini";
|
|
};
|
|
|
|
}
|