/* * Copyright (c) 2022, kleines Filmröllchen * Copyright (c) 2023, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include "PresenterWidget.h" #include #include #include #include #include #include ErrorOr serenity_main(Main::Arguments arguments) { // rpath is required to load .presenter files, unix, sendfd and recvfd are required to talk to WindowServer and WebContent. TRY(Core::System::pledge("stdio rpath unix sendfd recvfd")); DeprecatedString file_to_load; Core::ArgsParser argument_parser; argument_parser.add_positional_argument(file_to_load, "Presentation to load", "file", Core::ArgsParser::Required::No); argument_parser.parse(arguments); auto app = TRY(GUI::Application::try_create(arguments)); auto window = TRY(GUI::Window::try_create()); window->set_title("Presenter"); window->set_icon(GUI::Icon::default_icon("app-presenter"sv).bitmap_for_size(16)); auto main_widget = TRY(window->set_main_widget()); TRY(main_widget->initialize_menubar()); window->show(); if (!file_to_load.is_empty()) main_widget->set_file(file_to_load); return app->exec(); }