opuntiaOS - an operating system targeting x86 and ARMv7
at master 876 B 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 "Window.h" 10#include "../../Managers/WindowManager.h" 11#include <utility> 12 13namespace WinServer::Mobile { 14 15Window::Window(int connection_id, int id, CreateWindowMessage& msg) 16 : BaseWindow(connection_id, id, msg) 17{ 18 m_bounds = LG::Rect(0, 0, msg.width(), msg.height()); 19 m_content_bounds = LG::Rect(0, 0, msg.width(), msg.height()); 20 m_content_bitmap = LG::PixelBitmap(m_buffer.data(), content_bounds().width(), content_bounds().height()); 21} 22 23Window::Window(Window&& win) 24 : BaseWindow(std::move(win)) 25{ 26} 27 28void Window::on_style_change() 29{ 30 WindowManager::the().on_window_style_change(*this); 31} 32 33} // namespace WinServer