swift
Loading...
Searching...
No Matches
macosinpututils.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (C) 2019 swift Project Community / Contributors
2// SPDX-License-Identifier: GPL-3.0-or-later OR LicenseRef-swift-pilot-client-1
3
4#ifndef SWIFT_INPUT_MACOSINPUTUTILS_H
5#define SWIFT_INPUT_MACOSINPUTUTILS_H
6
8
9#include <CoreFoundation/CoreFoundation.h>
10
11namespace swift::input
12{
14 class CMacOSInputUtils
15 {
16 public:
17 CMacOSInputUtils() = delete;
18
20 static bool hasAccess();
21
23 static bool requestAccess();
24
26 static CFMutableDictionaryRef createDeviceMatchingDictionary(UInt32 usagePage, UInt32 usage);
27 };
28} // namespace swift::input
29
30#endif // SWIFT_INPUT_MACOSINPUTUTILS_H
static CFMutableDictionaryRef createDeviceMatchingDictionary(UInt32 usagePage, UInt32 usage)
Creates a new device matching dict using usagePage and usage.
static bool hasAccess()
Check OS permission for input monitoring access.
static bool requestAccess()
Request OS permission for input monitoring access.