File tree 4 files changed +36
-12
lines changed
4 files changed +36
-12
lines changed Original file line number Diff line number Diff line change 4
4
5
5
namespace nativeapi {
6
6
7
- AccessibilityManager::AccessibilityManager () {
8
- std::cout << " AccessibilityManager::AccessibilityManager()" << std::endl;
9
- };
7
+ AccessibilityManager::AccessibilityManager () {}
10
8
11
- AccessibilityManager::~AccessibilityManager () {
12
- std::cout << " AccessibilityManager::~AccessibilityManager()" << std::endl;
13
- };
9
+ AccessibilityManager::~AccessibilityManager () {}
14
10
15
11
} // namespace nativeapi
Original file line number Diff line number Diff line change 4
4
5
5
namespace nativeapi {
6
6
7
- BroadcastCenter::BroadcastCenter () {
8
- std::cout << " BroadcastCenter::BroadcastCenter()" << std::endl;
9
- };
7
+ BroadcastCenter::BroadcastCenter () {}
10
8
11
- BroadcastCenter::~BroadcastCenter () {
12
- std::cout << " BroadcastCenter::~BroadcastCenter()" << std::endl;
13
- };
9
+ BroadcastCenter::~BroadcastCenter () {}
14
10
15
11
BroadcastEventHandler::BroadcastEventHandler (
16
12
std::function<void (const std::string& topic, const std::string& message)>
Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ class Window {
18
18
void Blur ();
19
19
bool IsFocused () const ;
20
20
void Show ();
21
+ void ShowInactive ();
21
22
void Hide ();
22
23
bool IsVisible () const ;
23
24
void Maximize ();
@@ -62,6 +63,10 @@ class Window {
62
63
bool HasShadow () const ;
63
64
void SetOpacity (float opacity);
64
65
float GetOpacity () const ;
66
+ void SetVisibleOnAllWorkspaces (bool is_visible_on_all_workspaces);
67
+ bool IsVisibleOnAllWorkspaces () const ;
68
+ void SetIgnoreMouseEvents (bool is_ignore_mouse_events);
69
+ bool IsIgnoreMouseEvents () const ;
65
70
void SetFocusable (bool is_focusable);
66
71
bool IsFocusable () const ;
67
72
void StartDragging ();
Original file line number Diff line number Diff line change 39
39
}
40
40
41
41
void Window::Show () {
42
+ [pimpl_->ns_window_ setIsVisible: YES ];
43
+ // Panels receive key focus when shown but should not activate the app.
44
+ if (![pimpl_->ns_window_ isKindOfClass: [NSPanel class ]]) {
45
+ [[NSApplication sharedApplication ] activateIgnoringOtherApps: YES ];
46
+ }
47
+ [pimpl_->ns_window_ makeKeyAndOrderFront: nil ];
48
+ }
49
+
50
+ void Window::ShowInactive () {
42
51
[pimpl_->ns_window_ setIsVisible: YES ];
43
52
[pimpl_->ns_window_ orderFrontRegardless ];
44
53
}
282
291
return [pimpl_->ns_window_ alphaValue ];
283
292
}
284
293
294
+ void Window::SetVisibleOnAllWorkspaces (bool is_visible_on_all_workspaces) {
295
+ [pimpl_->ns_window_ setCollectionBehavior: is_visible_on_all_workspaces
296
+ ? NSWindowCollectionBehaviorCanJoinAllSpaces
297
+ : NSWindowCollectionBehaviorDefault];
298
+ }
299
+
300
+ bool Window::IsVisibleOnAllWorkspaces () const {
301
+ return [pimpl_->ns_window_ collectionBehavior ] & NSWindowCollectionBehaviorCanJoinAllSpaces;
302
+ }
303
+
304
+ void Window::SetIgnoreMouseEvents (bool is_ignore_mouse_events) {
305
+ [pimpl_->ns_window_ setIgnoresMouseEvents: is_ignore_mouse_events];
306
+ }
307
+
308
+ bool Window::IsIgnoreMouseEvents () const {
309
+ return [pimpl_->ns_window_ ignoresMouseEvents ];
310
+ }
311
+
285
312
void Window::SetFocusable (bool is_focusable) {
286
313
// TODO: Implement this
287
314
}
You can’t perform that action at this time.
0 commit comments