Squash commits for public release
This commit is contained in:
25
userland/servers/window_server/src/Target/Mobile/Window.cpp
Normal file
25
userland/servers/window_server/src/Target/Mobile/Window.cpp
Normal file
@@ -0,0 +1,25 @@
|
||||
#include "Window.h"
|
||||
#include "../../Managers/WindowManager.h"
|
||||
#include <utility>
|
||||
|
||||
namespace WinServer::Mobile {
|
||||
|
||||
Window::Window(int connection_id, int id, CreateWindowMessage& msg)
|
||||
: BaseWindow(connection_id, id, msg)
|
||||
{
|
||||
m_bounds = LG::Rect(0, 0, msg.width(), msg.height());
|
||||
m_content_bounds = LG::Rect(0, 0, msg.width(), msg.height());
|
||||
m_content_bitmap = LG::PixelBitmap(m_buffer.data(), content_bounds().width(), content_bounds().height());
|
||||
}
|
||||
|
||||
Window::Window(Window&& win)
|
||||
: BaseWindow(std::move(win))
|
||||
{
|
||||
}
|
||||
|
||||
void Window::on_style_change()
|
||||
{
|
||||
WindowManager::the().on_window_style_change(*this);
|
||||
}
|
||||
|
||||
} // namespace WinServer
|
||||
27
userland/servers/window_server/src/Target/Mobile/Window.h
Normal file
27
userland/servers/window_server/src/Target/Mobile/Window.h
Normal file
@@ -0,0 +1,27 @@
|
||||
#pragma once
|
||||
#include "../../Components/Base/BaseWindow.h"
|
||||
#include "../../Components/MenuBar/MenuItem.h"
|
||||
#include "../../IPC/Connection.h"
|
||||
#include <libfoundation/SharedBuffer.h>
|
||||
#include <libg/PixelBitmap.h>
|
||||
#include <libg/Rect.h>
|
||||
#include <sys/types.h>
|
||||
#include <utility>
|
||||
|
||||
namespace WinServer::Mobile {
|
||||
|
||||
class Window : public BaseWindow {
|
||||
public:
|
||||
Window(int connection_id, int id, CreateWindowMessage& msg);
|
||||
Window(Window&& win);
|
||||
|
||||
inline void set_style(StatusBarStyle ts) { m_style = ts, on_style_change(); }
|
||||
inline StatusBarStyle style() { return m_style; }
|
||||
|
||||
private:
|
||||
void on_style_change();
|
||||
|
||||
StatusBarStyle m_style { StatusBarStyle::StandardLight };
|
||||
};
|
||||
|
||||
} // namespace WinServer
|
||||
Reference in New Issue
Block a user