opuntiaOS - an operating system targeting x86 and ARMv7
at master 1.5 kB view raw
1/* 2 * Copyright (C) 2020-2022 The opuntiaOS Project Authors. 3 * + Contributed by Nikita Melekhin <nimelehin@gmail.com> 4 * 5 * Use of this source code is governed by a BSD-style license that can be 6 * found in the LICENSE file. 7 */ 8 9#include "Managers/InitManager.h" 10 11#ifdef TARGET_DESKTOP 12#define LAUNCH_PATH "/System/dock" 13#elif TARGET_MOBILE 14#define LAUNCH_PATH "/System/homescreen" 15#endif 16 17int main() 18{ 19 WinServer::InitManager::load_screen(); 20 21 auto* event_loop = new LFoundation::EventLoop(); 22 WinServer::InitManager::load_core_component<WinServer::Connection>(socket(PF_LOCAL, 0, 0)); 23 WinServer::InitManager::load_core_component<WinServer::CursorManager>(); 24 WinServer::InitManager::load_core_component<WinServer::ResourceManager, 4>(); 25 WinServer::InitManager::load_core_component<WinServer::Popup>(); 26 WinServer::InitManager::load_core_component<WinServer::MenuBar>(); 27#ifdef TARGET_MOBILE 28 WinServer::InitManager::load_core_component<WinServer::ControlBar>(); 29#endif 30 WinServer::InitManager::load_core_component<WinServer::Compositor>(); 31 WinServer::InitManager::load_core_component<WinServer::WindowManager>(); 32 WinServer::InitManager::load_core_component<WinServer::Devices>(); 33 34 WinServer::InitManager::add_widget<WinServer::Clock>(); 35 WinServer::InitManager::add_widget<WinServer::ControlPanelToggle>(); 36 37 WinServer::InitManager::launch_app(LAUNCH_PATH); 38 39 WinServer::LoadingScreen::destroy_the(); 40 return event_loop->run(); 41}