] class CVTimeStamp(ctypes.Structure): _fields_ = [ ('version', ctypes.c_uint32), ('videoTimeScale', ctypes.c_int32), ('videoTime', ctypes.c_int64), ('hostTime', ctypes.c_uint64), ('rateScalar', ctypes.c_double), ('videoRefreshPeriod', ctypes.c_int64), ('smpteTime', CVSMPTETime), ('flags', ctypes.c_uint64), ('reserved', ctypes.c_uint64), ] kQTPropertyClass_DataLocation = _name('dloc') kQTDataLocationPropertyID_CFStringPosixPath = _name('cfpp') kQTPropertyClass_Context = _name('ctxt') kQTContextPropertyID_VisualContext = _name('visu') kQTPropertyClass_MovieInstantiation = _name('mins') kQTMovieInstantiationPropertyID_DontAskUnresolvedDataRefs = _name('aurn') kQTPropertyClass_NewMovieProperty = _name('mprp') kQTNewMoviePropertyID_Active = _name('actv') kQTNewMoviePropertyID_DontInteractWithUser = _name('intn') quicktime.NewMovieFromProperties.restype = _oscheck quicktime.NewMovieFromProperties.argtypes = ( ItemCount,
from ctypes import * from pyglet.gl import * from pyglet.image import * from pyglet.image.codecs import * from pyglet.window.carbon import carbon, quicktime, _oscheck from pyglet.window.carbon.constants import _name from pyglet.window.carbon.types import * Handle = POINTER(POINTER(c_byte)) GWorldPtr = c_void_p carbon.NewHandle.restype = Handle HandleDataHandlerSubType = _name('hndl') PointerDataHandlerSubType = _name('ptr ') kDataHCanRead = 1 kDataRefExtensionFileName = _name('fnam') kDataRefExtensionMIMEType = _name('mime') ComponentInstance = c_void_p k1MonochromePixelFormat = 0x00000001 k2IndexedPixelFormat = 0x00000002 k4IndexedPixelFormat = 0x00000004 k8IndexedPixelFormat = 0x00000008 k16BE555PixelFormat = 0x00000010 k24RGBPixelFormat = 0x00000018 k32ARGBPixelFormat = 0x00000020 k32BGRAPixelFormat = _name('BGRA') k1IndexedGrayPixelFormat = 0x00000021
from ctypes import * from pyglet.gl import * from pyglet.image import * from pyglet.image.codecs import * from pyglet.window.carbon import carbon, quicktime, _oscheck from pyglet.window.carbon.constants import _name from pyglet.window.carbon.types import * Handle = POINTER(POINTER(c_byte)) GWorldPtr = c_void_p carbon.NewHandle.restype = Handle HandleDataHandlerSubType = _name("hndl") PointerDataHandlerSubType = _name("ptr ") kDataHCanRead = 1 kDataRefExtensionFileName = _name("fnam") kDataRefExtensionMIMEType = _name("mime") ComponentInstance = c_void_p k1MonochromePixelFormat = 0x00000001 k2IndexedPixelFormat = 0x00000002 k4IndexedPixelFormat = 0x00000004 k8IndexedPixelFormat = 0x00000008 k16BE555PixelFormat = 0x00000010 k24RGBPixelFormat = 0x00000018 k32ARGBPixelFormat = 0x00000020 k32BGRAPixelFormat = _name("BGRA") k1IndexedGrayPixelFormat = 0x00000021
import sys from ctypes import * from pyglet.gl import * from pyglet.image import * from pyglet.image.codecs import * from pyglet.window.carbon import carbon, quicktime from pyglet.window.carbon.constants import _name from pyglet.window.carbon.types import * Handle = POINTER(POINTER(c_byte)) GWorldPtr = c_void_p carbon.NewHandle.restype = Handle HandleDataHandlerSubType = _name('hndl') ComponentInstance = c_void_p k1MonochromePixelFormat = 0x00000001 k2IndexedPixelFormat = 0x00000002 k4IndexedPixelFormat = 0x00000004 k8IndexedPixelFormat = 0x00000008 k16BE555PixelFormat = 0x00000010 k24RGBPixelFormat = 0x00000018 k32ARGBPixelFormat = 0x00000020 k32BGRAPixelFormat = _name('BGRA') k1IndexedGrayPixelFormat = 0x00000021 k2IndexedGrayPixelFormat = 0x00000022 k4IndexedGrayPixelFormat = 0x00000024 k8IndexedGrayPixelFormat = 0x00000028 kNativeEndianPixMap = 1 << 8
from pyglet.window.carbon import carbon, types, constants, _oscheck EventHandlerProcPtr = ctypes.CFUNCTYPE(ctypes.c_int, ctypes.c_int, ctypes.c_void_p, ctypes.c_void_p) EventLoopTimerProc = ctypes.CFUNCTYPE(None, ctypes.c_void_p, ctypes.c_void_p) carbon.CreateEvent.argtypes = (ctypes.c_void_p, ctypes.c_uint32, ctypes.c_uint32, ctypes.c_double, ctypes.c_int, ctypes.c_void_p) kEventDurationForever = ctypes.c_double(constants.kEventDurationForever) kEventPriorityStandard = 1 kEventAttributeNone = 0 kEventAttributeUserEvent = 1 kEventParamPostTarget = constants._name('ptrg') typeEventTargetRef = constants._name('etrg') POST_EVENT_CLASS = constants._name('PYGL') POST_EVENT_KIND = 0 # TODO when no windows are open Ctrl+C doesn't kill event loop. Install a sig # handler? class MTCarbonEventLoop(BaseEventLoop): _running = False def __init__(self): self._post_event_queue = Queue.Queue() def post_event(self, dispatcher, event, *args):
''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import ctypes import pyglet from pyglet.window.carbon import CarbonEventHandler, carbon, _oscheck from pyglet.window.carbon.constants import * from pyglet.window.carbon.constants import _name kEventTabletPoint = 1 kEventTabletProximity = 2 kEventParamTabletPointRec = _name('tbrc') kEventParamTabletProximityRec = _name('tbpx') typeTabletPointRec = _name('tbrc') typeTabletProximityRec = _name('tbpx') class TabletProximityRec(ctypes.Structure): _fields_ = ( ('vendorID', ctypes.c_uint16), ('tabletID', ctypes.c_uint16), ('pointerID', ctypes.c_uint16), ('deviceID', ctypes.c_uint16), ('systemTabletID', ctypes.c_uint16), ('vendorPointerType', ctypes.c_uint16), ('pointerSerialNumber', ctypes.c_uint32), ('uniqueID', ctypes.c_uint64),
''' ''' __docformat__ = 'restructuredtext' __version__ = '$Id: $' import ctypes import pyglet from pyglet.window.carbon import CarbonEventHandler, carbon, _oscheck from pyglet.window.carbon.constants import * from pyglet.window.carbon.constants import _name kEventTabletPoint = 1 kEventTabletProximity = 2 kEventParamTabletPointRec = _name('tbrc') kEventParamTabletProximityRec = _name('tbpx') typeTabletPointRec = _name('tbrc') typeTabletProximityRec = _name('tbpx') class TabletProximityRec(ctypes.Structure): _fields_ = ( ('vendorID', ctypes.c_uint16), ('tabletID', ctypes.c_uint16), ('pointerID', ctypes.c_uint16), ('deviceID', ctypes.c_uint16), ('systemTabletID', ctypes.c_uint16), ('vendorPointerType', ctypes.c_uint16), ('pointerSerialNumber', ctypes.c_uint32), ('uniqueID', ctypes.c_uint64), ('capabilityMask', ctypes.c_uint32),