pyobjc-framework-Quartz 12.2__cp315-cp315-macosx_10_15_universal2.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- Quartz/CoreGraphics/__init__.py +80 -0
- Quartz/CoreGraphics/_callbacks.cpython-315-darwin.so +0 -0
- Quartz/CoreGraphics/_contextmanager.py +105 -0
- Quartz/CoreGraphics/_coregraphics.cpython-315-darwin.so +0 -0
- Quartz/CoreGraphics/_doubleindirect.cpython-315-darwin.so +0 -0
- Quartz/CoreGraphics/_inlines.cpython-315-darwin.so +0 -0
- Quartz/CoreGraphics/_metadata.py +3015 -0
- Quartz/CoreGraphics/_sortandmap.cpython-315-darwin.so +0 -0
- Quartz/CoreVideo/_CVPixelBuffer.cpython-315-darwin.so +0 -0
- Quartz/CoreVideo/__init__.py +37 -0
- Quartz/CoreVideo/_metadata.py +603 -0
- Quartz/ImageIO/PyObjCOverrides.bridgesupport +393 -0
- Quartz/ImageIO/__init__.py +34 -0
- Quartz/ImageIO/_metadata.py +336 -0
- Quartz/ImageKit/__init__.py +49 -0
- Quartz/ImageKit/_imagekit.cpython-315-darwin.so +0 -0
- Quartz/ImageKit/_metadata.py +607 -0
- Quartz/PDFKit/_PDFKit.cpython-315-darwin.so +0 -0
- Quartz/PDFKit/__init__.py +45 -0
- Quartz/PDFKit/_metadata.py +398 -0
- Quartz/QuartzComposer/__init__.py +45 -0
- Quartz/QuartzComposer/_metadata.py +440 -0
- Quartz/QuartzCore/__init__.py +81 -0
- Quartz/QuartzCore/_metadata.py +1110 -0
- Quartz/QuartzCore/_quartzcore.cpython-315-darwin.so +0 -0
- Quartz/QuartzFilters/__init__.py +41 -0
- Quartz/QuartzFilters/_metadata.py +95 -0
- Quartz/QuickLookUI/_QuickLookUI.cpython-315-darwin.so +0 -0
- Quartz/QuickLookUI/__init__.py +46 -0
- Quartz/QuickLookUI/_metadata.py +275 -0
- Quartz/__init__.py +47 -0
- pyobjc_framework_quartz-12.2.dist-info/METADATA +106 -0
- pyobjc_framework_quartz-12.2.dist-info/RECORD +37 -0
- pyobjc_framework_quartz-12.2.dist-info/WHEEL +5 -0
- pyobjc_framework_quartz-12.2.dist-info/licenses/LICENSE.txt +10 -0
- pyobjc_framework_quartz-12.2.dist-info/pyobjc-build-info.txt +3 -0
- pyobjc_framework_quartz-12.2.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Python mapping for the CoreGraphics framework.
|
|
3
|
+
|
|
4
|
+
This module does not contain docstrings for the wrapped code, check Apple's
|
|
5
|
+
documentation for details on how to use these functions and classes.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def _setup():
|
|
10
|
+
import sys
|
|
11
|
+
|
|
12
|
+
import CoreFoundation
|
|
13
|
+
import objc
|
|
14
|
+
import os
|
|
15
|
+
from . import (
|
|
16
|
+
_metadata,
|
|
17
|
+
_callbacks,
|
|
18
|
+
_doubleindirect,
|
|
19
|
+
_sortandmap,
|
|
20
|
+
_coregraphics,
|
|
21
|
+
_contextmanager,
|
|
22
|
+
)
|
|
23
|
+
from ._inlines import _inline_list_
|
|
24
|
+
|
|
25
|
+
if os.path.exists("/System/Library/Frameworks/CoreGraphics.framework"):
|
|
26
|
+
frameworkPath = "/System/Library/Frameworks/CoreGraphics.framework"
|
|
27
|
+
frameworkIdentifier = "com.apple.CoreGraphics"
|
|
28
|
+
else:
|
|
29
|
+
frameworkPath = "/System/Library/Frameworks/ApplicationServices.framework"
|
|
30
|
+
frameworkIdentifier = "com.apple.ApplicationServices"
|
|
31
|
+
|
|
32
|
+
dir_func, getattr_func = objc.createFrameworkDirAndGetattr(
|
|
33
|
+
name="Quartz.CoreGraphics",
|
|
34
|
+
frameworkIdentifier=frameworkIdentifier,
|
|
35
|
+
frameworkPath=objc.pathForFramework(frameworkPath),
|
|
36
|
+
globals_dict=globals(),
|
|
37
|
+
inline_list=_inline_list_,
|
|
38
|
+
parents=(
|
|
39
|
+
_callbacks,
|
|
40
|
+
_doubleindirect,
|
|
41
|
+
_sortandmap,
|
|
42
|
+
_coregraphics,
|
|
43
|
+
_contextmanager,
|
|
44
|
+
CoreFoundation,
|
|
45
|
+
),
|
|
46
|
+
metadict=_metadata.__dict__,
|
|
47
|
+
)
|
|
48
|
+
|
|
49
|
+
globals()["__dir__"] = dir_func
|
|
50
|
+
globals()["__getattr__"] = getattr_func
|
|
51
|
+
|
|
52
|
+
del sys.modules["Quartz.CoreGraphics._metadata"]
|
|
53
|
+
|
|
54
|
+
# XXX: To be verified
|
|
55
|
+
from . import CGPathElement
|
|
56
|
+
|
|
57
|
+
_sortandmap.setCGPathElement(CGPathElement)
|
|
58
|
+
del _sortandmap.setCGPathElement
|
|
59
|
+
|
|
60
|
+
# XXX: Move these to metadata!
|
|
61
|
+
|
|
62
|
+
global CGFLOAT_MIN, CGFLOAT_MAX
|
|
63
|
+
CGFLOAT_MIN = 1.175_494_350_822_287_5e-38
|
|
64
|
+
CGFLOAT_MAX = 3.402_823_466_385_288_6e38
|
|
65
|
+
|
|
66
|
+
global kCGAnyInputEventType
|
|
67
|
+
kCGAnyInputEventType = 0xFFFFFFFF
|
|
68
|
+
|
|
69
|
+
global CGEventMaskBit
|
|
70
|
+
|
|
71
|
+
def CGEventMaskBit(eventType):
|
|
72
|
+
return 1 << eventType
|
|
73
|
+
|
|
74
|
+
global kCGColorSpaceUserGray, kCGColorSpaceUserRGB, kCGColorSpaceUserCMYK
|
|
75
|
+
kCGColorSpaceUserGray = "kCGColorSpaceUserGray"
|
|
76
|
+
kCGColorSpaceUserRGB = "kCGColorSpaceUserRGB"
|
|
77
|
+
kCGColorSpaceUserCMYK = "kCGColorSpaceUserCMYK"
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
globals().pop("_setup")()
|
|
Binary file
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
"""
|
|
2
|
+
This module defines a number of context managers. These are meant to be used
|
|
3
|
+
in the context of the with statement (introduced in Python 2.5).
|
|
4
|
+
"""
|
|
5
|
+
|
|
6
|
+
__all__ = ("CGSavedGState", "CGTransparencyLayer", "CGContextPage")
|
|
7
|
+
import Quartz
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
class CGSavedGState:
|
|
11
|
+
"""
|
|
12
|
+
Context manager for saving and restoring the graphics state.
|
|
13
|
+
|
|
14
|
+
Usage::
|
|
15
|
+
|
|
16
|
+
with CGSavedGState(context):
|
|
17
|
+
statement
|
|
18
|
+
|
|
19
|
+
This is equivalent to:
|
|
20
|
+
CGContextSaveGState(context)
|
|
21
|
+
try:
|
|
22
|
+
statement
|
|
23
|
+
|
|
24
|
+
finally:
|
|
25
|
+
CGContextRestoreGState(context)
|
|
26
|
+
"""
|
|
27
|
+
|
|
28
|
+
def __init__(self, context):
|
|
29
|
+
self.context = context
|
|
30
|
+
|
|
31
|
+
def __enter__(self):
|
|
32
|
+
Quartz.CGContextSaveGState(self.context)
|
|
33
|
+
return self
|
|
34
|
+
|
|
35
|
+
def __exit__(self, exc_type, exc_value, exc_tp):
|
|
36
|
+
Quartz.CGContextRestoreGState(self.context)
|
|
37
|
+
return False
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class CGTransparencyLayer:
|
|
41
|
+
"""
|
|
42
|
+
Context manager for working in a transparancylayer.
|
|
43
|
+
|
|
44
|
+
Usage::
|
|
45
|
+
|
|
46
|
+
with CGTransparencyLayer(context, info [, rect]):
|
|
47
|
+
statement
|
|
48
|
+
|
|
49
|
+
This is equivalent to:
|
|
50
|
+
CGContextBeginTransparencyLayer(context, info)
|
|
51
|
+
try:
|
|
52
|
+
statement
|
|
53
|
+
|
|
54
|
+
finally:
|
|
55
|
+
CGContextEndTransparencyLayer(context)
|
|
56
|
+
"""
|
|
57
|
+
|
|
58
|
+
def __init__(self, context, info, rect=None):
|
|
59
|
+
self.context = context
|
|
60
|
+
self.info = info
|
|
61
|
+
self.rect = rect
|
|
62
|
+
|
|
63
|
+
def __enter__(self):
|
|
64
|
+
if self.rect is None:
|
|
65
|
+
result = Quartz.CGContextBeginTransparencyLayer(self.context, self.info)
|
|
66
|
+
else:
|
|
67
|
+
result = Quartz.CGContextBeginTransparencyLayerWithRect(
|
|
68
|
+
self.context, self.rect, self.info
|
|
69
|
+
)
|
|
70
|
+
return result
|
|
71
|
+
|
|
72
|
+
def __exit__(self, exc_type, exc_value, exc_tp):
|
|
73
|
+
Quartz.CGContextEndTransparencyLayer(self.context)
|
|
74
|
+
return False
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
class CGContextPage:
|
|
78
|
+
"""
|
|
79
|
+
Context manager for saving and restoring the graphics state.
|
|
80
|
+
|
|
81
|
+
Usage::
|
|
82
|
+
|
|
83
|
+
with CGContextPage(context) as mediaRect:
|
|
84
|
+
statement
|
|
85
|
+
|
|
86
|
+
This is equivalent to:
|
|
87
|
+
mediaRect = CGContextBeginPage(context, None)
|
|
88
|
+
try:
|
|
89
|
+
statement
|
|
90
|
+
|
|
91
|
+
finally:
|
|
92
|
+
CGContextEndPage(context)
|
|
93
|
+
"""
|
|
94
|
+
|
|
95
|
+
def __init__(self, context, mediaBox=None):
|
|
96
|
+
self.context = context
|
|
97
|
+
self.mediaBox = mediaBox
|
|
98
|
+
|
|
99
|
+
def __enter__(self):
|
|
100
|
+
mediaRect = Quartz.CGContextBeginPage(self.context, self.mediaBox)
|
|
101
|
+
return mediaRect
|
|
102
|
+
|
|
103
|
+
def __exit__(self, exc_type, exc_value, exc_tp):
|
|
104
|
+
Quartz.CGContextEndPage(self.context)
|
|
105
|
+
return False
|
|
Binary file
|
|
Binary file
|
|
Binary file
|