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
#pragma once
4
5
6
#undef USUAL_OPERATING_SYSTEM_SUPPRESSIONS
7
#include "acme/_operating_system.h"
8
#include "acme/windowing/window.h"
9
#include "acme/operating_system/window.h"
10
11
12
namespace
operating_system
13
{
14
15
16
struct
macos_window_t
17
{
18
19
20
//::u64 m_uCgwindowidMacosWindow;
21
union
22
{
23
::u64 m_uNSWindow;
24
::u64 m_uNSImpact;
25
};
26
//::u64 m_uTag;
27
28
29
void
Null() { m_uNSWindow = 0;
//m_uTag = 0;
30
}
31
32
33
bool
is_set()
const
{
34
return
this->m_uNSWindow != 0;
35
}
36
bool
is_null()
const
37
{
38
return
!this->is_set();
39
}
40
41
42
};
43
44
45
class
macos_window :
public
::operating_system::a_window
<::windowing::e_operating_ambient_macos, macos_window_t>
46
{
47
public
:
48
49
50
using
BASE_TYPE =
::operating_system::a_window<::windowing::e_operating_ambient_macos, macos_window_t>
;
51
52
53
using
BASE_TYPE::BASE_TYPE;
54
55
56
// macos_window(::uptr uptr)
57
// {
58
//
59
// this->operator=(uptr);
60
//
61
// }
62
63
macos_window(::uptr uptr, ::windowing::enum_operating_ambient eoperatingambient)
64
{
65
66
m_eoperatingambient = eoperatingambient;
67
m_window.m_uNSWindow = uptr;
68
//m_window.m_uTag = uTag;
69
m_pacmewindowingwindow =
nullptr
;
70
m_opaque.m_ulla[2]= 0;
71
72
}
73
74
::uptr window_uptr()
const
75
{
76
77
if
(this->m_eoperatingambient == ::windowing::e_operating_ambient_macos)
78
{
79
80
return
this->m_window.m_uNSWindow;
81
82
}
83
else
if
(this->m_eoperatingambient == ::windowing::e_operating_ambient_macos_impact_by_tag)
84
{
85
86
return
this->m_window.m_uNSWindow;
87
88
}
89
else
90
{
91
92
return
NULL;
93
94
}
95
96
}
97
98
::uptr impact_uptr()
const
99
{
100
101
if
(this->m_eoperatingambient == ::windowing::e_operating_ambient_macos_impact2)
102
{
103
104
return
this->m_window.m_uNSImpact;
105
106
}
107
else
108
{
109
110
return
NULL;
111
112
}
113
114
}
115
116
117
macos_window & operator=(::uptr uNSWindow)
118
{
119
120
if
(!uNSWindow)
121
{
122
123
this->Null();
124
125
}
126
else
127
{
128
129
this->m_eoperatingambient = ::windowing::e_operating_ambient_macos;
130
this->m_window.m_uNSWindow = uNSWindow;
131
132
}
133
134
return
*
this
;
135
136
}
137
138
};
139
140
141
}
// namespace operating_system
142
143
144
namespace
macos
145
{
146
147
148
// class CLASS_DECL_ACME window :
149
// virtual public ::acme::windowing::window
150
// {
151
// public:
152
//
153
//
154
// ::operating_system::macos_window m_macoswindow;
155
// ::f64 m_dVelocity;
156
// class ::time m_timeLastSizeMove;
157
// ::i32_point m_pointSizeMoveStart;
158
// bool m_bMovingNow;
159
// bool m_bDefaultSystemMenu;
160
// bool m_bSizeMoveMode;
161
// //CGWindowID m_cgwindowid;
162
// HMENU m_hmenuSystem;
163
// ::i32 m_iDebugAtom = 0;
164
//
165
// window();
166
// ~window() override;
167
//
168
// virtual bool on_window_procedure(LRESULT & lresult, UINT message, WPARAM wparam, LPARAM lparam);
169
// virtual bool _on_default_system_menu_init_menu(LRESULT & lresult, WPARAM wparam);
170
// virtual bool _on_default_system_menu_command(LRESULT & lresult, WPARAM wparam, LPARAM lparam);
171
// virtual void _defer_show_system_menu(::user::mouse * ppmouse);
172
//
173
//
174
// virtual CGWindowID _CGWindowID() const;
175
//
176
//
177
// };
178
//
179
//
180
// CLASS_DECL_ACME LRESULT CALLBACK window_procedure(CGWindowID cgwindowid, UINT msg, WPARAM wParam, LPARAM lParam);
181
// CLASS_DECL_ACME HINSTANCE get_window_procedure_hinstance();
182
183
184
}
// namespace macos
185
186
187
operating_system::a_window
Definition
window.h:289
operating_system::macos_window_t
Definition
window.h:17
operating_system
macos
window.h
Generated by
1.17.0