1// LAF OS Library
2// Copyright (C) 2021 Igara Studio S.A.
3// Copyright (C) 2012-2016 David Capello
4//
5// This file is released under the terms of the MIT license.
6// Read LICENSE.txt for more information.
7
8#ifndef OS_SKIA_SKIA_WINDOW_INCLUDED
9#define OS_SKIA_SKIA_WINDOW_INCLUDED
10#pragma once
11
12#if LAF_WINDOWS
13 #include "os/skia/skia_window_win.h"
14 namespace os {
15 using SkiaWindowPlatform = os::SkiaWindowWin;
16 }
17#elif LAF_MACOS
18 #include "os/skia/skia_window_osx.h"
19 namespace os {
20 using SkiaWindowPlatform = os::SkiaWindowOSX;
21 }
22#elif LAF_LINUX
23 #include "os/skia/skia_window_x11.h"
24 namespace os {
25 using SkiaWindowPlatform = os::SkiaWindowX11;
26 }
27#endif
28
29#include "os/native_cursor.h"
30#include "os/skia/skia_color_space.h"
31
32namespace os {
33
34class SkiaSurface;
35class WindowSpec;
36
37class SkiaWindow : public SkiaWindowPlatform {
38public:
39 SkiaWindow(const WindowSpec& spec);
40
41 // Returns the real and current window's size (without scale applied).
42 int width() const override;
43 int height() const override;
44
45 NativeCursor nativeCursor() override;
46 bool setCursor(NativeCursor cursor) override;
47
48private:
49 NativeCursor m_nativeCursor;
50};
51
52} // namespace os
53
54#endif
55