Bitcoin ABC 0.26.3
P2P Digital Currency
Loading...
Searching...
No Matches
macdockiconhandler.mm
Go to the documentation of this file.
1// Copyright (c) 2011-2019 The Bitcoin Core developers
2// Distributed under the MIT software license, see the accompanying
3// file COPYING or http://www.opensource.org/licenses/mit-license.php.
4
6
7#include <AppKit/AppKit.h>
8#include <objc/runtime.h>
9
11
12bool dockClickHandler(id self, SEL _cmd, ...) {
15
17
18 // Return NO (false) to suppress the default macOS actions
19 return false;
20}
21
23 Class delClass =
24 (Class)[[[NSApplication sharedApplication] delegate] class];
25 SEL shouldHandle =
26 sel_registerName("applicationShouldHandleReopen:hasVisibleWindows:");
28}
29
33
38
42
macOS-specific Dock icon handler.
static MacDockIconHandler * instance()
static MacDockIconHandler * s_instance
void setupDockClickHandler()
bool dockClickHandler(id self, SEL _cmd,...)
void ForceActivation()
Force application activation on macOS.
T GetRand(T nMax=std::numeric_limits< T >::max()) noexcept
Generate a uniform random integer of type T in the range [0..nMax) nMax defaults to std::numeric_limi...
Definition random.h:85