def test_pointers(self):
        self.assertEqual(mod.describe_type(objc._C_CHARPTR), "char*")
        self.assertEqual(mod.describe_type(objc._C_PTR + objc._C_CHR), "char*")
        self.assertEqual(mod.describe_type(objc._C_PTR + objc._C_PTR + objc._C_FLT), "float**")
        self.assertEqual(mod.describe_type(objc._C_PTR + objc._C_STRUCT_B + b'hello=' + objc._C_INT + objc._C_STRUCT_E), "struct hello*")

        handle = objc.createOpaquePointerType("NamedPointer", b"^{NamedTestPointer1=}")
        self.assertEqual(mod.describe_type(b"^{NamedTestPointer1=}"), "NamedPointer")
Exemplo n.º 2
0
    def testNaming (self):
        tp = objc.createOpaquePointerType(
                "Mod.BarHandle", BarEncoded, "BarHandle doc")

        self.assertIsInstance(tp, type)
        self.assertEqual(tp.__module__, "Mod")
        self.assertEqual(tp.__name__, "BarHandle")
        if sys.version_info[:2] >= (3,3):
            self.assertEqual(tp.__qualname__, "BarHandle")
        self.assertEqual(repr(tp), "<class 'Mod.BarHandle'>")
Exemplo n.º 3
0
def parseBridgeSupport(
    xmldata, globals, frameworkName, dylib_path=None, inlineTab=None  # noqa: A002
):

    if dylib_path:
        lib = ctypes.cdll.LoadLibrary(dylib_path)
        _libraries.append(lib)

    objc._updatingMetadata(True)
    try:
        prs = _BridgeSupportParser(xmldata, frameworkName)

        globals.update(prs.values)
        for entry in prs.cftypes:
            tp = objc.registerCFSignature(*entry)

            globals[entry[0]] = tp

        for name, typestr in prs.opaque:
            globals[name] = objc.createOpaquePointerType(name, typestr)

        for name, typestr, alias in prs.structs:
            if alias is not None:
                globals[name] = alias
                objc.createStructAlias(name, typestr, alias)
            else:
                globals[name] = value = objc.createStructType(name, typestr, None)

        for name, typestr, magic in prs.constants:
            try:
                value = objc._loadConstant(name, _as_string(typestr), magic)
            except AttributeError:
                continue

            globals[name] = value

        for class_name, sel_name, is_class in prs.meta:
            objc.registerMetaDataForSelector(
                class_name, sel_name, prs.meta[(class_name, sel_name, is_class)]
            )

        if prs.functions:
            objc.loadBundleFunctions(None, globals, prs.functions)

            if inlineTab is not None:
                objc.loadFunctionList(inlineTab, globals, prs.functions)

        for name, orig in prs.func_aliases:
            try:
                globals[name] = globals[orig]
            except KeyError:
                pass

    finally:
        objc._updatingMetadata(False)
def parseBridgeSupport(xmldata, globals, frameworkName, dylib_path=None, inlineTab=None):

    if dylib_path:
        lib = ctypes.cdll.LoadLibrary(dylib_path)
        _libraries.append(lib)

    objc._updatingMetadata(True)
    try:
        prs = _BridgeSupportParser(xmldata, frameworkName)

        globals.update(prs.values)
        for entry in prs.cftypes:
            tp = objc.registerCFSignature(*entry)

            globals[entry[0]] = tp

        for name, typestr in prs.opaque:
            globals[name] = objc.createOpaquePointerType(name, typestr)

        for name, typestr, alias in prs.structs:
            if alias is not None:
                globals[name] = alias
                objc.createStructAlias(name, typestr, alias)
            else:
                globals[name] = value = objc.createStructType(name, typestr, None)


        for name, typestr, magic in prs.constants:
            try:
                value = objc._loadConstant(name, _as_string(typestr), magic)
            except AttributeError:
                continue

            globals[name] = value

        for class_name, sel_name, is_class in prs.meta:
            objc.registerMetaDataForSelector(class_name, sel_name, prs.meta[(class_name, sel_name, is_class)])

        if prs.functions:
            objc.loadBundleFunctions(None, globals, prs.functions)

            if inlineTab is not None:
                objc.loadFunctionList(inlineTab, globals, prs.functions)

        for name, orig in prs.func_aliases:
            try:
                globals[name] = globals[orig]
            except KeyError:
                pass

    finally:
        objc._updatingMetadata(False)
Exemplo n.º 5
0
    def testBasic(self):
        tp = objc.createOpaquePointerType("BarHandle", BarEncoded,
                                          "BarHandle doc")

        self.assertIsInstance(tp, type)

        f = OC_OpaqueTest.createBarWithFirst_andSecond_(1.0, 4.5)
        self.assertIsInstance(f, tp)
        x = OC_OpaqueTest.getFirst_(f)
        self.assertEqual(x, 1.0)
        x = OC_OpaqueTest.getSecond_(f)
        self.assertEqual(x, 4.5)

        # NULL pointer is converted to None
        self.assertEqual(OC_OpaqueTest.nullBar(), None)
Exemplo n.º 6
0
    def testBasic (self):
        tp = objc.createOpaquePointerType(
                "BarHandle", BarEncoded, "BarHandle doc")

        self.assertIsInstance(tp, type)

        f = OC_OpaqueTest.createBarWithFirst_andSecond_(1.0, 4.5)
        self.assertIsInstance(f, tp)
        x = OC_OpaqueTest.getFirst_(f)
        self.assertEquals(x, 1.0)
        x = OC_OpaqueTest.getSecond_(f)
        self.assertEquals(x, 4.5)

        # NULL pointer is converted to None
        self.assertEquals(OC_OpaqueTest.nullBar(), None)
Exemplo n.º 7
0
    def test_pointers(self):
        self.assertEqual(mod.describe_type(objc._C_CHARPTR), "char*")
        self.assertEqual(mod.describe_type(objc._C_PTR + objc._C_CHR), "char*")
        self.assertEqual(
            mod.describe_type(objc._C_PTR + objc._C_PTR + objc._C_FLT),
            "float**")
        self.assertEqual(
            mod.describe_type(objc._C_PTR + objc._C_STRUCT_B + b"hello=" +
                              objc._C_INT + objc._C_STRUCT_E),
            "struct hello*",
        )

        _ = objc.createOpaquePointerType("NamedPointer",
                                         b"^{NamedTestPointer1=}")
        self.assertEqual(mod.describe_type(b"^{NamedTestPointer1=}"),
                         "NamedPointer")
Exemplo n.º 8
0
            }
        }
    }),
    'dispatch_queue_create_with_target': (b'@^t@@', '', {
        'comment': 'XXX: V2 API',
        'arguments': {
            0: {
                'c_array_delimited_by_null': True,
                'type_modifier': 'n'
            }
        }
    })
}
misc.update({
    'dispatch_source_t':
    objc.createOpaquePointerType('dispatch_source_t',
                                 b'^{dispatch_source_type_s=}')
})
expressions = {
    'DISPATCH_CURRENT_QUEUE_LABEL': 'None',
    'DISPATCH_QUEUE_SERIAL': 'None',
    'DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL':
    'dispatch_queue_attr_make_with_autorelease_frequency(DISPATCH_QUEUE_SERIAL, DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM)',
    'DISPATCH_APPLY_AUTO': 'None',
    'DISPATCH_QUEUE_SERIAL_INACTIVE':
    'dispatch_queue_attr_make_initially_inactive(DISPATCH_QUEUE_SERIAL)',
    'DISPATCH_DATA_DESTRUCTOR_DEFAULT': 'None',
    'DISPATCH_QUEUE_CONCURRENT_INACTIVE':
    'dispatch_queue_attr_make_initially_inactive(DISPATCH_QUEUE_CONCURRENT)',
    'DISPATCH_QUEUE_CONCURRENT_WITH_AUTORELEASE_POOL':
    'dispatch_queue_attr_make_with_autorelease_frequency(DISPATCH_QUEUE_CONCURRENT, DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM)',
    'DISPATCH_TARGET_QUEUE_DEFAULT': 'None'
Exemplo n.º 9
0
    ('SecKeychainAddGenericPassword',
     'i^{OpaqueSecKeychainRef=}I*I*I*o^^{OpaqueSecKeychainItemRef}'),
    ('SecKeychainOpen', 'i*o^^{OpaqueSecKeychainRef}'),
    ('SecKeychainFindGenericPassword',
     'i@I*I*o^Io^^{OpaquePassBuff}o^^{OpaqueSecKeychainItemRef}'),
]

objc.loadBundleFunctions(Security, globals(), S_functions)

SecKeychainRef = objc.registerCFSignature('SecKeychainRef',
                                          '^{OpaqueSecKeychainRef=}',
                                          SecKeychainGetTypeID())
SecKeychainItemRef = objc.registerCFSignature('SecKeychainItemRef',
                                              '^{OpaqueSecKeychainItemRef=}',
                                              SecKeychainItemGetTypeID())
PassBuffRef = objc.createOpaquePointerType("PassBuffRef",
                                           b"^{OpaquePassBuff=}", None)


def resolve_password(password_length, password_buffer):
    return (c_char * password_length).from_address(
        password_buffer.__pointer__)[:].decode('utf-8')


# Get the login keychain
result, login_keychain = SecKeychainOpen('login.keychain', None)

# Password details - service is the display name, acccount is the account name/user name
svc_n = "test-service"
act_n = "test-account"

# Store a password
from PyObjCTools.TestSupport import *
import objc
from PyObjCTest.structpointer2 import *
from PyObjCTest.structpointer1 import *

TestStructPointerStructPtr = objc.createOpaquePointerType("TestStructPointerStructPtr", FooEncoded);

class TestOpaqueStructPointer (TestCase):
    def testPointer(self):

        # Check that the TestPointerStructPtr has a signature that is
        # different from the one in the method definition. The latter contains
        # more information.
        retval = objc.splitSignature(
                OC_TestStructPointer.returnPointerToStruct.signature)[0]
        self.assertNotEqual(TestStructPointerStructPtr.__typestr__, retval)

        # And then check that the correct pointer wrapper is created
        v = OC_TestStructPointer.returnPointerToStruct()
        self.assertIsInstance(v, TestStructPointerStructPtr)

if __name__ == "__main__":
    main()
Exemplo n.º 11
0
import types
import ctypes
import objc
"""
Load the IOBluetooth framework.
"""
IOBluetooth = types.ModuleType('IOBluetooth')
objc.loadBundle('IOBluetooth', IOBluetooth.__dict__,
                '/System/Library/Frameworks/IOBluetooth.framework')
"""
Configure foreign function interface for Grand Central Dispatch.
"""
libSystem = ctypes.CDLL('libSystem.dylib')
# Datatypes
dispatch_function_t = ctypes.CFUNCTYPE(None, ctypes.c_void_p)
dispatch_queue_t = objc.createOpaquePointerType('dispatch_queue_t',
                                                b'^{dispatch_queue_s=}')
dispatch_time_t = ctypes.c_uint64
# Constants
QOS_CLASS_USER_INTERACTIVE = 0x21
QOS_CLASS_USER_INITIATED = 0x19
QOS_CLASS_DEFAULT = 0x15
QOS_CLASS_UTILITY = 0x11
QOS_CLASS_BACKGROUND = 0x09
QOS_CLASS_UNSPECIFIED = 0x00
# Globals
DISPATCH_SOURCE_TYPE_TIMER = ctypes.cast(libSystem._dispatch_source_type_timer,
                                         ctypes.c_void_p)
# Functions
f = libSystem.dispatch_get_global_queue
f.restype, f.argtypes = ctypes.c_void_p, (ctypes.c_long, ctypes.c_ulong)
f = libSystem.dispatch_queue_create
Exemplo n.º 12
0
import struct, objc
from Foundation import NSBundle
from Cocoa import NSAppleEventDescriptor


def OSType(s):
    # Convert 4 character code into 4 byte integer
    return struct.unpack('>I', s)[0]


# Create an opaque pointer type to mask the raw AEDesc pointers we'll throw around
AEDescRef = objc.createOpaquePointerType(
    'AEDescRef', '^{AEDesc=I^^{OpaqueAEDataStorageType}}')

# Load AESendMessage from AE.framework for sending the AppleEvent
AE_bundle = NSBundle.bundleWithIdentifier_('com.apple.AE')
functions = [
    ("AESendMessage",
     b"i^{AEDesc=I^^{OpaqueAEDataStorageType}}^{AEDesc=I^^{OpaqueAEDataStorageType}}iq"
     ),
]
objc.loadBundleFunctions(AE_bundle, globals(), functions)

# defined in AEDataModel.h
kAENoReply = 1
kAENeverInteract = 16
kAEDefaultTimeout = -1
kAnyTransactionID = 0
kAutoGenerateReturnID = -1

# defined in AEDataModel.h
Exemplo n.º 13
0
                                              'type_modifier': 'o'
                                          },
                                          5: {
                                              'type_modifier': 'o'
                                          }
                                      }
                                  }),
    'GetScriptInfoFromTextEncoding': (sel32or64(b'lL^s^s', b'iI^s^s'), '', {
        'arguments': {
            1: {
                'type_modifier': 'o'
            },
            2: {
                'type_modifier': 'o'
            }
        }
    })
}
cftypes = [('FSFileOperationRef', b'^{__FSFileOperation=}', None, None),
           ('FSFileSecurityRef', b'^{__FSFileSecurity=}', None, None)]
misc.update({
    'TECSnifferObjectRef':
    objc.createOpaquePointerType('TECSnifferObjectRef',
                                 b'^{OpaqueTECSnifferObjectRef=}'),
    'TECObjectRef':
    objc.createOpaquePointerType('TECObjectRef', b'^{OpaqueTECObjectRef=}')
})
expressions = {}

# END OF FILE
Exemplo n.º 14
0
SecurityFoundation = NSBundle.bundleWithPath_('/System/Library/Frameworks/SecurityFoundation.framework')
success = SecurityFoundation.load()

PASS_MIN_LENGTH  = 4
PASS_MAX_LENGTH  = 1024
PASS_MAX_REQUEST = 15

algorithm = {
             'memorable':    0,
             'random':       1,
             'letters':      2, # FIPS-181 compliant
             'alphanumeric': 3,
             'numbers':      4,
}

SFPWAContextRef = objc.createOpaquePointerType("SFPWAContextRef", b"^{_SFPWAContext=}", None)

functions = [
             ('SFPWAPolicyCopyDefault', '@'),
             ('SFPWAContextCreateWithDefaults', '^{_SFPWAContext=}'),
             ('SFPWAContextCreate', '^{_SFPWAContext=}'),
             ('SFPWAContextLoadDictionaries', 'v^{_SFPWAContext=}^{__CFArray=}I'),
             ('SFPWAPasswordSuggest', '@^{_SFPWAContext=}^{__CFDictionary=}IIII'),
             ('SFPWAPasswordEvaluator', '@^{_SFPWAContext=}^{__CFString=}I^{__CFDictionary=}'),
             ('SFPWAPolicyParse', 'v^{_SFPWAContext=}^{__CFDictionary=}'),
            ]

objc.loadBundleFunctions(SecurityFoundation, globals(), functions)

def password_languages():
    policy = SFPWAPolicyCopyDefault()
Exemplo n.º 15
0
#!/usr/bin/python
## ref: https://gist.github.com/pudquick/5f1baad30024a898e9f2115ac9b0c631

import objc
from Foundation import NSBundle

# Predefine some opaque types
DASessionRef = objc.createOpaquePointerType('DASessionRef', '^{__DASession=}', None)
DADiskRef    = objc.createOpaquePointerType('DADiskRef',    '^{__DADisk=}',    None)

# Load DiskManagement framework classes
DiskManagment = objc.loadBundle('DiskManagment', globals(), bundle_path='/System/Library/PrivateFrameworks/DiskManagement.framework')

# Load DiskArbitration framework functions
DiskArbitration_bundle = NSBundle.bundleWithIdentifier_('com.apple.DiskArbitration')
functions = [
             ('DASessionCreate',  '@o@'),
             ('DADiskGetBSDName', '*^{__DADisk=}'),
            ]
objc.loadBundleFunctions(DiskArbitration_bundle, globals(), functions)

class diskRef(object):
    def __init__(self, dObj, controller, rawRef=False):
        if rawRef:
            self.cf_type    = objc.objc_object(c_void_p=dObj.__pointer__)
            self.ref_type   = dObj
        else:
            self.cf_type    = dObj
            self.ref_type   = DADiskRef(c_void_p=(dObj.__c_void_p__().value))
        self.controller = controller
    def __repr__(self):
Exemplo n.º 16
0
import objc
from Foundation import NSBundle

Security_bundle = NSBundle.bundleWithIdentifier_('com.apple.security')

CMSDecoderRef = objc.createOpaquePointerType("CMSDecoderRef", b"^{CMSDecoder}",
                                             None)

functions = [('CMSDecoderCreate', b'io^^{CMSDecoder}'),
             ('CMSDecoderUpdateMessage', b'i^{CMSDecoder}*I'),
             (
                 'CMSDecoderFinalizeMessage',
                 b'i^{CMSDecoder}',
             ), ('CMSDecoderCopyContent', b'i^{CMSDecoder}o^^{__CFData}')]

objc.loadBundleFunctions(Security_bundle, globals(), functions)

f = open('cms.txt', 'rb')
signed_plist = f.read()
f.close()

err, decoder = CMSDecoderCreate(None)
print err
err = CMSDecoderUpdateMessage(decoder, signed_plist, len(signed_plist))
print err
err = CMSDecoderFinalizeMessage(decoder)
print err
err, unsigned_data = CMSDecoderCopyContent(decoder, None)

# plist_bytes = unsigned_data.bytes().tobytes()
# print plist_bytes
Exemplo n.º 17
0
            }
        },
    ),
    "dispatch_queue_create_with_target": (
        b"@^t@@",
        "",
        {
            "comment": "XXX: V2 API",
            "arguments": {0: {"c_array_delimited_by_null": True, "type_modifier": "n"}},
        },
    ),
}
misc.update(
    {
        "dispatch_source_t": objc.createOpaquePointerType(
            "dispatch_source_t", b"^{dispatch_source_type_s=}"
        )
    }
)
expressions = {
    "DISPATCH_CURRENT_QUEUE_LABEL": "None",
    "DISPATCH_QUEUE_SERIAL": "None",
    "DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL": "dispatch_queue_attr_make_with_autorelease_frequency(DISPATCH_QUEUE_SERIAL, DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM)",
    "DISPATCH_APPLY_AUTO": "None",
    "DISPATCH_QUEUE_SERIAL_INACTIVE": "dispatch_queue_attr_make_initially_inactive(DISPATCH_QUEUE_SERIAL)",
    "DISPATCH_DATA_DESTRUCTOR_DEFAULT": "None",
    "DISPATCH_QUEUE_CONCURRENT_INACTIVE": "dispatch_queue_attr_make_initially_inactive(DISPATCH_QUEUE_CONCURRENT)",
    "DISPATCH_QUEUE_CONCURRENT_WITH_AUTORELEASE_POOL": "dispatch_queue_attr_make_with_autorelease_frequency(DISPATCH_QUEUE_CONCURRENT, DISPATCH_AUTORELEASE_FREQUENCY_WORK_ITEM)",
    "DISPATCH_TARGET_QUEUE_DEFAULT": "None",
}
Exemplo n.º 18
0
# Source: BridgeSupport/InterfaceBuilderKit.bridgesupport
# Last update: Thu Jul 21 08:47:20 2011

import objc, sys

if sys.maxsize > 2 ** 32:
    def sel32or64(a, b): return b
else:
    def sel32or64(a, b): return a
if sys.byteorder == 'little':
    def littleOrBig(a, b): return a
else:
    def littleOrBig(a, b): return b

misc = {
    "IBDocumentStorage*": objc.createOpaquePointerType('IBDocumentStorage*', b'^{IBDocumentStorage=}'),
    "IBInset": objc.createStructType('IBInset', b'{IBInsetTag="left"f"top"f"right"f"bottom"f}', None),
}
constants = '''$IBAdditionalLocalizableKeyPaths$IBAttributeKeyPaths$IBLocalizableGeometryKeyPaths$IBLocalizableStringKeyPaths$IBToManyRelationshipKeyPaths$IBToOneRelationshipKeyPaths$'''
enums = '''$IBMaxXDirection@2$IBMaxXMaxYDirection@10$IBMaxXMinYDirection@6$IBMaxYDirection@8$IBMinXDirection@1$IBMinXMaxYDirection@9$IBMinXMinYDirection@5$IBMinYDirection@4$IBNoDirection@0$'''
misc.update({})
functions = {}
cftypes = []
r = objc.registerMetaDataForSelector
objc._updatingMetadata(True)
try:
    pass
    r(b'IBDocument', b'addObject:toParent:', {'retval': {'type': b'v'}, 'arguments': {2: {'type': b'@'}, 3: {'type': b'@'}}})
    r(b'IBDocument', b'childrenOfObject:', {'retval': {'type': b'@'}, 'arguments': {2: {'type': b'@'}}})
    r(b'IBDocument', b'connectAction:ofSourceObject:toDestinationObject:', {'retval': {'type': b'v'}, 'arguments': {2: {'type': b'@'}, 3: {'type': b'@'}, 4: {'type': b'@'}}})
    r(b'IBDocument', b'connectBinding:ofSourceObject:toDestinationObject:keyPath:options:', {'retval': {'type': b'v'}, 'arguments': {2: {'type': b'@'}, 3: {'type': b'@'}, 4: {'type': b'@'}, 5: {'type': b'@'}, 6: {'type': b'@'}}})
Exemplo n.º 19
0
    '/System/Library/Frameworks/SecurityFoundation.framework')
success = SecurityFoundation.load()

PASS_MIN_LENGTH = 4
PASS_MAX_LENGTH = 1024
PASS_MAX_REQUEST = 15

algorithm = {
    'memorable': 0,
    'random': 1,
    'letters': 2,  # FIPS-181 compliant
    'alphanumeric': 3,
    'numbers': 4,
}

SFPWAContextRef = objc.createOpaquePointerType("SFPWAContextRef",
                                               b"^{_SFPWAContext=}", None)

functions = [
    ('SFPWAPolicyCopyDefault', '@'),
    ('SFPWAContextCreateWithDefaults', '^{_SFPWAContext=}'),
    ('SFPWAContextCreate', '^{_SFPWAContext=}'),
    ('SFPWAContextLoadDictionaries', 'v^{_SFPWAContext=}^{__CFArray=}I'),
    ('SFPWAPasswordSuggest', '@^{_SFPWAContext=}^{__CFDictionary=}IIII'),
    ('SFPWAPasswordEvaluator',
     '@^{_SFPWAContext=}^{__CFString=}I^{__CFDictionary=}'),
    ('SFPWAPolicyParse', 'v^{_SFPWAContext=}^{__CFDictionary=}'),
]

objc.loadBundleFunctions(SecurityFoundation, globals(), functions)

Exemplo n.º 20
0
from PyObjCTools.TestSupport import *
from PyObjCTest.pointersupport import opaque_capsule, object_capsule
import objc
import ctypes

OpaqueType = objc.createOpaquePointerType("OpaqueType", b"^{OpaqueType}", None)


class TestProxySupport (TestCase):
    def test_cobject_roundtrip(self):
        arr = objc.lookUpClass('NSArray').array()

        p = arr.__cobject__()
        self.assertEqual(type(p).__name__, "PyCapsule")
        self.assertIn("objc.__object__", repr(p))
        # Note: 

        v = objc.objc_object(cobject=p)
        self.assertIs(v, arr)

    def test_voidp_roundtrip(self):
        arr = objc.lookUpClass('NSArray').array()

        p = arr.__c_void_p__()
        self.assertIsInstance(p, ctypes.c_void_p)
        self.assertEqual(p.value, objc.pyobjc_id(arr))

        v = objc.objc_object(c_void_p=p)
        self.assertIs(v, arr)

    def test_voidp_using_ctypes(self):
Exemplo n.º 21
0
import objc
from Foundation import NSBundle

# Predefine some opaque types
DASessionRef = objc.createOpaquePointerType('DASessionRef', '^{__DASession=}', None)
DADiskRef    = objc.createOpaquePointerType('DADiskRef',    '^{__DADisk=}',    None)

# Load DiskManagement framework classes
DiskManagment = objc.loadBundle('DiskManagment', globals(), bundle_path='/System/Library/PrivateFrameworks/DiskManagement.framework')

# Load DiskArbitration framework functions
DiskArbitration_bundle = NSBundle.bundleWithIdentifier_('com.apple.DiskArbitration')
functions = [
             ('DASessionCreate',  '@o@'),
             ('DADiskGetBSDName', '*^{__DADisk=}'),
            ]
objc.loadBundleFunctions(DiskArbitration_bundle, globals(), functions)

class diskRef(object):
    def __init__(self, dObj, controller, rawRef=False):
        if rawRef:
            self.cf_type    = objc.objc_object(c_void_p=dObj.__pointer__)
            self.ref_type   = dObj
        else:
            self.cf_type    = dObj
            self.ref_type   = DADiskRef(c_void_p=(dObj.__c_void_p__().value))
        self.controller = controller
    def __repr__(self):
        return self.cf_type.__repr__()
    @property
    def devname(self):
Exemplo n.º 22
0

if sys.byteorder == "little":

    def littleOrBig(a, b):
        return a

else:

    def littleOrBig(a, b):
        return b


misc = {
    "IBDocumentStorage*":
    objc.createOpaquePointerType("IBDocumentStorage*",
                                 b"^{IBDocumentStorage=}"),
    "IBInset":
    objc.createStructType("IBInset",
                          b'{IBInsetTag="left"f"top"f"right"f"bottom"f}',
                          None),
}
constants = """$IBAdditionalLocalizableKeyPaths$IBAttributeKeyPaths$IBLocalizableGeometryKeyPaths$IBLocalizableStringKeyPaths$IBToManyRelationshipKeyPaths$IBToOneRelationshipKeyPaths$"""
enums = """$IBMaxXDirection@2$IBMaxXMaxYDirection@10$IBMaxXMinYDirection@6$IBMaxYDirection@8$IBMinXDirection@1$IBMinXMaxYDirection@9$IBMinXMinYDirection@5$IBMinYDirection@4$IBNoDirection@0$"""
misc.update({})
functions = {}
cftypes = []
r = objc.registerMetaDataForSelector
objc._updatingMetadata(True)
try:
    pass
    r(
Exemplo n.º 23
0
# This file is generated by objective.metadata
#
# Last update: Mon Jan 14 10:24:36 2013

import objc, sys

if sys.maxsize > 2 ** 32:
    def sel32or64(a, b): return b
else:
    def sel32or64(a, b): return a
if sys.byteorder == 'little':
    def littleOrBig(a, b): return a
else:
    def littleOrBig(a, b): return b

misc = {
}
misc.update({'LSItemInfoRecord': objc.createStructType('LSItemInfoRecord', sel32or64(b'{LSItemInfoRecord=LLL^{__CFString=}^{__CFString=}L}', b'{LSItemInfoRecord=III^{__CFString=}}'), sel32or64(['flags', 'filetype', 'creator', 'extension', 'iconFileName', 'kindID'], ['flags', 'filetype', 'creator', 'extension']), None, 2), 'LSLaunchFSRefSpec': objc.createStructType('LSLaunchFSRefSpec', sel32or64(b'{LSLaunchFSRefSpec=^{FSRef=[80C]}L^{FSRef=[80C]}^{AEDesc=L^^{OpaqueAEDataStorageType=}}L^v}', b'{LSLaunchFSRefSpec=^{FSRef=[80C]}Q^{FSRef=[80C]}^{AEDesc=I^^{OpaqueAEDataStorageType=}}I^v}'), ['appRef', 'numDocs', 'itemRefs', 'passThruParams', 'launchFlags', 'asyncRefCon'], None, 2), 'LSApplicationParameters': objc.createStructType('LSApplicationParameters', sel32or64(b'{LSApplicationParameters=lL^{FSRef=[80C]}^v^{__CFDictionary=}^{__CFArray=}^{AEDesc=L^^{OpaqueAEDataStorageType=}}}', b'{LSApplicationParameters=qI^{FSRef=[80C]}^v^{__CFDictionary=}^{__CFArray=}^{AEDesc=I^^{OpaqueAEDataStorageType=}}}'), ['version', 'flags', 'application', 'asyncLaunchRefCon', 'environment', 'argv', 'initialEvent']), 'LSLaunchURLSpec': objc.createStructType('LSLaunchURLSpec', sel32or64(b'{LSLaunchURLSpec=^{__CFURL=}^{__CFArray=}^{AEDesc=L^^{OpaqueAEDataStorageType=}}L^v}', b'{LSLaunchURLSpec=^{__CFURL=}^{__CFArray=}^{AEDesc=I^^{OpaqueAEDataStorageType=}}I^v}'), ['appURL', 'itemURLs', 'passThruParams', 'launchFlags', 'asyncRefCon'], None, 2)})
constants = '''$kLSItemContentType@^{__CFString=}$kLSItemDisplayKind@^{__CFString=}$kLSItemDisplayName@^{__CFString=}$kLSItemExtension@^{__CFString=}$kLSItemExtensionIsHidden@^{__CFString=}$kLSItemFileCreator@^{__CFString=}$kLSItemFileType@^{__CFString=}$kLSItemIsInvisible@^{__CFString=}$kLSItemQuarantineProperties@^{__CFString=}$kLSItemRoleHandlerDisplayName@^{__CFString=}$kLSQuarantineAgentBundleIdentifierKey@^{__CFString=}$kLSQuarantineAgentNameKey@^{__CFString=}$kLSQuarantineDataURLKey@^{__CFString=}$kLSQuarantineOriginURLKey@^{__CFString=}$kLSQuarantineTimeStampKey@^{__CFString=}$kLSQuarantineTypeCalendarEventAttachment@^{__CFString=}$kLSQuarantineTypeEmailAttachment@^{__CFString=}$kLSQuarantineTypeInstantMessageAttachment@^{__CFString=}$kLSQuarantineTypeKey@^{__CFString=}$kLSQuarantineTypeOtherAttachment@^{__CFString=}$kLSQuarantineTypeOtherDownload@^{__CFString=}$kLSQuarantineTypeWebDownload@^{__CFString=}$kLSSharedFileListFavoriteItems@^{__CFString=}$kLSSharedFileListFavoriteVolumes@^{__CFString=}$kLSSharedFileListGlobalLoginItems@^{__CFString=}$kLSSharedFileListItemHidden@^{__CFString=}$kLSSharedFileListLoginItemHidden@^{__CFString=}$kLSSharedFileListRecentApplicationItems@^{__CFString=}$kLSSharedFileListRecentDocumentItems@^{__CFString=}$kLSSharedFileListRecentItemsMaxAmount@^{__CFString=}$kLSSharedFileListRecentServerItems@^{__CFString=}$kLSSharedFileListSessionLoginItems@^{__CFString=}$kLSSharedFileListVolumesComputerVisible@^{__CFString=}$kLSSharedFileListVolumesIDiskVisible@^{__CFString=}$kLSSharedFileListVolumesNetworkVisible@^{__CFString=}$kUTExportedTypeDeclarationsKey@^{__CFString=}$kUTImportedTypeDeclarationsKey@^{__CFString=}$kUTTagClassFilenameExtension@^{__CFString=}$kUTTagClassMIMEType@^{__CFString=}$kUTTagClassNSPboardType@^{__CFString=}$kUTTagClassOSType@^{__CFString=}$kUTTypeAliasFile@^{__CFString=}$kUTTypeAliasRecord@^{__CFString=}$kUTTypeAppleICNS@^{__CFString=}$kUTTypeAppleProtectedMPEG4Audio@^{__CFString=}$kUTTypeApplication@^{__CFString=}$kUTTypeApplicationBundle@^{__CFString=}$kUTTypeApplicationFile@^{__CFString=}$kUTTypeArchive@^{__CFString=}$kUTTypeAudio@^{__CFString=}$kUTTypeAudiovisualContent@^{__CFString=}$kUTTypeBMP@^{__CFString=}$kUTTypeBundle@^{__CFString=}$kUTTypeCHeader@^{__CFString=}$kUTTypeCPlusPlusHeader@^{__CFString=}$kUTTypeCPlusPlusSource@^{__CFString=}$kUTTypeCSource@^{__CFString=}$kUTTypeCompositeContent@^{__CFString=}$kUTTypeConformsToKey@^{__CFString=}$kUTTypeContact@^{__CFString=}$kUTTypeContent@^{__CFString=}$kUTTypeData@^{__CFString=}$kUTTypeDescriptionKey@^{__CFString=}$kUTTypeDirectory@^{__CFString=}$kUTTypeDiskImage@^{__CFString=}$kUTTypeFileURL@^{__CFString=}$kUTTypeFlatRTFD@^{__CFString=}$kUTTypeFolder@^{__CFString=}$kUTTypeFramework@^{__CFString=}$kUTTypeGIF@^{__CFString=}$kUTTypeHTML@^{__CFString=}$kUTTypeICO@^{__CFString=}$kUTTypeIconFileKey@^{__CFString=}$kUTTypeIdentifierKey@^{__CFString=}$kUTTypeImage@^{__CFString=}$kUTTypeInkText@^{__CFString=}$kUTTypeItem@^{__CFString=}$kUTTypeJPEG@^{__CFString=}$kUTTypeJPEG2000@^{__CFString=}$kUTTypeJavaSource@^{__CFString=}$kUTTypeMP3@^{__CFString=}$kUTTypeMPEG@^{__CFString=}$kUTTypeMPEG4@^{__CFString=}$kUTTypeMPEG4Audio@^{__CFString=}$kUTTypeMessage@^{__CFString=}$kUTTypeMountPoint@^{__CFString=}$kUTTypeMovie@^{__CFString=}$kUTTypeObjectiveCPlusPlusSource@^{__CFString=}$kUTTypeObjectiveCSource@^{__CFString=}$kUTTypePDF@^{__CFString=}$kUTTypePICT@^{__CFString=}$kUTTypePNG@^{__CFString=}$kUTTypePackage@^{__CFString=}$kUTTypePlainText@^{__CFString=}$kUTTypeQuickTimeImage@^{__CFString=}$kUTTypeQuickTimeMovie@^{__CFString=}$kUTTypeRTF@^{__CFString=}$kUTTypeRTFD@^{__CFString=}$kUTTypeReferenceURLKey@^{__CFString=}$kUTTypeResolvable@^{__CFString=}$kUTTypeSourceCode@^{__CFString=}$kUTTypeSymLink@^{__CFString=}$kUTTypeTIFF@^{__CFString=}$kUTTypeTXNTextAndMultimediaData@^{__CFString=}$kUTTypeTagSpecificationKey@^{__CFString=}$kUTTypeText@^{__CFString=}$kUTTypeURL@^{__CFString=}$kUTTypeUTF16ExternalPlainText@^{__CFString=}$kUTTypeUTF16PlainText@^{__CFString=}$kUTTypeUTF8PlainText@^{__CFString=}$kUTTypeVCard@^{__CFString=}$kUTTypeVersionKey@^{__CFString=}$kUTTypeVideo@^{__CFString=}$kUTTypeVolume@^{__CFString=}$kUTTypeWebArchive@^{__CFString=}$kUTTypeXML@^{__CFString=}$'''
enums = '''$appleMenuFolderIconResource@-3982$controlPanelFolderIconResource@-3976$desktopIconResource@-3992$dropFolderIconResource@-3979$extensionsFolderIconResource@-3973$floppyIconResource@-3998$fontsFolderIconResource@-3968$fullTrashIconResource@-3984$genericApplicationIconResource@-3996$genericCDROMIconResource@-3987$genericDeskAccessoryIconResource@-3991$genericDocumentIconResource@-4000$genericEditionFileIconResource@-3989$genericExtensionIconResource@-16415$genericFileServerIconResource@-3972$genericFolderIconResource@-3999$genericHardDiskIconResource@-3995$genericMoverObjectIconResource@-3969$genericPreferencesIconResource@-3971$genericQueryDocumentIconResource@-16506$genericRAMDiskIconResource@-3988$genericStationeryIconResource@-3985$genericSuitcaseIconResource@-3970$kAFPServerIcon@1634103411$kAlertCautionBadgeIcon@1667392615$kAlertCautionIcon@1667331444$kAlertNoteIcon@1852798053$kAlertStopIcon@1937010544$kAliasBadgeIcon@1633838183$kAppearanceFolderIcon@1634758770$kAppleExtrasFolderIcon@1634040004$kAppleLogoIcon@1667330156$kAppleMenuFolderIcon@1634561653$kAppleMenuFolderIconResource@-3982$kAppleMenuIcon@1935765612$kAppleScriptBadgeIcon@1935897200$kAppleTalkIcon@1635019883$kAppleTalkZoneIcon@1635023470$kApplicationSupportFolderIcon@1634956656$kApplicationsFolderIcon@1634758771$kAssistantsFolderIcon@1634956484$kBackwardArrowIcon@1650553455$kBurningIcon@1651864174$kClipboardIcon@1129072976$kClippingPictureTypeIcon@1668051056$kClippingSoundTypeIcon@1668051059$kClippingTextTypeIcon@1668051060$kClippingUnknownTypeIcon@1668051061$kColorSyncFolderIcon@1886547814$kComputerIcon@1919905652$kConnectToIcon@1668178804$kContextualMenuItemsFolderIcon@1668116085$kControlPanelDisabledFolderIcon@1668575812$kControlPanelFolderIcon@1668575852$kControlPanelFolderIconResource@-3976$kControlStripModulesFolderIcon@1935963844$kDeleteAliasIcon@1684106345$kDesktopIcon@1684370283$kDesktopIconResource@-3992$kDocumentsFolderIcon@1685021555$kDropFolderIcon@1684172664$kDropFolderIconResource@-3979$kEjectMediaIcon@1701471587$kExtensionsDisabledFolderIcon@1702392900$kExtensionsFolderIcon@1702392942$kExtensionsFolderIconResource@-3973$kFTPServerIcon@1718906995$kFavoriteItemsIcon@1717663346$kFavoritesFolderIcon@1717663347$kFinderIcon@1179534418$kFloppyIconResource@-3998$kFontSuitcaseIcon@1179011404$kFontsFolderIcon@1718578804$kFontsFolderIconResource@-3968$kForwardArrowIcon@1717662319$kFullTrashIcon@1718907496$kFullTrashIconResource@-3984$kGenericApplicationIcon@1095782476$kGenericApplicationIconResource@-3996$kGenericCDROMIcon@1667523698$kGenericCDROMIconResource@-3987$kGenericComponentIcon@1953001063$kGenericControlPanelIcon@1095782467$kGenericControlStripModuleIcon@1935959414$kGenericDeskAccessoryIcon@1095782468$kGenericDeskAccessoryIconResource@-3991$kGenericDocumentIcon@1685021557$kGenericDocumentIconResource@-4000$kGenericEditionFileIcon@1701082214$kGenericEditionFileIconResource@-3989$kGenericExtensionIcon@1229867348$kGenericExtensionIconResource@-16415$kGenericFileServerIcon@1936881266$kGenericFileServerIconResource@-3972$kGenericFloppyIcon@1718382713$kGenericFolderIcon@1718379634$kGenericFolderIconResource@-3999$kGenericFontIcon@1717987692$kGenericFontScalerIcon@1935895666$kGenericHardDiskIcon@1751413611$kGenericHardDiskIconResource@-3995$kGenericIDiskIcon@1768190827$kGenericMoverObjectIcon@1836021362$kGenericMoverObjectIconResource@-3969$kGenericNetworkIcon@1735288180$kGenericPCCardIcon@1885564259$kGenericPreferencesIcon@1886545254$kGenericPreferencesIconResource@-3971$kGenericQueryDocumentIcon@1902473849$kGenericQueryDocumentIconResource@-16506$kGenericRAMDiskIcon@1918987620$kGenericRAMDiskIconResource@-3988$kGenericRemovableMediaIcon@1919774582$kGenericSharedLibaryIcon@1936223330$kGenericStationeryIcon@1935961955$kGenericStationeryIconResource@-3985$kGenericSuitcaseIcon@1937074548$kGenericSuitcaseIconResource@-3970$kGenericURLIcon@1735750252$kGenericWORMIcon@2003792493$kGenericWindowIcon@1735879022$kGridIcon@1735551332$kGroupIcon@1735554416$kGuestUserIcon@1735750514$kHTTPServerIcon@1752461427$kHelpFolderIcon@-999789456$kHelpIcon@1751477360$kHelpIconResource@-20271$kIPFileServerIcon@1769173622$kIconServicesCatalogInfoMask@531550$kIconServicesNoBadgeFlag@1$kIconServicesNormalUsageFlag@0$kIconServicesUpdateIfNeededFlag@2$kInternationResourcesIcon@1768319340$kInternationalResourcesIcon@1768319340$kInternetFolderIcon@1768846532$kInternetLocationAppleShareIcon@1768710502$kInternetLocationAppleTalkZoneIcon@1768710516$kInternetLocationFTPIcon@1768711796$kInternetLocationFileIcon@1768711785$kInternetLocationGenericIcon@1768712037$kInternetLocationHTTPIcon@1768712308$kInternetLocationMailIcon@1768713569$kInternetLocationNSLNeighborhoodIcon@1768713843$kInternetLocationNewsIcon@1768713847$kInternetPlugInFolderIcon@-999398028$kInternetSearchSitesFolderIcon@1769173862$kKeepArrangedIcon@1634889319$kKeyboardLayoutIcon@1801873772$kLSAcceptAllowLoginUI@2$kLSAcceptDefault@1$kLSAppDoesNotClaimTypeErr@-10820$kLSAppDoesNotSupportSchemeWarning@-10821$kLSAppInTrashErr@-10660$kLSApplicationNotFoundErr@-10814$kLSAttributeNotFoundErr@-10662$kLSAttributeNotSettableErr@-10663$kLSCannotSetInfoErr@-10823$kLSDataErr@-10817$kLSDataTooOldErr@-10816$kLSDataUnavailableErr@-10813$kLSExecutableIncorrectFormat@-10661$kLSHandlerOptionsDefault@0$kLSHandlerOptionsIgnoreCreator@1$kLSIncompatibleApplicationVersionErr@-10664$kLSIncompatibleSystemVersionErr@-10825$kLSInitializeDefaults@1$kLSItemInfoAppIsScriptable@2048$kLSItemInfoAppPrefersClassic@1024$kLSItemInfoAppPrefersNative@512$kLSItemInfoExtensionIsHidden@1048576$kLSItemInfoIsAliasFile@16$kLSItemInfoIsApplication@4$kLSItemInfoIsClassicApp@256$kLSItemInfoIsContainer@8$kLSItemInfoIsInvisible@64$kLSItemInfoIsNativeApp@128$kLSItemInfoIsPackage@2$kLSItemInfoIsPlainFile@1$kLSItemInfoIsSymlink@32$kLSItemInfoIsVolume@4096$kLSLaunchAndDisplayErrors@64$kLSLaunchAndHide@1048576$kLSLaunchAndHideOthers@2097152$kLSLaunchAndPrint@2$kLSLaunchAsync@65536$kLSLaunchDefaults@1$kLSLaunchDontAddToRecents@256$kLSLaunchDontSwitch@512$kLSLaunchHasUntrustedContents@4194304$kLSLaunchInClassic@262144$kLSLaunchInProgressErr@-10818$kLSLaunchInhibitBGOnly@128$kLSLaunchNewInstance@524288$kLSLaunchNoParams@2048$kLSLaunchReserved2@4$kLSLaunchReserved3@8$kLSLaunchReserved4@16$kLSLaunchReserved5@32$kLSLaunchStartClassic@131072$kLSMinCatInfoBitmap@6154$kLSMultipleSessionsNotSupportedErr@-10829$kLSNoClassicEnvironmentErr@-10828$kLSNoExecutableErr@-10827$kLSNoLaunchPermissionErr@-10826$kLSNoRegistrationInfoErr@-10824$kLSNoRosettaEnvironmentErr@-10665$kLSNotAnApplicationErr@-10811$kLSNotInitializedErr@-10812$kLSNotRegisteredErr@-10819$kLSRequestAllFlags@16$kLSRequestAllInfo@4294967295$kLSRequestAppTypeFlags@8$kLSRequestBasicFlagsOnly@4$kLSRequestExtension@1$kLSRequestExtensionFlagsOnly@64$kLSRequestIconAndKind@32$kLSRequestTypeCreator@2$kLSRolesAll@4294967295$kLSRolesEditor@4$kLSRolesNone@1$kLSRolesShell@8$kLSRolesViewer@2$kLSServerCommunicationErr@-10822$kLSSharedFileListDoNotMountVolumes@2$kLSSharedFileListNoUserInteraction@1$kLSUnknownCreator@0$kLSUnknownErr@-10810$kLSUnknownKindID@0$kLSUnknownType@0$kLSUnknownTypeErr@-10815$kLocalesFolderIcon@-999526557$kLockedBadgeIcon@1818387559$kLockedIcon@1819239275$kMacOSReadMeFolderIcon@1836020420$kMountedBadgeIcon@1835164775$kMountedFolderIcon@1835955300$kMountedFolderIconResource@-3977$kNoFilesIcon@1852205420$kNoFolderIcon@1852206180$kNoWriteIcon@1853321844$kOpenFolderIcon@1868983396$kOpenFolderIconResource@-3997$kOwnedFolderIcon@1870098020$kOwnedFolderIconResource@-3980$kOwnerIcon@1937077106$kPreferencesFolderIcon@1886545604$kPreferencesFolderIconResource@-3974$kPrintMonitorFolderIcon@1886547572$kPrintMonitorFolderIconResource@-3975$kPrinterDescriptionFolderIcon@1886413926$kPrinterDriverFolderIcon@-999263644$kPrivateFolderIcon@1886549606$kPrivateFolderIconResource@-3994$kProtectedApplicationFolderIcon@1885433968$kProtectedSystemFolderIcon@1886615923$kPublicFolderIcon@1886741094$kQuestionMarkIcon@1903519091$kRecentApplicationsFolderIcon@1918988400$kRecentDocumentsFolderIcon@1919184739$kRecentItemsIcon@1919118964$kRecentServersFolderIcon@1920168566$kRightContainerArrowIcon@1919115634$kScriptingAdditionsFolderIcon@-999070862$kScriptsFolderIcon@1935897284$kSharedBadgeIcon@1935828071$kSharedFolderIcon@1936221804$kSharedFolderIconResource@-3978$kSharedLibrariesFolderIcon@-999528094$kSharingPrivsNotApplicableIcon@1936223841$kSharingPrivsReadOnlyIcon@1936224879$kSharingPrivsReadWriteIcon@1936224887$kSharingPrivsUnknownIcon@1936225643$kSharingPrivsWritableIcon@2003986804$kShortcutIcon@1936224884$kShutdownItemsDisabledFolderIcon@1936221252$kShutdownItemsFolderIcon@1936221286$kSortAscendingIcon@1634954852$kSortDescendingIcon@1685286500$kSoundFileIcon@1936091500$kSpeakableItemsFolder@1936747369$kStartupFolderIconResource@-3981$kStartupItemsDisabledFolderIcon@1937011268$kStartupItemsFolderIcon@1937011316$kSystemExtensionDisabledFolderIcon@1835098948$kSystemFolderIcon@1835098995$kSystemFolderIconResource@-3983$kSystemIconsCreator@1835098995$kSystemSuitcaseIcon@2054388083$kTextEncodingsFolderIcon@-999004808$kToolbarAdvancedIcon@1952604534$kToolbarApplicationsFolderIcon@1950445683$kToolbarCustomizeIcon@1952675187$kToolbarDeleteIcon@1952736620$kToolbarDesktopFolderIcon@1950643051$kToolbarDocumentsFolderIcon@1950642019$kToolbarDownloadsFolderIcon@1950644078$kToolbarFavoritesIcon@1952866678$kToolbarHomeIcon@1953001325$kToolbarInfoIcon@1952606574$kToolbarLabelsIcon@1952607330$kToolbarLibraryFolderIcon@1951164770$kToolbarMovieFolderIcon@1951231862$kToolbarMusicFolderIcon@1951233395$kToolbarPicturesFolderIcon@1951426915$kToolbarPublicFolderIcon@1951429986$kToolbarSitesFolderIcon@1951626355$kToolbarUtilitiesFolderIcon@1951757420$kTrashIcon@1953657704$kTrashIconResource@-3993$kTrueTypeFlatFontIcon@1936092788$kTrueTypeFontIcon@1952868716$kTrueTypeMultiFlatFontIcon@1953784678$kUnknownFSObjectIcon@1970169459$kUnlockedIcon@1970037611$kUserFolderIcon@1969646692$kUserIDiskIcon@1969517419$kUserIcon@1970496882$kUsersFolderIcon@1970500292$kUtilitiesFolderIcon@1970563524$kVoicesFolderIcon@1719037795$kWorkgroupFolderIcon@2003201124$mountedFolderIconResource@-3977$openFolderIconResource@-3997$ownedFolderIconResource@-3980$preferencesFolderIconResource@-3974$printMonitorFolderIconResource@-3975$privateFolderIconResource@-3994$sharedFolderIconResource@-3978$startupFolderIconResource@-3981$systemFolderIconResource@-3983$trashIconResource@-3993$'''
misc.update({})
functions={'LSSharedFileListItemCopyDisplayName': (b'^{__CFString=}^{OpaqueLSSharedFileListItemRef=}', '', {'retval': {'already_cfretained': True}}), '_LSCopyAllApplicationURLs': (b'v^@', '', {'arguments': {0: {'already_retained': True, 'type_modifier': 'o'}}}), 'LSCopyItemInfoForRef': (sel32or64(b'l^{FSRef=[80C]}L^{LSItemInfoRecord=LLL^{__CFString=}^{__CFString=}L}', b'i^{FSRef=[80C]}I^{LSItemInfoRecord=III^{__CFString=}}'), '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'n'}, 2: {'type_modifier': 'o'}}}), 'GetIconRefFromTypeInfo': (sel32or64(b'sLL^{__CFString=}^{__CFString=}L^^{OpaqueIconRef=}', b'sII^{__CFString=}^{__CFString=}I^^{OpaqueIconRef=}'), '', {'arguments': {5: {'type_modifier': 'o'}}}), 'ReadIconFromFSRef': (sel32or64(b'l^{FSRef=[80C]}^^^{IconFamilyResource=Ll[1{IconFamilyElement=Ll[1C]}]}', b'i^{FSRef=[80C]}^^^{IconFamilyResource=Ii[1{IconFamilyElement=Ii[1C]}]}'), '', {'arguments': {0: {'type_modifier': 'n'}}}), 'LSSharedFileListRemoveAllItems': (sel32or64(b'l^{OpaqueLSSharedFileListRef=}', b'i^{OpaqueLSSharedFileListRef=}'),), 'LSCopyItemAttribute': (sel32or64(b'l^{FSRef=[80C]}L^{__CFString=}^@', b'i^{FSRef=[80C]}I^{__CFString=}^@'), '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'n'}, 3: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'LSSharedFileListItemMove': (sel32or64(b'l^{OpaqueLSSharedFileListRef=}^{OpaqueLSSharedFileListItemRef=}^{OpaqueLSSharedFileListItemRef=}', b'i^{OpaqueLSSharedFileListRef=}^{OpaqueLSSharedFileListItemRef=}^{OpaqueLSSharedFileListItemRef=}'),), 'LSSetDefaultRoleHandlerForContentType': (sel32or64(b'l^{__CFString=}L^{__CFString=}', b'i^{__CFString=}I^{__CFString=}'),), 'LSSetHandlerOptionsForContentType': (sel32or64(b'l^{__CFString=}L', b'i^{__CFString=}I'),), 'LSSharedFileListGetTypeID': (sel32or64(b'L', b'Q'),), 'LSInit': (sel32or64(b'lL', b'iI'),), 'LSCopyDefaultHandlerForURLScheme': (b'^{__CFString=}^{__CFString=}', '', {'retval': {'already_cfretained': True}}), 'LSCopyAllRoleHandlersForContentType': (sel32or64(b'^{__CFArray=}^{__CFString=}L', b'^{__CFArray=}^{__CFString=}I'), '', {'retval': {'already_cfretained': True}}), 'IsDataAvailableInIconRef': (sel32or64(b'ZL^{OpaqueIconRef=}', b'ZI^{OpaqueIconRef=}'),), 'IsValidIconRef': (b'Z^{OpaqueIconRef=}',), 'LSCanRefAcceptItem': (sel32or64(b'l^{FSRef=[80C]}^{FSRef=[80C]}LL^Z', b'i^{FSRef=[80C]}^{FSRef=[80C]}II^Z'), '', {'arguments': {0: {'type_modifier': 'n'}, 1: {'type_modifier': 'n'}, 4: {'type_modifier': 'o'}}}), 'LSCopyKindStringForTypeInfo': (sel32or64(b'lLL^{__CFString=}^^{__CFString=}', b'iII^{__CFString=}^^{__CFString=}'), '', {'retval': {'already_cfretained': True}, 'arguments': {3: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'UTTypeCopyPreferredTagWithClass': (b'^{__CFString=}^{__CFString=}^{__CFString=}', '', {'retval': {'already_cfretained': True}}), 'FlushIconRefs': (b'sLL',), 'LSSetExtensionHiddenForURL': (sel32or64(b'l^{__CFURL=}Z', b'i^{__CFURL=}Z'),), 'LSOpenFSRef': (sel32or64(b'l^{FSRef=[80C]}^{FSRef=[80C]}', b'i^{FSRef=[80C]}^{FSRef=[80C]}'), '', {'arguments': {0: {'type_modifier': 'n'}, 1: {'type_modifier': 'o'}}}), 'LSSharedFileListInsertItemFSRef': (b'^{OpaqueLSSharedFileListItemRef=}^{OpaqueLSSharedFileListRef=}^{OpaqueLSSharedFileListItemRef=}^{__CFString=}^{OpaqueIconRef=}^{FSRef=[80C]}^{__CFDictionary=}^{__CFArray=}',), 'RegisterIconRefFromIconFile': (b'sLL^{FSSpec=sl[64C]}^^{OpaqueIconRef=}', '', {'arguments': {3: {'type_modifier': 'o'}}}), 'LSCopyItemAttributes': (sel32or64(b'l^{FSRef=[80C]}L^{__CFArray=}^^{__CFDictionary=}', b'i^{FSRef=[80C]}I^{__CFArray=}^^{__CFDictionary=}'), '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'n'}, 3: {'type_modifier': 'o'}}}), 'LSSharedFileListItemSetProperty': (sel32or64(b'l^{OpaqueLSSharedFileListItemRef=}^{__CFString=}@', b'i^{OpaqueLSSharedFileListItemRef=}^{__CFString=}@'),), 'UTTypeCreateAllIdentifiersForTag': (b'^{__CFArray=}^{__CFString=}^{__CFString=}^{__CFString=}', '', {'retval': {'already_cfretained': True}}), 'LSGetHandlerOptionsForContentType': (sel32or64(b'L^{__CFString=}', b'I^{__CFString=}'),), 'LSTerm': (sel32or64(b'l', b'i'),), 'LSSharedFileListItemCopyProperty': (b'@^{OpaqueLSSharedFileListItemRef=}^{__CFString=}', '', {'retval': {'already_cfretained': True}}), 'UpdateIconRef': (b's^{OpaqueIconRef=}',), 'LSGetApplicationForInfo': (sel32or64(b'lLL^{__CFString=}L^{FSRef=[80C]}^^{__CFURL=}', b'iII^{__CFString=}I^{FSRef=[80C]}^^{__CFURL=}'), '', {'arguments': {4: {'type_modifier': 'o'}, 5: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'LSSharedFileListItemGetTypeID': (sel32or64(b'L', b'Q'),), 'GetIconRefFromComponent': (sel32or64(b'l^{ComponentRecord=[1l]}^^{OpaqueIconRef=}', b'i^{ComponentRecord=[1q]}^^{OpaqueIconRef=}'), '', {'arguments': {1: {'type_modifier': 'o'}}}), 'UTTypeCopyDeclaration': (b'^{__CFDictionary=}^{__CFString=}', '', {'retval': {'already_cfretained': True}}), 'LSSharedFileListSetProperty': (sel32or64(b'l^{OpaqueLSSharedFileListRef=}^{__CFString=}@', b'i^{OpaqueLSSharedFileListRef=}^{__CFString=}@'),), 'LSSharedFileListRemoveObserver': (b'v^{OpaqueLSSharedFileListRef=}^{__CFRunLoop=}^{__CFString=}^?^v', '', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^{OpaqueLSSharedFileListRef=}'}, 1: {'type': b'^v'}}}}}}), 'RegisterIconRefFromFSRef': (sel32or64(b'lLL^{FSRef=[80C]}^^{OpaqueIconRef=}', b'iII^{FSRef=[80C]}^^{OpaqueIconRef=}'), '', {'arguments': {2: {'type_modifier': 'n'}}}), 'LSCopyApplicationForMIMEType': (sel32or64(b'l^{__CFString=}L^^{__CFURL=}', b'i^{__CFString=}I^^{__CFURL=}'), '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'ReleaseIconRef': (b's^{OpaqueIconRef=}',), 'UTTypeCreatePreferredIdentifierForTag': (b'^{__CFString=}^{__CFString=}^{__CFString=}^{__CFString=}', '', {'retval': {'already_cfretained': True}}), 'LSSharedFileListItemResolve': (sel32or64(b'l^{OpaqueLSSharedFileListItemRef=}L^^{__CFURL=}^{FSRef=[80C]}', b'i^{OpaqueLSSharedFileListItemRef=}I^^{__CFURL=}^{FSRef=[80C]}'), '', {'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o'}, 3: {'type_modifier': 'o'}}}), 'GetIconRefFromIconFamilyPtr': (sel32or64(b'l^{IconFamilyResource=Ll[1{IconFamilyElement=Ll[1C]}]}l^^{OpaqueIconRef=}', b'i^{IconFamilyResource=Ii[1{IconFamilyElement=Ii[1C]}]}q^^{OpaqueIconRef=}'), '', {'arguments': {0: {'type_modifier': 'n'}, 2: {'type_modifier': 'o'}}}), 'LSSharedFileListCreate': (b'^{OpaqueLSSharedFileListRef=}^{__CFAllocator=}^{__CFString=}@', '', {'retval': {'already_cfretained': True}}), 'WriteIconFile': (b's^^{IconFamilyResource=Ll[1{IconFamilyElement=Ll[1C]}]}^{FSSpec=sl[64C]}',), 'OverrideIconRef': (b's^{OpaqueIconRef=}^{OpaqueIconRef=}',), 'LSSharedFileListCopyProperty': (b'@^{OpaqueLSSharedFileListRef=}^{__CFString=}', '', {'retval': {'already_cfretained': True}}), 'IsIconRefComposite': (b's^{OpaqueIconRef=}^^{OpaqueIconRef=}^^{OpaqueIconRef=}', '', {'arguments': {1: {'type_modifier': 'o'}, 2: {'type_modifier': 'o'}}}), 'LSCanURLAcceptURL': (sel32or64(b'l^{__CFURL=}^{__CFURL=}LL^Z', b'i^{__CFURL=}^{__CFURL=}II^Z'), '', {'arguments': {4: {'type_modifier': 'o'}}}), 'GetIconRefFromFile': (b's^{FSSpec=sl[64C]}^^{OpaqueIconRef=}^s', '', {'arguments': {2: {'type_modifier': 'o'}}}), 'RemoveIconRefOverride': (b's^{OpaqueIconRef=}',), 'LSSharedFileListSetAuthorization': (sel32or64(b'l^{OpaqueLSSharedFileListRef=}^{AuthorizationOpaqueRef=}', b'i^{OpaqueLSSharedFileListRef=}^{AuthorizationOpaqueRef=}'),), 'LSOpenItemsWithRole': (sel32or64(b'l^{FSRef=[80C]}lL^{AEKeyDesc=L{AEDesc=L^^{OpaqueAEDataStorageType=}}}^{LSApplicationParameters=lL^{FSRef=[80C]}^v^{__CFDictionary=}^{__CFArray=}^{AEDesc=L^^{OpaqueAEDataStorageType=}}}^{ProcessSerialNumber=LL}l', b'i^{FSRef=[80C]}qI^{AEKeyDesc=I{AEDesc=I^^{OpaqueAEDataStorageType=}}}^{LSApplicationParameters=qI^{FSRef=[80C]}^v^{__CFDictionary=}^{__CFArray=}^{AEDesc=I^^{OpaqueAEDataStorageType=}}}^{ProcessSerialNumber=II}q'), '', {'arguments': {0: {'c_array_length_in_arg': 1, 'type_modifier': 'n'}, 3: {'type_modifier': 'n'}, 4: {'type_modifier': 'n'}, 5: {'c_array_length_in_arg': 6, 'type_modifier': 'o'}}}), 'RegisterIconRefFromResource': (b'sLL^{FSSpec=sl[64C]}s^^{OpaqueIconRef=}',), 'LSSharedFileListGetSeedValue': (sel32or64(b'L^{OpaqueLSSharedFileListRef=}', b'I^{OpaqueLSSharedFileListRef=}'),), 'LSOpenApplication': (sel32or64(b'l^{LSApplicationParameters=lL^{FSRef=[80C]}^v^{__CFDictionary=}^{__CFArray=}^{AEDesc=L^^{OpaqueAEDataStorageType=}}}^{ProcessSerialNumber=LL}', b'i^{LSApplicationParameters=qI^{FSRef=[80C]}^v^{__CFDictionary=}^{__CFArray=}^{AEDesc=I^^{OpaqueAEDataStorageType=}}}^{ProcessSerialNumber=II}'), '', {'arguments': {0: {'type_modifier': 'n'}, 1: {'type_modifier': 'o'}}}), 'LSGetApplicationForItem': (sel32or64(b'l^{FSRef=[80C]}L^{FSRef=[80C]}^^{__CFURL=}', b'i^{FSRef=[80C]}I^{FSRef=[80C]}^^{__CFURL=}'), '', {'arguments': {0: {'type_modifier': 'n'}, 2: {'type_modifier': 'o'}, 3: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'LSSetDefaultHandlerForURLScheme': (sel32or64(b'l^{__CFString=}^{__CFString=}', b'i^{__CFString=}^{__CFString=}'),), 'GetIconRef': (sel32or64(b'ssLL^^{OpaqueIconRef=}', b'ssII^^{OpaqueIconRef=}'), '', {'arguments': {3: {'type_modifier': 'o'}}}), 'LSRegisterURL': (sel32or64(b'l^{__CFURL=}Z', b'i^{__CFURL=}Z'),), 'GetIconRefOwners': (b's^{OpaqueIconRef=}^S', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'LSCopyAllHandlersForURLScheme': (b'^{__CFArray=}^{__CFString=}', '', {'retval': {'already_cfretained': True}}), 'UTTypeCopyDeclaringBundleURL': (b'^{__CFURL=}^{__CFString=}', '', {'retval': {'already_cfretained': True}}), 'AcquireIconRef': (b's^{OpaqueIconRef=}',), 'ReadIconFile': (b's^{FSSpec=sl[64C]}^^^{IconFamilyResource=Ll[1{IconFamilyElement=Ll[1C]}]}',), 'LSSharedFileListItemCopyIconRef': (b'^{OpaqueIconRef=}^{OpaqueLSSharedFileListItemRef=}', '', {'retval': {'already_cfretained': True}}), 'UTGetOSTypeFromString': (sel32or64(b'L^{__CFString=}', b'I^{__CFString=}'),), 'LSGetApplicationForURL': (sel32or64(b'l^{__CFURL=}L^{FSRef=[80C]}^^{__CFURL=}', b'i^{__CFURL=}I^{FSRef=[80C]}^^{__CFURL=}'), '', {'arguments': {2: {'type_modifier': 'o'}, 3: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'LSSharedFileListInsertItemURL': (b'^{OpaqueLSSharedFileListItemRef=}^{OpaqueLSSharedFileListRef=}^{OpaqueLSSharedFileListItemRef=}^{__CFString=}^{OpaqueIconRef=}^{__CFURL=}^{__CFDictionary=}^{__CFArray=}', '', {'retval': {'already_cfretained': True}}), 'LSOpenURLsWithRole': (sel32or64(b'l^{__CFArray=}L^{AEKeyDesc=L{AEDesc=L^^{OpaqueAEDataStorageType=}}}^{LSApplicationParameters=lL^{FSRef=[80C]}^v^{__CFDictionary=}^{__CFArray=}^{AEDesc=L^^{OpaqueAEDataStorageType=}}}^{ProcessSerialNumber=LL}l', b'i^{__CFArray=}I^{AEKeyDesc=I{AEDesc=I^^{OpaqueAEDataStorageType=}}}^{LSApplicationParameters=qI^{FSRef=[80C]}^v^{__CFDictionary=}^{__CFArray=}^{AEDesc=I^^{OpaqueAEDataStorageType=}}}^{ProcessSerialNumber=II}q'), '', {'arguments': {2: {'type_modifier': 'n'}, 3: {'type_modifier': 'n'}, 4: {'c_array_length_in_arg': 5, 'type_modifier': 'o'}}}), 'LSCopyDefaultRoleHandlerForContentType': (sel32or64(b'^{__CFString=}^{__CFString=}L', b'^{__CFString=}^{__CFString=}I'), '', {'retval': {'already_cfretained': True}}), 'UnregisterIconRef': (sel32or64(b'sLL', b'sII'),), 'LSOpenFromURLSpec': (sel32or64(b'l^{LSLaunchURLSpec=^{__CFURL=}^{__CFArray=}^{AEDesc=L^^{OpaqueAEDataStorageType=}}L^v}^^{__CFURL=}', b'i^{LSLaunchURLSpec=^{__CFURL=}^{__CFArray=}^{AEDesc=I^^{OpaqueAEDataStorageType=}}I^v}^^{__CFURL=}'), '', {'arguments': {0: {'type_modifier': 'n'}, 1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'UTTypeConformsTo': (b'Z^{__CFString=}^{__CFString=}',), 'SetCustomIconsEnabled': (b'ssZ',), 'LSRegisterFSRef': (sel32or64(b'l^{FSRef=[80C]}Z', b'i^{FSRef=[80C]}Z'), '', {'arguments': {0: {'type_modifier': 'n'}}}), 'LSSetItemAttribute': (sel32or64(b'l^{FSRef=[80C]}L^{__CFString=}@', b'i^{FSRef=[80C]}I^{__CFString=}@'), '', {'arguments': {0: {'type_modifier': 'n'}}}), 'UTCreateStringForOSType': (sel32or64(b'^{__CFString=}L', b'^{__CFString=}I'), '', {'retval': {'already_cfretained': True}}), 'LSCopyKindStringForRef': (sel32or64(b'l^{FSRef=[80C]}^^{__CFString=}', b'i^{FSRef=[80C]}^^{__CFString=}'), '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'n'}, 1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'LSCopyDisplayNameForRef': (sel32or64(b'l^{FSRef=[80C]}^^{__CFString=}', b'i^{FSRef=[80C]}^^{__CFString=}'), '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'n'}, 1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'CompositeIconRef': (b's^{OpaqueIconRef=}^{OpaqueIconRef=}^^{OpaqueIconRef=}', '', {'arguments': {2: {'type_modifier': 'o'}}}), 'UTTypeEqual': (b'Z^{__CFString=}^{__CFString=}',), 'LSCopyKindStringForMIMEType': (sel32or64(b'l^{__CFString=}^^{__CFString=}', b'i^{__CFString=}^^{__CFString=}'), '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'RegisterIconRefFromIconFamily': (sel32or64(b'sLL^^{IconFamilyResource=Ll[1{IconFamilyElement=Ll[1C]}]}^^{OpaqueIconRef=}', b'sII^^{IconFamilyResource=Ii[1{IconFamilyElement=Ii[1C]}]}^^{OpaqueIconRef=}'),), 'LSCopyDisplayNameForURL': (sel32or64(b'l^{__CFURL=}^^{__CFString=}', b'i^{__CFURL=}^^{__CFString=}'), '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'GetIconRefFromFolder': (sel32or64(b'ssllcc^^{OpaqueIconRef=}', b'ssiicc^^{OpaqueIconRef=}'), '', {'arguments': {5: {'type_modifier': 'o'}}}), 'LSSetExtensionHiddenForRef': (sel32or64(b'l^{FSRef=[80C]}Z', b'i^{FSRef=[80C]}Z'), '', {'arguments': {0: {'type_modifier': 'n'}}}), 'OverrideIconRefFromResource': (b's^{OpaqueIconRef=}^{FSSpec=sl[64C]}s',), 'LSGetExtensionInfo': (sel32or64(b'lL^T^L', b'iQ^T^Q'), '', {'arguments': {1: {'c_array_length_in_arg': 0, 'type_modifier': 'n'}, 2: {'type_modifier': 'o'}}}), 'GetIconRefFromFileInfo': (sel32or64(b'l^{FSRef=[80C]}L^TL^{FSCatalogInfo=SsLLCCCC{UTCDateTime=SLS}{UTCDateTime=SLS}{UTCDateTime=SLS}{UTCDateTime=SLS}{UTCDateTime=SLS}[4L][16C][16C]QQQQLL}L^^{OpaqueIconRef=}^s', b'i^{FSRef=[80C]}Q^TI^{FSCatalogInfo=SsIICCCC{UTCDateTime=SIS}{UTCDateTime=SIS}{UTCDateTime=SIS}{UTCDateTime=SIS}{UTCDateTime=SIS}{FSPermissionInfo=IICCS^{__FSFileSecurity=}}[16C][16C]QQQQII}I^^{OpaqueIconRef=}^s'), '', {'arguments': {0: {'type_modifier': 'n'}, 2: {'c_array_length_in_arg': 1, 'type_modifier': 'n'}, 4: {'null_accepted': True, 'type_modifier': 'n'}, 6: {'type_modifier': 'o'}, 7: {'type_modifier': 'o'}}}), 'UTTypeCopyDescription': (b'^{__CFString=}^{__CFString=}', '', {'retval': {'already_cfretained': True}}), 'FlushIconRefsByVolume': (b'ss',), 'GetCustomIconsEnabled': (b'ss^Z', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'LSCopyItemInfoForURL': (sel32or64(b'l^{__CFURL=}L^{LSItemInfoRecord=LLL^{__CFString=}^{__CFString=}L}', b'i^{__CFURL=}I^{LSItemInfoRecord=III^{__CFString=}}'), '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'type_modifier': 'o'}}}), 'LSFindApplicationForInfo': (sel32or64(b'lL^{__CFString=}^{__CFString=}^{FSRef=[80C]}^^{__CFURL=}', b'iI^{__CFString=}^{__CFString=}^{FSRef=[80C]}^^{__CFURL=}'), '', {'arguments': {3: {'type_modifier': 'o'}, 4: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'LSOpenFromRefSpec': (sel32or64(b'l^{LSLaunchFSRefSpec=^{FSRef=[80C]}L^{FSRef=[80C]}^{AEDesc=L^^{OpaqueAEDataStorageType=}}L^v}^{FSRef=[80C]}', b'i^{LSLaunchFSRefSpec=^{FSRef=[80C]}Q^{FSRef=[80C]}^{AEDesc=I^^{OpaqueAEDataStorageType=}}I^v}^{FSRef=[80C]}'), '', {'arguments': {0: {'type_modifier': 'n'}, 1: {'type_modifier': 'o'}}}), 'LSSharedFileListItemRemove': (sel32or64(b'l^{OpaqueLSSharedFileListRef=}^{OpaqueLSSharedFileListItemRef=}', b'i^{OpaqueLSSharedFileListRef=}^{OpaqueLSSharedFileListItemRef=}'),), 'LSCopyKindStringForURL': (sel32or64(b'l^{__CFURL=}^^{__CFString=}', b'i^{__CFURL=}^^{__CFString=}'), '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'LSCopyApplicationURLsForURL': (sel32or64(b'^{__CFArray=}^{__CFURL=}L', b'^{__CFArray=}^{__CFURL=}I'), '', {'retval': {'already_cfretained': True}}), 'LSOpenCFURLRef': (sel32or64(b'l^{__CFURL=}^^{__CFURL=}', b'i^{__CFURL=}^^{__CFURL=}'), '', {'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'LSSharedFileListCopySnapshot': (sel32or64(b'^{__CFArray=}^{OpaqueLSSharedFileListRef=}^L', b'^{__CFArray=}^{OpaqueLSSharedFileListRef=}^I'), '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'type_modifier': 'o'}}}), 'LSSharedFileListAddObserver': (b'v^{OpaqueLSSharedFileListRef=}^{__CFRunLoop=}^{__CFString=}^?^v', '', {'arguments': {3: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^{OpaqueLSSharedFileListRef=}'}, 1: {'type': b'^v'}}}, 'callable_retained': True}}}), 'LSSharedFileListItemGetID': (sel32or64(b'L^{OpaqueLSSharedFileListItemRef=}', b'I^{OpaqueLSSharedFileListItemRef=}'),)}
aliases = {'kLSInvalidExtensionIndex': 'ULONG_MAX'}
cftypes=[('LSSharedFileListItemRef', b'^{OpaqueLSSharedFileListItemRef=}', 'LSSharedFileListItemGetTypeID', None), ('LSSharedFileListRef', b'^{OpaqueLSSharedFileListRef=}', 'LSSharedFileListGetTypeID', None)]
misc.update({'IconRef': objc.createOpaquePointerType('IconRef', b'^{OpaqueIconRef=}')})
expressions = {}

# END OF FILE
Exemplo n.º 24
0
        return a


if sys.byteorder == 'little':

    def littleOrBig(a, b):
        return a
else:

    def littleOrBig(a, b):
        return b


misc = {
    "IBDocumentStorage*":
    objc.createOpaquePointerType('IBDocumentStorage*',
                                 b'^{IBDocumentStorage=}'),
    "IBInset":
    objc.createStructType('IBInset',
                          b'{IBInsetTag="left"f"top"f"right"f"bottom"f}',
                          None),
}
constants = '''$IBAdditionalLocalizableKeyPaths$IBAttributeKeyPaths$IBLocalizableGeometryKeyPaths$IBLocalizableStringKeyPaths$IBToManyRelationshipKeyPaths$IBToOneRelationshipKeyPaths$'''
enums = '''$IBMaxXDirection@2$IBMaxXMaxYDirection@10$IBMaxXMinYDirection@6$IBMaxYDirection@8$IBMinXDirection@1$IBMinXMaxYDirection@9$IBMinXMinYDirection@5$IBMinYDirection@4$IBNoDirection@0$'''
misc.update({})
functions = {}
cftypes = []
r = objc.registerMetaDataForSelector
objc._updatingMetadata(True)
try:
    pass
    r(
Exemplo n.º 25
0
from PyObjCTools.TestSupport import *
import objc, sys
from PyObjCTest.opaque import *


FooHandle = objc.createOpaquePointerType("FooHandle", FooEncoded, "FooHandle doc")

class TestFromPython (TestCase):
    def testBasic (self):
        tp = objc.createOpaquePointerType(
                "BarHandle", BarEncoded, "BarHandle doc")

        self.assertIsInstance(tp, type)
        self.assertEqual(tp.__module__, "objc")
        self.assertEqual(repr(tp), "<class 'objc.BarHandle'>")

        f = OC_OpaqueTest.createBarWithFirst_andSecond_(1.0, 4.5)
        self.assertIsInstance(f, tp)
        x = OC_OpaqueTest.getFirst_(f)
        self.assertEqual(x, 1.0)
        x = OC_OpaqueTest.getSecond_(f)
        self.assertEqual(x, 4.5)

        # NULL pointer is converted to None
        self.assertEqual(OC_OpaqueTest.nullBar(), None)

    def testNaming (self):
        tp = objc.createOpaquePointerType(
                "Mod.BarHandle", BarEncoded, "BarHandle doc")

        self.assertIsInstance(tp, type)
Exemplo n.º 26
0
     '', {
         'arguments': {
             3: {
                 'type_modifier': 'o'
             }
         }
     }),
    'JSValueMakeSymbol':
    (b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSString=}', ),
    'JSGarbageCollect': (b'v^{OpaqueJSContext=}', ),
    'JSValueGetType': (b'I^{OpaqueJSContext=}^{OpaqueJSValue=}', )
}
aliases = {'JSObjectRef': 'JSValueRef', 'JSGlobalContextRef': 'JSContextRef'}
misc.update({
    'JSValueRef':
    objc.createOpaquePointerType('JSValueRef', b'^{OpaqueJSValue=}'),
    'JSStringRef':
    objc.createOpaquePointerType('JSStringRef', b'^{OpaqueJSString=}'),
    'JSContextRef':
    objc.createOpaquePointerType('JSContextRef', b'^{OpaqueJSContext=}'),
    'JSPropertyNameArrayRef':
    objc.createOpaquePointerType('JSPropertyNameArrayRef',
                                 b'^{OpaqueJSPropertyNameArray=}'),
    'JSClassRef':
    objc.createOpaquePointerType('JSClassRef', b'^{OpaqueJSClass=}'),
    'JSContextGroupRef':
    objc.createOpaquePointerType('JSContextGroupRef',
                                 b'^{OpaqueJSContextGroup=}'),
    'JSPropertyNameAccumulatorRef':
    objc.createOpaquePointerType('JSPropertyNameAccumulatorRef',
                                 b'^{OpaqueJSPropertyNameAccumulator=}')
Exemplo n.º 27
0
            }
        },
    ),
    "JSObjectMakeTypedArrayWithArrayBuffer": (
        b"^{OpaqueJSValue=}^{OpaqueJSContext=}I^{OpaqueJSValue=}^^{OpaqueJSValue=}",
        "",
        {"arguments": {3: {"type_modifier": "o"}}},
    ),
    "JSValueMakeSymbol": (b"^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSString=}",),
    "JSGarbageCollect": (b"v^{OpaqueJSContext=}",),
    "JSValueGetType": (b"I^{OpaqueJSContext=}^{OpaqueJSValue=}",),
}
aliases = {"JSObjectRef": "JSValueRef", "JSGlobalContextRef": "JSContextRef"}
misc.update(
    {
        "JSValueRef": objc.createOpaquePointerType("JSValueRef", b"^{OpaqueJSValue=}"),
        "JSStringRef": objc.createOpaquePointerType("JSStringRef", b"^{OpaqueJSString=}"),
        "JSContextRef": objc.createOpaquePointerType(
            "JSContextRef", b"^{OpaqueJSContext=}"
        ),
        "JSPropertyNameArrayRef": objc.createOpaquePointerType(
            "JSPropertyNameArrayRef", b"^{OpaqueJSPropertyNameArray=}"
        ),
        "JSClassRef": objc.createOpaquePointerType("JSClassRef", b"^{OpaqueJSClass=}"),
        "JSContextGroupRef": objc.createOpaquePointerType(
            "JSContextGroupRef", b"^{OpaqueJSContextGroup=}"
        ),
        "JSPropertyNameAccumulatorRef": objc.createOpaquePointerType(
            "JSPropertyNameAccumulatorRef", b"^{OpaqueJSPropertyNameAccumulator=}"
        ),
    }
Exemplo n.º 28
0
from PyObjCTools.TestSupport import *
from PyObjCTest.pointersupport import opaque_capsule, object_capsule
import objc
import ctypes

OpaqueType = objc.createOpaquePointerType("OpaqueType", b"^{OpaqueType}", None)


class TestProxySupport(TestCase):
    def test_cobject_roundtrip(self):
        arr = objc.lookUpClass('NSArray').array()

        p = arr.__cobject__()
        self.assertEqual(type(p).__name__, "PyCapsule")
        self.assertIn("objc.__object__", repr(p))
        # Note:

        v = objc.objc_object(cobject=p)
        self.assertIs(v, arr)

    def test_voidp_roundtrip(self):
        arr = objc.lookUpClass('NSArray').array()

        p = arr.__c_void_p__()
        self.assertIsInstance(p, ctypes.c_void_p)
        self.assertEqual(p.value, objc.pyobjc_id(arr))

        v = objc.objc_object(c_void_p=p)
        self.assertIs(v, arr)

    def test_voidp_using_ctypes(self):
Exemplo n.º 29
0
    "MIDISourceCreate": (
        b"iI^{__CFString=}^I",
        "",
        {
            "retval": {
                "already_cfretained": True
            }
        },
    ),
    "MIDIEntityGetNumberOfSources": (b"QI", ),
    "MIDI2AssignablePNC": (b"{MIDIMessage_64=II}CCCCI", ),
    "MIDIEntityGetSource": (b"IIQ", ),
}
misc.update({
    "MIDIDriverRef":
    objc.createOpaquePointerType("MIDIDriverRef", b"^^{MIDriverInterface=}")
})
r = objc.registerMetaDataForSelector
objc._updatingMetadata(True)
try:
    r(b"MIDICIDiscoveredNode", b"supportsProfiles", {"retval": {"type": b"Z"}})
    r(b"MIDICIDiscoveredNode", b"supportsProperties",
      {"retval": {
          "type": b"Z"
      }})
    r(
        b"MIDICIDiscoveryManager",
        b"discoverWithHandler:",
        {
            "arguments": {
                2: {
Exemplo n.º 30
0
    "FSEventStreamCopyDescription": (
        b"^{__CFString=}^{__FSEventStream=}",
        "",
        {"retval": {"already_retained": True}},
    ),
    "FSEventStreamCopyPathsBeingWatched": (
        b"^{__CFArray=}^{__FSEventStream=}",
        "",
        {"retval": {"already_cfretained": True}},
    ),
    "FSEventStreamUnscheduleFromRunLoop": (
        b"v^{__FSEventStream=}^{__CFRunLoop=}^{__CFString=}",
    ),
    "FSEventStreamRelease": (b"v^{__FSEventStream=}",),
    "FSEventStreamStart": (b"Z^{__FSEventStream=}",),
    "FSEventStreamFlushSync": (b"v^{__FSEventStream=}",),
    "FSEventsGetLastEventIdForDeviceBeforeTime": (b"Qid",),
    "FSEventStreamFlushAsync": (b"Q^{__FSEventStream=}",),
    "FSEventsGetCurrentEventId": (b"Q",),
}
misc.update(
    {
        "FSEventStreamRef": objc.createOpaquePointerType(
            "FSEventStreamRef", b"^{__FSEventStream=}"
        )
    }
)
expressions = {}

# END OF FILE
Exemplo n.º 31
0
# This file is generated by objective.metadata
#
# Last update: Wed May 22 23:00:43 2013

import objc, sys

if sys.maxsize > 2 ** 32:
    def sel32or64(a, b): return b
else:
    def sel32or64(a, b): return a
if sys.byteorder == 'little':
    def littleOrBig(a, b): return a
else:
    def littleOrBig(a, b): return b

misc = {
}
constants = '''$kJSClassDefinitionEmpty@{_JSClassDefinition=iI^c^{OpaqueJSClass=}^{_JSStaticValue=^c^?^?I}^{_JSStaticFunction=^c^?I}^?^?^?^?^?^?^?^?^?^?^?}$'''
enums = '''$WEBKIT_VERSION_1_0@256$WEBKIT_VERSION_1_1@272$WEBKIT_VERSION_1_2@288$WEBKIT_VERSION_1_3@304$WEBKIT_VERSION_2_0@512$WEBKIT_VERSION_3_0@768$WEBKIT_VERSION_3_1@784$WEBKIT_VERSION_4_0@1024$WEBKIT_VERSION_LATEST@39321$kJSClassAttributeNoAutomaticPrototype@2$kJSClassAttributeNone@0$kJSPropertyAttributeDontDelete@8$kJSPropertyAttributeDontEnum@4$kJSPropertyAttributeNone@0$kJSPropertyAttributeReadOnly@2$kJSTypeBoolean@2$kJSTypeNull@1$kJSTypeNumber@3$kJSTypeObject@5$kJSTypeString@4$kJSTypeUndefined@0$'''
misc.update({})
functions={'JSValueMakeNumber': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}d',), 'JSValueGetType': (b'i^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSClassRetain': (b'^{OpaqueJSClass=}^{OpaqueJSClass=}',), 'JSValueCreateJSONString': (b'^{OpaqueJSString=}^{OpaqueJSContext=}^{OpaqueJSValue=}I^^{OpaqueJSValue=}', '', {'retval': {'already_cfretained': True}}), 'JSValueToObject': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSValue=}^^{OpaqueJSValue=}',), 'JSObjectMakeFunctionWithCallback': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSString=}^?', '', {'arguments': {2: {'callable': {'retval': {'type': b'^{OpaqueJSValue=}'}, 'arguments': {0: {'type': b'^{OpaqueJSContext=}'}, 1: {'type': b'^{OpaqueJSValue=}'}, 2: {'type': b'^{OpaqueJSValue=}'}, 3: {'type': b'L'}, 4: {'type': b'^^{OpaqueJSValue=}', 'type_modifier': 'n', 'c_array_length_in_arg': 3}, 5: {'type': b'^^{OpaqueJSValue=}', 'type_modifier': 'o'}}}}}}), 'JSValueToBoolean': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSValueIsObject': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSPropertyNameArrayRetain': (b'^{OpaqueJSPropertyNameArray=}^{OpaqueJSPropertyNameArray=}',), 'JSValueIsString': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSStringGetUTF8CString': (sel32or64(b'l^{OpaqueJSString=}^tl', b'q^{OpaqueJSString=}^tq'), '', {'arguments': {1: {'c_array_length_in_result': True, 'type_modifier': 'o', 'c_array_length_in_arg': 2}}}), 'JSStringCreateWithCFString': (b'^{OpaqueJSString=}^{__CFString=}', '', {'retval': {'already_cfretained': True}}), 'JSObjectCopyPropertyNames': (b'^{OpaqueJSPropertyNameArray=}^{OpaqueJSContext=}^{OpaqueJSValue=}', '', {'retval': {'already_cfretained': True}}), 'JSContextGetGlobalObject': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}',), 'JSGlobalContextCreate': (b'^{OpaqueJSContext=}^{OpaqueJSClass=}', '', {'retval': {'already_cfretained': True}}), 'JSStringCopyCFString': (b'^{__CFString=}^{__CFAllocator=}^{OpaqueJSString=}', '', {'retval': {'already_cfretained': True}}), 'JSObjectGetPrivate': (b'^v^{OpaqueJSValue=}',), 'JSObjectSetProperty': (b'v^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSString=}^{OpaqueJSValue=}I^^{OpaqueJSValue=}', '', {'arguments': {5: {'type_modifier': 'o'}}}), 'JSValueIsEqual': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSValue=}^^{OpaqueJSValue=}',), 'JSObjectIsFunction': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSValueIsBoolean': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSValueIsUndefined': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSValueProtect': (b'v^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSValueIsObjectOfClass': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSClass=}',), 'JSObjectGetPrototype': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSStringCreateWithUTF8CString': (b'^{OpaqueJSString=}^t', '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'c_array_delimited_by_null': True, 'type_modifier': 'n'}}}), 'JSObjectMakeArray': (sel32or64(b'^{OpaqueJSValue=}^{OpaqueJSContext=}l^^{OpaqueJSValue=}^^{OpaqueJSValue=}', b'^{OpaqueJSValue=}^{OpaqueJSContext=}q^^{OpaqueJSValue=}^^{OpaqueJSValue=}'), '', {'arguments': {2: {'c_array_length_in_arg': 1, 'type_modifier': 'n'}, 3: {'type_modifier': 'o'}}}), 'JSPropertyNameArrayGetNameAtIndex': (sel32or64(b'^{OpaqueJSString=}^{OpaqueJSPropertyNameArray=}L', b'^{OpaqueJSString=}^{OpaqueJSPropertyNameArray=}Q'),), 'JSValueMakeNull': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}',), 'JSStringGetMaximumUTF8CStringSize': (sel32or64(b'l^{OpaqueJSString=}', b'q^{OpaqueJSString=}'),), 'JSObjectMakeError': (sel32or64(b'^{OpaqueJSValue=}^{OpaqueJSContext=}l^^{OpaqueJSValue=}^^{OpaqueJSValue=}', b'^{OpaqueJSValue=}^{OpaqueJSContext=}q^^{OpaqueJSValue=}^^{OpaqueJSValue=}'), '', {'arguments': {2: {'c_array_length_in_arg': 1, 'type_modifier': 'n'}, 3: {'type_modifier': 'o'}}}), 'JSValueMakeBoolean': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}B',), 'JSGlobalContextRelease': (b'v^{OpaqueJSContext=}',), 'JSObjectMakeRegExp': (sel32or64(b'^{OpaqueJSValue=}^{OpaqueJSContext=}l^^{OpaqueJSValue=}^^{OpaqueJSValue=}', b'^{OpaqueJSValue=}^{OpaqueJSContext=}q^^{OpaqueJSValue=}^^{OpaqueJSValue=}'), '', {'arguments': {2: {'c_array_length_in_arg': 1, 'type_modifier': 'n'}, 3: {'type_modifier': 'o'}}}), 'JSObjectSetPropertyAtIndex': (b'v^{OpaqueJSContext=}^{OpaqueJSValue=}I^{OpaqueJSValue=}^^{OpaqueJSValue=}', '', {'arguments': {4: {'type_modifier': 'o'}}}), 'JSContextGetGroup': (b'^{OpaqueJSContextGroup=}^{OpaqueJSContext=}',), 'JSContextGroupCreate': (b'^{OpaqueJSContextGroup=}', '', {'retval': {'already_cfretained': True}}), 'JSStringIsEqualToUTF8CString': (b'B^{OpaqueJSString=}^t', '', {'arguments': {1: {'c_array_delimited_by_null': True, 'type_modifier': 'n'}}}), 'JSValueIsInstanceOfConstructor': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSValue=}^^{OpaqueJSValue=}',), 'JSValueIsNull': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSStringIsEqual': (b'B^{OpaqueJSString=}^{OpaqueJSString=}',), 'JSObjectCallAsConstructor': (sel32or64(b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSValue=}L^^{OpaqueJSValue=}^^{OpaqueJSValue=}', b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSValue=}Q^^{OpaqueJSValue=}^^{OpaqueJSValue=}'), '', {'arguments': {3: {'c_array_length_in_arg': 2, 'type_modifier': 'n'}, 4: {'type_modifier': 'o'}}}), 'JSStringRetain': (b'^{OpaqueJSString=}^{OpaqueJSString=}',), 'JSObjectDeleteProperty': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSString=}^^{OpaqueJSValue=}', '', {'arguments': {3: {'type_modifier': 'o'}}}), 'JSObjectMakeConstructor': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSClass=}^?', '', {'arguments': {2: {'callable': {'retval': {'type': b'^{OpaqueJSValue=}'}, 'arguments': {0: {'type': b'^{OpaqueJSContext=}'}, 1: {'type': b'^{OpaqueJSValue=}'}, 2: {'type': b'L'}, 3: {'type': b'^^{OpaqueJSValue=}', 'type_modifier': 'n', 'c_array_length_in_arg': 2}, 4: {'type': b'^^{OpaqueJSValue=}', 'type_modifier': 'o'}}}}}}), 'JSValueMakeString': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSString=}',), 'JSObjectSetPrivate': (b'B^{OpaqueJSValue=}^v',), 'JSObjectMakeFunction': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSString=}I^^{OpaqueJSString=}^{OpaqueJSString=}^{OpaqueJSString=}i^^{OpaqueJSValue=}', '', {'arguments': {3: {'c_array_length_in_arg': 2, 'type_modifier': 'n'}, 7: {'type_modifier': 'o'}}}), 'JSValueToStringCopy': (b'^{OpaqueJSString=}^{OpaqueJSContext=}^{OpaqueJSValue=}^^{OpaqueJSValue=}', '', {'retval': {'already_cfretained': True}}), 'JSValueMakeFromJSONString': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSString=}',), 'JSValueIsNumber': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSEvaluateScript': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSString=}^{OpaqueJSValue=}^{OpaqueJSString=}i^^{OpaqueJSValue=}', '', {'arguments': {5: {'type_modifier': 'o'}}}), 'JSObjectGetPropertyAtIndex': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSValue=}I^^{OpaqueJSValue=}', '', {'arguments': {3: {'type_modifier': 'o'}}}), 'JSStringCreateWithCharacters': (sel32or64(b'^{OpaqueJSString=}^Tl', b'^{OpaqueJSString=}^Tq'), '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'c_array_length_in_arg': 1, 'type_modifier': 'n'}}}), 'JSValueToNumber': (b'd^{OpaqueJSContext=}^{OpaqueJSValue=}^^{OpaqueJSValue=}',), 'JSObjectGetProperty': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSString=}^^{OpaqueJSValue=}', '', {'arguments': {3: {'type_modifier': 'o'}}}), 'JSPropertyNameAccumulatorAddName': (b'v^{OpaqueJSPropertyNameAccumulator=}^{OpaqueJSString=}',), 'JSObjectSetPrototype': (b'v^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSValue=}',), 'JSContextGroupRelease': (b'v^{OpaqueJSContextGroup=}',), 'JSObjectHasProperty': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSString=}',), 'JSValueIsStrictEqual': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSValue=}',), 'JSObjectMake': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSClass=}^v',), 'JSValueMakeUndefined': (b'^{OpaqueJSValue=}^{OpaqueJSContext=}',), 'JSCheckScriptSyntax': (b'B^{OpaqueJSContext=}^{OpaqueJSString=}^{OpaqueJSString=}i^^{OpaqueJSValue=}', '', {'arguments': {4: {'type_modifier': 'o'}}}), 'JSGlobalContextCreateInGroup': (b'^{OpaqueJSContext=}^{OpaqueJSContextGroup=}^{OpaqueJSClass=}', '', {'retval': {'already_cfretained': True}}), 'JSValueUnprotect': (b'v^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSObjectIsConstructor': (b'B^{OpaqueJSContext=}^{OpaqueJSValue=}',), 'JSObjectMakeDate': (sel32or64(b'^{OpaqueJSValue=}^{OpaqueJSContext=}l^^{OpaqueJSValue=}^^{OpaqueJSValue=}', b'^{OpaqueJSValue=}^{OpaqueJSContext=}q^^{OpaqueJSValue=}^^{OpaqueJSValue=}'), '', {'arguments': {2: {'c_array_length_in_arg': 1, 'type_modifier': 'n'}, 3: {'type_modifier': 'o'}}}), 'JSPropertyNameArrayRelease': (b'v^{OpaqueJSPropertyNameArray=}',), 'JSClassRelease': (b'v^{OpaqueJSClass=}',), 'JSObjectCallAsFunction': (sel32or64(b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSValue=}L^^{OpaqueJSValue=}^^{OpaqueJSValue=}', b'^{OpaqueJSValue=}^{OpaqueJSContext=}^{OpaqueJSValue=}^{OpaqueJSValue=}Q^^{OpaqueJSValue=}^^{OpaqueJSValue=}'), '', {'arguments': {4: {'c_array_length_in_arg': 3, 'type_modifier': 'n'}, 5: {'type_modifier': 'o'}}}), 'JSContextGroupRetain': (b'^{OpaqueJSContextGroup=}^{OpaqueJSContextGroup=}',), 'JSClassCreate': (b'^{OpaqueJSClass=}^{_JSClassDefinition=iI^c^{OpaqueJSClass=}^{_JSStaticValue=^c^?^?I}^{_JSStaticFunction=^c^?I}^?^?^?^?^?^?^?^?^?^?^?}', '', {'retval': {'already_cfretained': True}}), 'JSPropertyNameArrayGetCount': (sel32or64(b'L^{OpaqueJSPropertyNameArray=}', b'Q^{OpaqueJSPropertyNameArray=}'),), 'JSStringGetLength': (sel32or64(b'l^{OpaqueJSString=}', b'q^{OpaqueJSString=}'),), 'JSGarbageCollect': (b'v^{OpaqueJSContext=}',), 'JSStringRelease': (b'v^{OpaqueJSString=}',), 'JSGlobalContextRetain': (b'^{OpaqueJSContext=}^{OpaqueJSContext=}',)}
aliases = {'JSObjectRef': 'JSValueRef', 'JSGlobalContextRef': 'JSContextRef'}
misc.update({'JSValueRef': objc.createOpaquePointerType('JSValueRef', b'^{OpaqueJSValue=}'), 'JSStringRef': objc.createOpaquePointerType('JSStringRef', b'^{OpaqueJSString=}'), 'JSContextRef': objc.createOpaquePointerType('JSContextRef', b'^{OpaqueJSContext=}'), 'JSPropertyNameArrayRef': objc.createOpaquePointerType('JSPropertyNameArrayRef', b'^{OpaqueJSPropertyNameArray=}'), 'JSClassRef': objc.createOpaquePointerType('JSClassRef', b'^{OpaqueJSClass=}'), 'JSContextGroupRef': objc.createOpaquePointerType('JSContextGroupRef', b'^{OpaqueJSContextGroup=}'), 'JSPropertyNameAccumulatorRef': objc.createOpaquePointerType('JSPropertyNameAccumulatorRef', b'^{OpaqueJSPropertyNameAccumulator=}')})
expressions = {}

# END OF FILE
Exemplo n.º 32
0
    "privateFolderIconResource": "kPrivateFolderIconResource",
    "preferencesFolderIconResource": "kPreferencesFolderIconResource",
    "fullTrashIconResource": "kFullTrashIconResource",
    "trashIconResource": "kTrashIconResource",
    "genericPreferencesIconResource": "kGenericPreferencesIconResource",
    "genericStationeryIconResource": "kGenericStationeryIconResource",
    "genericExtensionIconResource": "kGenericExtensionIconResource",
    "ownedFolderIconResource": "kOwnedFolderIconResource",
    "startupFolderIconResource": "kStartupFolderIconResource",
    "genericCDROMIconResource": "kGenericCDROMIconResource",
    "kInternationResourcesIcon": "kInternationalResourcesIcon",
}
cftypes = [
    (
        "LSSharedFileListItemRef",
        b"^{OpaqueLSSharedFileListItemRef=}",
        "LSSharedFileListItemGetTypeID",
        None,
    ),
    (
        "LSSharedFileListRef",
        b"^{OpaqueLSSharedFileListRef=}",
        "LSSharedFileListGetTypeID",
        None,
    ),
]
misc.update({"IconRef": objc.createOpaquePointerType("IconRef", b"^{OpaqueIconRef=}")})
expressions = {}

# END OF FILE
Exemplo n.º 33
0
        {"arguments": {1: {"type_modifier": "o"}, 2: {"type_modifier": "o"}}},
    ),
    "GetTextEncodingVariant": (sel32or64(b"LL", b"II"),),
    "TECDisposeConverter": (
        sel32or64(b"l^{OpaqueTECObjectRef=}", b"i^{OpaqueTECObjectRef=}"),
    ),
    "TECGetTextEncodingFromInternetName": (
        sel32or64(b"l^L^C", b"i^I^C"),
        "",
        {"arguments": {0: {"type_modifier": "o"}, 1: {"type_modifier": "n"}}},
    ),
    "CSDiskSpaceCancelRecovery": (b"v^{__CFUUID=}",),
}
cftypes = [
    ("FSFileOperationRef", b"^{__FSFileOperation=}", None, None),
    ("FSFileSecurityRef", b"^{__FSFileSecurity=}", None, None),
]
misc.update(
    {
        "TECSnifferObjectRef": objc.createOpaquePointerType(
            "TECSnifferObjectRef", b"^{OpaqueTECSnifferObjectRef=}"
        ),
        "TECObjectRef": objc.createOpaquePointerType(
            "TECObjectRef", b"^{OpaqueTECObjectRef=}"
        ),
    }
)
expressions = {}

# END OF FILE
Exemplo n.º 34
0
def parseBridgeSupport(xmldata,
                       globals,
                       frameworkName,
                       dylib_path=None,
                       inlineTab=None):

    if dylib_path:
        lib = ctypes.cdll.LoadLibrary(dylib_path)
        _libraries.append(lib)

    objc._updatingMetadata(True)
    try:
        prs = _BridgeSupportParser(xmldata, frameworkName)

        globals.update(prs.values)
        for entry in prs.cftypes:
            tp = objc.registerCFSignature(*entry)

            globals[entry[0]] = tp

        for name, typestr in prs.opaque:
            globals[name] = objc.createOpaquePointerType(name, typestr)

        for name, typestr, alias in prs.structs:
            if alias is not None:
                globals[name] = alias
                objc.createStructAlias(name, typestr, alias)
            else:
                globals[name] = value = objc.createStructType(
                    name, typestr, None)

        for name, typestr, magic in prs.constants:
            try:
                value = objc._loadConstant(name, typestr, magic)
            except AttributeError:
                continue

            globals[name] = value

        for class_name, sel_name, is_class in prs.meta:
            objc.registerMetaDataForSelector(
                class_name, sel_name,
                prs.meta[(class_name, sel_name, is_class)])

        for name, method_list in prs.informal_protocols:
            proto = objc.informal_protocol(name, method_list)

            # XXX: protocols submodule should be deprecated
            if "protocols" not in globals:
                mod_name = "%s.protocols" % (frameworkName, )
                m = globals["protocols"] = type(objc)(mod_name)
                sys.modules[mod_name] = m

            else:
                m = globals["protocols"]

            setattr(m, name, proto)

        if prs.functions:
            objc.loadBundleFunctions(None, globals, prs.functions)

            if inlineTab is not None:
                objc.loadFunctionList(inlineTab, globals, prs.functions)

        for name, orig in prs.func_aliases:
            try:
                globals[name] = globals[orig]
            except KeyError:
                pass

    finally:
        objc._updatingMetadata(False)
Exemplo n.º 35
0
    "kPMDontWantBoolean": "objc.NULL",
    "kPMTargetPrinterAEType": "typeChar",
    "kPMCollateAEType": "typeBoolean",
    "kPMCopieAEType": "typeSInt32",
    "kPMFirstPageAEType": "typeSInt32",
    "kPMLayoutDownAEType": "typeSInt32",
    "kPMNoData": "objc.NULL",
    "kPMDontWantSize": "objc.NULL",
    "kPMSaveAsPSAEType": "typeFileURL",
    "kPMPresetAEType": "typeUTF8Text",
    "kPMLayoutAcrossAEType": "typeSInt32",
    "kPMInvalidParameter": "paramErr",
}
misc.update({
    "PMPrintSettings":
    objc.createOpaquePointerType("PMPrintSettings",
                                 b"^{OpaquePMPrintSettings}"),
    "PMPrintSession":
    objc.createOpaquePointerType("PMPrintSession", b"^{OpaquePMPrintSession}"),
    "PMPageFormat":
    objc.createOpaquePointerType("PMPageFormat", b"^{OpaquePMPageFormat}"),
    "PMPaper":
    objc.createOpaquePointerType("PMPaper", b"^{OpaquePMPaper}"),
    "PMPreset":
    objc.createOpaquePointerType("PMPreset", b"^{OpaquePMPreset}"),
    "PMPrinter":
    objc.createOpaquePointerType("PMPrinter", b"^{OpaquePMPrinter}"),
    "PMServer":
    objc.createOpaquePointerType("PMServer", b"^{OpaquePMServer}"),
})
r = objc.registerMetaDataForSelector
objc._updatingMetadata(True)
Exemplo n.º 36
0
# This file is generated by objective.metadata
#
# Last update: Sat Aug 18 17:26:59 2018

import objc
import sys

if sys.maxsize > 2 ** 32:
    def sel32or64(a, b): return b
else:
    def sel32or64(a, b): return a
if sys.byteorder == 'little':
    def littleOrBig(a, b): return a
else:
    def littleOrBig(a, b): return b

misc = {
}
misc.update({'ScriptCodeRun': objc.createStructType('ScriptCodeRun', sel32or64(b'{ScriptCodeRun=Ls}', b'{ScriptCodeRun=Qs}'), ['offset', 'script']), 'NumFormatStringRec': objc.createStructType('NumFormatStringRec', b'{NumFormatString=CC[254c]}', ['fLength', 'fVersion', 'data']), 'UnicodeMapping': objc.createStructType('UnicodeMapping', sel32or64(b'{UnicodeMapping=LLl}', b'{UnicodeMapping=IIi}'), ['unicodeEncoding', 'otherEncoding', 'mappingVersion']), 'TECConversionInfo': objc.createStructType('TECConversionInfo', sel32or64(b'{TECConversionInfo=LLSS}', b'{TECConversionInfo=IISS}'), ['sourceEncoding', 'destinationEncoding', 'reserved1', 'reserved2']), 'LocaleAndVariant': objc.createStructType('LocaleAndVariant', sel32or64(b'{LocaleAndVariant=^{OpaqueLocaleRef=}L}', b'{LocaleAndVariant=^{OpaqueLocaleRef=}I}'), ['locale', 'opVariant']), 'TextEncodingRun': objc.createStructType('TextEncodingRun', sel32or64(b'{TextEncodingRun=LL}', b'{TextEncodingRun=QI}'), ['offset', 'textEncoding']), 'TECInfo': objc.createStructType('TECInfo', sel32or64(b'{TECInfo=SSLLL[32C][32C]SS}', b'{TECInfo=SSIII[32C][32C]SS}'), ['format', 'tecVersion', 'tecTextConverterFeatures', 'tecUnicodeConverterFeatures', 'tecTextCommonFeatures', 'tecTextEncodingsFolderName', 'tecExtensionFileName', 'tecLowestTEFileVersion', 'tecHighestTEFileVersion']), 'Nanoseconds': objc.createStructType('Nanoseconds', sel32or64(b'{UnsignedWide=LL}', b'{UnsignedWide=II}'), ['lo', 'hi'])})
constants = '''$$'''
enums = '''$_MixedModeMagic@43774$kBig5_BasicVariant@0$kBig5_DOSVariant@3$kBig5_ETenVariant@2$kBig5_StandardVariant@1$kCCRegisterCBit@16$kCCRegisterNBit@19$kCCRegisterVBit@17$kCCRegisterXBit@20$kCCRegisterZBit@18$kCFM68kRTA@16$kCSDiskSpaceRecoveryOptionNoUI@1$kCStackBased@1$kCallingConventionMask@15$kCallingConventionPhase@0$kCallingConventionWidth@4$kCurrentMixedModeStateRecord@1$kD0DispatchedCStackBased@9$kD0DispatchedPascalStackBased@8$kD1DispatchedPascalStackBased@12$kDOSJapanesePalmVariant@1$kDOSJapaneseStandardVariant@0$kDispatchedParameterPhase@8$kDispatchedSelectorSizePhase@6$kDispatchedSelectorSizeWidth@2$kDontPassSelector@8$kEUC_CN_BasicVariant@0$kEUC_CN_DOSVariant@1$kEUC_KR_BasicVariant@0$kEUC_KR_DOSVariant@1$kFSAllowConcurrentAsyncIOBit@3$kFourByteCode@3$kFragmentIsPrepared@0$kFragmentNeedsPreparing@2$kHebrewFigureSpaceVariant@1$kHebrewStandardVariant@0$kISOLatin1MusicCDVariant@1$kISOLatin1StandardVariant@0$kISOLatinArabicExplicitOrderVariant@2$kISOLatinArabicImplicitOrderVariant@0$kISOLatinArabicVisualOrderVariant@1$kISOLatinHebrewExplicitOrderVariant@2$kISOLatinHebrewImplicitOrderVariant@0$kISOLatinHebrewVisualOrderVariant@1$kJapaneseBasicVariant@2$kJapanesePostScriptPrintVariant@4$kJapanesePostScriptScrnVariant@3$kJapaneseStandardVariant@0$kJapaneseStdNoVerticalsVariant@1$kJapaneseVertAtKuPlusTenVariant@5$kLoadCFrag@1$kLocaleAllPartsMask@63$kLocaleAndVariantNameMask@3$kLocaleLanguageMask@1$kLocaleLanguageVariantMask@2$kLocaleNameMask@1$kLocaleOperationVariantNameMask@2$kLocaleRegionMask@16$kLocaleRegionVariantMask@32$kLocaleScriptMask@4$kLocaleScriptVariantMask@8$kM68kISA@0$kMacArabicAlBayanVariant@3$kMacArabicStandardVariant@0$kMacArabicThuluthVariant@2$kMacArabicTrueTypeVariant@1$kMacCroatianCurrencySignVariant@1$kMacCroatianDefaultVariant@0$kMacCroatianEuroSignVariant@2$kMacCyrillicCurrSignStdVariant@1$kMacCyrillicCurrSignUkrVariant@2$kMacCyrillicDefaultVariant@0$kMacCyrillicEuroSignVariant@3$kMacFarsiStandardVariant@0$kMacFarsiTrueTypeVariant@1$kMacGreekDefaultVariant@0$kMacGreekEuroSignVariant@2$kMacGreekNoEuroSignVariant@1$kMacHebrewFigureSpaceVariant@1$kMacHebrewStandardVariant@0$kMacIcelandicStandardVariant@0$kMacIcelandicStdCurrSignVariant@2$kMacIcelandicStdDefaultVariant@0$kMacIcelandicStdEuroSignVariant@4$kMacIcelandicTTCurrSignVariant@3$kMacIcelandicTTDefaultVariant@1$kMacIcelandicTTEuroSignVariant@5$kMacIcelandicTrueTypeVariant@1$kMacJapaneseBasicVariant@2$kMacJapanesePostScriptPrintVariant@4$kMacJapanesePostScriptScrnVariant@3$kMacJapaneseStandardVariant@0$kMacJapaneseStdNoVerticalsVariant@1$kMacJapaneseVertAtKuPlusTenVariant@5$kMacRomanCurrencySignVariant@1$kMacRomanDefaultVariant@0$kMacRomanEuroSignVariant@2$kMacRomanLatin1CroatianVariant@8$kMacRomanLatin1DefaultVariant@0$kMacRomanLatin1IcelandicVariant@11$kMacRomanLatin1RomanianVariant@14$kMacRomanLatin1StandardVariant@2$kMacRomanLatin1TurkishVariant@6$kMacRomanStandardVariant@0$kMacRomanianCurrencySignVariant@1$kMacRomanianDefaultVariant@0$kMacRomanianEuroSignVariant@2$kMacVT100CurrencySignVariant@1$kMacVT100DefaultVariant@0$kMacVT100EuroSignVariant@2$kNoByteCode@0$kOld68kRTA@0$kOneByteCode@1$kPascalStackBased@0$kPassSelector@0$kPowerPCISA@1$kPowerPCRTA@0$kProcDescriptorIsAbsolute@0$kProcDescriptorIsIndex@32$kProcDescriptorIsProcPtr@0$kProcDescriptorIsRelative@1$kRegisterA0@4$kRegisterA1@5$kRegisterA2@6$kRegisterA3@7$kRegisterA4@12$kRegisterA5@13$kRegisterA6@14$kRegisterBased@2$kRegisterD0@0$kRegisterD1@1$kRegisterD2@2$kRegisterD3@3$kRegisterD4@8$kRegisterD5@9$kRegisterD6@10$kRegisterD7@11$kRegisterParameterMask@2147481600$kRegisterParameterPhase@11$kRegisterParameterSizePhase@0$kRegisterParameterSizeWidth@2$kRegisterParameterWhichPhase@2$kRegisterParameterWhichWidth@3$kRegisterParameterWidth@5$kRegisterResultLocationPhase@6$kRegisterResultLocationWidth@5$kResultSizeMask@48$kResultSizePhase@4$kResultSizeWidth@2$kRoutineDescriptorVersion@7$kRoutineIsDispatchedDefaultRoutine@16$kRoutineIsNotDispatchedDefaultRoutine@0$kSelectorsAreIndexable@1$kSelectorsAreNotIndexable@0$kShiftJIS_BasicVariant@0$kShiftJIS_DOSVariant@1$kShiftJIS_MusicCDVariant@2$kSpecialCase@15$kSpecialCaseCaretHook@0$kSpecialCaseDrawHook@4$kSpecialCaseEOLHook@1$kSpecialCaseGNEFilterProc@11$kSpecialCaseHighHook@0$kSpecialCaseHitTestHook@5$kSpecialCaseMBarHook@12$kSpecialCaseNWidthHook@3$kSpecialCaseProtocolHandler@7$kSpecialCaseSelectorMask@1008$kSpecialCaseSelectorPhase@4$kSpecialCaseSelectorWidth@6$kSpecialCaseSocketListener@8$kSpecialCaseTEDoText@10$kSpecialCaseTEFindWord@6$kSpecialCaseTERecalc@9$kSpecialCaseTextWidthHook@2$kSpecialCaseWidthHook@2$kStackDispatchedPascalStackBased@14$kStackParameterMask@-64$kStackParameterPhase@6$kStackParameterWidth@2$kTECAddFallbackInterruptBit@7$kTECAddFallbackInterruptMask@128$kTECAddForceASCIIChangesBit@4$kTECAddForceASCIIChangesMask@16$kTECAddTextRunHeuristicsBit@6$kTECAddTextRunHeuristicsMask@64$kTECChinesePluginSignature@1887070319$kTECDisableFallbacksBit@16$kTECDisableFallbacksMask@65536$kTECDisableLooseMappingsBit@17$kTECDisableLooseMappingsMask@131072$kTECFallbackTextLengthFixBit@1$kTECFallbackTextLengthFixMask@2$kTECInfoCurrentFormat@2$kTECInternetNameDefaultUsageMask@0$kTECInternetNameStrictUsageMask@1$kTECInternetNameTolerantUsageMask@2$kTECJapanesePluginSignature@1886023790$kTECKeepInfoFixBit@0$kTECKeepInfoFixMask@1$kTECKoreanPluginSignature@1886089074$kTECPreferredEncodingFixBit@5$kTECPreferredEncodingFixMask@32$kTECSignature@1701733238$kTECTextRunBitClearFixBit@2$kTECTextRunBitClearFixMask@4$kTECTextToUnicodeScanFixBit@3$kTECTextToUnicodeScanFixMask@8$kTECUnicodePluginSignature@1886744169$kTEC_MIBEnumDontCare@-1$kTextCenter@1$kTextEncodingANSEL@1537$kTextEncodingBaseName@1$kTextEncodingBig5@2563$kTextEncodingBig5_E@2569$kTextEncodingBig5_HKSCS_1999@2566$kTextEncodingCNS_11643_92_P1@1617$kTextEncodingCNS_11643_92_P2@1618$kTextEncodingCNS_11643_92_P3@1619$kTextEncodingDOSArabic@1049$kTextEncodingDOSBalticRim@1030$kTextEncodingDOSCanadianFrench@1048$kTextEncodingDOSChineseSimplif@1057$kTextEncodingDOSChineseTrad@1059$kTextEncodingDOSCyrillic@1043$kTextEncodingDOSGreek@1029$kTextEncodingDOSGreek1@1041$kTextEncodingDOSGreek2@1052$kTextEncodingDOSHebrew@1047$kTextEncodingDOSIcelandic@1046$kTextEncodingDOSJapanese@1056$kTextEncodingDOSKorean@1058$kTextEncodingDOSLatin1@1040$kTextEncodingDOSLatin2@1042$kTextEncodingDOSLatinUS@1024$kTextEncodingDOSNordic@1050$kTextEncodingDOSPortuguese@1045$kTextEncodingDOSRussian@1051$kTextEncodingDOSThai@1053$kTextEncodingDOSTurkish@1044$kTextEncodingDefaultFormat@0$kTextEncodingDefaultVariant@0$kTextEncodingEBCDIC_CP037@3074$kTextEncodingEBCDIC_LatinCore@3073$kTextEncodingEBCDIC_US@3073$kTextEncodingEUC_CN@2352$kTextEncodingEUC_JP@2336$kTextEncodingEUC_KR@2368$kTextEncodingEUC_TW@2353$kTextEncodingFormatName@3$kTextEncodingFullName@0$kTextEncodingGBK_95@1585$kTextEncodingGB_18030_2000@1586$kTextEncodingGB_18030_2005@1586$kTextEncodingGB_2312_80@1584$kTextEncodingHZ_GB_2312@2565$kTextEncodingISO10646_1993@257$kTextEncodingISOLatin1@513$kTextEncodingISOLatin10@528$kTextEncodingISOLatin2@514$kTextEncodingISOLatin3@515$kTextEncodingISOLatin4@516$kTextEncodingISOLatin5@521$kTextEncodingISOLatin6@522$kTextEncodingISOLatin7@525$kTextEncodingISOLatin8@526$kTextEncodingISOLatin9@527$kTextEncodingISOLatinArabic@518$kTextEncodingISOLatinCyrillic@517$kTextEncodingISOLatinGreek@519$kTextEncodingISOLatinHebrew@520$kTextEncodingISO_2022_CN@2096$kTextEncodingISO_2022_CN_EXT@2097$kTextEncodingISO_2022_JP@2080$kTextEncodingISO_2022_JP_1@2082$kTextEncodingISO_2022_JP_2@2081$kTextEncodingISO_2022_JP_3@2083$kTextEncodingISO_2022_KR@2112$kTextEncodingJIS_C6226_78@1572$kTextEncodingJIS_X0201_76@1568$kTextEncodingJIS_X0208_83@1569$kTextEncodingJIS_X0208_90@1570$kTextEncodingJIS_X0212_90@1571$kTextEncodingJIS_X0213_MenKuTen@1577$kTextEncodingKOI8_R@2562$kTextEncodingKOI8_U@2568$kTextEncodingKSC_5601_87@1600$kTextEncodingKSC_5601_92_Johab@1601$kTextEncodingMacArabic@4$kTextEncodingMacArmenian@24$kTextEncodingMacBengali@13$kTextEncodingMacBurmese@19$kTextEncodingMacCeltic@39$kTextEncodingMacCentralEurRoman@29$kTextEncodingMacChineseSimp@25$kTextEncodingMacChineseTrad@2$kTextEncodingMacCroatian@36$kTextEncodingMacCyrillic@7$kTextEncodingMacDevanagari@9$kTextEncodingMacDingbats@34$kTextEncodingMacEastEurRoman@29$kTextEncodingMacEthiopic@28$kTextEncodingMacExtArabic@31$kTextEncodingMacFarsi@140$kTextEncodingMacGaelic@40$kTextEncodingMacGeez@28$kTextEncodingMacGeorgian@23$kTextEncodingMacGreek@6$kTextEncodingMacGujarati@11$kTextEncodingMacGurmukhi@10$kTextEncodingMacHFS@255$kTextEncodingMacHebrew@5$kTextEncodingMacIcelandic@37$kTextEncodingMacInuit@236$kTextEncodingMacJapanese@1$kTextEncodingMacKannada@16$kTextEncodingMacKeyboardGlyphs@41$kTextEncodingMacKhmer@20$kTextEncodingMacKorean@3$kTextEncodingMacLaotian@22$kTextEncodingMacMalayalam@17$kTextEncodingMacMongolian@27$kTextEncodingMacOriya@12$kTextEncodingMacRSymbol@8$kTextEncodingMacRoman@0$kTextEncodingMacRomanLatin1@2564$kTextEncodingMacRomanian@38$kTextEncodingMacSimpChinese@25$kTextEncodingMacSinhalese@18$kTextEncodingMacSymbol@33$kTextEncodingMacTamil@14$kTextEncodingMacTelugu@15$kTextEncodingMacThai@21$kTextEncodingMacTibetan@26$kTextEncodingMacTradChinese@2$kTextEncodingMacTurkish@35$kTextEncodingMacUkrainian@152$kTextEncodingMacUnicode@126$kTextEncodingMacUninterp@32$kTextEncodingMacVT100@252$kTextEncodingMacVietnamese@30$kTextEncodingMultiRun@4095$kTextEncodingNextStepJapanese@2818$kTextEncodingNextStepLatin@2817$kTextEncodingShiftJIS@2561$kTextEncodingShiftJIS_X0213@1576$kTextEncodingShiftJIS_X0213_00@1576$kTextEncodingUS_ASCII@1536$kTextEncodingUnicodeDefault@256$kTextEncodingUnicodeV10_0@276$kTextEncodingUnicodeV11_0@277$kTextEncodingUnicodeV1_1@257$kTextEncodingUnicodeV2_0@259$kTextEncodingUnicodeV2_1@259$kTextEncodingUnicodeV3_0@260$kTextEncodingUnicodeV3_1@261$kTextEncodingUnicodeV3_2@262$kTextEncodingUnicodeV4_0@264$kTextEncodingUnicodeV5_0@266$kTextEncodingUnicodeV5_1@267$kTextEncodingUnicodeV6_0@269$kTextEncodingUnicodeV6_1@270$kTextEncodingUnicodeV6_3@272$kTextEncodingUnicodeV7_0@273$kTextEncodingUnicodeV8_0@274$kTextEncodingUnicodeV9_0@275$kTextEncodingUnknown@65535$kTextEncodingVISCII@2567$kTextEncodingVariantName@2$kTextEncodingWindowsANSI@1280$kTextEncodingWindowsArabic@1286$kTextEncodingWindowsBalticRim@1287$kTextEncodingWindowsCyrillic@1282$kTextEncodingWindowsGreek@1283$kTextEncodingWindowsHebrew@1285$kTextEncodingWindowsKoreanJohab@1296$kTextEncodingWindowsLatin1@1280$kTextEncodingWindowsLatin2@1281$kTextEncodingWindowsLatin5@1284$kTextEncodingWindowsVietnamese@1288$kTextFlushDefault@0$kTextFlushLeft@-2$kTextFlushRight@-1$kTextLanguageDontCare@-128$kTextRegionDontCare@-128$kTextScriptDontCare@-128$kThinkCStackBased@5$kTwoByteCode@2$kUCBidiCatArabicNumber@6$kUCBidiCatBlockSeparator@8$kUCBidiCatBoundaryNeutral@19$kUCBidiCatCommonNumberSeparator@7$kUCBidiCatEuroNumber@3$kUCBidiCatEuroNumberSeparator@4$kUCBidiCatEuroNumberTerminator@5$kUCBidiCatFirstStrongIsolate@22$kUCBidiCatLeftRight@1$kUCBidiCatLeftRightEmbedding@13$kUCBidiCatLeftRightIsolate@20$kUCBidiCatLeftRightOverride@15$kUCBidiCatNonSpacingMark@18$kUCBidiCatNotApplicable@0$kUCBidiCatOtherNeutral@11$kUCBidiCatPopDirectionalFormat@17$kUCBidiCatPopDirectionalIsolate@23$kUCBidiCatRightLeft@2$kUCBidiCatRightLeftArabic@12$kUCBidiCatRightLeftEmbedding@14$kUCBidiCatRightLeftIsolate@21$kUCBidiCatRightLeftOverride@16$kUCBidiCatSegmentSeparator@9$kUCBidiCatWhitespace@10$kUCCharPropTypeBidiCategory@3$kUCCharPropTypeCombiningClass@2$kUCCharPropTypeDecimalDigitValue@4$kUCCharPropTypeGenlCategory@1$kUCGenlCatLetterLowercase@15$kUCGenlCatLetterModifier@17$kUCGenlCatLetterOther@18$kUCGenlCatLetterTitlecase@16$kUCGenlCatLetterUppercase@14$kUCGenlCatMarkEnclosing@7$kUCGenlCatMarkNonSpacing@5$kUCGenlCatMarkSpacingCombining@6$kUCGenlCatNumberDecimalDigit@8$kUCGenlCatNumberLetter@9$kUCGenlCatNumberOther@10$kUCGenlCatOtherControl@1$kUCGenlCatOtherFormat@2$kUCGenlCatOtherNotAssigned@0$kUCGenlCatOtherPrivateUse@4$kUCGenlCatOtherSurrogate@3$kUCGenlCatPunctClose@23$kUCGenlCatPunctConnector@20$kUCGenlCatPunctDash@21$kUCGenlCatPunctFinalQuote@25$kUCGenlCatPunctInitialQuote@24$kUCGenlCatPunctOpen@22$kUCGenlCatPunctOther@26$kUCGenlCatSeparatorLine@12$kUCGenlCatSeparatorParagraph@13$kUCGenlCatSeparatorSpace@11$kUCGenlCatSymbolCurrency@29$kUCGenlCatSymbolMath@28$kUCGenlCatSymbolModifier@30$kUCGenlCatSymbolOther@31$kUCHighSurrogateRangeEnd@56319$kUCHighSurrogateRangeStart@55296$kUCLowSurrogateRangeEnd@57343$kUCLowSurrogateRangeStart@56320$kUnicode16BitFormat@0$kUnicode32BitFormat@3$kUnicodeByteOrderMark@65279$kUnicodeCanonicalCompVariant@3$kUnicodeCanonicalDecompVariant@2$kUnicodeFallbackInterruptSafeMask@4$kUnicodeFallbackSequencingMask@3$kUnicodeHFSPlusCompVariant@9$kUnicodeHFSPlusDecompVariant@8$kUnicodeMaxDecomposedVariant@2$kUnicodeNoCompatibilityVariant@1$kUnicodeNoComposedVariant@3$kUnicodeNoCorporateVariant@4$kUnicodeNoSubset@0$kUnicodeNormalizationFormC@3$kUnicodeNormalizationFormD@5$kUnicodeNotAChar@65535$kUnicodeObjectReplacement@65532$kUnicodeReplacementChar@65533$kUnicodeSCSUFormat@8$kUnicodeSwappedByteOrderMark@65534$kUnicodeUTF16BEFormat@4$kUnicodeUTF16Format@0$kUnicodeUTF16LEFormat@5$kUnicodeUTF32BEFormat@6$kUnicodeUTF32Format@3$kUnicodeUTF32LEFormat@7$kUnicodeUTF7Format@1$kUnicodeUTF8Format@2$kUseCurrentISA@0$kUseNativeISA@4$kWildcardCFragVersion@-1$kWindowsLatin1PalmVariant@1$kWindowsLatin1StandardVariant@0$kX86ISA@2$kX86RTA@32$'''
misc.update({'kTECMacOSXDispatchTableNameString': b'ConverterPluginGetPluginDispatchTable'})
functions={'TECCountDirectTextEncodingConversions': (sel32or64(b'l^L', b'i^Q'), '', {'arguments': {0: {'type_modifier': 'o'}}}), 'TECConvertText': (sel32or64(b'l^{OpaqueTECObjectRef=}^CL^L^CL^L', b'i^{OpaqueTECObjectRef=}^CQ^Q^CQ^Q'), '', {'arguments': {1: {'c_array_length_in_arg': 2, 'type_modifier': 'n'}, 3: {'type_modifier': 'o'}, 4: {'c_array_length_in_arg': (5, 6), 'type_modifier': 'o'}, 6: {'type_modifier': 'o'}}}), 'UCIsSurrogateLowCharacter': (b'ZT',), 'TECGetMailTextEncodings': (sel32or64(b'ls^LL^L', b'is^IQ^Q'), '', {'arguments': {1: {'c_array_length_in_arg': (2, 3), 'type_modifier': 'o'}, 3: {'type_modifier': 'o'}}}), 'UCGetUnicodeScalarValueForSurrogatePair': (sel32or64(b'LTT', b'ITT'),), 'LocaleRefFromLocaleString': (sel32or64(b'l^t^^{OpaqueLocaleRef=}', b'i^t^^{OpaqueLocaleRef=}'), '', {'arguments': {0: {'c_array_delimited_by_null': True, 'type_modifier': 'n'}, 1: {'type_modifier': 'o'}}}), 'GetTextEncodingBase': (sel32or64(b'LL', b'II'),), 'TECCreateConverterFromPath': (sel32or64(b'l^^{OpaqueTECObjectRef=}^LL', b'i^^{OpaqueTECObjectRef=}^IQ'), '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'o'}, 1: {'c_array_length_in_arg': 2, 'type_modifier': 'n'}}}), 'TECFlushText': (sel32or64(b'l^{OpaqueTECObjectRef=}^CL^L', b'i^{OpaqueTECObjectRef=}^CQ^Q'), '', {'arguments': {1: {'c_array_length_in_arg': (2, 3), 'type_modifier': 'o'}, 3: {'type_modifier': 'o'}}}), 'UpgradeScriptInfoToTextEncoding': (sel32or64(b'lsss^C^L', b'isss^C^I'), '', {'arguments': {3: {'type_modifier': 'n'}, 4: {'type_modifier': 'o'}}}), 'TECCountSubTextEncodings': (sel32or64(b'lL^L', b'iI^Q'), '', {'arguments': {1: {'type_modifier': 'o'}}}), 'TECGetDirectTextEncodingConversions': (sel32or64(b'l^{TECConversionInfo=LLSS}L^L', b'i^{TECConversionInfo=IISS}Q^Q'), '', {'arguments': {0: {'c_array_length_in_arg': (1, 2), 'type_modifier': 'o'}, 2: {'type_modifier': 'o'}}}), 'GetTextEncodingName': (sel32or64(b'lLLsLL^L^s^L^t', b'iIIsIQ^Q^s^I^t'), '', {'arguments': {8: {'c_array_length_in_arg': (4, 5), 'type_modifier': 'o'}, 5: {'type_modifier': 'o'}, 6: {'type_modifier': 'o'}, 7: {'type_modifier': 'o'}}}), 'TECCreateConverter': (sel32or64(b'l^^{OpaqueTECObjectRef=}LL', b'i^^{OpaqueTECObjectRef=}II'), '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'o'}}}), 'TECCountMailTextEncodings': (sel32or64(b'ls^L', b'is^Q'), '', {'arguments': {1: {'type_modifier': 'o'}}}), 'TECGetDestinationTextEncodings': (sel32or64(b'lL^LL^L', b'iI^IQ^Q'), '', {'arguments': {1: {'c_array_length_in_arg': (2, 3), 'type_modifier': 'o'}, 3: {'type_modifier': 'o'}}}), 'LocaleOperationGetName': (sel32or64(b'lL^{OpaqueLocaleRef=}L^L^t', b'iI^{OpaqueLocaleRef=}Q^Q^t'), '', {'arguments': {3: {'type_modifier': 'o'}, 4: {'c_array_length_in_arg': (2, 3), 'type_modifier': 'o'}}}), 'LocaleOperationCountNames': (sel32or64(b'lL^L', b'iI^Q'),), 'TECDisposeConverter': (sel32or64(b'l^{OpaqueTECObjectRef=}', b'i^{OpaqueTECObjectRef=}'),), 'TECGetTextEncodingFromInternetName': (sel32or64(b'l^L^C', b'i^I^C'), '', {'arguments': {0: {'type_modifier': 'o'}, 1: {'type_modifier': 'n'}}}), 'TECFlushMultipleEncodings': (sel32or64(b'l^{OpaqueTECObjectRef=}^CL^L^{TextEncodingRun=LL}L^L', b'i^{OpaqueTECObjectRef=}^CQ^Q^{TextEncodingRun=QI}Q^Q'), '', {'arguments': {1: {'c_array_length_in_arg': (2, 3), 'type_modifier': 'o'}, 3: {'type_modifier': 'o'}, 4: {'c_array_length_in_arg': (5, 6), 'type_modifier': 'o'}, 6: {'type_modifier': 'o'}}}), 'CSBackupIsItemExcluded': (b'Z^{__CFURL=}^Z', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'CSDiskSpaceStartRecovery': (b'v^{__CFURL=}Qi^^{__CFUUID=}@@?', '', {'arguments': {3: {'type_modifier': 'o'}, 5: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': '^v'}, 1: {'type': 'Z'}, 2: {'type': 'Q'}, 3: {'type': '@'}}}}}}), 'GetTextEncodingFormat': (sel32or64(b'LL', b'II'),), 'TECCountAvailableTextEncodings': (sel32or64(b'l^L', b'i^Q'), '', {'arguments': {0: {'type_modifier': 'o'}}}), 'TECGetWebTextEncodings': (sel32or64(b'ls^LL^L', b'is^IQ^Q'), '', {'arguments': {1: {'c_array_length_in_arg': (2, 3), 'type_modifier': 'o'}, 3: {'type_modifier': 'o'}}}), 'TECCreateOneToManyConverter': (sel32or64(b'l^^{OpaqueTECObjectRef=}LL^L', b'i^^{OpaqueTECObjectRef=}IQ^I'), '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'o'}, 3: {'c_array_length_in_arg': 2, 'type_modifier': 'n'}}}), 'TECGetInfo': (sel32or64(b'l^^^{TECInfo=SSLLL[32C][32C]SS}', b'i^^^{TECInfo=SSIII[32C][32C]SS}'), '', {'arguments': {0: {'type_modifier': 'o'}}}), 'RevertTextEncodingToScriptInfo': (sel32or64(b'lL^s^s[256C]', b'iI^s^s[256C]'), '', {'arguments': {1: {'type_modifier': 'o'}, 2: {'type_modifier': 'o'}, 3: {'type_modifier': 'o'}}}), 'TECCountAvailableSniffers': (sel32or64(b'l^L', b'i^Q'), '', {'arguments': {0: {'type_modifier': 'o'}}}), 'TECConvertTextToMultipleEncodings': (sel32or64(b'l^{OpaqueTECObjectRef=}^CL^L^CL^L^{TextEncodingRun=LL}L^L', b'i^{OpaqueTECObjectRef=}^CQ^Q^CQ^Q^{TextEncodingRun=QI}Q^Q'), '', {'arguments': {1: {'c_array_length_in_arg': 2, 'type_modifier': 'n'}, 3: {'type_modifier': 'o'}, 4: {'c_array_length_in_arg': (5, 6), 'type_modifier': 'o'}, 6: {'type_modifier': 'o'}, 7: {'c_array_length_in_arg': (8, 9), 'type_modifier': 'o'}, 9: {'type_modifier': 'o'}}}), 'UCIsSurrogateHighCharacter': (b'ZT',), 'TECCopyTextEncodingInternetNameAndMIB': (sel32or64(b'lLL^^{__CFString=}^l', b'iII^^{__CFString=}^i'), '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o'}, 3: {'type_modifier': 'o'}}}), 'LocaleStringToLangAndRegionCodes': (sel32or64(b'l^t^s^s', b'i^t^s^s'), '', {'arguments': {0: {'c_array_delimited_by_null': True, 'type_modifier': 'n'}, 1: {'type_modifier': 'o'}, 2: {'type_modifier': 'o'}}}), 'TECCreateSniffer': (sel32or64(b'l^^{OpaqueTECSnifferObjectRef=}^LL', b'i^^{OpaqueTECSnifferObjectRef=}^IQ'), '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'o'}, 1: {'c_array_length_in_arg': 2, 'type_modifier': 'n'}}}), 'TECClearConverterContextInfo': (sel32or64(b'l^{OpaqueTECObjectRef=}', b'i^{OpaqueTECObjectRef=}'),), 'TECCountWebTextEncodings': (sel32or64(b'ls^L', b'is^Q'), '', {'arguments': {1: {'type_modifier': 'o'}}}), 'LocaleRefGetPartString': (sel32or64(b'l^{OpaqueLocaleRef=}LL^c', b'i^{OpaqueLocaleRef=}IQ^c'), '', {'arguments': {3: {'c_array_delimited_by_null': True, 'type_modifier': 'o'}}}), 'TECCountDestinationTextEncodings': (sel32or64(b'lL^L', b'iI^Q'), '', {'arguments': {1: {'type_modifier': 'o'}}}), 'TECSetBasicOptions': (sel32or64(b'l^{OpaqueTECObjectRef=}L', b'i^{OpaqueTECObjectRef=}I'),), 'CSBackupSetItemExcluded': (sel32or64(b'l^{__CFURL=}ZZ', b'i^{__CFURL=}ZZ'),), 'TECDisposeSniffer': (sel32or64(b'l^{OpaqueTECSnifferObjectRef=}', b'i^{OpaqueTECSnifferObjectRef=}'),), 'TECClearSnifferContextInfo': (sel32or64(b'l^{OpaqueTECSnifferObjectRef=}', b'i^{OpaqueTECSnifferObjectRef=}'),), 'UCGetCharProperty': (sel32or64(b'l^TLl^L', b'i^TQi^I'), '', {'arguments': {0: {'c_array_length_in_arg': 1, 'type_modifier': 'n'}, 3: {'type_modifier': 'o'}}}), 'CSDiskSpaceGetRecoveryEstimate': (b'Q^{__CFURL=}',), 'NearestMacTextEncodings': (sel32or64(b'lL^L^L', b'iI^I^I'), '', {'arguments': {1: {'type_modifier': 'o'}, 2: {'type_modifier': 'o'}}}), 'CSDiskSpaceCancelRecovery': (b'v^{__CFUUID=}',), 'GetTextEncodingFromScriptInfo': (sel32or64(b'lsss^L', b'isss^I'), '', {'arguments': {3: {'type_modifier': 'o'}}}), 'TECGetTextEncodingFromInternetNameOrMIB': (sel32or64(b'l^LL^{__CFString=}l', b'i^II^{__CFString=}i'), '', {'arguments': {0: {'type_modifier': 'o'}, 2: {'type_modifier': 'n'}}}), 'TECSniffTextEncoding': (sel32or64(b'l^{OpaqueTECSnifferObjectRef=}^CL^LL^LL^LL', b'i^{OpaqueTECSnifferObjectRef=}^CQ^IQ^QQ^QQ'), '', {'arguments': {1: {'c_array_length_in_arg': 2, 'type_modifier': 'n'}, 3: {'c_array_length_in_arg': 4, 'type_modifier': 'o'}, 5: {'c_array_length_in_arg': 6, 'type_modifier': 'o'}, 7: {'c_array_length_in_arg': 8, 'type_modifier': 'o'}}}), 'TECGetSubTextEncodings': (sel32or64(b'lL^LL^L', b'iI^IQ^Q'), '', {'arguments': {1: {'c_array_length_in_arg': (2, 3), 'type_modifier': 'o'}, 3: {'type_modifier': 'o'}}}), 'TECGetTextEncodingInternetName': (sel32or64(b'lL[256C]', b'iI[256C]'), '', {'arguments': {1: {'type_modifier': 'o'}}}), 'ResolveDefaultTextEncoding': (sel32or64(b'LL', b'II'),), 'TECGetAvailableSniffers': (sel32or64(b'l^LL^L', b'i^IQ^Q'), '', {'arguments': {0: {'c_array_length_in_arg': (1, 2), 'type_modifier': 'o'}, 2: {'type_modifier': 'o'}}}), 'GetTextEncodingVariant': (sel32or64(b'LL', b'II'),), 'CreateTextEncoding': (sel32or64(b'LLLL', b'IIII'), '', {'retval': {'already_cfretained': True}}), 'LocaleRefFromLangOrRegionCode': (sel32or64(b'lss^^{OpaqueLocaleRef=}', b'iss^^{OpaqueLocaleRef=}'), '', {'arguments': {2: {'type_modifier': 'o'}}}), 'TECGetAvailableTextEncodings': (sel32or64(b'l^LL^L', b'i^IQ^Q'), '', {'arguments': {0: {'c_array_length_in_arg': (1, 2), 'type_modifier': 'o'}, 2: {'type_modifier': 'o'}}}), 'LocaleOperationGetIndName': (sel32or64(b'lLLL^L^t^^{OpaqueLocaleRef=}', b'iIQQ^Q^t^^{OpaqueLocaleRef=}'), '', {'arguments': {3: {'type_modifier': 'o'}, 4: {'c_array_length_in_arg': (2, 3), 'type_modifier': 'o'}, 5: {'type_modifier': 'o'}}}), 'GetScriptInfoFromTextEncoding': (sel32or64(b'lL^s^s', b'iI^s^s'), '', {'arguments': {1: {'type_modifier': 'o'}, 2: {'type_modifier': 'o'}}})}
cftypes=[('FSFileOperationRef', b'^{__FSFileOperation=}', None, None), ('FSFileSecurityRef', b'^{__FSFileSecurity=}', None, None)]
misc.update({'TECSnifferObjectRef': objc.createOpaquePointerType('TECSnifferObjectRef', b'^{OpaqueTECSnifferObjectRef=}'), 'TECObjectRef': objc.createOpaquePointerType('TECObjectRef', b'^{OpaqueTECObjectRef=}')})
expressions = {}

# END OF FILE
Exemplo n.º 37
0
# This file is generated by objective.metadata
#
# Last update: Fri Sep 21 15:02:14 2012

import objc, sys

if sys.maxsize > 2 ** 32:
    def sel32or64(a, b): return b
else:
    def sel32or64(a, b): return a
if sys.byteorder == 'little':
    def littleOrBig(a, b): return a
else:
    def littleOrBig(a, b): return b

misc = {
}
misc.update({'FSEventStreamContext': objc.createStructType('FSEventStreamContext', b'{FSEventStreamContext=l^v^?^?^?}', [])})
constants = '''$$'''
enums = '''$kFSEventStreamCreateFlagFileEvents@16$kFSEventStreamCreateFlagIgnoreSelf@8$kFSEventStreamCreateFlagNoDefer@2$kFSEventStreamCreateFlagNone@0$kFSEventStreamCreateFlagUseCFTypes@1$kFSEventStreamCreateFlagWatchRoot@4$kFSEventStreamEventFlagEventIdsWrapped@8$kFSEventStreamEventFlagHistoryDone@16$kFSEventStreamEventFlagItemChangeOwner@16384$kFSEventStreamEventFlagItemCreated@256$kFSEventStreamEventFlagItemFinderInfoMod@8192$kFSEventStreamEventFlagItemInodeMetaMod@1024$kFSEventStreamEventFlagItemIsDir@131072$kFSEventStreamEventFlagItemIsFile@65536$kFSEventStreamEventFlagItemIsSymlink@262144$kFSEventStreamEventFlagItemModified@4096$kFSEventStreamEventFlagItemRemoved@512$kFSEventStreamEventFlagItemRenamed@2048$kFSEventStreamEventFlagItemXattrMod@32768$kFSEventStreamEventFlagKernelDropped@4$kFSEventStreamEventFlagMount@64$kFSEventStreamEventFlagMustScanSubDirs@1$kFSEventStreamEventFlagNone@0$kFSEventStreamEventFlagRootChanged@32$kFSEventStreamEventFlagUnmount@128$kFSEventStreamEventFlagUserDropped@2$kFSEventStreamEventIdSinceNow@18446744073709551615$'''
misc.update({})
functions={'FSEventStreamGetDeviceBeingWatched': (b'i^{__FSEventStream=}',), 'FSEventStreamGetLatestEventId': (b'Q^{__FSEventStream=}',), 'FSEventStreamRetain': (b'v^{__FSEventStream=}',), 'FSEventStreamCreateRelativeToDevice': (sel32or64(b'^{__FSEventStream=}^{__CFAllocator=}^?^{FSEventStreamContext=i^v^?^?^?}i^{__CFArray=}QdL', b'^{__FSEventStream=}^{__CFAllocator=}^?^{FSEventStreamContext=q^v^?^?^?}i^{__CFArray=}QdI'), '', {'retval': {'already_retained': True}, 'arguments': {1: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^{__FSEventStream=}'}, 1: {'type': b'^v'}, 2: {'type': b'L'}, 3: {'type': b'^v'}, 4: {'type': b'^I'}, 5: {'type': b'^Q'}}}}}}), 'FSEventsCopyUUIDForDevice': (b'^{__CFUUID=}i', '', {'retval': {'already_retained': True}}), 'FSEventStreamShow': (b'v^{__FSEventStream=}',), 'FSEventStreamScheduleWithRunLoop': (b'v^{__FSEventStream=}^{__CFRunLoop=}^{__CFString=}',), 'FSEventStreamInvalidate': (b'v^{__FSEventStream=}',), 'FSEventsGetCurrentEventId': (b'Q',), 'FSEventStreamStop': (b'v^{__FSEventStream=}',), 'FSEventsPurgeEventsForDeviceUpToEventId': (b'ZiQ',), 'FSEventStreamCreate': (sel32or64(b'^{__FSEventStream=}^{__CFAllocator=}^?^{FSEventStreamContext=i^v^?^?^?}^{__CFArray=}QdL', b'^{__FSEventStream=}^{__CFAllocator=}^?^{FSEventStreamContext=q^v^?^?^?}^{__CFArray=}QdI'), '', {'retval': {'already_retained': True}, 'arguments': {1: {'callable': {'retval': {'type': b'v'}, 'arguments': {0: {'type': b'^{__FSEventStream=}'}, 1: {'type': b'^v'}, 2: {'type': b'L'}, 3: {'type': b'^v'}, 4: {'type': b'^I'}, 5: {'type': b'^Q'}}}}}}), 'FSEventStreamCopyDescription': (b'^{__CFString=}^{__FSEventStream=}', '', {'retval': {'already_retained': True}}), 'FSEventStreamCopyPathsBeingWatched': (b'^{__CFArray=}^{__FSEventStream=}', '', {'retval': {'already_cfretained': True}}), 'FSEventStreamUnscheduleFromRunLoop': (b'v^{__FSEventStream=}^{__CFRunLoop=}^{__CFString=}',), 'FSEventStreamRelease': (b'v^{__FSEventStream=}',), 'FSEventStreamStart': (b'Z^{__FSEventStream=}',), 'FSEventStreamFlushSync': (b'v^{__FSEventStream=}',), 'FSEventsGetLastEventIdForDeviceBeforeTime': (b'Qid',), 'FSEventStreamFlushAsync': (b'Q^{__FSEventStream=}',), 'FSEventStreamSetDispatchQueue': (b'v^{__FSEventStream=}^{dispatch_queue_s=}',)}
misc.update({'FSEventStreamRef': objc.createOpaquePointerType('FSEventStreamRef', b'^{__FSEventStream=}')})
expressions = {}

# END OF FILE
Exemplo n.º 38
0
def parseBridgeSupport(xmldata, globals, frameworkName, dylib_path=None, inlineTab=None):

    if dylib_path:
        lib = ctypes.cdll.LoadLibrary(dylib_path)
        _libraries.append(lib)

    objc._updatingMetadata(True)
    try:
        prs = _BridgeSupportParser(xmldata, frameworkName)

        globals.update(prs.values)
        for entry in prs.cftypes:
            tp = objc.registerCFSignature(*entry)

            globals[entry[0]] = tp

        for name, typestr in prs.opaque:
            globals[name] = objc.createOpaquePointerType(name, typestr)

        for name, typestr, alias in prs.structs:
            if alias is not None:
                globals[name] = alias
                objc.createStructAlias(name, typestr, alias)
            else:
                globals[name] = value = objc.createStructType(name, typestr, None)


        for name, typestr, magic in prs.constants:
            try:
                value = objc._loadConstant(name, typestr, magic)
            except AttributeError:
                continue

            globals[name] = value

        for class_name, sel_name, is_class in prs.meta:
            objc.registerMetaDataForSelector(class_name, sel_name, prs.meta[(class_name, sel_name, is_class)])

        for name, method_list in prs.informal_protocols:
            proto = objc.informal_protocol(name, method_list)

            # XXX: protocols submodule should be deprecated
            if "protocols" not in globals:
                mod_name = "%s.protocols"%(frameworkName,)
                m = globals["protocols"] = type(objc)(mod_name)
                sys.modules[mod_name] = m

            else:
                m = globals["protocols"]

            setattr(m, name, proto)

        if prs.functions:
            objc.loadBundleFunctions(None, globals, prs.functions)

            if inlineTab is not None:
                objc.loadFunctionList(inlineTab, globals, prs.functions)

        for name, orig in prs.func_aliases:
            try:
                globals[name] = globals[orig]
            except KeyError:
                pass

    finally:
        objc._updatingMetadata(False)
Exemplo n.º 39
0
import objc
from PyObjCTest.structpointer1 import OC_TestStructPointer
from PyObjCTest.structpointer2 import FooEncoded
from PyObjCTools.TestSupport import TestCase

TestStructPointerStructPtr = objc.createOpaquePointerType(
    "TestStructPointerStructPtr", FooEncoded)


class TestOpaqueStructPointer(TestCase):
    def testPointer(self):

        # Check that the TestPointerStructPtr has a signature that is
        # different from the one in the method definition. The latter contains
        # more information.
        retval = objc.splitSignature(
            OC_TestStructPointer.returnPointerToStruct.signature)[0]
        self.assertNotEqual(TestStructPointerStructPtr.__typestr__, retval)

        # And then check that the correct pointer wrapper is created
        v = OC_TestStructPointer.returnPointerToStruct()
        self.assertIsInstance(v, TestStructPointerStructPtr)
Exemplo n.º 40
0
import objc
from PyObjCTest.opaque import OC_OpaqueTest, BarEncoded, FooEncoded
from PyObjCTools.TestSupport import TestCase, main

FooHandle = objc.createOpaquePointerType("FooHandle", FooEncoded,
                                         "FooHandle doc")


class TestFromPython(TestCase):
    def testBasic(self):
        tp = objc.createOpaquePointerType("BarHandle", BarEncoded,
                                          "BarHandle doc")

        self.assertIsInstance(tp, type)
        self.assertEqual(tp.__module__, "objc")
        self.assertEqual(repr(tp), "<class 'objc.BarHandle'>")

        f = OC_OpaqueTest.createBarWithFirst_andSecond_(1.0, 4.5)
        self.assertIsInstance(f, tp)
        x = OC_OpaqueTest.getFirst_(f)
        self.assertEqual(x, 1.0)
        x = OC_OpaqueTest.getSecond_(f)
        self.assertEqual(x, 4.5)

        # NULL pointer is converted to None
        self.assertEqual(OC_OpaqueTest.nullBar(), None)

    def testNaming(self):
        tp = objc.createOpaquePointerType("Mod.BarHandle", BarEncoded,
                                          "BarHandle doc")
Exemplo n.º 41
0
    'FSEventsPurgeEventsForDeviceUpToEventId': (b'ZiQ', ),
    'FSEventStreamGetDeviceBeingWatched': (b'i^{__FSEventStream=}', ),
    'FSEventStreamCopyDescription': (b'^{__CFString=}^{__FSEventStream=}', '',
                                     {
                                         'retval': {
                                             'already_retained': True
                                         }
                                     }),
    'FSEventStreamCopyPathsBeingWatched': (b'^{__CFArray=}^{__FSEventStream=}',
                                           '', {
                                               'retval': {
                                                   'already_cfretained': True
                                               }
                                           }),
    'FSEventStreamUnscheduleFromRunLoop':
    (b'v^{__FSEventStream=}^{__CFRunLoop=}^{__CFString=}', ),
    'FSEventStreamRelease': (b'v^{__FSEventStream=}', ),
    'FSEventStreamStart': (b'Z^{__FSEventStream=}', ),
    'FSEventStreamFlushSync': (b'v^{__FSEventStream=}', ),
    'FSEventsGetLastEventIdForDeviceBeforeTime': (b'Qid', ),
    'FSEventStreamFlushAsync': (b'Q^{__FSEventStream=}', ),
    'FSEventsGetCurrentEventId': (b'Q', )
}
misc.update({
    'FSEventStreamRef':
    objc.createOpaquePointerType('FSEventStreamRef', b'^{__FSEventStream=}')
})
expressions = {}

# END OF FILE
Exemplo n.º 42
0
else:
    def sel32or64(a, b): return a
if sys.byteorder == 'little':
    def littleOrBig(a, b): return a
else:
    def littleOrBig(a, b): return b

misc = {
}
misc.update({'PMPaperMargins': objc.createStructType('PMPaperMargins', b'{PMRect=dddd}', ['top', 'left', 'bottom', 'right']), 'PMResolution': objc.createStructType('PMResolution', b'{PMResolution=dd}', ['hRes', 'vRes']), 'PMLanguageInfo': objc.createStructType('PMLanguageInfo', b'{PMLanguageInfo=[33C][33C][33C]}', ['level', 'version', 'release']), 'PMRect': objc.createStructType('PMRect', b'{PMRect=dddd}', ['top', 'left', 'bottom', 'right'])})
constants = '''$$'''
enums = '''$kAllPPDDomains@1$kCUPSPPDDomain@6$kLocalPPDDomain@3$kNetworkPPDDomain@4$kPMAllocationFailure@-108$kPMBorderDoubleHairline@2$kPMBorderDoubleThickline@4$kPMBorderSingleHairline@1$kPMBorderSingleThickline@3$kPMCMYKColorSpaceModel@3$kPMCVMSymbolNotFound@-9662$kPMCancel@128$kPMCloseFailed@-9785$kPMColorSpaceModelCount@4$kPMCoverPageAfter@3$kPMCoverPageBefore@2$kPMCoverPageNone@1$kPMCreateMessageFailed@-9620$kPMDataFormatXMLCompressed@2$kPMDataFormatXMLDefault@0$kPMDataFormatXMLMinimal@1$kPMDeleteSubTicketFailed@-9585$kPMDestinationFax@3$kPMDestinationFile@2$kPMDestinationInvalid@0$kPMDestinationPreview@4$kPMDestinationPrinter@1$kPMDestinationProcessPDF@5$kPMDevNColorSpaceModel@4$kPMDocumentNotFound@-9644$kPMDontSwitchPDEError@-9531$kPMDuplexNoTumble@2$kPMDuplexNone@1$kPMDuplexTumble@3$kPMEditRequestFailed@-9544$kPMFeatureNotInstalled@-9533$kPMFileOrDirOperationFailed@-9634$kPMFontNameTooLong@-9704$kPMFontNotFound@-9703$kPMGeneralCGError@-9705$kPMGeneralError@-30870$kPMGrayColorSpaceModel@1$kPMHideInlineItems@0$kPMIOAttrNotAvailable@-9787$kPMIOMSymbolNotFound@-9661$kPMInternalError@-30870$kPMInvalidAllocator@-30890$kPMInvalidCVMContext@-9665$kPMInvalidCalibrationTarget@-30898$kPMInvalidConnection@-30887$kPMInvalidFileType@-30895$kPMInvalidIOMContext@-9664$kPMInvalidIndex@-30882$kPMInvalidItem@-30892$kPMInvalidJobID@-9666$kPMInvalidJobTemplate@-30885$kPMInvalidKey@-30888$kPMInvalidLookupSpec@-9542$kPMInvalidObject@-30896$kPMInvalidPBMRef@-9540$kPMInvalidPDEContext@-9530$kPMInvalidPMContext@-9663$kPMInvalidPageFormat@-30876$kPMInvalidPaper@-30897$kPMInvalidParameter@-50$kPMInvalidPreset@-30899$kPMInvalidPrintSession@-30879$kPMInvalidPrintSettings@-30875$kPMInvalidPrinter@-30880$kPMInvalidPrinterAddress@-9780$kPMInvalidPrinterInfo@-30886$kPMInvalidReply@-30894$kPMInvalidState@-9706$kPMInvalidSubTicket@-9584$kPMInvalidTicket@-30891$kPMInvalidType@-30893$kPMInvalidValue@-30889$kPMItemIsLocked@-9586$kPMJobBusy@-9642$kPMJobCanceled@-9643$kPMJobGetTicketBadFormatError@-9672$kPMJobGetTicketReadError@-9673$kPMJobManagerAborted@-9671$kPMJobNotFound@-9641$kPMJobStreamEndError@-9670$kPMJobStreamOpenFailed@-9668$kPMJobStreamReadFailed@-9669$kPMKeyNotFound@-9589$kPMKeyNotUnique@-9590$kPMKeyOrValueNotFound@-9623$kPMLandscape@2$kPMLastErrorCodeToMakeMaintenanceOfThisListEasier@-9799$kPMLayoutBottomTopLeftRight@7$kPMLayoutBottomTopRightLeft@8$kPMLayoutLeftRightBottomTop@2$kPMLayoutLeftRightTopBottom@1$kPMLayoutRightLeftBottomTop@4$kPMLayoutRightLeftTopBottom@3$kPMLayoutTopBottomLeftRight@5$kPMLayoutTopBottomRightLeft@6$kPMLockIgnored@-30878$kPMMessagingError@-9624$kPMNoDefaultItem@-9500$kPMNoDefaultPrinter@-30872$kPMNoDefaultSettings@-9501$kPMNoError@0$kPMNoPrinterJobID@-9667$kPMNoSelectedPrinters@-9541$kPMNoSuchEntry@-30874$kPMNotImplemented@-30873$kPMObjectInUse@-30881$kPMOpenFailed@-9781$kPMOutOfScope@-30871$kPMPMSymbolNotFound@-9660$kPMPageToPaperMappingNone@1$kPMPageToPaperMappingScaleToFit@2$kPMPaperTypeCoated@2$kPMPaperTypeGlossy@4$kPMPaperTypePlain@1$kPMPaperTypePremium@3$kPMPaperTypeTShirt@6$kPMPaperTypeTransparency@5$kPMPaperTypeUnknown@0$kPMPermissionError@-9636$kPMPluginNotFound@-9701$kPMPluginRegisterationFailed@-9702$kPMPortrait@1$kPMPrBrowserNoUI@-9545$kPMPrintAllPages@-1$kPMPrinterIdle@3$kPMPrinterProcessing@4$kPMPrinterStopped@5$kPMQualityBest@13$kPMQualityDraft@4$kPMQualityHighest@15$kPMQualityInkSaver@1$kPMQualityLowest@0$kPMQualityNormal@8$kPMQualityPhoto@11$kPMQueueAlreadyExists@-9639$kPMQueueJobFailed@-9640$kPMQueueNotFound@-9638$kPMRGBColorSpaceModel@2$kPMReadFailed@-9782$kPMReadGotZeroData@-9788$kPMReverseLandscape@4$kPMReversePortrait@3$kPMScalingCenterOnImgArea@6$kPMScalingCenterOnPaper@5$kPMScalingPinBottomLeft@3$kPMScalingPinBottomRight@4$kPMScalingPinTopLeft@1$kPMScalingPinTopRight@2$kPMServerAlreadyRunning@-9631$kPMServerAttributeRestricted@-9633$kPMServerCommunicationFailed@-9621$kPMServerNotFound@-9630$kPMServerSuspended@-9632$kPMShowDefaultInlineItems@32768$kPMShowInlineCopies@1$kPMShowInlineOrientation@8$kPMShowInlinePageRange@2$kPMShowInlinePageRangeWithSelection@64$kPMShowInlinePaperSize@4$kPMShowInlineScale@128$kPMShowPageAttributesPDE@256$kPMSimplexTumble@4$kPMStatusFailed@-9784$kPMStringConversionFailure@-30883$kPMSubTicketNotFound@-9583$kPMSyncRequestFailed@-9543$kPMTemplateIsLocked@-9588$kPMTicketIsLocked@-9587$kPMTicketTypeNotFound@-9580$kPMUnableToFindProcess@-9532$kPMUnexpectedImagingError@-9707$kPMUnknownColorSpaceModel@0$kPMUnknownDataType@-9591$kPMUnknownMessage@-9637$kPMUnlocked@0$kPMUnsupportedConnection@-9786$kPMUpdateTicketFailed@-9581$kPMUserOrGroupNotFound@-9635$kPMValidateTicketFailed@-9582$kPMValueOutOfRange@-30877$kPMWriteFailed@-9783$kPMXMLParseError@-30884$kSystemPPDDomain@2$kUserPPDDomain@5$'''
misc.update({'kPMNoPrintSettings': None, 'kPMMirrorStr': b'mirror', 'kPMFaxCoverSheetMessageStr': b'faxCoverSheetMessage', 'kPMUseOptionalAccountIDStr': b'com.apple.print.PrintSettings.PMUseOptionalAccountID', 'kPMSecondaryPaperFeedStr': b'com.apple.print.PrintSettings.PMSecondaryPaperFeed', 'kPMTotalSidesImagedStr': b'com.apple.print.PrintSettings.PMTotalSidesImaged', 'kPMSchedulerPDEKindID': b'com.apple.print.pde.SchedulerKind'.decode("utf-8"), 'kPMServerLocal': None, 'kPMJobPINPDEKindID': b'com.apple.print.pde.jobPIN'.decode("utf-8"), 'kPMPageToPaperMappingTypeStr': b'com.apple.print.PageToPaperMappingType', 'SUMMARY_DISPLAY_ORDER': b'Summary, Display, Order'.decode("utf-8"), 'kPMColorPDEKindID': b'com.apple.print.pde.ColorKind'.decode("utf-8"), 'kPMBorderTypeStr': b'com.apple.print.PrintSettings.PMBorderType', 'kPMPrinterFeaturesPDEKindID': b'com.apple.print.pde.PrinterFeaturesKind'.decode("utf-8"), 'kPMGraphicsContextCoreGraphics': b'com.apple.graphicscontext.coregraphics'.decode("utf-8"), 'kPMColorSyncProfileIDStr': b'com.apple.print.PrintSettings.PMColorSyncProfileID', 'kPMFaxToneDialingStr': b'faxToneDialing', 'kPDFWorkflowItemsKey': b'items'.decode("utf-8"), 'kPMCoverPagePDEKindID': b'com.apple.print.pde.CoverPageKind'.decode("utf-8"), 'kPMFaxSubjectLabelStr': b'faxSubjectLabel', 'kGeneralPageSetupDialogTypeIDStr': b'6E6ED964-B738-11D3-952F-0050E4603277'.decode("utf-8"), 'kPMCopiesAndPagesPDEKindID': b'com.apple.print.pde.CopiesAndPagesKind'.decode("utf-8"), 'kAppPageSetupDialogTypeIDStr': b'B9A0DA98-E57F-11D3-9E83-0050E4603277'.decode("utf-8"), 'kPMDocumentFormatDefault': b'com.apple.documentformat.default'.decode("utf-8"), 'kPDFWorkflowDisplayNameKey': b'displayName'.decode("utf-8"), 'kPMNoPageFormat': None, 'kPMImagingOptionsPDEKindID': b'com.apple.print.pde.ImagingOptionsKind'.decode("utf-8"), 'kPDFWorkflowModifiedKey': b'wasModifiedInline'.decode("utf-8"), 'kPMPrintSelectionOnlyStr': b'com.apple.print.PrintSettings.PMPrintSelectionOnly', 'kPMDestinationPrinterIDStr': b'DestinationPrinterID', 'kPMJobPriorityStr': b'com.apple.print.PrintSettings.PMJobPriority', 'kPMLayoutTileOrientationStr': b'com.apple.print.PrintSettings.PMLayoutTileOrientation', 'kPrinterModuleTypeIDStr': b'BDB091F4-E57F-11D3-B5CC-0050E4603277'.decode("utf-8"), 'kPMInkPDEKindID': b'com.apple.print.pde.InkKind'.decode("utf-8"), 'kPMSandboxCompatiblePDEs': b'PMSandboxCompatiblePDEs'.decode("utf-8"), 'kPMPrimaryPaperFeedStr': b'com.apple.print.PrintSettings.PMPrimaryPaperFeed', 'kPMFaxUseSoundStr': b'faxUseSound', 'kPMPSErrorHandlerStr': b'com.apple.print.PrintSettings.PMPSErrorHandler', 'kPMTotalBeginPagesStr': b'com.apple.print.PrintSettings.PMTotalBeginPages', 'kPMBorderStr': b'com.apple.print.PrintSettings.PMBorder', 'kPMGraphicsContextDefault': b'com.apple.graphicscontext.default'.decode("utf-8"), 'kPMPrintSelectionTitleKey': b'com.apple.printSelection.title'.decode("utf-8"), 'kDialogExtensionIntfIDStr': b'A996FD7E-B738-11D3-8519-0050E4603277'.decode("utf-8"), 'kPMInlineWorkflowStr': b'inlineWorkflow', 'kPMLayoutColumnsStr': b'com.apple.print.PrintSettings.PMLayoutColumns', 'kPMPageSetStr': b'page-set', 'kPMFaxModemPDEKindID': b'com.apple.print.pde.FaxModemKind'.decode("utf-8"), 'kPMPageToPaperMediaNameStr': b'com.apple.print.PageToPaperMappingMediaName', 'kPMPageAttributesKindID': b'com.apple.print.pde.PageAttributesKind'.decode("utf-8"), 'kPMLayoutNUpStr': b'com.apple.print.PrintSettings.PMLayoutNUp', 'kPMLayoutPDEKindID': b'com.apple.print.pde.LayoutUserOptionKind'.decode("utf-8"), 'kAppPrintDialogTypeIDStr': b'BCB07250-E57F-11D3-8CA6-0050E4603277'.decode("utf-8"), 'kPMUseOptionalPINStr': b'com.apple.print.PrintSettings.PMUseOptionalPIN', 'kPMErrorHandlingPDEKindID': b'com.apple.print.pde.ErrorHandlingKind'.decode("utf-8"), 'kPMApplicationColorMatchingStr': b'AP_ApplicationColorMatching', 'kPMPresetGraphicsTypeAll': b'All'.decode("utf-8"), 'kPMCopyCollateStr': b'com.apple.print.PrintSettings.PMCopyCollate', 'kPMPSTraySwitchStr': b'com.apple.print.PrintSettings.PMPSTraySwitch', 'kPMOutputFilenameStr': b'com.apple.print.PrintSettings.PMOutputFilename', 'kPMUnsupportedPDEKindID': b'com.apple.print.pde.UnsupportedPDEKind'.decode("utf-8"), 'kPMCustomProfilePathStr': b'PMCustomProfilePath', 'kPMLayoutDirectionStr': b'com.apple.print.PrintSettings.PMLayoutDirection', 'kPMFaxCoverPagePDEKindID': b'com.apple.print.pde.FaxCoverPageKind'.decode("utf-8"), 'kPMFaxSheetsLabelStr': b'faxSheetsLabel', 'kPMFaxToLabelStr': b'faxToLabel', 'kPMFaxWaitForDialToneStr': b'faxWaitForDialTone', 'kGeneralPrintDialogTypeIDStr': b'C1BF838E-B72A-11D3-9644-0050E4603277'.decode("utf-8"), 'kPMJobStateStr': b'com.apple.print.PrintSettings.PMJobState', 'kPMLayoutRowsStr': b'com.apple.print.PrintSettings.PMLayoutRows', 'kPMDocumentFormatPDF': b'application/pdf'.decode("utf-8"), 'kPMOutputOptionsPDEKindID': b'com.apple.print.pde.OutputOptionsKind'.decode("utf-8"), 'kPDFWorkflowItemURLKey': b'itemURL'.decode("utf-8"), 'kPMPPDDescriptionType': b'PMPPDDescriptionType'.decode("utf-8"), 'kPMPresetGraphicsTypeNone': b'None'.decode("utf-8"), 'kPMCopiesStr': b'com.apple.print.PrintSettings.PMCopies', 'kPMPresetGraphicsTypeGeneral': b'General'.decode("utf-8"), 'kPMColorMatchingModeStr': b'AP_ColorMatchingMode', 'kAppPrintThumbnailTypeIDStr': b'9320FE03-B5D5-11D5-84D1-003065D6135E'.decode("utf-8"), 'kPMFaxAddressesPDEKindID': b'com.apple.print.pde.FaxAddressesKind'.decode("utf-8"), 'kPMFitToPageStr': b'fit-to-page', 'kPMFaxSubjectStr': b'faxSubject', 'kPMPresetGraphicsTypeKey': b'com.apple.print.preset.graphicsType'.decode("utf-8"), 'kPMCustomPaperSizePDEKindID': b'com.apple.print.pde.CustomPaperSizeKind'.decode("utf-8"), 'kPMJobHoldUntilTimeStr': b'com.apple.print.PrintSettings.PMJobHoldUntilTime', 'kPMCoverPageStr': b'com.apple.print.PrintSettings.PMCoverPage', 'kPMDuplexPDEKindID': b'com.apple.print.pde.DuplexKind'.decode("utf-8"), 'kPMFaxDateLabelStr': b'faxDateLabel', 'kPMPageToPaperMappingAllowScalingUpStr': b'com.apple.print.PageToPaperMappingAllowScalingUp', 'kPMFaxNumberStr': b'phone', 'kPMCoverPageSourceStr': b'com.apple.print.PrintSettings.PMCoverPageSource', 'kPMDestinationTypeStr': b'com.apple.print.PrintSettings.PMDestinationType', 'kPMFaxPrefixStr': b'faxPrefix', 'kPMVendorColorMatchingStr': b'AP_VendorColorMatching', 'kPMPriorityPDEKindID': b'com.apple.print.pde.PriorityKind'.decode("utf-8"), 'kPMPaperSourcePDEKindID': b'com.apple.print.pde.PaperSourceKind'.decode("utf-8"), 'kPMPaperFeedPDEKindID': b'com.apple.print.pde.PaperFeedKind'.decode("utf-8"), 'kPMUniPrinterPDEKindID': b'com.apple.print.pde.UniPrinterKind'.decode("utf-8"), 'kPMColorMatchingPDEKindID': b'com.apple.print.pde.ColorMatchingKind'.decode("utf-8"), 'kPMFaxFromLabelStr': b'faxFromLabel', 'kPMMediaQualityPDEKindID': b'com.apple.print.pde.MediaQualityPDEKind'.decode("utf-8"), 'kPMDocumentFormatPostScript': b'application/postscript'.decode("utf-8"), 'kPMPresetGraphicsTypePhoto': b'Photo'.decode("utf-8"), 'kPMDuplexingStr': b'com.apple.print.PrintSettings.PMDuplexing', 'kPMPaperHandlingPDEKindID': b'com.apple.print.pde.PaperHandlingKind'.decode("utf-8"), 'kPMFaxToStr': b'faxTo', 'kPMSummaryPanelKindID': b'com.apple.print.pde.SummaryKind'.decode("utf-8"), 'kPMRotationScalingPDEKindID': b'com.apple.print.pde.RotationScalingKind'.decode("utf-8"), 'kPMPDFEffectsPDEKindID': b'com.apple.print.pde.PDFEffects'.decode("utf-8"), 'kPMOutputOrderStr': b'OutputOrder', 'kPMFaxCoverSheetStr': b'faxCoverSheet'})
functions={'PMSetPageRange': (b'i^{OpaquePMPrintSettings=}II',), 'PMPaperGetPPDPaperName': (b'i^{OpaquePMPaper=}^^{__CFString=}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMGetCopies': (b'i^{OpaquePMPrintSettings=}^I', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPrinterGetOutputResolution': (b'i^{OpaquePMPrinter=}^{OpaquePMPrintSettings=}^{PMResolution=dd}', '', {'arguments': {2: {'type_modifier': 'o'}}}), 'PMPrinterCopyPresets': (b'i^{OpaquePMPrinter=}^^{__CFArray=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMGetLastPage': (b'i^{OpaquePMPrintSettings=}^I', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPaperGetWidth': (b'i^{OpaquePMPaper=}^d', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMGetPageFormatPaper': (b'i^{OpaquePMPageFormat=}^^{OpaquePMPaper=}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPrinterIsDefault': (b'Z^{OpaquePMPrinter=}',), 'PMGetPageFormatExtendedData': (b'i^{OpaquePMPageFormat=}I^I^v', '', {'arguments': {2: {'type_modifier': 'N'}, 3: {'c_array_length_in_arg': 2, 'type_modifier': 'o'}}}), 'PMPaperCreateLocalizedName': (b'i^{OpaquePMPaper=}^{OpaquePMPrinter=}^^{__CFString=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMSessionError': (b'i^{OpaquePMPrintSession=}',), 'PMPresetGetAttributes': (b'i^{OpaquePMPreset=}^^{__CFDictionary=}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPrinterGetPaperList': (b'i^{OpaquePMPrinter=}^^{__CFArray=}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMSessionCopyDestinationFormat': (b'i^{OpaquePMPrintSession=}^{OpaquePMPrintSettings=}^^{__CFString=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMPrinterSendCommand': (b'i^{OpaquePMPrinter=}^{__CFString=}^{__CFString=}^{__CFDictionary=}',), 'PMPrinterIsPostScriptPrinter': (b'i^{OpaquePMPrinter=}^Z', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMSessionCreatePrinterList': (b'i^{OpaquePMPrintSession=}^^{__CFArray=}^q^^{OpaquePMPrinter=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}, 2: {'type_modifier': 'o'}, 3: {'type_modifier': 'o'}}}), 'PMGetFirstPage': (b'i^{OpaquePMPrintSettings=}^I', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMWorkflowSubmitPDFWithSettings': (b'i^{__CFURL=}^{OpaquePMPrintSettings=}^{__CFURL=}',), 'PMCGImageCreateWithEPSDataProvider': (b'^{CGImage=}^{CGDataProvider=}^{CGImage=}', '', {'retval': {'already_cfretained': True}}), 'PMPrintSettingsCopyAsDictionary': (b'i^{OpaquePMPrintSettings=}^^{__CFDictionary=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMPrinterPrintWithProvider': (b'i^{OpaquePMPrinter=}^{OpaquePMPrintSettings=}^{OpaquePMPageFormat=}^{__CFString=}^{CGDataProvider=}',), 'PMGetPageRange': (b'i^{OpaquePMPrintSettings=}^I^I', '', {'arguments': {1: {'type_modifier': 'o'}, 2: {'type_modifier': 'o'}}}), 'PMSessionEndPageNoDialog': (b'i^{OpaquePMPrintSession=}',), 'PMGetOrientation': (b'i^{OpaquePMPageFormat=}^S', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPageFormatCreateWithDataRepresentation': (b'i^{__CFData=}^^{OpaquePMPageFormat=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'type_modifier': 'o'}}}), 'PMGetCollate': (b'i^{OpaquePMPrintSettings=}^Z', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPresetCreatePrintSettings': (b'i^{OpaquePMPreset=}^{OpaquePMPrintSession=}^^{OpaquePMPrintSettings=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'type_modifier': 'o'}}}), 'PMSetCollate': (b'i^{OpaquePMPrintSettings=}Z',), 'PMPrinterIsRemote': (b'i^{OpaquePMPrinter=}^Z', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPrintSettingsGetJobName': (b'i^{OpaquePMPrintSettings=}^^{__CFString=}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMSetDuplex': (b'i^{OpaquePMPrintSettings=}I',), 'PMPrinterGetMimeTypes': (b'i^{OpaquePMPrinter=}^{OpaquePMPrintSettings=}^^{__CFArray=}', '', {'arguments': {2: {'type_modifier': 'o'}}}), 'PMPrinterIsPostScriptCapable': (b'Z^{OpaquePMPrinter=}',), 'PMPrintSettingsSetJobName': (b'i^{OpaquePMPrintSettings=}^{__CFString=}',), 'PMSessionCopyOutputFormatList': (b'i^{OpaquePMPrintSession=}S^^{__CFArray=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMSetPageFormatExtendedData': (b'i^{OpaquePMPageFormat=}II^v', '', {'arguments': {3: {'c_array_length_in_arg': 2, 'type_modifier': 'n'}}}), 'PMPrinterCreateFromPrinterID': (b'^{OpaquePMPrinter=}^{__CFString=}', '', {'retval': {'already_cfretained': True}}), 'PMPrinterIsFavorite': (b'Z^{OpaquePMPrinter=}',), 'PMPrintSettingsCreateWithDataRepresentation': (b'i^{__CFData=}^^{OpaquePMPrintSettings=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'type_modifier': 'o'}}}), 'PMPageFormatCreateDataRepresentation': (b'i^{OpaquePMPageFormat=}^^{__CFData=}I', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMSessionDefaultPageFormat': (b'i^{OpaquePMPrintSession=}^{OpaquePMPageFormat=}',), 'PMCopyPrintSettings': (b'i^{OpaquePMPrintSettings=}^{OpaquePMPrintSettings=}', '', {'retval': {'already_cfretained': True}}), 'PMPrinterGetCommInfo': (b'i^{OpaquePMPrinter=}^Z^Z', '', {'arguments': {1: {'type_modifier': 'o'}, 2: {'type_modifier': 'o'}}}), 'PMPrinterGetLocation': (b'^{__CFString=}^{OpaquePMPrinter=}',), 'PMPageFormatGetPrinterID': (b'i^{OpaquePMPageFormat=}^^{__CFString=}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMRetain': (b'i^v',), 'PMSessionGetCGGraphicsContext': (b'i^{OpaquePMPrintSession=}^^{CGContext=}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMSessionSetCurrentPMPrinter': (b'i^{OpaquePMPrintSession=}^{OpaquePMPrinter=}',), 'PMPrinterGetID': (b'^{__CFString=}^{OpaquePMPrinter=}',), 'PMPaperIsCustom': (b'Z^{OpaquePMPaper=}',), 'PMGetUnadjustedPageRect': (b'i^{OpaquePMPageFormat=}^{PMRect=dddd}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMSetOrientation': (b'i^{OpaquePMPageFormat=}SZ',), 'PMCreateGenericPrinter': (b'i^^{OpaquePMPrinter=}', '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'o'}}}), 'PMGetAdjustedPaperRect': (b'i^{OpaquePMPageFormat=}^{PMRect=dddd}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMCopyLocalizedPPD': (b'i^{__CFURL=}^^{__CFURL=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMPaperGetID': (b'i^{OpaquePMPaper=}^^{__CFString=}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPaperGetHeight': (b'i^{OpaquePMPaper=}^d', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPrinterCopyDeviceURI': (b'i^{OpaquePMPrinter=}^^{__CFURL=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMPaperCreateCustom': (b'i^{OpaquePMPrinter=}^{__CFString=}^{__CFString=}dd^{PMRect=dddd}^^{OpaquePMPaper=}', '', {'retval': {'already_cfretained': True}, 'arguments': {5: {'type_modifier': 'n'}, 6: {'type_modifier': 'o'}}}), 'PMSessionEndDocumentNoDialog': (b'i^{OpaquePMPrintSession=}',), 'PMServerCreatePrinterList': (b'i^{OpaquePMServer=}^^{__CFArray=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMPrinterGetDriverCreator': (b'i^{OpaquePMPrinter=}^I', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMSessionCopyDestinationLocation': (b'i^{OpaquePMPrintSession=}^{OpaquePMPrintSettings=}^^{__CFURL=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMPrinterGetIndexedPrinterResolution': (b'i^{OpaquePMPrinter=}I^{PMResolution=dd}', '', {'arguments': {2: {'type_modifier': 'o'}}}), 'PMSessionCreatePageFormatList': (b'i^{OpaquePMPrintSession=}^{OpaquePMPrinter=}^^{__CFArray=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMPrinterCopyHostName': (b'i^{OpaquePMPrinter=}^^{__CFString=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMSetScale': (b'i^{OpaquePMPageFormat=}d',), 'PMPrinterPrintWithFile': (b'i^{OpaquePMPrinter=}^{OpaquePMPrintSettings=}^{OpaquePMPageFormat=}^{__CFString=}^{__CFURL=}',), 'PMSessionSetDataInSession': (b'i^{OpaquePMPrintSession=}^{__CFString=}@',), 'PMPaperGetPrinterID': (b'i^{OpaquePMPaper=}^^{__CFString=}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMSessionValidatePrintSettings': (b'i^{OpaquePMPrintSession=}^{OpaquePMPrintSettings=}^Z', '', {'arguments': {2: {'type_modifier': 'o'}}}), 'PMPaperGetMargins': (b'i^{OpaquePMPaper=}^{PMRect=dddd}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPrinterCopyState': (b'i^{OpaquePMPrinter=}^^{__CFDictionary=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMPrintSettingsGetValue': (b'i^{OpaquePMPrintSettings=}^{__CFString=}^@', '', {'arguments': {2: {'type_modifier': 'o'}}}), 'PMCreatePageFormat': (b'i^^{OpaquePMPageFormat=}', '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'o'}}}), 'PMSessionBeginPageNoDialog': (b'i^{OpaquePMPrintSession=}^{OpaquePMPageFormat=}^{PMRect=dddd}',), 'PMPrinterGetLanguageInfo': (b'i^{OpaquePMPrinter=}^{PMLanguageInfo=[33C][33C][33C]}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMSetLastPage': (b'i^{OpaquePMPrintSettings=}IZ',), 'PMCopyPPDData': (b'i^{__CFURL=}^^{__CFData=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMSessionGetDataFromSession': (b'i^{OpaquePMPrintSession=}^{__CFString=}^@', '', {'arguments': {2: {'type_modifier': 'o'}}}), 'PMPrintSettingsCreateDataRepresentation': (b'i^{OpaquePMPrintSettings=}^^{__CFData=}I', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMPrinterGetDriverReleaseInfo': (b'i^{OpaquePMPrinter=}^{VersRec={NumVersion=CCCC}s[256C][256C]}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMSessionSetError': (b'i^{OpaquePMPrintSession=}i',), 'PMSessionSetDestination': (b'i^{OpaquePMPrintSession=}^{OpaquePMPrintSettings=}S^{__CFString=}^{__CFURL=}',), 'PMSessionBeginCGDocumentNoDialog': (b'i^{OpaquePMPrintSession=}^{OpaquePMPrintSettings=}^{OpaquePMPageFormat=}',), 'PMSessionGetDestinationType': (b'i^{OpaquePMPrintSession=}^{OpaquePMPrintSettings=}^S', '', {'arguments': {2: {'type_modifier': 'o'}}}), 'PMCreateSession': (b'i^^{OpaquePMPrintSession=}', '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'o'}}}), 'PMServerLaunchPrinterBrowser': (b'i^{OpaquePMServer=}^{__CFDictionary=}',), 'PMCopyPageFormat': (b'i^{OpaquePMPageFormat=}^{OpaquePMPageFormat=}', '', {'retval': {'already_cfretained': True}}), 'PMPrinterGetName': (b'^{__CFString=}^{OpaquePMPrinter=}',), 'PMCopyAvailablePPDs': (b'iS^^{__CFArray=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMSessionDefaultPrintSettings': (b'i^{OpaquePMPrintSession=}^{OpaquePMPrintSettings=}',), 'PMPrinterWritePostScriptToURL': (b'i^{OpaquePMPrinter=}^{OpaquePMPrintSettings=}^{OpaquePMPageFormat=}^{__CFString=}^{__CFURL=}^{__CFURL=}',), 'PMPrinterSetDefault': (b'i^{OpaquePMPrinter=}',), 'PMPrinterSetOutputResolution': (b'i^{OpaquePMPrinter=}^{OpaquePMPrintSettings=}^{PMResolution=dd}', '', {'arguments': {2: {'type_modifier': 'n'}}}), 'PMPrinterGetState': (b'i^{OpaquePMPrinter=}^S', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMWorkflowSubmitPDFWithOptions': (b'i^{__CFURL=}^{__CFString=}^c^{__CFURL=}', '', {'arguments': {2: {'c_array_delimited_by_null': True, 'type_modifier': 'n'}}}), 'PMGetScale': (b'i^{OpaquePMPageFormat=}^d', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMSetFirstPage': (b'i^{OpaquePMPrintSettings=}IZ',), 'PMWorkflowCopyItems': (b'i^^{__CFArray=}', '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMGetAdjustedPageRect': (b'i^{OpaquePMPageFormat=}^{PMRect=dddd}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPrinterCopyDescriptionURL': (b'i^{OpaquePMPrinter=}^{__CFString=}^^{__CFURL=}', '', {'retval': {'already_cfretained': True}, 'arguments': {2: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMCreatePrintSettings': (b'i^^{OpaquePMPrintSettings=}', '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'o'}}}), 'PMPrintSettingsSetValue': (b'i^{OpaquePMPrintSettings=}^{__CFString=}@Z',), 'PMGetDuplex': (b'i^{OpaquePMPrintSettings=}^I', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPrinterGetMakeAndModelName': (b'i^{OpaquePMPrinter=}^^{__CFString=}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPresetCopyName': (b'i^{OpaquePMPreset=}^^{__CFString=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMSessionGetCurrentPrinter': (b'i^{OpaquePMPrintSession=}^^{OpaquePMPrinter=}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMPrinterGetPrinterResolutionCount': (b'i^{OpaquePMPrinter=}^I', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMSetCopies': (b'i^{OpaquePMPrintSettings=}IZ',), 'PMGetUnadjustedPaperRect': (b'i^{OpaquePMPageFormat=}^{PMRect=dddd}', '', {'arguments': {1: {'type_modifier': 'o'}}}), 'PMSessionValidatePageFormat': (b'i^{OpaquePMPrintSession=}^{OpaquePMPageFormat=}^Z', '', {'arguments': {2: {'type_modifier': 'o'}}}), 'PMPrintSettingsCopyKeys': (b'i^{OpaquePMPrintSettings=}^^{__CFArray=}', '', {'retval': {'already_cfretained': True}, 'arguments': {1: {'already_cfretained': True, 'type_modifier': 'o'}}}), 'PMCreatePageFormatWithPMPaper': (b'i^^{OpaquePMPageFormat=}^{OpaquePMPaper=}', '', {'retval': {'already_cfretained': True}, 'arguments': {0: {'type_modifier': 'o'}}}), 'PMRelease': (b'i^v',)}
aliases = {'kPMPrintTimeAEType': 'cLongDateTime', 'kPMDontWantData': 'objc.NULL', 'kPMNoReference': 'objc.NULL', 'kPMLastPageAEType': 'typeSInt32', 'kPMFeatureAEType': 'typeAEList', 'kPMDestinationTypeDefault': 'kPMDestinationPrinter', 'kPMAllocationFailure': 'memFullErr', 'kPMNoError': 'noErr', 'kPMInternalError': 'kPMGeneralError', 'kPMPDFWorkFlowAEType': 'typeUTF8Text', 'kPMFaxNumberAEType': 'typeChar', 'kPMErrorHandlingAEType': 'typeEnumerated', 'kPMSaveAsPDFAEType': 'typeFileURL', 'kPMDuplexDefault': 'kPMDuplexNone', 'kPMDontWantBoolean': 'objc.NULL', 'kPMTargetPrinterAEType': 'typeChar', 'kPMCollateAEType': 'typeBoolean', 'kPMCopieAEType': 'typeSInt32', 'kPMFirstPageAEType': 'typeSInt32', 'kPMLayoutDownAEType': 'typeSInt32', 'kPMNoData': 'objc.NULL', 'kPMDontWantSize': 'objc.NULL', 'kPMSaveAsPSAEType': 'typeFileURL', 'kPMPresetAEType': 'typeUTF8Text', 'kPMLayoutAcrossAEType': 'typeSInt32', 'kPMInvalidParameter': 'paramErr'}
misc.update({'PMPrintSettings': objc.createOpaquePointerType('PMPrintSettings', b'^{OpaquePMPrintSettings}'), 'PMPrintSession': objc.createOpaquePointerType('PMPrintSession', b'^{OpaquePMPrintSession}'), 'PMPageFormat': objc.createOpaquePointerType('PMPageFormat', b'^{OpaquePMPageFormat}'), 'PMPaper': objc.createOpaquePointerType('PMPaper', b'^{OpaquePMPaper}'), 'PMPreset': objc.createOpaquePointerType('PMPreset', b'^{OpaquePMPreset}'), 'PMPrinter': objc.createOpaquePointerType('PMPrinter', b'^{OpaquePMPrinter}'), 'PMServer': objc.createOpaquePointerType('PMServer', b'^{OpaquePMServer}')})
r = objc.registerMetaDataForSelector
objc._updatingMetadata(True)
try:
    r(b'NSObject', b'initWithBundle:', {'retval': {'type': 'Z'}})
    r(b'NSObject', b'printWindowWillClose:', {'arguments': {2: {'type': 'Z'}}})
    r(b'NSObject', b'restoreValuesAndReturnError:', {'retval': {'type': 'Z'}, 'arguments': {2: {'type': '^@', 'type_modifier': b'o'}}})
    r(b'NSObject', b'saveValuesAndReturnError:', {'retval': {'type': 'Z'}, 'arguments': {2: {'type': '^@', 'type_modifier': b'o'}}})
    r(b'NSObject', b'shouldHide', {'retval': {'type': 'Z'}})
    r(b'NSObject', b'shouldPrint', {'retval': {'type': 'Z'}})
    r(b'NSObject', b'shouldShowHelp', {'retval': {'type': 'Z'}})
    r(b'NSObject', b'willChangePPDOptionKeyValue:ppdChoice:', {'retval': {'type': 'Z'}})
finally:
    objc._updatingMetadata(False)
expressions = {'kPMLayoutTileOrientationKey': "kPMLayoutTileOrientationStr.decode('utf-8')", 'kPMColorSyncProfileIDKey': "kPMColorSyncProfileIDStr.decode('utf-8')", 'kPMFaxSheetsLabelKey': "kPMFaxSheetsLabelStr.decode('utf-8')", 'kPMUseOptionalAccountIDKey': "kPMUseOptionalAccountIDStr.decode('utf-8')", 'kPMJobPriorityKey': "kPMJobPriorityStr.decode('utf-8')", 'kPMLayoutNUpKey': "kPMLayoutNUpStr.decode('utf-8')", 'kPMCoverPageDefault': '(kPMCoverPageNone)', 'kPMPSTraySwitchKey': "kPMPSTraySwitchStr.decode('utf-8')", 'kPMColorMatchingModeKey': "kPMColorMatchingModeStr.decode('utf-8')", 'kPMJobStateKey': "kPMJobStateStr.decode('utf-8')", 'kPMPrintSelectionOnlyKey': "kPMPrintSelectionOnlyStr.decode('utf-8')", 'kPMFaxNumberKey': "kPMFaxNumberStr.decode('utf-8')", 'kPMLayoutRowsKey': "kPMLayoutRowsStr.decode('utf-8')", 'kPMFitToPageKey': "kPMFitToPageStr.decode('utf-8')", 'kPMDestinationPrinterIDKey': "kPMDestinationPrinterIDStr.decode('utf-8')", 'kPMFaxDateLabelKey': "kPMFaxDateLabelStr.decode('utf-8')", 'kPMFaxSubjectLabelKey': "kPMFaxSubjectLabelStr.decode('utf-8')", 'kPMBorderTypeKey': "kPMBorderTypeStr.decode('utf-8')", 'kPMUseOptionalPINKey': "kPMUseOptionalPINStr.decode('utf-8')", 'kPMFaxSubjectKey': "kPMFaxSubjectStr.decode('utf-8')", 'kPMTotalSidesImagedKey': "kPMTotalSidesImagedStr.decode('utf-8')", 'kPMPageSetKey': 'CFSTR(kPMPageSetStr)', 'kPMCoverPageKey': "kPMCoverPageStr.decode('utf-8')", 'kPMFaxFromLabelKey': "kPMFaxFromLabelStr.decode('utf-8')", 'kPMSecondaryPaperFeedKey': "kPMSecondaryPaperFeedStr.decode('utf-8')", 'kPMFaxWaitForDialToneKey': "kPMFaxWaitForDialToneStr.decode('utf-8')", 'kPMLayoutDirectionKey': "kPMLayoutDirectionStr.decode('utf-8')", 'kPMDestinationTypeKey': "kPMDestinationTypeStr.decode('utf-8')", 'kPMDuplexingKey': "kPMDuplexingStr.decode('utf-8')", 'kPMCopiesKey': "kPMCopiesStr.decode('utf-8')", 'kPMVendorColorMatching': "kPMVendorColorMatchingStr.decode('utf-8')", 'kPMFaxPrefixKey': "kPMFaxPrefixStr.decode('utf-8')", 'kPMFaxCoverSheetMessageKey': "kPMFaxCoverSheetMessageStr.decode('utf-8')", 'kPMFaxToLabelKey': "kPMFaxToLabelStr.decode('utf-8')", 'kPMFaxToneDialingKey': "kPMFaxToneDialingStr.decode('utf-8')", 'kPMPrimaryPaperFeedKey': "kPMPrimaryPaperFeedStr.decode('utf-8')", 'kPMCoverPageSourceKey': "kPMCoverPageSourceStr.decode('utf-8')", 'kPMOutputFilenameKey': "kPMOutputFilenameStr.decode('utf-8')", 'kPMOutputOrderKey': 'CFSTR(kPMOutputOrderStr)', 'kPMCopyCollateKey': "kPMCopyCollateStr.decode('utf-8')", 'kPMInlineWorkflowKey': "kPMInlineWorkflowStr.decode('utf-8')", 'kPMPageToPaperMappingAllowScalingUpKey': 'CFSTR(kPMPageToPaperMappingAllowScalingUpStr)', 'kPMFaxUseSoundKey': "kPMFaxUseSoundStr.decode('utf-8')", 'kPMBorderKey': "kPMBorderStr.decode('utf-8')", 'kPMFaxToKey': "kPMFaxToStr.decode('utf-8')", 'kPMApplicationColorMatching': "kPMApplicationColorMatchingStr.decode('utf-8')", 'kPMFaxCoverSheetKey': "kPMFaxCoverSheetStr.decode('utf-8')", 'kPMJobHoldUntilTimeKey': "kPMJobHoldUntilTimeStr.decode('utf-8')", 'kPMMirrorKey': 'CFSTR(kPMMirrorStr)', 'kPMLayoutColumnsKey': "kPMLayoutColumnsStr.decode('utf-8')", 'kPMTotalBeginPagesKey': "kPMTotalBeginPagesStr.decode('utf-8')", 'kPMPageToPaperMediaNameKey': 'CFSTR(kPMPageToPaperMediaNameStr)', 'kPMCustomProfilePathKey': "kPMCustomProfilePathStr.decode('utf-8')", 'kPMPSErrorHandlerKey': "kPMPSErrorHandlerStr.decode('utf-8')", 'kPMPageToPaperMappingTypeKey': 'CFSTR(kPMPageToPaperMappingTypeStr)'}