Home | History | Annotate | Download | only in tools

Lines Matching refs:ctypes

24 import ctypes
25 from ctypes import util
28 iokit = ctypes.cdll.LoadLibrary(ctypes.util.find_library('IOKit'))
29 cf = ctypes.cdll.LoadLibrary(ctypes.util.find_library('CoreFoundation'))
31 kIOMasterPortDefault = ctypes.c_void_p.in_dll(iokit, "kIOMasterPortDefault")
32 kCFAllocatorDefault = ctypes.c_void_p.in_dll(cf, "kCFAllocatorDefault")
36 iokit.IOServiceMatching.restype = ctypes.c_void_p
38 iokit.IOServiceGetMatchingServices.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
39 iokit.IOServiceGetMatchingServices.restype = ctypes.c_void_p
41 iokit.IORegistryEntryGetParentEntry.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
43 iokit.IORegistryEntryCreateCFProperty.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p, ctypes.c_uint32]
44 iokit.IORegistryEntryCreateCFProperty.restype = ctypes.c_void_p
46 iokit.IORegistryEntryGetPath.argtypes = [ctypes.c_void_p, ctypes.c_void_p, ctypes.c_void_p]
47 iokit.IORegistryEntryGetPath.restype = ctypes.c_void_p
49 iokit.IORegistryEntryGetName.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
50 iokit.IORegistryEntryGetName.restype = ctypes.c_void_p
52 iokit.IOObjectGetClass.argtypes = [ctypes.c_void_p, ctypes.c_void_p]
53 iokit.IOObjectGetClass.restype = ctypes.c_void_p
55 iokit.IOObjectRelease.argtypes = [ctypes.c_void_p]
58 cf.CFStringCreateWithCString.argtypes = [ctypes.c_void_p, ctypes.c_char_p, ctypes.c_int32]
59 cf.CFStringCreateWithCString.restype = ctypes.c_void_p
61 cf.CFStringGetCStringPtr.argtypes = [ctypes.c_void_p, ctypes.c_uint32]
62 cf.CFStringGetCStringPtr.restype = ctypes.c_char_p
64 cf.CFNumberGetValue.argtypes = [ctypes.c_void_p, ctypes.c_uint32, ctypes.c_void_p]
65 cf.CFNumberGetValue.restype = ctypes.c_void_p
114 number = ctypes.c_uint16()
117 output = cf.CFNumberGetValue(CFContainer, 2, ctypes.byref(number))
122 pathname = ctypes.create_string_buffer(100) # TODO: Is this ok?
125 ctypes.byref(pathname)
137 parent = ctypes.c_void_p()
141 ctypes.byref(parent)
155 serial_port_iterator = ctypes.c_void_p()
160 ctypes.byref(serial_port_iterator)