From 5d6cf7612652e5eed31fd61afdbeaa6096c083d8 Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Sat, 14 Jan 2023 21:33:19 +0100 Subject: [PATCH] Add bindings for the IOBluetoothUI framework. Issue #381 --- docs/apinotes/IOBluetoothUI.rst | 15 + docs/changelog.rst | 2 +- docs/notes/framework-wrappers.rst | 3 +- .../Lib/IOBluetooth/__init__.py | 2 +- pyobjc-framework-IOBluetooth/setup.py | 1 - .../Lib/IOBluetoothUI/__init__.py | 30 + .../Lib/IOBluetoothUI/_metadata.py | 123 ++ pyobjc-framework-IOBluetoothUI/License.txt | 10 + pyobjc-framework-IOBluetoothUI/MANIFEST.in | 14 + .../PyObjCTest/__init__.py | 1 + .../test_iobluetoothobjectpushuicontroller.py | 10 + .../test_iobluetoothpairingcontroller.py | 10 + .../test_iobluetoothpasskeydisplay.py | 17 + ...est_iobluetoothservicebrowsercontroller.py | 22 + .../PyObjCTest/test_iobluetoothui.py | 28 + .../PyObjCTest/test_iobluetoothuiuserlib.py | 41 + .../metadata/IOBluetoothUI.fwinfo | 154 ++ .../metadata/metadata.ini | 2 + .../metadata/raw/arm64-13.1.fwinfo | 1474 +++++++++++++++++ .../metadata/raw/x86_64-13.1.fwinfo | 1474 +++++++++++++++++ .../pyobjc_setup.py | 670 ++++++++ pyobjc-framework-IOBluetoothUI/setup.py | 25 + pyobjc/setup.py | 1 + 23 files changed, 4125 insertions(+), 4 deletions(-) create mode 100644 docs/apinotes/IOBluetoothUI.rst create mode 100644 pyobjc-framework-IOBluetoothUI/Lib/IOBluetoothUI/__init__.py create mode 100644 pyobjc-framework-IOBluetoothUI/Lib/IOBluetoothUI/_metadata.py create mode 100644 pyobjc-framework-IOBluetoothUI/License.txt create mode 100644 pyobjc-framework-IOBluetoothUI/MANIFEST.in create mode 100644 pyobjc-framework-IOBluetoothUI/PyObjCTest/__init__.py create mode 100644 pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothobjectpushuicontroller.py create mode 100644 pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothpairingcontroller.py create mode 100644 pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothpasskeydisplay.py create mode 100644 pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothservicebrowsercontroller.py create mode 100644 pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothui.py create mode 100644 pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothuiuserlib.py create mode 100644 pyobjc-framework-IOBluetoothUI/metadata/IOBluetoothUI.fwinfo create mode 100644 pyobjc-framework-IOBluetoothUI/metadata/metadata.ini create mode 100644 pyobjc-framework-IOBluetoothUI/metadata/raw/arm64-13.1.fwinfo create mode 100644 pyobjc-framework-IOBluetoothUI/metadata/raw/x86_64-13.1.fwinfo create mode 100644 pyobjc-framework-IOBluetoothUI/pyobjc_setup.py create mode 100644 pyobjc-framework-IOBluetoothUI/setup.py diff --git a/docs/apinotes/IOBluetoothUI.rst b/docs/apinotes/IOBluetoothUI.rst new file mode 100644 index 0000000000..f018dbcb70 --- /dev/null +++ b/docs/apinotes/IOBluetoothUI.rst @@ -0,0 +1,15 @@ +API Notes: IOBluetoothUI framework +=================================== + +The full API is described in `Apple's documentation`__, both +the C and Objective-C APIs are available (but see the `API Notes`_ below). + +.. __: https://developer.apple.com/documentation/iobluetoothui/?preferredLanguage=occ + +These bindings are accessed through the ``IOBluetoothUI`` package (that is, ``import IOBluetoothUI``). + + +API Notes +--------- + +The full API is available from Python. diff --git a/docs/changelog.rst b/docs/changelog.rst index 3b9e582eb5..1f6484fda8 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -336,7 +336,7 @@ improvements as described below). ``objc.NSDecimal(0)`` was interpreted as true-ish in boolean contexts, it now is interpreted as false-ish just like other number types. -* Add bindings for the IOBluetooth framework +* :issue:`381`: Add bindings for the IOBluetooth and IOBluetoothUI frameworks Version 9.0.1 ------------- diff --git a/docs/notes/framework-wrappers.rst b/docs/notes/framework-wrappers.rst index 402f845fd7..e60974015b 100644 --- a/docs/notes/framework-wrappers.rst +++ b/docs/notes/framework-wrappers.rst @@ -337,7 +337,7 @@ The framework name links to API notes for that framework, the python packages li +--------------------------------------------------------------------------------------+------------------------------------------------------+-----------------------------------------+ | :doc:`IOBluetooth ` | `pyobjc-framework-IOBluetooth`_ | | +--------------------------------------------------------------------------------------+------------------------------------------------------+-----------------------------------------+ -| IOBluetoothUI | - | Will not be wrapped. | +| :doc:`IOBluetoothUI ` | `pyobjc-framework-IOBluetoothUI`_ | | +--------------------------------------------------------------------------------------+------------------------------------------------------+-----------------------------------------+ | IOKit | - | Will not be wrapped. | +--------------------------------------------------------------------------------------+------------------------------------------------------+-----------------------------------------+ @@ -788,3 +788,4 @@ prioritizing work. .. _`pyobjc-framework-SafetyKit`: https://pypi.org/project/pyobjc-framework-SafetyKit/ .. _`pyobjc-framework-ThreadNetwork`: https://pypi.org/project/pyobjc-framework-ThreadNetwork/ .. _`pyobjc-framework-IOBluetooth`: https://pypi.org/project/pyobjc-framework-IOBluetooth/ +.. _`pyobjc-framework-IOBluetoothUI`: https://pypi.org/project/pyobjc-framework-IOBluetoothUI/ diff --git a/pyobjc-framework-IOBluetooth/Lib/IOBluetooth/__init__.py b/pyobjc-framework-IOBluetooth/Lib/IOBluetooth/__init__.py index df7b61459c..5c63013a40 100644 --- a/pyobjc-framework-IOBluetooth/Lib/IOBluetooth/__init__.py +++ b/pyobjc-framework-IOBluetooth/Lib/IOBluetooth/__init__.py @@ -15,7 +15,7 @@ sys.modules["IOBluetooth"] = mod = objc.ObjCLazyModule( "IOBluetooth", - "com.apple.IOBluetooth", + "com.apple.Bluetooth", objc.pathForFramework("/System/Library/Frameworks/IOBluetooth.framework"), _metadata.__dict__, None, diff --git a/pyobjc-framework-IOBluetooth/setup.py b/pyobjc-framework-IOBluetooth/setup.py index 81d8850317..92e33136fe 100644 --- a/pyobjc-framework-IOBluetooth/setup.py +++ b/pyobjc-framework-IOBluetooth/setup.py @@ -16,7 +16,6 @@ setup( name="pyobjc-framework-IOBluetooth", description="Wrappers for the framework IOBluetooth on macOS", - min_os_level="10.2", packages=["IOBluetooth"], ext_modules=[ Extension( diff --git a/pyobjc-framework-IOBluetoothUI/Lib/IOBluetoothUI/__init__.py b/pyobjc-framework-IOBluetoothUI/Lib/IOBluetoothUI/__init__.py new file mode 100644 index 0000000000..a155545184 --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/Lib/IOBluetoothUI/__init__.py @@ -0,0 +1,30 @@ +""" +Python mapping for the IOBluetoothUI framework. + +This module does not contain docstrings for the wrapped code, check Apple's +documentation for details on how to use these functions and classes. +""" + +import sys + +import IOBluetooth +import objc +from . import _metadata + + +sys.modules["IOBluetoothUI"] = mod = objc.ObjCLazyModule( + "IOBluetoothUI", + "com.apple.BluetoothUI", + objc.pathForFramework("/System/Library/Frameworks/IOBluetoothUI.framework"), + _metadata.__dict__, + None, + { + "__doc__": __doc__, + "objc": objc, + "__path__": __path__, + "__loader__": globals().get("__loader__", None), + }, + (IOBluetooth,), +) + +del sys.modules["IOBluetoothUI._metadata"] diff --git a/pyobjc-framework-IOBluetoothUI/Lib/IOBluetoothUI/_metadata.py b/pyobjc-framework-IOBluetoothUI/Lib/IOBluetoothUI/_metadata.py new file mode 100644 index 0000000000..775365f480 --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/Lib/IOBluetoothUI/_metadata.py @@ -0,0 +1,123 @@ +# This file is generated by objective.metadata +# +# Last update: Sat Jan 14 21:30:00 2023 +# +# flake8: noqa + +import objc, sys +from typing import NewType + +if sys.maxsize > 2**32: + + def sel32or64(a, b): + return b + +else: + + def sel32or64(a, b): + return a + + +if objc.arch == "arm64": + + def selAorI(a, b): + return a + +else: + + def selAorI(a, b): + return b + + +misc = {} +constants = """$$""" +enums = """$kBluetoothKeyboardANSIReturn@0$kBluetoothKeyboardISOReturn@1$kBluetoothKeyboardJISReturn@2$kBluetoothKeyboardNoReturn@3$kIOBluetoothServiceBrowserControllerOptionsAutoStartInquiry@1$kIOBluetoothServiceBrowserControllerOptionsDisconnectWhenDone@2$kIOBluetoothServiceBrowserControllerOptionsNone@0$kIOBluetoothUISuccess@-1000$kIOBluetoothUIUserCanceledErr@-1001$""" +misc.update( + { + "BluetoothKeyboardReturnType": NewType("BluetoothKeyboardReturnType", int), + "IOBluetoothServiceBrowserControllerOptions": NewType( + "IOBluetoothServiceBrowserControllerOptions", int + ), + } +) +misc.update({}) +misc.update({}) +functions = { + "IOBluetoothGetDeviceSelectorController": (b"^{OpaqueIOBluetoothObjectRef=}",), + "IOBluetoothValidateHardwareWithDescription": (b"i^{__CFString=}^{__CFString=}",), + "IOBluetoothGetPairingController": (b"^{OpaqueIOBluetoothObjectRef=}",), +} +aliases = { + "IOBluetoothServiceBrowserControllerRef": "IOBluetoothObjectRef", + "IOBluetoothDeviceSelectorControllerRef": "IOBluetoothObjectRef", + "IOBluetoothPairingControllerRef": "IOBluetoothObjectRef", +} +r = objc.registerMetaDataForSelector +objc._updatingMetadata(True) +try: + r( + b"IOBluetoothDeviceSelectorController", + b"setSearchAttributes:", + {"arguments": {2: {"type_modifier": b"n"}}}, + ) + r( + b"IOBluetoothObjectPushUIController", + b"isTransferInProgress", + {"retval": {"type": b"Z"}}, + ) + r( + b"IOBluetoothPairingController", + b"setSearchAttributes:", + {"arguments": {2: {"type_modifier": b"n"}}}, + ) + r(b"IOBluetoothPasskeyDisplay", b"isIncomingRequest", {"retval": {"type": b"Z"}}) + r( + b"IOBluetoothPasskeyDisplay", + b"setIsIncomingRequest:", + {"arguments": {2: {"type": b"Z"}}}, + ) + r( + b"IOBluetoothPasskeyDisplay", + b"setPasskey:forDevice:usingSSP:", + {"arguments": {4: {"type": b"Z"}}}, + ) + r( + b"IOBluetoothPasskeyDisplay", + b"setPasskeyIndicatorEnabled:", + {"arguments": {2: {"type": b"Z"}}}, + ) + r( + b"IOBluetoothPasskeyDisplay", + b"setUsePasskeyNotificaitons:", + {"arguments": {2: {"type": b"Z"}}}, + ) + r( + b"IOBluetoothPasskeyDisplay", + b"usePasskeyNotificaitons", + {"retval": {"type": b"Z"}}, + ) + r( + b"IOBluetoothServiceBrowserController", + b"discover:", + {"arguments": {2: {"type_modifier": b"o"}}}, + ) + r( + b"IOBluetoothServiceBrowserController", + b"discoverAsSheetForWindow:withRecord:", + {"arguments": {3: {"type_modifier": b"o"}}}, + ) + r( + b"IOBluetoothServiceBrowserController", + b"discoverWithDeviceAttributes:serviceList:serviceRecord:", + {"arguments": {2: {"type_modifier": b"n"}, 4: {"type_modifier": b"o"}}}, + ) + r( + b"IOBluetoothServiceBrowserController", + b"setSearchAttributes:", + {"arguments": {2: {"type_modifier": b"n"}}}, + ) +finally: + objc._updatingMetadata(False) +expressions = {} + +# END OF FILE diff --git a/pyobjc-framework-IOBluetoothUI/License.txt b/pyobjc-framework-IOBluetoothUI/License.txt new file mode 100644 index 0000000000..14028493bd --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/License.txt @@ -0,0 +1,10 @@ +(This is the MIT license, note that libffi-src is a separate product with its own license) + +Copyright 2002, 2003 - Bill Bumgarner, Ronald Oussoren, Steve Majewski, Lele Gaifax, et.al. +Copyright 2003-2022 - Ronald Oussoren + + Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + + The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/pyobjc-framework-IOBluetoothUI/MANIFEST.in b/pyobjc-framework-IOBluetoothUI/MANIFEST.in new file mode 100644 index 0000000000..69e52b0986 --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/MANIFEST.in @@ -0,0 +1,14 @@ +include *.txt MANIFEST.in *.py +graft Doc +graft Examples +graft Lib +graft Modules +graft source-deps +graft PyObjCTest +graft metadata +global-exclude .DS_Store +global-exclude *.pyc +global-exclude *.pyo +global-exclude *.so +prune Lib/*/*.dSYM +prune PyObjCTest/*.dSYM diff --git a/pyobjc-framework-IOBluetoothUI/PyObjCTest/__init__.py b/pyobjc-framework-IOBluetoothUI/PyObjCTest/__init__.py new file mode 100644 index 0000000000..6b9deff98d --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/PyObjCTest/__init__.py @@ -0,0 +1 @@ +""" test suite """ diff --git a/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothobjectpushuicontroller.py b/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothobjectpushuicontroller.py new file mode 100644 index 0000000000..5c666bb30c --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothobjectpushuicontroller.py @@ -0,0 +1,10 @@ +from PyObjCTools.TestSupport import TestCase + +import IOBluetoothUI + + +class TestIOBluetoothObjectPushUIController(TestCase): + def test_methods(self): + self.assertResultIsBOOL( + IOBluetoothUI.IOBluetoothObjectPushUIController.isTransferInProgress + ) diff --git a/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothpairingcontroller.py b/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothpairingcontroller.py new file mode 100644 index 0000000000..6be4270948 --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothpairingcontroller.py @@ -0,0 +1,10 @@ +from PyObjCTools.TestSupport import TestCase + +import IOBluetoothUI + + +class TestIOBluetoothPairingController(TestCase): + def test_methods(self): + self.assertArgIsIn( + IOBluetoothUI.IOBluetoothPairingController.setSearchAttributes_, 0 + ) diff --git a/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothpasskeydisplay.py b/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothpasskeydisplay.py new file mode 100644 index 0000000000..9ed9a4bcc9 --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothpasskeydisplay.py @@ -0,0 +1,17 @@ +from PyObjCTools.TestSupport import TestCase + +import IOBluetoothUI + + +class TestIOBluetoothPasskeyDisplay(TestCase): + def test_constants(self): + self.assertIsEnumType(IOBluetoothUI.BluetoothKeyboardReturnType) + self.assertEqual(IOBluetoothUI.kBluetoothKeyboardANSIReturn, 0) + self.assertEqual(IOBluetoothUI.kBluetoothKeyboardISOReturn, 1) + self.assertEqual(IOBluetoothUI.kBluetoothKeyboardJISReturn, 2) + self.assertEqual(IOBluetoothUI.kBluetoothKeyboardNoReturn, 3) + + def test_methods(self): + self.assertArgIsBOOL( + IOBluetoothUI.IOBluetoothPasskeyDisplay.setPasskey_forDevice_usingSSP_, 2 + ) diff --git a/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothservicebrowsercontroller.py b/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothservicebrowsercontroller.py new file mode 100644 index 0000000000..655e2947fb --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothservicebrowsercontroller.py @@ -0,0 +1,22 @@ +from PyObjCTools.TestSupport import TestCase + +import IOBluetoothUI + + +class TestIOBluetoothServiceBrowserController(TestCase): + def test_methods(self): + self.assertArgIsOut( + IOBluetoothUI.IOBluetoothServiceBrowserController.discover_, 0 + ) + self.assertArgIsOut( + IOBluetoothUI.IOBluetoothServiceBrowserController.discoverAsSheetForWindow_withRecord_, + 1, + ) + self.assertArgIsOut( + IOBluetoothUI.IOBluetoothServiceBrowserController.discoverWithDeviceAttributes_serviceList_serviceRecord_, + 2, + ) + + self.assertArgIsIn( + IOBluetoothUI.IOBluetoothServiceBrowserController.setSearchAttributes_, 0 + ) diff --git a/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothui.py b/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothui.py new file mode 100644 index 0000000000..3dbfaebe5f --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothui.py @@ -0,0 +1,28 @@ +from PyObjCTools.TestSupport import TestCase + +import IOBluetoothUI + + +class TestCallableMetadata(TestCase): + def test_callable_metadata_is_sane(self): + self.assertCallableMetadataIsSane( + IOBluetoothUI, + exclude_attrs={ + ( + "NSObject", + "isKeyExcludedFromWebScript_", + ), + ( + "NSObject", + "utf8ValueSafe_", + ), + ( + "NSObject", + "utf8ValueSafe", + ), + ( + "NSObject", + "newTaggedNSStringWithASCIIBytes__length__", + ), + }, + ) diff --git a/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothuiuserlib.py b/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothuiuserlib.py new file mode 100644 index 0000000000..e5fd97f1fb --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/PyObjCTest/test_iobluetoothuiuserlib.py @@ -0,0 +1,41 @@ +from PyObjCTools.TestSupport import TestCase + +import IOBluetoothUI + + +class TestIOBluetoothUIUserLib(TestCase): + def test_types(self): + self.assertIs( + IOBluetoothUI.IOBluetoothDeviceSelectorControllerRef, + IOBluetoothUI.IOBluetoothObjectRef, + ) + self.assertIs( + IOBluetoothUI.IOBluetoothPairingControllerRef, + IOBluetoothUI.IOBluetoothObjectRef, + ) + self.assertIs( + IOBluetoothUI.IOBluetoothServiceBrowserControllerRef, + IOBluetoothUI.IOBluetoothObjectRef, + ) + + def test_constants(self): + self.assertIsEnumType(IOBluetoothUI.IOBluetoothServiceBrowserControllerOptions) + self.assertEqual( + IOBluetoothUI.kIOBluetoothServiceBrowserControllerOptionsNone, 0 + ) + self.assertEqual( + IOBluetoothUI.kIOBluetoothServiceBrowserControllerOptionsAutoStartInquiry, + 1 << 0, + ) + self.assertEqual( + IOBluetoothUI.kIOBluetoothServiceBrowserControllerOptionsDisconnectWhenDone, + 1 << 1, + ) + + self.assertEqual(IOBluetoothUI.kIOBluetoothUISuccess, -1000) + self.assertEqual(IOBluetoothUI.kIOBluetoothUIUserCanceledErr, -1001) + + def test_functions(self): + IOBluetoothUI.IOBluetoothValidateHardwareWithDescription + IOBluetoothUI.IOBluetoothGetPairingController + IOBluetoothUI.IOBluetoothGetDeviceSelectorController diff --git a/pyobjc-framework-IOBluetoothUI/metadata/IOBluetoothUI.fwinfo b/pyobjc-framework-IOBluetoothUI/metadata/IOBluetoothUI.fwinfo new file mode 100644 index 0000000000..16e8d90dda --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/metadata/IOBluetoothUI.fwinfo @@ -0,0 +1,154 @@ +// objective.metadata exceptions file, see its document +// for information on how to update this file. +{ + "definitions": { + "aliases": { + "IOBluetoothDeviceSelectorControllerRef": { "alias": "IOBluetoothObjectRef" }, + "IOBluetoothPairingControllerRef": { "alias": "IOBluetoothObjectRef" }, + "IOBluetoothServiceBrowserControllerRef": { "alias": "IOBluetoothObjectRef" } + }, + "enum_type": { + "IOBluetoothServiceBrowserControllerOptions": { "type": "I" }, + "BluetoothKeyboardReturnType": { "type": "I" } + }, + "classes": { + "IOBluetoothDeviceSelectorController": { + "methods": [ + { + "args": { + "3": {} + }, + "class_method": false, + "selector": "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:" + }, + { + "args": { + "0": { "type_modifier": "n" } + }, + "class_method": false, + "selector": "setSearchAttributes:" + }, + { + "class_method": false, + "retval": {}, + "selector": "getSearchAttributes" + } + ] + }, + "IOBluetoothObjectPushUIController": { + "methods": [ + { + "args": { + "3": {} + }, + "class_method": false, + "selector": "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:" + } + ] + }, + "IOBluetoothPairingController": { + "methods": [ + { + "args": { + "0": { "type_modifier": "n" } + }, + "class_method": false, + "selector": "setSearchAttributes:" + }, + { + "class_method": false, + "retval": {}, + "selector": "getSearchAttributes" + } + ] + }, + "IOBluetoothServiceBrowserController": { + "methods": [ + { + "args": { + "0": {} + }, + "class_method": true, + "selector": "browseDevices:options:" + }, + { + "args": { + "0": {} + }, + "class_method": true, + "selector": "browseDevicesAsSheetForWindow:options:window:" + }, + { + "args": { + "0": {} + }, + "class_method": true, + "selector": "withServiceBrowserControllerRef:" + }, + { + "class_method": false, + "retval": {}, + "selector": "getServiceBrowserControllerRef" + }, + { + "args": { + "0": { "type_modifier": "o" } + }, + "class_method": false, + "selector": "discover:" + }, + { + "args": { + "1": { "type_modifier": "o" } + }, + "class_method": false, + "selector": "discoverAsSheetForWindow:withRecord:" + }, + { + "args": { + "0": { "type_modifier": "n" }, + "2": { "type_modifier": "o" } + }, + "class_method": false, + "selector": "discoverWithDeviceAttributes:serviceList:serviceRecord:" + }, + { + "args": { + "3": {} + }, + "class_method": false, + "selector": "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:" + }, + { + "args": { + "0": { "type_modifier": "n" } + }, + "class_method": false, + "selector": "setSearchAttributes:" + }, + { + "class_method": false, + "retval": {}, + "selector": "getSearchAttributes" + } + ] + } + }, + "formal_protocols": {}, + "functions": { + "IOBluetoothGetDeviceSelectorController": { + "retval": {} + }, + "IOBluetoothGetPairingController": { + "retval": {} + }, + "IOBluetoothValidateHardwareWithDescription": { + "args": { + "0": {}, + "1": {} + } + } + }, + "informal_protocols": {} + } +} diff --git a/pyobjc-framework-IOBluetoothUI/metadata/metadata.ini b/pyobjc-framework-IOBluetoothUI/metadata/metadata.ini new file mode 100644 index 0000000000..2b2d318ade --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/metadata/metadata.ini @@ -0,0 +1,2 @@ +[IOBluetoothUI] +framework = IOBluetoothUI diff --git a/pyobjc-framework-IOBluetoothUI/metadata/raw/arm64-13.1.fwinfo b/pyobjc-framework-IOBluetoothUI/metadata/raw/arm64-13.1.fwinfo new file mode 100644 index 0000000000..7196f35fa8 --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/metadata/raw/arm64-13.1.fwinfo @@ -0,0 +1,1474 @@ +// GENERATED FILE DO NOT EDIT +// +// This file was generated by objective.metadata +// Last update: Sat Jan 14 21:06:17 2023 +{ + "arch": "arm64", + "definitions": { + "aliases": {}, + "called_definitions": {}, + "cftypes": {}, + "classes": { + "IOBluetoothAccessibilityIgnoredImageCell": { + "categories": [], + "methods": [], + "name": "IOBluetoothAccessibilityIgnoredImageCell", + "properties": [], + "protocols": [], + "super": "NSImageCell" + }, + "IOBluetoothAccessibilityIgnoredTextFieldCell": { + "categories": [], + "methods": [], + "name": "IOBluetoothAccessibilityIgnoredTextFieldCell", + "properties": [], + "protocols": [], + "super": "NSTextFieldCell" + }, + "IOBluetoothDeviceSelectorController": { + "categories": [], + "methods": [ + { + "args": [], + "class_method": true, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "deviceSelector", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "runModal", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": ":", + "typestr_special": false + }, + { + "typestr": "^v", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getResults", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "I", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setOptions:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "I", + "typestr_special": false + }, + "selector": "getOptions", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setSearchAttributes:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + }, + "selector": "getSearchAttributes", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "addAllowedUUID:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "addAllowedUUIDArray:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "clearAllowedUUIDs", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setTitle:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getTitle", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setHeader:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getHeader", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setDescriptionText:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getDescriptionText", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPrompt:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getPrompt", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setCancel:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getCancel", + "visibility": "public" + } + ], + "name": "IOBluetoothDeviceSelectorController", + "properties": [], + "protocols": [], + "super": "NSWindowController" + }, + "IOBluetoothObjectPushUIController": { + "categories": [], + "methods": [ + { + "args": [ + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "initObjectPushWithBluetoothDevice:withFiles:delegate:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "runModal", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "runPanel", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": ":", + "typestr_special": false + }, + { + "typestr": "^v", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "stop", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setTitle:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getTitle", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setIconImage:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getDevice", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "Z", + "typestr_special": true + }, + "selector": "isTransferInProgress", + "visibility": "public" + } + ], + "name": "IOBluetoothObjectPushUIController", + "properties": [], + "protocols": [], + "super": "NSWindowController" + }, + "IOBluetoothPairingController": { + "categories": [], + "methods": [ + { + "args": [], + "class_method": true, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "pairingController", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "runModal", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getResults", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "I", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setOptions:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "I", + "typestr_special": false + }, + "selector": "getOptions", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setSearchAttributes:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + }, + "selector": "getSearchAttributes", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "addAllowedUUID:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "addAllowedUUIDArray:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "clearAllowedUUIDs", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setTitle:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getTitle", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setDescriptionText:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getDescriptionText", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPrompt:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getPrompt", + "visibility": "public" + } + ], + "name": "IOBluetoothPairingController", + "properties": [], + "protocols": [], + "super": "NSWindowController" + }, + "IOBluetoothPasskeyDisplay": { + "categories": [], + "methods": [ + { + "args": [], + "class_method": true, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "sharedDisplayView", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "Z", + "typestr_special": true + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPasskey:forDevice:usingSSP:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "advancePasskeyIndicator", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "retreatPasskeyIndicator", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "resetPasskeyIndicator", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setupUIForDevice:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setupUIForSSPDevice:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPasskeyString:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "Z", + "typestr_special": true + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPasskeyIndicatorEnabled:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "resetAll", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "Z", + "typestr_special": true + }, + "selector": "usePasskeyNotificaitons", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "Z", + "typestr_special": true + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setUsePasskeyNotificaitons:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "Z", + "typestr_special": true + }, + "selector": "isIncomingRequest", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "Z", + "typestr_special": true + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setIsIncomingRequest:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "passkey", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPasskey:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "returnImage", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setReturnImage:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "returnHighlightImage", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setReturnHighlightImage:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "centeredView", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setCenteredView:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "backgroundImageConstraint", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setBackgroundImageConstraint:", + "visibility": "public" + } + ], + "name": "IOBluetoothPasskeyDisplay", + "properties": [ + { + "attributes": [ + "assign" + ], + "name": "usePasskeyNotificaitons", + "typestr": "Z", + "typestr_special": true + }, + { + "attributes": [ + "assign" + ], + "name": "isIncomingRequest", + "typestr": "Z", + "typestr_special": true + }, + { + "attributes": [ + "copy" + ], + "name": "passkey", + "typestr": "@", + "typestr_special": false + }, + { + "attributes": [ + "retain" + ], + "name": "returnImage", + "typestr": "@", + "typestr_special": false + }, + { + "attributes": [ + "retain" + ], + "name": "returnHighlightImage", + "typestr": "@", + "typestr_special": false + }, + { + "attributes": [ + "assign" + ], + "name": "centeredView", + "typestr": "@", + "typestr_special": false + }, + { + "attributes": [ + "assign" + ], + "name": "backgroundImageConstraint", + "typestr": "@", + "typestr_special": false + } + ], + "protocols": [], + "super": "NSView" + }, + "IOBluetoothServiceBrowserController": { + "categories": [], + "methods": [ + { + "args": [ + { + "typestr": "I", + "typestr_special": false + } + ], + "class_method": true, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "serviceBrowserController:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^@", + "typestr_special": false + }, + { + "typestr": "I", + "typestr_special": false + } + ], + "class_method": true, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "browseDevices:options:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^@", + "typestr_special": false + }, + { + "typestr": "I", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": true, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "browseDevicesAsSheetForWindow:options:window:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^{OpaqueIOBluetoothObjectRef=}", + "typestr_special": false + } + ], + "class_method": true, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "withServiceBrowserControllerRef:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "^{OpaqueIOBluetoothObjectRef=}", + "typestr_special": false + }, + "selector": "getServiceBrowserControllerRef", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "discover:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "^@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "discoverAsSheetForWindow:withRecord:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "^@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "discoverWithDeviceAttributes:serviceList:serviceRecord:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "I", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setOptions:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "runModal", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": ":", + "typestr_special": false + }, + { + "typestr": "^v", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getResults", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "I", + "typestr_special": false + }, + "selector": "getOptions", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setSearchAttributes:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + }, + "selector": "getSearchAttributes", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "addAllowedUUID:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "addAllowedUUIDArray:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "clearAllowedUUIDs", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setTitle:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getTitle", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setDescriptionText:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getDescriptionText", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPrompt:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getPrompt", + "visibility": "public" + } + ], + "name": "IOBluetoothServiceBrowserController", + "properties": [], + "protocols": [], + "super": "NSWindowController" + } + }, + "enum": { + "kBluetoothKeyboardANSIReturn": 0, + "kBluetoothKeyboardISOReturn": 1, + "kBluetoothKeyboardJISReturn": 2, + "kBluetoothKeyboardNoReturn": 3, + "kIOBluetoothServiceBrowserControllerOptionsAutoStartInquiry": 1, + "kIOBluetoothServiceBrowserControllerOptionsDisconnectWhenDone": 2, + "kIOBluetoothServiceBrowserControllerOptionsNone": 0, + "kIOBluetoothUISuccess": -1000, + "kIOBluetoothUIUserCanceledErr": -1001 + }, + "enum_type": {}, + "expressions": {}, + "externs": {}, + "formal_protocols": {}, + "func_macros": {}, + "functions": { + "IOBluetoothGetDeviceSelectorController": { + "args": [ + { + "name": null, + "typestr": "v" + } + ], + "retval": { + "typestr": "^{OpaqueIOBluetoothObjectRef=}" + } + }, + "IOBluetoothGetPairingController": { + "args": [ + { + "name": null, + "typestr": "v" + } + ], + "retval": { + "typestr": "^{OpaqueIOBluetoothObjectRef=}" + } + }, + "IOBluetoothValidateHardwareWithDescription": { + "args": [ + { + "name": "cancelButtonTitle", + "typestr": "^{__CFString=}" + }, + { + "name": "descriptionText", + "typestr": "^{__CFString=}" + } + ], + "retval": { + "typestr": "i" + } + } + }, + "informal_protocols": {}, + "literals": {}, + "structs": {}, + "typedefs": { + "BluetoothKeyboardReturnType": "enum BluetoothKeyboardReturnType", + "IOBluetoothDeviceSelectorControllerRef": "struct OpaqueIOBluetoothObjectRef *", + "IOBluetoothPairingControllerRef": "struct OpaqueIOBluetoothObjectRef *", + "IOBluetoothServiceBrowserControllerOptions": "uint32_t", + "IOBluetoothServiceBrowserControllerRef": "struct OpaqueIOBluetoothObjectRef *" + } + }, + "framework": "IOBluetoothUI", + "headers": [ + "IOBluetoothDeviceSelectorController.h", + "IOBluetoothObjectPushUIController.h", + "IOBluetoothPairingController.h", + "IOBluetoothPasskeyDisplay.h", + "IOBluetoothServiceBrowserController.h", + "IOBluetoothUIUserLib.h" + ], + "release": "10.16", + "sdk": "/Users/ronald/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk" +} diff --git a/pyobjc-framework-IOBluetoothUI/metadata/raw/x86_64-13.1.fwinfo b/pyobjc-framework-IOBluetoothUI/metadata/raw/x86_64-13.1.fwinfo new file mode 100644 index 0000000000..f9a3eb1f44 --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/metadata/raw/x86_64-13.1.fwinfo @@ -0,0 +1,1474 @@ +// GENERATED FILE DO NOT EDIT +// +// This file was generated by objective.metadata +// Last update: Sat Jan 14 21:06:14 2023 +{ + "arch": "x86_64", + "definitions": { + "aliases": {}, + "called_definitions": {}, + "cftypes": {}, + "classes": { + "IOBluetoothAccessibilityIgnoredImageCell": { + "categories": [], + "methods": [], + "name": "IOBluetoothAccessibilityIgnoredImageCell", + "properties": [], + "protocols": [], + "super": "NSImageCell" + }, + "IOBluetoothAccessibilityIgnoredTextFieldCell": { + "categories": [], + "methods": [], + "name": "IOBluetoothAccessibilityIgnoredTextFieldCell", + "properties": [], + "protocols": [], + "super": "NSTextFieldCell" + }, + "IOBluetoothDeviceSelectorController": { + "categories": [], + "methods": [ + { + "args": [], + "class_method": true, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "deviceSelector", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "runModal", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": ":", + "typestr_special": false + }, + { + "typestr": "^v", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getResults", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "I", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setOptions:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "I", + "typestr_special": false + }, + "selector": "getOptions", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setSearchAttributes:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + }, + "selector": "getSearchAttributes", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "addAllowedUUID:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "addAllowedUUIDArray:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "clearAllowedUUIDs", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setTitle:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getTitle", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setHeader:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getHeader", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setDescriptionText:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getDescriptionText", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPrompt:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getPrompt", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setCancel:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getCancel", + "visibility": "public" + } + ], + "name": "IOBluetoothDeviceSelectorController", + "properties": [], + "protocols": [], + "super": "NSWindowController" + }, + "IOBluetoothObjectPushUIController": { + "categories": [], + "methods": [ + { + "args": [ + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "initObjectPushWithBluetoothDevice:withFiles:delegate:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "runModal", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "runPanel", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": ":", + "typestr_special": false + }, + { + "typestr": "^v", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "stop", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setTitle:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getTitle", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setIconImage:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getDevice", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "Z", + "typestr_special": true + }, + "selector": "isTransferInProgress", + "visibility": "public" + } + ], + "name": "IOBluetoothObjectPushUIController", + "properties": [], + "protocols": [], + "super": "NSWindowController" + }, + "IOBluetoothPairingController": { + "categories": [], + "methods": [ + { + "args": [], + "class_method": true, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "pairingController", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "runModal", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getResults", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "I", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setOptions:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "I", + "typestr_special": false + }, + "selector": "getOptions", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setSearchAttributes:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + }, + "selector": "getSearchAttributes", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "addAllowedUUID:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "addAllowedUUIDArray:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "clearAllowedUUIDs", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setTitle:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getTitle", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setDescriptionText:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getDescriptionText", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPrompt:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getPrompt", + "visibility": "public" + } + ], + "name": "IOBluetoothPairingController", + "properties": [], + "protocols": [], + "super": "NSWindowController" + }, + "IOBluetoothPasskeyDisplay": { + "categories": [], + "methods": [ + { + "args": [], + "class_method": true, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "sharedDisplayView", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "Z", + "typestr_special": true + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPasskey:forDevice:usingSSP:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "advancePasskeyIndicator", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "retreatPasskeyIndicator", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "resetPasskeyIndicator", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setupUIForDevice:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setupUIForSSPDevice:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPasskeyString:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "Z", + "typestr_special": true + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPasskeyIndicatorEnabled:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "resetAll", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "Z", + "typestr_special": true + }, + "selector": "usePasskeyNotificaitons", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "Z", + "typestr_special": true + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setUsePasskeyNotificaitons:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "Z", + "typestr_special": true + }, + "selector": "isIncomingRequest", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "Z", + "typestr_special": true + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setIsIncomingRequest:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "passkey", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPasskey:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "returnImage", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setReturnImage:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "returnHighlightImage", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setReturnHighlightImage:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "centeredView", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setCenteredView:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "backgroundImageConstraint", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setBackgroundImageConstraint:", + "visibility": "public" + } + ], + "name": "IOBluetoothPasskeyDisplay", + "properties": [ + { + "attributes": [ + "assign" + ], + "name": "usePasskeyNotificaitons", + "typestr": "Z", + "typestr_special": true + }, + { + "attributes": [ + "assign" + ], + "name": "isIncomingRequest", + "typestr": "Z", + "typestr_special": true + }, + { + "attributes": [ + "copy" + ], + "name": "passkey", + "typestr": "@", + "typestr_special": false + }, + { + "attributes": [ + "retain" + ], + "name": "returnImage", + "typestr": "@", + "typestr_special": false + }, + { + "attributes": [ + "retain" + ], + "name": "returnHighlightImage", + "typestr": "@", + "typestr_special": false + }, + { + "attributes": [ + "assign" + ], + "name": "centeredView", + "typestr": "@", + "typestr_special": false + }, + { + "attributes": [ + "assign" + ], + "name": "backgroundImageConstraint", + "typestr": "@", + "typestr_special": false + } + ], + "protocols": [], + "super": "NSView" + }, + "IOBluetoothServiceBrowserController": { + "categories": [], + "methods": [ + { + "args": [ + { + "typestr": "I", + "typestr_special": false + } + ], + "class_method": true, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "serviceBrowserController:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^@", + "typestr_special": false + }, + { + "typestr": "I", + "typestr_special": false + } + ], + "class_method": true, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "browseDevices:options:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^@", + "typestr_special": false + }, + { + "typestr": "I", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": true, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "browseDevicesAsSheetForWindow:options:window:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^{OpaqueIOBluetoothObjectRef=}", + "typestr_special": false + } + ], + "class_method": true, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "withServiceBrowserControllerRef:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "^{OpaqueIOBluetoothObjectRef=}", + "typestr_special": false + }, + "selector": "getServiceBrowserControllerRef", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "discover:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "^@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "discoverAsSheetForWindow:withRecord:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "^@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "discoverWithDeviceAttributes:serviceList:serviceRecord:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "I", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setOptions:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "runModal", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": "@", + "typestr_special": false + }, + { + "typestr": ":", + "typestr_special": false + }, + { + "typestr": "^v", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "i", + "typestr_special": false + }, + "selector": "beginSheetModalForWindow:modalDelegate:didEndSelector:contextInfo:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getResults", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "I", + "typestr_special": false + }, + "selector": "getOptions", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setSearchAttributes:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "^{IOBluetoothDeviceSearchAttributes=III^{IOBluetoothDeviceSearchDeviceAttributes={BluetoothDeviceAddress=[6C]}[248C]III}}", + "typestr_special": false + }, + "selector": "getSearchAttributes", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "addAllowedUUID:", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "addAllowedUUIDArray:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "clearAllowedUUIDs", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setTitle:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getTitle", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setDescriptionText:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getDescriptionText", + "visibility": "public" + }, + { + "args": [ + { + "typestr": "@", + "typestr_special": false + } + ], + "class_method": false, + "retval": { + "typestr": "v", + "typestr_special": false + }, + "selector": "setPrompt:", + "visibility": "public" + }, + { + "args": [], + "class_method": false, + "retval": { + "typestr": "@", + "typestr_special": false + }, + "selector": "getPrompt", + "visibility": "public" + } + ], + "name": "IOBluetoothServiceBrowserController", + "properties": [], + "protocols": [], + "super": "NSWindowController" + } + }, + "enum": { + "kBluetoothKeyboardANSIReturn": 0, + "kBluetoothKeyboardISOReturn": 1, + "kBluetoothKeyboardJISReturn": 2, + "kBluetoothKeyboardNoReturn": 3, + "kIOBluetoothServiceBrowserControllerOptionsAutoStartInquiry": 1, + "kIOBluetoothServiceBrowserControllerOptionsDisconnectWhenDone": 2, + "kIOBluetoothServiceBrowserControllerOptionsNone": 0, + "kIOBluetoothUISuccess": -1000, + "kIOBluetoothUIUserCanceledErr": -1001 + }, + "enum_type": {}, + "expressions": {}, + "externs": {}, + "formal_protocols": {}, + "func_macros": {}, + "functions": { + "IOBluetoothGetDeviceSelectorController": { + "args": [ + { + "name": null, + "typestr": "v" + } + ], + "retval": { + "typestr": "^{OpaqueIOBluetoothObjectRef=}" + } + }, + "IOBluetoothGetPairingController": { + "args": [ + { + "name": null, + "typestr": "v" + } + ], + "retval": { + "typestr": "^{OpaqueIOBluetoothObjectRef=}" + } + }, + "IOBluetoothValidateHardwareWithDescription": { + "args": [ + { + "name": "cancelButtonTitle", + "typestr": "^{__CFString=}" + }, + { + "name": "descriptionText", + "typestr": "^{__CFString=}" + } + ], + "retval": { + "typestr": "i" + } + } + }, + "informal_protocols": {}, + "literals": {}, + "structs": {}, + "typedefs": { + "BluetoothKeyboardReturnType": "enum BluetoothKeyboardReturnType", + "IOBluetoothDeviceSelectorControllerRef": "struct OpaqueIOBluetoothObjectRef *", + "IOBluetoothPairingControllerRef": "struct OpaqueIOBluetoothObjectRef *", + "IOBluetoothServiceBrowserControllerOptions": "uint32_t", + "IOBluetoothServiceBrowserControllerRef": "struct OpaqueIOBluetoothObjectRef *" + } + }, + "framework": "IOBluetoothUI", + "headers": [ + "IOBluetoothDeviceSelectorController.h", + "IOBluetoothObjectPushUIController.h", + "IOBluetoothPairingController.h", + "IOBluetoothPasskeyDisplay.h", + "IOBluetoothServiceBrowserController.h", + "IOBluetoothUIUserLib.h" + ], + "release": "10.16", + "sdk": "/Users/ronald/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.1.sdk" +} diff --git a/pyobjc-framework-IOBluetoothUI/pyobjc_setup.py b/pyobjc-framework-IOBluetoothUI/pyobjc_setup.py new file mode 100644 index 0000000000..cc76d07df1 --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/pyobjc_setup.py @@ -0,0 +1,670 @@ +""" +Generic setup.py file for PyObjC framework wrappers. + +This file should only be changed in pyobjc-core and then copied +to all framework wrappers. + +To change this file: + - Change the copy in pyobjc-core/Tools/pyobjc_setup.py + - Run development-support/update-shared-files +""" + +__all__ = ("setup", "Extension", "Command") + +import os +import pkg_resources +import plistlib +import re +import shlex +import shutil +import subprocess +import sys +import tempfile +import time +import unittest +from sysconfig import get_config_var, get_config_vars +from setuptools import Command +from setuptools import Extension as _Extension +from setuptools import setup as _setup +from setuptools.command import build_ext, build_py, develop, egg_info, install_lib, test + +from distutils import log +from distutils.errors import DistutilsError, DistutilsPlatformError + +try: + from setuptools.command import install +except ImportError: + from distutils.command import install + +try: + from setuptools.command import build +except ImportError: + from distutils.command import build + + +class oc_build_py(build_py.build_py): + def build_packages(self): + log.info("overriding build_packages to copy PyObjCTest") + p = self.packages + self.packages = list(self.packages) + ["PyObjCTest"] + try: + build_py.build_py.build_packages(self) + finally: + self.packages = p + + +REPO_NAME = "pyobjc" + + +class oc_egg_info(egg_info.egg_info): + def run(self): + egg_info.egg_info.run(self) + + path = os.path.join(self.egg_info, "PKG-INFO") + with open(path) as fp: + contents = fp.read() + + first, middle, last = contents.partition("\n\n") + + with open(path, "w") as fp: + fp.write(first) + fp.write( + "\nProject-URL: Documentation, " + "https://%s.readthedocs.io/en/latest/\n" % (REPO_NAME,) + ) + fp.write( + "Project-URL: Issue tracker, " + "https://github.com/ronaldoussoren/%s/issues\n" % (REPO_NAME,) + ) + fp.write( + "Project-URL: Repository, " + "https://github.com/ronaldoussoren/%s" % (REPO_NAME,) + ) + fp.write(middle) + fp.write(last) + + +class oc_test(test.test): + description = "run test suite" + user_options = test.test.user_options + [ + ("verbosity=", None, "print what tests are run") + ] + + def initialize_options(self): + test.test.initialize_options(self) + self.verbosity = "1" + + def finalize_options(self): + test.test.finalize_options(self) + if isinstance(self.verbosity, str): + self.verbosity = int(self.verbosity) + + def cleanup_environment(self): + from pkg_resources import add_activation_listener + + add_activation_listener(lambda dist: dist.activate()) + + ei_cmd = self.get_finalized_command("egg_info") + egg_name = ei_cmd.egg_name.replace("-", "_") + + to_remove = [] + for dirname in sys.path: + bn = os.path.basename(dirname) + if bn.startswith(egg_name + "-"): + to_remove.append(dirname) + + for dirname in to_remove: + log.info(f"removing installed {dirname!r} from sys.path before testing") + sys.path.remove(dirname) + + pkg_resources.working_set.__init__() + + def add_project_to_sys_path(self): + from pkg_resources import normalize_path, add_activation_listener + from pkg_resources import working_set, require + + self.reinitialize_command("egg_info") + self.run_command("egg_info") + self.reinitialize_command("build_ext", inplace=1) + self.run_command("build_ext") + + self.__old_path = sys.path[:] + self.__old_modules = sys.modules.copy() + + if "PyObjCTools" in sys.modules: + del sys.modules["PyObjCTools"] + + ei_cmd = self.get_finalized_command("egg_info") + sys.path.insert(0, normalize_path(ei_cmd.egg_base)) + sys.path.insert(1, os.path.dirname(__file__)) + + add_activation_listener(lambda dist: dist.activate()) + working_set.__init__() + require(f"{ei_cmd.egg_name}=={ei_cmd.egg_version}") + + def remove_from_sys_path(self): + from pkg_resources import working_set + + sys.path[:] = self.__old_path + sys.modules.clear() + sys.modules.update(self.__old_modules) + working_set.__init__() + + def run(self): + + self.cleanup_environment() + self.add_project_to_sys_path() + + from pkg_resources import EntryPoint + + loader_ep = EntryPoint.parse("x=" + self.test_loader) + loader_class = loader_ep.resolve() + + import warnings + + warnings.simplefilter("error") + + try: + time_before = time.time() + suite = loader_class().loadTestsFromName(self.distribution.test_suite) + + if self.verbose and self.verbosity < 3: + runner = unittest.TextTestRunner(verbosity=3) + else: + runner = unittest.TextTestRunner(verbosity=self.verbosity) + result = runner.run(suite) + + time_after = time.time() + + # Print out summary. This is a structured format that + # should make it easy to use this information in scripts. + summary = { + "count": result.testsRun, + "fails": len(result.failures), + "errors": len(result.errors), + "xfails": len(getattr(result, "expectedFailures", [])), + "xpass": len(getattr(result, "unexpectedSuccesses", [])), + "skip=": len(getattr(result, "skipped", [])), + "testSeconds": (time_after - time_before), + } + print(f"SUMMARY: {summary}") + if not result.wasSuccessful(): + raise DistutilsError("some tests failed") + + finally: + self.remove_from_sys_path() + + +CLASSIFIERS = list( + filter( + None, + """ +Development Status :: 5 - Production/Stable +Environment :: Console +Environment :: MacOS X :: Cocoa +Intended Audience :: Developers +License :: OSI Approved :: MIT License +Natural Language :: English +Operating System :: MacOS :: MacOS X +Programming Language :: Python +Programming Language :: Python :: 3 +Programming Language :: Python :: 3 :: Only +Programming Language :: Python :: 3.7 +Programming Language :: Python :: 3.8 +Programming Language :: Python :: 3.9 +Programming Language :: Python :: 3.10 +Programming Language :: Python :: 3.11 +Programming Language :: Python :: Implementation :: CPython +Programming Language :: Objective C +Topic :: Software Development :: Libraries :: Python Modules +Topic :: Software Development :: User Interfaces +""".splitlines(), + ) +) + + +def get_os_level(): + # Retrieve the productVersion by invoking sw_vers, code tries + # to retrieve the version in-process will retrieve a compatibility + # version when compiled with an SDK older than 11.0. + v = ( + subprocess.check_output(["/usr/bin/sw_vers", "-productVersion"]) + .decode() + .strip() + ) + return ".".join(v.split(".")[:2]) + + +def get_sdk(): + env_cflags = os.environ.get("CFLAGS", "") + config_cflags = get_config_var("CFLAGS") + sdk = None + for cflags_str in [env_cflags, config_cflags]: + cflags = shlex.split(cflags_str) + for i, val in enumerate(cflags): + if val == "-isysroot": + sdk = cflags[i + 1] + break + elif val.find("-isysroot") == 0: + sdk = val[len("-isysroot") :] + break + if sdk: + break + + return sdk + + +def get_sdk_level(): + sdk = get_sdk() + + if not sdk: + return None + + if sdk == "/": + return get_os_level() + + sdk = sdk.rstrip("/") + sdkname = os.path.basename(sdk) + assert sdkname.startswith("MacOSX") + assert sdkname.endswith(".sdk") + + settings_path = os.path.join(sdk, "SDKSettings.plist") + if os.path.exists(settings_path): + try: + with open(os.path.join(sdk, "SDKSettings.plist"), "rb") as fp: + pl = plistlib.load(fp) + return pl["Version"] + except Exception: + raise SystemExit("Cannot determine SDK version") + else: + version_part = sdkname[6:-4] + assert version_part + return version_part + + +class pyobjc_install_lib(install_lib.install_lib): + def get_exclusions(self): + result = install_lib.install_lib.get_exclusions(self) + if hasattr(install_lib, "_install_lib"): + outputs = install_lib._install_lib.get_outputs(self) + else: + outputs = install_lib.orig.install_lib.get_outputs(self) + + exclusions = {} + for fn in outputs: + if "PyObjCTest" in fn: + exclusions[fn] = 1 + + exclusions["PyObjCTest"] = 1 + exclusions[os.path.join(self.install_dir, "PyObjCTest")] = 1 + for fn in os.listdir("PyObjCTest"): + exclusions[os.path.join("PyObjCTest", fn)] = 1 + exclusions[os.path.join(self.install_dir, "PyObjCTest", fn)] = 1 + result.update(exclusions) + + return result + + +def _find_executable(executable): + if os.path.isfile(executable): + return executable + + else: + for p in os.environ["PATH"].split(os.pathsep): + f = os.path.join(p, executable) + if os.path.isfile(f): + return executable + return None + + +def _working_compiler(executable): + + with tempfile.NamedTemporaryFile(mode="w", suffix=".c") as fp: + fp.write("#include \nint main(void) { return 0; }\n") + fp.flush() + + cflags = get_config_var("CFLAGS") + cflags = shlex.split(cflags) + + p = subprocess.Popen( + [executable, "-c", fp.name] + cflags, + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + ) + status = p.wait() + p.stdout.close() + p.stderr.close() + if status != 0: + return False + + binfile = fp.name[:-1] + "o" + if os.path.exists(binfile): + os.unlink(binfile) + + binfile = os.path.basename(binfile) + if os.path.exists(binfile): + os.unlink(binfile) + + cflags = get_config_var("CFLAGS") + if re.search(r"-arch\s+i386", cflags) is not None: + raise DistutilsPlatformError("i386 (32-bit) is not supported by PyObjC") + + if re.search(r"-arch\s+ppc", cflags) is not None: + raise DistutilsPlatformError("PowerPC is not supported by PyObjC") + + return True + + +def _fixup_compiler(use_ccache): + if "CC" in os.environ: + # CC is in the environment, always use explicit + # overrides. + return + + try: + import _osx_support + + _osx_support.customize_compiler(get_config_vars()) + except (ImportError, NameError): + pass + + cc = oldcc = get_config_var("CC").split()[0] + cc = _find_executable(cc) + if cc is not None and os.path.basename(cc).startswith("gcc"): + # Check if compiler is LLVM-GCC, that's known to + # generate bad code. + data = os.popen( + "'{}' --version 2>/dev/null".format(cc.replace("'", "'\"'\"'")) + ).read() + if "llvm-gcc" in data: + cc = None + + if cc is not None and not _working_compiler(cc): + cc = None + + if cc is None: + # Default compiler is not usable, try finding 'clang' + cc = _find_executable("clang") + if cc is None: + cc = os.popen("/usr/bin/xcrun -find clang").read() + + if not cc: + raise SystemExit("Cannot locate compiler candidate") + + if not _working_compiler(cc): + raise SystemExit("Cannot locate a working compiler") + + if use_ccache: + ccache = _find_executable("ccache") + if ccache: + cc = f"{ccache} {cc}" + + if cc != oldcc: + print(f"Use '{cc}' instead of '{oldcc}' as the compiler") + + config_vars = get_config_vars() + for env in ("BLDSHARED", "LDSHARED", "CC", "CXX"): + if env in config_vars and env not in os.environ: + split = config_vars[env].split() + split[0] = cc if env != "CXX" else cc + "++" + config_vars[env] = " ".join(split) + + +class pyobjc_build_ext(build_ext.build_ext): + def run(self): + _fixup_compiler("PYOBJC_USE_CCACHE" in os.environ) + + # Ensure that the PyObjC header files are available + # in 2.3 and later the headers are in the egg, + # before that we ship a copy. + if os.path.exists("Modules") and not os.path.isfile("Modules/pyobjc-api.h"): + (dist,) = pkg_resources.require("pyobjc-core") + + include_root = os.path.join(self.build_temp, "pyobjc-include") + if os.path.exists(include_root): + shutil.rmtree(include_root) + + os.makedirs(include_root) + if dist.has_metadata("include"): + for fn in dist.metadata_listdir("include"): + data = dist.get_metadata(f"include/{fn}") + fp = open(os.path.join(include_root, fn), "w") + try: + fp.write(data) + finally: + fp.close() + + else: + raise SystemExit("pyobjc-core egg-info does not include header files") + + for e in self.extensions: + if include_root not in e.include_dirs: + e.include_dirs.append(include_root) + + # Run the actual build + build_ext.build_ext.run(self) + + # Then tweak the copy_extensions bit to ensure PyObjCTest gets + # copied to the right place. + extensions = self.extensions + self.extensions = [e for e in extensions if e.name.startswith("PyObjCTest")] + self.copy_extensions_to_source() + self.extensions = extensions + + +def Extension(*args, **kwds): + """ + Simple wrapper about distutils.core.Extension that adds additional PyObjC + specific flags. + """ + if sys.platform != "darwin": + # Use a fake OS level on non-macOS platforms, + # otherwise the error path in setup() is not triggered. + os_level = "10.0" + else: + os_level = get_sdk_level() + if os_level is None: + os_level = get_os_level() + + cflags = [] + ldflags = [] + if "clang" in get_config_var("CC"): + cflags.append("-Wno-deprecated-declarations") + + if sys.platform != "darwin": + # See above + sdk = "/" + else: + sdk = get_sdk() + + if not sdk: + # We're likely on a system with the Xcode Command Line Tools. + # Explicitly use the most recent SDK to avoid compile problems. + data = subprocess.check_output( + ["/usr/bin/xcrun", "-sdk", "macosx", "--show-sdk-path"], + text=True, + ).strip() + + if data: + sdk_settings_path = os.path.join(data, "SDKSettings.plist") + if os.path.exists(sdk_settings_path): + with open(sdk_settings_path, "rb") as fp: + sdk_settings = plistlib.load(fp) + version = sdk_settings["Version"] + else: + version = os.path.basename(data)[6:-4] + + cflags.append("-isysroot") + cflags.append(data) + cflags.append( + "-DPyObjC_BUILD_RELEASE=%02d%02d" + % (tuple(map(int, version.split(".")[:2]))) + ) + else: + cflags.append( + "-DPyObjC_BUILD_RELEASE=%02d%02d" + % (tuple(map(int, os_level.split(".")[:2]))) + ) + + else: + cflags.append( + "-DPyObjC_BUILD_RELEASE=%02d%02d" + % (tuple(map(int, os_level.split(".")[:2]))) + ) + + if os_level == "10.4": + cflags.append("-DNO_OBJC2_RUNTIME") + + if "-Werror" not in cflags: + cflags.append("-Werror") + + if "extra_compile_args" in kwds: + kwds["extra_compile_args"] = kwds["extra_compile_args"] + cflags + else: + kwds["extra_compile_args"] = cflags + + if "extra_link_args" in kwds: + kwds["extra_link_args"] = kwds["extra_link_args"] + ldflags + else: + kwds["extra_link_args"] = ldflags + + return _Extension(*args, **kwds) + + +def _sort_key(version): + return tuple(int(x) for x in version.split(".")) + + +def setup(min_os_level=None, max_os_level=None, cmdclass=None, **kwds): + + k = kwds.copy() + + os_level = get_sdk_level() + if os_level is None: + os_level = get_os_level() + os_compatible = True + if sys.platform != "darwin": + os_compatible = False + + else: + if min_os_level is not None: + if _sort_key(os_level) < _sort_key(min_os_level): + os_compatible = False + if max_os_level is not None: + if _sort_key(os_level) > _sort_key(max_os_level): + os_compatible = False + + if cmdclass is None: + cmdclass = {} + else: + cmdclass = cmdclass.copy() + + if os_compatible or ("bdist_wheel" in sys.argv and "ext_modules" not in k): + cmdclass["build_ext"] = pyobjc_build_ext + cmdclass["egg_info"] = oc_egg_info + cmdclass["install_lib"] = pyobjc_install_lib + cmdclass["test"] = oc_test + cmdclass["build_py"] = oc_build_py + + else: + if min_os_level is not None: + if max_os_level is not None: + msg = ( + "This distribution is only supported on MacOSX " + "versions %s up to and including %s" % (min_os_level, max_os_level) + ) + else: + msg = "This distribution is only supported on MacOSX >= {}".format( + min_os_level, + ) + elif max_os_level is not None: + msg = "This distribution is only supported on MacOSX <= {}".format( + max_os_level, + ) + else: + msg = "This distribution is only supported on MacOSX" + + def create_command_subclass(base_class): + class subcommand(base_class): + def run(self, msg=msg): + raise DistutilsPlatformError(msg) + + return subcommand + + class no_test(oc_test): + def run(self, msg=msg): + print(f"WARNING: {msg}\n") + print( + "SUMMARY: {'testSeconds': 0.0, 'count': 0, 'fails': 0, " + "'errors': 0, 'xfails': 0, 'skip': 65, 'xpass': 0, " + "'message': %r }" % (msg,) + ) + + cmdclass["build"] = create_command_subclass(build.build) + cmdclass["test"] = no_test + cmdclass["install"] = create_command_subclass(install.install) + cmdclass["install_lib"] = create_command_subclass(pyobjc_install_lib) + cmdclass["develop"] = create_command_subclass(develop.develop) + cmdclass["build_py"] = create_command_subclass(oc_build_py) + + if "ext_modules" not in k: + # No extension modules, can build universal wheel + k["options"] = {"bdist_wheel": {"universal": 1}} + + plat_name = "MacOS X" + plat_versions = [] + if min_os_level is not None and min_os_level == max_os_level: + plat_versions.append(f"=={min_os_level}") + else: + if min_os_level is not None: + plat_versions.append(f">={min_os_level}") + if max_os_level is not None: + plat_versions.append(f"<={max_os_level}") + if plat_versions: + plat_name += " ({})".format(", ".join(plat_versions)) + + if os.path.isfile("Modules/pyobjc-api.h") or "ext_modules" not in k: + if "setup_requires" in k: + if len(k["setup_requires"]) == 1 and k["setup_requires"][0].startswith( + "pyobjc-core" + ): + del k["setup_requires"] + + if "long_description" in k: + k["long_description"] += "\n\nProject links\n" + k["long_description"] += "-------------\n" + k["long_description"] += "\n" + k[ + "long_description" + ] += "* `Documentation `_\n\n".format( + REPO_NAME, + ) + k[ + "long_description" + ] += "* `Issue Tracker `_\n\n".format( + REPO_NAME, + ) + k[ + "long_description" + ] += "* `Repository `_\n\n".format( + REPO_NAME, + ) + k["long_description_content_type"] = "text/x-rst; charset=UTF-8" + + _setup( + cmdclass=cmdclass, + author="Ronald Oussoren", + author_email="pyobjc-dev@lists.sourceforge.net", + url="https://github.com/ronaldoussoren/pyobjc", + platforms=[plat_name], + package_dir={"": "Lib", "PyObjCTest": "PyObjCTest"}, + dependency_links=[], + package_data={"": ["*.bridgesupport"]}, + test_suite="PyObjCTest", + zip_safe=False, + license="MIT License", + classifiers=CLASSIFIERS, + python_requires=">=3.7", + keywords=["PyObjC"] + [p for p in k["packages"] if p not in ("PyObjCTools",)], + **k, + ) diff --git a/pyobjc-framework-IOBluetoothUI/setup.py b/pyobjc-framework-IOBluetoothUI/setup.py new file mode 100644 index 0000000000..b7eb5c4bd8 --- /dev/null +++ b/pyobjc-framework-IOBluetoothUI/setup.py @@ -0,0 +1,25 @@ +""" +Wrappers for the "IOBluetoothUI" framework on macOS. + +These wrappers don't include documentation, please check Apple's documentation +for information on how to use this framework and PyObjC's documentation +for general tips and tricks regarding the translation between Python +and (Objective-)C frameworks +""" + +from pyobjc_setup import setup + +VERSION = "9.1" + +setup( + name="pyobjc-framework-IOBluetoothUI", + description="Wrappers for the framework IOBluetoothUI on macOS", + packages=["IOBluetoothUI"], + version=VERSION, + install_requires=[ + "pyobjc-core>=" + VERSION, + "pyobjc-framework-IOBluetooth>=" + VERSION, + ], + long_description=__doc__, + options={"bdist_wheel": {"py_limited_api": "cp36"}}, +) diff --git a/pyobjc/setup.py b/pyobjc/setup.py index 732b62c242..5e271b74dc 100644 --- a/pyobjc/setup.py +++ b/pyobjc/setup.py @@ -93,6 +93,7 @@ ("InstallerPlugins", None, None), ("InstantMessage", "10.5", None), ("IOBluetooth", None, None), + ("IOBluetoothUI", None, None), ("IOSurface", "10.6", None), ("KernelManagement", "11.0", None), ("LatentSemanticMapping", None, None),