acme
Foundational cross-platform layer of the ca2 framework
Toggle main menu visibility
Loading...
Searching...
No Matches
window.h
1
// Created by camilo on 2024-09-13 15:55 <3ThomasBorregaardSorensen
2
// From windows/window.h by camilo on 2026-02-28 21:17 <3ThomasBorregaardSørensen!!
3
// From macos/window.h by camilo on 2026-03-19 08:35 <3ThomasBorregaardSørensen!!
4
#pragma once
5
6
7
#undef USUAL_OPERATING_SYSTEM_SUPPRESSIONS
8
#include "acme/_operating_system.h"
9
#include "acme/windowing/window.h"
10
#include "acme/operating_system/window.h"
11
12
13
namespace
operating_system
14
{
15
16
union
ios_window_t
17
{
18
19
20
UIWindow_uptr m_uiwindowuptrIosWindow;
21
22
23
void
Null() { m_uiwindowuptrIosWindow = 0; }
24
25
};
26
27
28
class
ios_window :
public
::operating_system::a_window
<e_operating_system_ios, ios_window_t>
29
{
30
public
:
31
32
33
using
BASE_TYPE =
::operating_system::a_window<e_operating_system_ios, ios_window_t>
;
34
35
36
using
BASE_TYPE::BASE_TYPE;
37
38
39
ios_window(UIWindow_uptr uiwindowuptr)
40
{
41
42
this->operator=(uiwindowuptr);
43
44
}
45
46
47
UIWindow_uptr as_UIWindow_uptr()
const
48
{
49
50
if
(this->m_eoperatingsystem == e_operating_system_macos)
51
{
52
53
if
(!this->m_window.m_uiwindowuptrIosWindow)
54
{
55
56
throw ::exception(error_wrong_state);
57
58
}
59
60
return
this->m_window.m_uiwindowuptrIosWindow;
61
62
}
63
else
if
(this->m_window.m_uiwindowuptrIosWindow)
64
{
65
66
throw ::exception(error_wrong_state);
67
68
}
69
else
70
{
71
72
return
NULL;
73
74
}
75
76
}
77
78
79
using
BASE_TYPE::operator=;
80
81
ios_window & operator=(UIWindow_uptr uiwindowuptr)
82
{
83
84
if
(!uiwindowuptr)
85
{
86
87
this->Null();
88
89
}
90
else
91
{
92
93
this->m_eoperatingsystem = e_operating_system_macos;
94
this->m_window.m_uiwindowuptrIosWindow = uiwindowuptr;
95
96
}
97
98
return
*
this
;
99
100
}
101
102
};
103
104
105
}
// namespace operating_system
106
107
operating_system::a_window
Definition
window.h:289
operating_system::ios_window_t
Definition
window.h:17
operating_system
ios
window.h
Generated by
1.17.0