Serenity Operating System
1/*
2 * Copyright (c) 2021, Timur Sultanov <SultanovTS@yandex.ru>
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 */
6
7#include "KeymapStatusWindow.h"
8#include <LibCore/System.h>
9#include <LibGUI/Application.h>
10#include <LibGUI/ConnectionToWindowManagerServer.h>
11#include <LibMain/Main.h>
12#include <WindowServer/Window.h>
13
14ErrorOr<int> serenity_main(Main::Arguments arguments)
15{
16 TRY(Core::System::pledge("stdio recvfd sendfd rpath unix getkeymap proc exec"));
17
18 auto app = TRY(GUI::Application::try_create(arguments));
19
20 auto window = TRY(KeymapStatusWindow::try_create());
21 window->set_has_alpha_channel(true);
22 window->set_title("Keymap");
23 window->resize(16, 16);
24 window->show();
25 window->make_window_manager(WindowServer::WMEventMask::KeymapChanged);
26
27 TRY(Core::System::pledge("stdio recvfd sendfd rpath getkeymap proc exec"));
28
29 return app->exec();
30}