HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
gui_window_vulkan_macos.hpp
1// Copyright Take Vos 2019-2021.
2// Distributed under the Boost Software License, Version 1.0.
3// (See accompanying file LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt)
4
5#pragma once
6
7#include "gui_window_vulkan.hpp"
8#include <unordered_map>
9
10namespace tt {
11class Application_macos;
12}
13
14namespace tt {
15
17public:
18 //HWND win32Window = nullptr;
19
20 gui_window_vulkan_macos(std::shared_ptr<WindowDelegate> const &delegate, Label &&title);
22
24 gui_window_vulkan_macos &operator=(const gui_window_vulkan_macos &) = delete;
27
28 void createWindow(const std::string &title, i32x4 extent);
29 //LRESULT windowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
30
31 static void createWindowClass();
32
33 //static const wchar_t *win32WindowClassName;
34 //static WNDCLASSW win32WindowClass;
35 //static bool win32WindowClassIsRegistered;
36 //static std::unordered_map<HWND, gui_window_vulkan_macos *> win32WindowMap;
37 static bool firstWindowHasBeenOpened;
38
39 vk::SurfaceKHR getSurface() const override;
40
41 void set_cursor(mouse_cursor cursor) noexcept override;
42
43 void close_window() override;
44
45 void minimize_window() override;
46
47 void maximize_window() override;
48
49 void normalize_window() override;
50
51 void set_window_size(i32x4 extent) override {}
52
53 [[nodiscard]] std::string get_text_from_clipboard() const noexcept override {
54 return "<clipboard>";
55 }
56
57 void set_text_on_clipboard(std::string str) noexcept override { }
58
59
60private:
61 //void setOSWindowRectangleFromRECT(RECT aarect) noexcept;
62
63 //TRACKMOUSEEVENT trackMouseLeaveEventParameters;
64 bool trackingMouseLeaveEvent = false;
65
66 //static LRESULT CALLBACK _WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
67
72};
73
74}
Definition Application_macos.hpp:10
f32x4 extent
The current window extent as set by the GPU library.
Definition gui_window.hpp:78
Definition gui_window_vulkan.hpp:31
Definition gui_window_vulkan_macos.hpp:16
vk::SurfaceKHR getSurface() const override
void maximize_window() override
Ask the operating system to maximize this window.
std::string get_text_from_clipboard() const noexcept override
Retrieve a text string from the operating system's clip-board.
Definition gui_window_vulkan_macos.hpp:53
void minimize_window() override
Ask the operating system to minimize this window.
void set_cursor(mouse_cursor cursor) noexcept override
Set the mouse cursor icon.
void normalize_window() override
Ask the operating system to normalize this window.
void set_text_on_clipboard(std::string str) noexcept override
Place a text string on the operating system's clip-board.
Definition gui_window_vulkan_macos.hpp:57
void close_window() override
Ask the operating system to close this window.
A 4D vector.
Definition ivec.hpp:38