Serenity Operating System
1/*
2 * Copyright (c) 2021, sin-ack <sin-ack@protonmail.com>
3 *
4 * SPDX-License-Identifier: BSD-2-Clause
5 */
6
7#include "GalleryWidget.h"
8#include <LibCore/System.h>
9#include <LibGUI/Application.h>
10#include <LibGUI/BoxLayout.h>
11#include <LibGUI/Button.h>
12#include <LibGUI/Frame.h>
13#include <LibGUI/MessageBox.h>
14#include <LibMain/Main.h>
15#include <unistd.h>
16
17ErrorOr<int> serenity_main(Main::Arguments arguments)
18{
19 TRY(Core::System::pledge("stdio recvfd sendfd rpath wpath cpath unix"));
20
21 auto app = TRY(GUI::Application::try_create(arguments));
22
23 TRY(Core::System::pledge("stdio recvfd sendfd rpath"));
24
25 auto app_icon = TRY(GUI::Icon::try_create_default_icon("app-model-gallery"sv));
26
27 auto window = TRY(GUI::Window::try_create());
28 window->set_title("Model Gallery");
29 window->set_icon(app_icon.bitmap_for_size(16));
30 window->resize(430, 480);
31 (void)TRY(window->set_main_widget<GalleryWidget>());
32
33 window->show();
34 return app->exec();
35}