pyobjc-framework-PhotosUI 12.2.2__tar.gz → 13.1__tar.gz

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.
Files changed (42) hide show
  1. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/Lib/PhotosUI/__init__.py +20 -12
  2. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/Lib/PhotosUI/_metadata.py +124 -4
  3. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/Lib/pyobjc_framework_PhotosUI.egg-info/PKG-INFO +5 -5
  4. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/Lib/pyobjc_framework_PhotosUI.egg-info/SOURCES.txt +6 -3
  5. pyobjc_framework_photosui-13.1/Lib/pyobjc_framework_PhotosUI.egg-info/pyobjc-build-info.txt +3 -0
  6. pyobjc_framework_photosui-13.1/Lib/pyobjc_framework_PhotosUI.egg-info/requires.txt +2 -0
  7. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/Modules/_PhotosUI.m +9 -2
  8. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/Modules/_PhotosUI_protocols.m +15 -5
  9. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/Modules/pyobjc-api.h +18 -4
  10. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/Modules/pyobjc-compat.h +0 -18
  11. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/PKG-INFO +5 -5
  12. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/PyObjCTest/test_phcontenteditingcontroller.py +5 -6
  13. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/PyObjCTest/test_phlivephotoview.py +6 -8
  14. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/PyObjCTest/test_photosuitypes.py +2 -2
  15. pyobjc_framework_photosui-13.1/PyObjCTest/test_phphotouierror.py +12 -0
  16. pyobjc_framework_photosui-13.1/PyObjCTest/test_phpicker.py +76 -0
  17. pyobjc_framework_photosui-12.2.2/PyObjCTest/test_phprojectextensionContext.py → pyobjc_framework_photosui-13.1/PyObjCTest/test_phprojectextensioncontext.py +1 -1
  18. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/PyObjCTest/test_phprojectextensioncontroller.py +4 -5
  19. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/PyObjCTest/test_phprojectinfo.py +4 -6
  20. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/PyObjCTest/test_phprojecttypedescription.py +1 -1
  21. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/PyObjCTest/test_phprojecttypedescriptiondatasource.py +3 -3
  22. pyobjc_framework_photosui-13.1/PyObjCTest/test_phsharedalbumcreationviewcontroller.py +15 -0
  23. pyobjc_framework_photosui-13.1/PyObjCTest/test_phsharedalbumcustomizationviewcontroller.py +10 -0
  24. pyobjc_framework_photosui-13.1/PyObjCTest/test_phsharedalbumpostingviewcontroller.py +8 -0
  25. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/metadata/PhotosUI.fwinfo +0 -79
  26. pyobjc_framework_photosui-12.2.2/metadata/raw/arm64-26.5.fwinfo → pyobjc_framework_photosui-13.1/metadata/raw/arm64-27.fwinfo +3280 -1423
  27. pyobjc_framework_photosui-12.2.2/metadata/raw/x86_64-26.5.fwinfo → pyobjc_framework_photosui-13.1/metadata/raw/x86_64-27.fwinfo +3280 -1423
  28. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/pyobjc_setup.py +66 -8
  29. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/setup.py +1 -1
  30. pyobjc_framework_photosui-12.2.2/Lib/pyobjc_framework_PhotosUI.egg-info/pyobjc-build-info.txt +0 -3
  31. pyobjc_framework_photosui-12.2.2/Lib/pyobjc_framework_PhotosUI.egg-info/requires.txt +0 -2
  32. pyobjc_framework_photosui-12.2.2/PyObjCTest/test_phpicker.py +0 -47
  33. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/Lib/pyobjc_framework_PhotosUI.egg-info/dependency_links.txt +0 -0
  34. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/Lib/pyobjc_framework_PhotosUI.egg-info/not-zip-safe +0 -0
  35. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/Lib/pyobjc_framework_PhotosUI.egg-info/top_level.txt +0 -0
  36. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/License.txt +0 -0
  37. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/MANIFEST.in +0 -0
  38. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/PyObjCTest/__init__.py +0 -0
  39. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/PyObjCTest/test_photosui.py +0 -0
  40. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/metadata/metadata.ini +0 -0
  41. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/pyproject.toml +0 -0
  42. {pyobjc_framework_photosui-12.2.2 → pyobjc_framework_photosui-13.1}/setup.cfg +0 -0
@@ -52,22 +52,30 @@ def _setup():
52
52
  ("PHPickerViewController", b"new"),
53
53
  ("PHProjectTypeDescription", b"init"),
54
54
  ("PHProjectTypeDescription", b"new"),
55
+ ("PHPickerSearchText", b"init"),
56
+ ("PHPickerSearchText", b"new"),
57
+ ("PHSharedAlbumCreationConfiguration", b"init"),
58
+ ("PHSharedAlbumCreationConfiguration", b"new"),
59
+ ("PHSharedAlbumCreationResult", b"init"),
60
+ ("PHSharedAlbumCreationResult", b"new"),
61
+ ("PHSharedAlbumCreationViewController", b"init"),
62
+ ("PHSharedAlbumCreationViewController", b"initWithNibName:bundle:"),
63
+ ("PHSharedAlbumCreationViewController", b"initWithCoder:"),
64
+ ("PHSharedAlbumCreationViewController", b"new"),
65
+ ("PHSharedAlbumCustomizationViewController", b"init"),
66
+ ("PHSharedAlbumCustomizationViewController", b"initWithNibName:bundle:"),
67
+ ("PHSharedAlbumCustomizationViewController", b"initWithCoder:"),
68
+ ("PHSharedAlbumCustomizationViewController", b"new"),
69
+ ("PHSharedAlbumPostingViewController", b"init"),
70
+ ("PHSharedAlbumPostingViewController", b"initWithNibName:bundle:"),
71
+ ("PHSharedAlbumPostingViewController", b"initWithCoder:"),
72
+ ("PHSharedAlbumPostingViewController", b"new"),
73
+ ("PHPickerAspectRatio", b"init"),
74
+ ("PHPickerAspectRatio", b"new"),
55
75
  ):
56
76
  objc.registerUnavailableMethod(cls, sel)
57
77
 
58
78
  del sys.modules["PhotosUI._metadata"]
59
79
 
60
- for cls_name in (
61
- "PHPickerFilter",
62
- "PHPickerConfiguration",
63
- "PHPickerResult",
64
- "PHPickerViewController",
65
- ):
66
- try:
67
- cls = objc.lookUpClass(cls_name)
68
- cls.__objc_final__ = True
69
- except objc.error:
70
- pass
71
-
72
80
 
73
81
  globals().pop("_setup")()
@@ -1,7 +1,5 @@
1
1
  # This file is generated by objective.metadata
2
2
  #
3
- # Last update: Thu May 28 22:50:54 2026
4
- #
5
3
  # flake8: noqa
6
4
 
7
5
  import objc, sys
@@ -30,23 +28,31 @@ else:
30
28
 
31
29
 
32
30
  misc = {}
33
- constants = """$PHProjectCategoryBook$PHProjectCategoryCalendar$PHProjectCategoryCard$PHProjectCategoryOther$PHProjectCategoryPrints$PHProjectCategorySlideshow$PHProjectCategoryUndefined$PHProjectCategoryWallDecor$PHProjectTypeUndefined$"""
34
- enums = """$PHLivePhotoViewContentModeAspectFill@1$PHLivePhotoViewContentModeAspectFit@0$PHLivePhotoViewPlaybackStyleFull@1$PHLivePhotoViewPlaybackStyleHint@2$PHLivePhotoViewPlaybackStyleUndefined@0$PHPickerCapabilitiesCollectionNavigation@4$PHPickerCapabilitiesNone@0$PHPickerCapabilitiesSearch@1$PHPickerCapabilitiesSelectionActions@8$PHPickerCapabilitiesSensitivityAnalysisIntervention@16$PHPickerCapabilitiesStagingArea@2$PHPickerConfigurationAssetRepresentationModeAutomatic@0$PHPickerConfigurationAssetRepresentationModeCompatible@2$PHPickerConfigurationAssetRepresentationModeCurrent@1$PHPickerConfigurationSelectionContinuous@2$PHPickerConfigurationSelectionContinuousAndOrdered@3$PHPickerConfigurationSelectionDefault@0$PHPickerConfigurationSelectionOrdered@1$PHPickerModeCompact@1$PHPickerModeDefault@0$PHProjectCreationSourceAlbum@2$PHProjectCreationSourceMemory@3$PHProjectCreationSourceMoment@4$PHProjectCreationSourceProject@20$PHProjectCreationSourceProjectBook@21$PHProjectCreationSourceProjectCalendar@22$PHProjectCreationSourceProjectCard@23$PHProjectCreationSourceProjectExtension@26$PHProjectCreationSourceProjectPrintOrder@24$PHProjectCreationSourceProjectSlideshow@25$PHProjectCreationSourceUndefined@0$PHProjectCreationSourceUserSelection@1$PHProjectSectionTypeAuxiliary@3$PHProjectSectionTypeContent@2$PHProjectSectionTypeCover@1$PHProjectSectionTypeUndefined@0$PHProjectTextElementTypeBody@0$PHProjectTextElementTypeSubtitle@2$PHProjectTextElementTypeTitle@1$"""
31
+ constants = """$PHPhotosUIErrorDomain$PHProjectCategoryBook$PHProjectCategoryCalendar$PHProjectCategoryCard$PHProjectCategoryOther$PHProjectCategoryPrints$PHProjectCategorySlideshow$PHProjectCategoryUndefined$PHProjectCategoryWallDecor$PHProjectTypeUndefined$"""
32
+ enums = """$PHLivePhotoViewContentModeAspectFill@1$PHLivePhotoViewContentModeAspectFit@0$PHLivePhotoViewPlaybackStyleFull@1$PHLivePhotoViewPlaybackStyleHint@2$PHLivePhotoViewPlaybackStyleUndefined@0$PHPhotosUIAssetCollectionCreationFailedError@3$PHPhotosUIAssetCollectionNotFoundError@1$PHPhotosUIAssetCollectionNotWritableError@2$PHPhotosUIICloudPhotosNotEnabledError@101$PHPhotosUISharedAlbumMigrationInProgressError@100$PHPickerCapabilitiesAutomaticModalInPresentation@32$PHPickerCapabilitiesAutomaticPreferredContentSize@64$PHPickerCapabilitiesCollectionNavigation@4$PHPickerCapabilitiesNone@0$PHPickerCapabilitiesSearch@1$PHPickerCapabilitiesSelectionActions@8$PHPickerCapabilitiesSensitivityAnalysisIntervention@16$PHPickerCapabilitiesSidebar@128$PHPickerCapabilitiesStagingArea@2$PHPickerConfigurationAssetRepresentationModeAutomatic@0$PHPickerConfigurationAssetRepresentationModeCompatible@2$PHPickerConfigurationAssetRepresentationModeCurrent@1$PHPickerConfigurationSelectionContinuous@2$PHPickerConfigurationSelectionContinuousAndOrdered@3$PHPickerConfigurationSelectionDefault@0$PHPickerConfigurationSelectionOrdered@1$PHPickerMetadataOptionsNone@0$PHPickerMetadataOptionsRemoveAppleReferenceImage@4$PHPickerMetadataOptionsRemoveCaptions@2$PHPickerMetadataOptionsRemoveKeywords@8$PHPickerMetadataOptionsRemoveLocation@1$PHPickerModeCompact@1$PHPickerModeDefault@0$PHPickerPrimaryButtonTypeAdd@2$PHPickerPrimaryButtonTypeAutomatic@0$PHPickerPrimaryButtonTypeChoose@7$PHPickerPrimaryButtonTypeContinue@8$PHPickerPrimaryButtonTypeDone@3$PHPickerPrimaryButtonTypeEdit@4$PHPickerPrimaryButtonTypeNext@6$PHPickerPrimaryButtonTypeNone@1$PHPickerPrimaryButtonTypeSave@5$PHPickerResultThumbnailSizeSmall@1$PHPickerResultThumbnailSizeStandard@2$PHPickerSecondaryButtonTypeAutomatic@0$PHPickerSecondaryButtonTypeBack@3$PHPickerSecondaryButtonTypeCancel@2$PHPickerSecondaryButtonTypeClear@5$PHPickerSecondaryButtonTypeClose@4$PHPickerSecondaryButtonTypeNone@1$PHProjectCreationSourceAlbum@2$PHProjectCreationSourceMemory@3$PHProjectCreationSourceMoment@4$PHProjectCreationSourceProject@20$PHProjectCreationSourceProjectBook@21$PHProjectCreationSourceProjectCalendar@22$PHProjectCreationSourceProjectCard@23$PHProjectCreationSourceProjectExtension@26$PHProjectCreationSourceProjectPrintOrder@24$PHProjectCreationSourceProjectSlideshow@25$PHProjectCreationSourceUndefined@0$PHProjectCreationSourceUserSelection@1$PHProjectSectionTypeAuxiliary@3$PHProjectSectionTypeContent@2$PHProjectSectionTypeCover@1$PHProjectSectionTypeUndefined@0$PHProjectTextElementTypeBody@0$PHProjectTextElementTypeSubtitle@2$PHProjectTextElementTypeTitle@1$PHSharedAlbumCreationSharingPolicyPrivate@0$PHSharedAlbumCreationSharingPolicyPublic@1$"""
35
33
  misc.update(
36
34
  {
35
+ "PHPickerSecondaryButtonType": NewType("PHPickerSecondaryButtonType", int),
37
36
  "PHPickerConfigurationAssetRepresentationMode": NewType(
38
37
  "PHPickerConfigurationAssetRepresentationMode", int
39
38
  ),
40
39
  "PHProjectCreationSource": NewType("PHProjectCreationSource", int),
40
+ "PHPhotosUIError": NewType("PHPhotosUIError", int),
41
41
  "PHPickerMode": NewType("PHPickerMode", int),
42
42
  "PHAssetPlaybackStyle": NewType("PHAssetPlaybackStyle", int),
43
43
  "PHLivePhotoViewPlaybackStyle": NewType("PHLivePhotoViewPlaybackStyle", int),
44
44
  "PHProjectSectionType": NewType("PHProjectSectionType", int),
45
45
  "PHProjectTextElementType": NewType("PHProjectTextElementType", int),
46
+ "PHPickerResultThumbnailSize": NewType("PHPickerResultThumbnailSize", int),
47
+ "PHSharedAlbumCreationSharingPolicy": NewType(
48
+ "PHSharedAlbumCreationSharingPolicy", int
49
+ ),
46
50
  "PHPickerCapabilities": NewType("PHPickerCapabilities", int),
51
+ "PHPickerPrimaryButtonType": NewType("PHPickerPrimaryButtonType", int),
47
52
  "PHPickerConfigurationSelection": NewType(
48
53
  "PHPickerConfigurationSelection", int
49
54
  ),
55
+ "PHPickerMetadataOptions": NewType("PHPickerMetadataOptions", int),
50
56
  "PHLivePhotoViewContentMode": NewType("PHLivePhotoViewContentMode", int),
51
57
  }
52
58
  )
@@ -174,6 +180,16 @@ try:
174
180
  "arguments": {2: {"type": b"@"}, 3: {"type": b"@"}},
175
181
  },
176
182
  )
183
+ r(
184
+ b"NSObject",
185
+ b"pickerDidPerformPrimaryAction:",
186
+ {"required": False, "retval": {"type": b"v"}, "arguments": {2: {"type": b"@"}}},
187
+ )
188
+ r(
189
+ b"NSObject",
190
+ b"pickerDidPerformSecondaryAction:",
191
+ {"required": False, "retval": {"type": b"v"}, "arguments": {2: {"type": b"@"}}},
192
+ )
177
193
  r(
178
194
  b"NSObject",
179
195
  b"resumeProjectWithExtensionContext:completion:",
@@ -192,6 +208,33 @@ try:
192
208
  },
193
209
  },
194
210
  )
211
+ r(
212
+ b"NSObject",
213
+ b"sharedAlbumCreationViewController:didCompleteWithError:",
214
+ {
215
+ "required": True,
216
+ "retval": {"type": b"v"},
217
+ "arguments": {2: {"type": b"@"}, 3: {"type": b"@"}},
218
+ },
219
+ )
220
+ r(
221
+ b"NSObject",
222
+ b"sharedAlbumCustomizationViewController:didCompleteWithError:",
223
+ {
224
+ "required": True,
225
+ "retval": {"type": b"v"},
226
+ "arguments": {2: {"type": b"@"}, 3: {"type": b"@"}},
227
+ },
228
+ )
229
+ r(
230
+ b"NSObject",
231
+ b"sharedAlbumPostingViewController:didCompleteWithError:",
232
+ {
233
+ "required": True,
234
+ "retval": {"type": b"v"},
235
+ "arguments": {2: {"type": b"@"}, 3: {"type": b"@"}},
236
+ },
237
+ )
195
238
  r(
196
239
  b"NSObject",
197
240
  b"shouldShowCancelConfirmation",
@@ -233,6 +276,30 @@ try:
233
276
  r(b"PHLivePhotoView", b"isMuted", {"retval": {"type": "Z"}})
234
277
  r(b"PHLivePhotoView", b"setMuted:", {"arguments": {2: {"type": "Z"}}})
235
278
  r(b"PHLivePhotoView", b"stopPlaybackAnimated:", {"arguments": {2: {"type": "Z"}}})
279
+ r(
280
+ b"PHPickerResult",
281
+ b"requestThumbnailImageURLForPreferredSize:resultHandler:",
282
+ {
283
+ "arguments": {
284
+ 3: {
285
+ "callable": {
286
+ "retval": {"type": b"v"},
287
+ "arguments": {
288
+ 0: {"type": b"^v"},
289
+ 1: {"type": b"@"},
290
+ 2: {"type": b"@"},
291
+ },
292
+ }
293
+ }
294
+ }
295
+ },
296
+ )
297
+ r(b"PHPickerSearchText", b"prefersAutomaticFocus", {"retval": {"type": b"Z"}})
298
+ r(
299
+ b"PHPickerSearchText",
300
+ b"setPrefersAutomaticFocus:",
301
+ {"arguments": {2: {"type": b"Z"}}},
302
+ )
236
303
  r(b"PHProjectAssetElement", b"horizontallyFlipped", {"retval": {"type": b"Z"}})
237
304
  r(b"PHProjectAssetElement", b"verticallyFlipped", {"retval": {"type": b"Z"}})
238
305
  r(
@@ -265,10 +332,14 @@ try:
265
332
  finally:
266
333
  objc._updatingMetadata(False)
267
334
 
335
+ objc.registerNewKeywordsFromSelector("PHPickerAspectRatio", b"init")
336
+ objc.registerNewKeywordsFromSelector("PHPickerAspectRatio", b"initWithAspectRatio:")
268
337
  objc.registerNewKeywordsFromSelector("PHPickerConfiguration", b"init")
269
338
  objc.registerNewKeywordsFromSelector("PHPickerConfiguration", b"initWithPhotoLibrary:")
270
339
  objc.registerNewKeywordsFromSelector("PHPickerFilter", b"init")
271
340
  objc.registerNewKeywordsFromSelector("PHPickerResult", b"init")
341
+ objc.registerNewKeywordsFromSelector("PHPickerSearchText", b"init")
342
+ objc.registerNewKeywordsFromSelector("PHPickerSearchText", b"initWithString:")
272
343
  objc.registerNewKeywordsFromSelector("PHPickerViewController", b"init")
273
344
  objc.registerNewKeywordsFromSelector("PHPickerViewController", b"initWithCoder:")
274
345
  objc.registerNewKeywordsFromSelector(
@@ -302,6 +373,55 @@ objc.registerNewKeywordsFromSelector(
302
373
  "PHProjectTypeDescription",
303
374
  b"initWithProjectType:title:description:image:subtypeDescriptions:",
304
375
  )
376
+ objc.registerNewKeywordsFromSelector("PHSharedAlbumCreationConfiguration", b"init")
377
+ objc.registerNewKeywordsFromSelector(
378
+ "PHSharedAlbumCreationConfiguration", b"initWithPhotoLibrary:"
379
+ )
380
+ objc.registerNewKeywordsFromSelector("PHSharedAlbumCreationResult", b"init")
381
+ objc.registerNewKeywordsFromSelector("PHSharedAlbumCreationViewController", b"init")
382
+ objc.registerNewKeywordsFromSelector(
383
+ "PHSharedAlbumCreationViewController", b"initWithCoder:"
384
+ )
385
+ objc.registerNewKeywordsFromSelector(
386
+ "PHSharedAlbumCreationViewController", b"initWithConfiguration:"
387
+ )
388
+ objc.registerNewKeywordsFromSelector(
389
+ "PHSharedAlbumCreationViewController", b"initWithNibName:bundle:"
390
+ )
391
+ objc.registerNewKeywordsFromSelector(
392
+ "PHSharedAlbumCustomizationViewController", b"init"
393
+ )
394
+ objc.registerNewKeywordsFromSelector(
395
+ "PHSharedAlbumCustomizationViewController", b"initWithAlbumIdentifier:photoLibrary:"
396
+ )
397
+ objc.registerNewKeywordsFromSelector(
398
+ "PHSharedAlbumCustomizationViewController", b"initWithCoder:"
399
+ )
400
+ objc.registerNewKeywordsFromSelector(
401
+ "PHSharedAlbumCustomizationViewController", b"initWithNibName:bundle:"
402
+ )
403
+ objc.registerNewKeywordsFromSelector("PHSharedAlbumPostingViewController", b"init")
404
+ objc.registerNewKeywordsFromSelector(
405
+ "PHSharedAlbumPostingViewController", b"initWithCoder:"
406
+ )
407
+ objc.registerNewKeywordsFromSelector(
408
+ "PHSharedAlbumPostingViewController",
409
+ b"initWithItems:defaultAlbumIdentifier:photoLibrary:",
410
+ )
411
+ objc.registerNewKeywordsFromSelector(
412
+ "PHSharedAlbumPostingViewController", b"initWithNibName:bundle:"
413
+ )
305
414
  expressions = {}
415
+ formal_protocols = {
416
+ "PHContentEditingController": "PHContentEditingController",
417
+ "PHLivePhotoViewDelegate": "PHLivePhotoViewDelegate",
418
+ "PHPickerViewControllerDelegate": "PHPickerViewControllerDelegate",
419
+ "PHProjectExtensionController": "PHProjectExtensionController",
420
+ "PHProjectTypeDescriptionDataSource": "PHProjectTypeDescriptionDataSource",
421
+ "PHProjectTypeDescriptionInvalidator": "PHProjectTypeDescriptionInvalidator",
422
+ "PHSharedAlbumCreationViewControllerDelegate": "PHSharedAlbumCreationViewControllerDelegate",
423
+ "PHSharedAlbumCustomizationViewControllerDelegate": "PHSharedAlbumCustomizationViewControllerDelegate",
424
+ "PHSharedAlbumPostingViewControllerDelegate": "PHSharedAlbumPostingViewControllerDelegate",
425
+ }
306
426
 
307
427
  # END OF FILE
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobjc-framework-PhotosUI
3
- Version: 12.2.2
3
+ Version: 13.1
4
4
  Summary: Wrappers for the framework PhotosUI on macOS
5
5
  Home-page: https://github.com/ronaldoussoren/pyobjc
6
6
  Author: Ronald Oussoren
@@ -17,21 +17,21 @@ Classifier: Operating System :: MacOS :: MacOS X
17
17
  Classifier: Programming Language :: Python
18
18
  Classifier: Programming Language :: Python :: 3
19
19
  Classifier: Programming Language :: Python :: 3 :: Only
20
- Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
23
22
  Classifier: Programming Language :: Python :: 3.13
24
23
  Classifier: Programming Language :: Python :: 3.14
25
24
  Classifier: Programming Language :: Python :: 3.15
25
+ Classifier: Programming Language :: Python :: 3.16
26
26
  Classifier: Programming Language :: Python :: Implementation :: CPython
27
27
  Classifier: Programming Language :: Python :: Free Threading :: 3 - Stable
28
28
  Classifier: Programming Language :: Objective C
29
29
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
30
30
  Classifier: Topic :: Software Development :: User Interfaces
31
- Requires-Python: >=3.10
31
+ Requires-Python: >=3.11
32
32
  Description-Content-Type: text/x-rst; charset=UTF-8
33
- Requires-Dist: pyobjc-core>=12.2.2
34
- Requires-Dist: pyobjc-framework-Cocoa>=12.2.2
33
+ Requires-Dist: pyobjc-core>=13.1
34
+ Requires-Dist: pyobjc-framework-Cocoa>=13.1
35
35
  Dynamic: author
36
36
  Dynamic: author-email
37
37
  Dynamic: classifier
@@ -21,14 +21,17 @@ PyObjCTest/test_phcontenteditingcontroller.py
21
21
  PyObjCTest/test_phlivephotoview.py
22
22
  PyObjCTest/test_photosui.py
23
23
  PyObjCTest/test_photosuitypes.py
24
+ PyObjCTest/test_phphotouierror.py
24
25
  PyObjCTest/test_phpicker.py
25
- PyObjCTest/test_phprojectextensionContext.py
26
26
  PyObjCTest/test_phprojectextensioncontext.py
27
27
  PyObjCTest/test_phprojectextensioncontroller.py
28
28
  PyObjCTest/test_phprojectinfo.py
29
29
  PyObjCTest/test_phprojecttypedescription.py
30
30
  PyObjCTest/test_phprojecttypedescriptiondatasource.py
31
+ PyObjCTest/test_phsharedalbumcreationviewcontroller.py
32
+ PyObjCTest/test_phsharedalbumcustomizationviewcontroller.py
33
+ PyObjCTest/test_phsharedalbumpostingviewcontroller.py
31
34
  metadata/PhotosUI.fwinfo
32
35
  metadata/metadata.ini
33
- metadata/raw/arm64-26.5.fwinfo
34
- metadata/raw/x86_64-26.5.fwinfo
36
+ metadata/raw/arm64-27.fwinfo
37
+ metadata/raw/x86_64-27.fwinfo
@@ -0,0 +1,3 @@
1
+ macOS 27.2.1 (26B131)
2
+ Apple clang version 21.0.0 (clang-2100.4.1.1)
3
+ SDK: macOS 27.2
@@ -0,0 +1,2 @@
1
+ pyobjc-core>=13.1
2
+ pyobjc-framework-Cocoa>=13.1
@@ -2,6 +2,10 @@
2
2
  #include "Python.h"
3
3
  #include "pyobjc-api.h"
4
4
 
5
+ #ifdef USE_STATIC_ANALYZER
6
+ #include "../../pyobjc-core/Modules/objc/python-api-used.h"
7
+ #endif
8
+
5
9
  #import <PhotosUI/PhotosUI.h>
6
10
 
7
11
  /* We include the source code here instead of
@@ -10,6 +14,8 @@
10
14
 
11
15
  #include "_PhotosUI_protocols.m"
12
16
 
17
+ NS_ASSUME_NONNULL_BEGIN
18
+
13
19
  static PyMethodDef mod_methods[] = {
14
20
  {0, 0, 0, 0} /* sentinel */
15
21
  };
@@ -55,10 +61,11 @@ static struct PyModuleDef mod_module = {
55
61
  .m_free = NULL,
56
62
  };
57
63
 
58
- PyObject* PyInit__PhotosUI(void);
64
+ PyObject* _Nullable PyInit__PhotosUI(void);
59
65
 
60
- PyObject* __attribute__((__visibility__("default")))
66
+ PyObject* _Nullable __attribute__((__visibility__("default")))
61
67
  PyInit__PhotosUI(void)
62
68
  {
63
69
  return PyModuleDef_Init(&mod_module);
64
70
  }
71
+ NS_ASSUME_NONNULL_END
@@ -1,8 +1,7 @@
1
- /*
2
- * This file is generated by objective.metadata
3
- *
4
- * Last update: Tue May 26 22:53:41 2015
5
- */
1
+ // LCOV_EXCL_START
2
+ // This function is only present to ensure protocols are
3
+ // available at runtime.
4
+ NS_ASSUME_NONNULL_BEGIN
6
5
 
7
6
  static void __attribute__((__used__))
8
7
  use_protocols(void)
@@ -30,4 +29,15 @@ use_protocols(void)
30
29
  p = PyObjC_IdToPython(@protocol(PHPickerViewControllerDelegate));
31
30
  Py_XDECREF(p);
32
31
  #endif /* PyObjC_BUILD_RELEASE >= 1300 */
32
+ #if PyObjC_BUILD_RELEASE >= 2700
33
+ p = PyObjC_IdToPython(@protocol(PHSharedAlbumCreationViewControllerDelegate));
34
+ Py_XDECREF(p);
35
+ p = PyObjC_IdToPython(@protocol(PHSharedAlbumCustomizationViewControllerDelegate));
36
+ Py_XDECREF(p);
37
+ p = PyObjC_IdToPython(@protocol(PHSharedAlbumPostingViewControllerDelegate));
38
+ Py_XDECREF(p);
39
+ #endif /* PyObjC_BUILD_RELEASE >= 2700 */
33
40
  }
41
+
42
+ NS_ASSUME_NONNULL_END
43
+ // LCOV_EXCL_STOP
@@ -60,6 +60,11 @@ typedef int(RegisterMethodMappingFunctionType)(
60
60
  PyObject* _Nonnull const* _Nonnull, size_t),
61
61
  IMP _Nullable (*_Nonnull)(PyObject* _Nonnull, PyObject* _Nonnull));
62
62
 
63
+ #ifndef PyObjC_FUNCTION_CALL_H
64
+ typedef PyObject* _Nullable (*PyObjC_FunctionCallFunc)(
65
+ PyObject* meth, PyObject* _Nonnull const* _Nonnull args, size_t nargs);
66
+ #endif
67
+
63
68
  struct pyobjc_api {
64
69
  int api_version; /* API version */
65
70
  size_t struct_len; /* Length of this struct */
@@ -117,6 +122,9 @@ struct pyobjc_api {
117
122
 
118
123
  PyObject* _Nullable (*_Nonnull createopaquepointertype)(const char*, const char*,
119
124
  const char*);
125
+ int (*_Nonnull register_functioncaller)(void*, PyObjC_FunctionCallFunc);
126
+ PyObject* _Nullable (*_Nonnull create_registered_struct)(
127
+ const char*, Py_ssize_t, const char* _Nonnull* _Nullable, Py_ssize_t*);
120
128
  };
121
129
 
122
130
  #ifndef PYOBJC_BUILD
@@ -159,6 +167,8 @@ static struct pyobjc_api* PyObjC_API;
159
167
  #define PyObjC_CheckArgCount (PyObjC_API->checkargcount)
160
168
  #define PyObjC_CheckNoKwnames (PyObjC_API->checknokwnames)
161
169
  #define PyObjCCreateOpaquePointerType (PyObjC_API->createopaquepointertype)
170
+ #define PyObjCRegister_FunctionCaller (PyObjC_API->register_functioncaller)
171
+ #define PyObjC_CreateRegisteredStruct (PyObjC_API->create_registered_struct)
162
172
 
163
173
  typedef void (*PyObjC_Function_Pointer)(void);
164
174
  typedef struct PyObjC_function_map {
@@ -178,21 +188,25 @@ static inline int
178
188
  PyObjC_ImportAPI(PyObject* calling_module)
179
189
  {
180
190
  PyObjC_API = (struct pyobjc_api*)PyCapsule_Import("objc." PYOBJC_API_NAME, 0);
181
- if (PyObjC_API == NULL) {
182
- return -1;
191
+ if (PyObjC_API == NULL) { // LCOV_BR_EXCL_LINE
192
+ return -1; // LCOV_EXCL_LINE
183
193
  }
184
- if (PyObjC_API->api_version != PYOBJC_API_VERSION) {
194
+ if (PyObjC_API->api_version != PYOBJC_API_VERSION) { // LCOV_BR_EXCL_LINE
195
+ // LCOV_EXCL_START
185
196
  PyErr_Format(PyExc_RuntimeError,
186
197
  "Wrong version of PyObjC C API (got %d, expected %d)",
187
198
  (int)PyObjC_API->api_version, (int)PYOBJC_API_VERSION);
188
199
  return -1;
200
+ // LCOV_EXCL_STOP
189
201
  }
190
202
 
191
- if (PyObjC_API->struct_len < PyObjC_EXPECTED_STRUCT_SIZE) {
203
+ if (PyObjC_API->struct_len < PyObjC_EXPECTED_STRUCT_SIZE) { // LCOV_EXCL_LINE
204
+ // LCOV_EXCL_START
192
205
  PyErr_Format(PyExc_RuntimeError,
193
206
  "Wrong struct-size of PyObjC C API (got %d, expected %d)",
194
207
  (int)PyObjC_API->struct_len, (int)sizeof(struct pyobjc_api));
195
208
  return -1;
209
+ // LCOV_EXCL_STOP
196
210
  }
197
211
 
198
212
  /* Current pyobjc implementation doesn't allow deregistering
@@ -167,24 +167,6 @@ _PyObjCTuple_GetItem(PyObject* tuple, Py_ssize_t idx)
167
167
  PyGILState_Release(_GILState); \
168
168
  } while (0)
169
169
 
170
- #if PY_VERSION_HEX < 0x030a0000
171
-
172
- static inline PyObject*
173
- Py_NewRef(PyObject* o)
174
- {
175
- Py_INCREF(o);
176
- return o;
177
- }
178
-
179
- static inline PyObject*
180
- Py_XNewRef(PyObject* o)
181
- {
182
- Py_XINCREF(o);
183
- return o;
184
- }
185
-
186
- #endif /* PY_VERSION_HEX < 0x030a0000 */
187
-
188
170
  #if PY_VERSION_HEX < 0x030d0000
189
171
  #define Py_BEGIN_CRITICAL_SECTION(value) \
190
172
  { \
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyobjc-framework-PhotosUI
3
- Version: 12.2.2
3
+ Version: 13.1
4
4
  Summary: Wrappers for the framework PhotosUI on macOS
5
5
  Home-page: https://github.com/ronaldoussoren/pyobjc
6
6
  Author: Ronald Oussoren
@@ -17,21 +17,21 @@ Classifier: Operating System :: MacOS :: MacOS X
17
17
  Classifier: Programming Language :: Python
18
18
  Classifier: Programming Language :: Python :: 3
19
19
  Classifier: Programming Language :: Python :: 3 :: Only
20
- Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
23
22
  Classifier: Programming Language :: Python :: 3.13
24
23
  Classifier: Programming Language :: Python :: 3.14
25
24
  Classifier: Programming Language :: Python :: 3.15
25
+ Classifier: Programming Language :: Python :: 3.16
26
26
  Classifier: Programming Language :: Python :: Implementation :: CPython
27
27
  Classifier: Programming Language :: Python :: Free Threading :: 3 - Stable
28
28
  Classifier: Programming Language :: Objective C
29
29
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
30
30
  Classifier: Topic :: Software Development :: User Interfaces
31
- Requires-Python: >=3.10
31
+ Requires-Python: >=3.11
32
32
  Description-Content-Type: text/x-rst; charset=UTF-8
33
- Requires-Dist: pyobjc-core>=12.2.2
34
- Requires-Dist: pyobjc-framework-Cocoa>=12.2.2
33
+ Requires-Dist: pyobjc-core>=13.1
34
+ Requires-Dist: pyobjc-framework-Cocoa>=13.1
35
35
  Dynamic: author
36
36
  Dynamic: author-email
37
37
  Dynamic: classifier
@@ -1,4 +1,4 @@
1
- from PyObjCTools.TestSupport import TestCase, min_os_level
1
+ from PyObjCTools.TestSupport import TestCase, min_sdk_level
2
2
  import PhotosUI
3
3
 
4
4
 
@@ -14,12 +14,11 @@ class TestPHContentEditingControllerHelper(PhotosUI.NSObject):
14
14
 
15
15
 
16
16
  class TestPHContentEditingController(TestCase):
17
- @min_os_level("10.11")
18
- def testProtocols(self):
19
- self.assertProtocolExists("PHContentEditingController")
17
+ @min_sdk_level("10.11")
18
+ def test_protocols(self):
19
+ self.assertProtocolExists("PHContentEditingController", PhotosUI)
20
20
 
21
- @min_os_level("10.11")
22
- def testMethods(self):
21
+ def test_protocol_methods(self):
23
22
  self.assertResultIsBOOL(
24
23
  TestPHContentEditingControllerHelper.canHandleAdjustmentData_
25
24
  )
@@ -15,26 +15,24 @@ class TestPHLivePhotoViewHelper(PhotosUI.NSObject):
15
15
 
16
16
 
17
17
  class TestPHLivePhotoView(TestCase):
18
- def test_enum_types(self):
19
- self.assertIsEnumType(PhotosUI.PHLivePhotoViewContentMode)
18
+ def test_enums(self):
20
19
  self.assertIsEnumType(PhotosUI.PHLivePhotoViewPlaybackStyle)
21
-
22
- def test_constants(self):
23
20
  self.assertEqual(PhotosUI.PHLivePhotoViewPlaybackStyleUndefined, 0)
24
21
  self.assertEqual(PhotosUI.PHLivePhotoViewPlaybackStyleFull, 1)
25
22
  self.assertEqual(PhotosUI.PHLivePhotoViewPlaybackStyleHint, 2)
26
23
 
24
+ self.assertIsEnumType(PhotosUI.PHLivePhotoViewContentMode)
27
25
  self.assertEqual(PhotosUI.PHLivePhotoViewContentModeAspectFit, 0)
28
26
  self.assertEqual(PhotosUI.PHLivePhotoViewContentModeAspectFill, 1)
29
27
 
30
28
  @min_os_level("10.12")
31
- def testMethods(self):
29
+ def test_methods(self):
32
30
  self.assertResultIsBOOL(PhotosUI.PHLivePhotoView.isMuted)
33
31
  self.assertArgIsBOOL(PhotosUI.PHLivePhotoView.setMuted_, 0)
34
32
  self.assertArgIsBOOL(PhotosUI.PHLivePhotoView.stopPlaybackAnimated_, 0)
35
33
 
36
34
  @min_sdk_level("10.12")
37
- def testProtocolMethods(self):
35
+ def test_protocol_methods(self):
38
36
  self.assertArgHasType(
39
37
  TestPHLivePhotoViewHelper.livePhotoView_willBeginPlaybackWithStyle_,
40
38
  1,
@@ -57,5 +55,5 @@ class TestPHLivePhotoView(TestCase):
57
55
  )
58
56
 
59
57
  @min_sdk_level("10.12")
60
- def testProtocols(self):
61
- self.assertProtocolExists("PHLivePhotoViewDelegate")
58
+ def test_protocols(self):
59
+ self.assertProtocolExists("PHLivePhotoViewDelegate", PhotosUI)
@@ -3,11 +3,11 @@ import PhotosUI
3
3
 
4
4
 
5
5
  class TestPhotosUITypes(TestCase):
6
- def test_typed_enum(self):
6
+ def test_typed_enums(self):
7
7
  self.assertIsTypedEnum(PhotosUI.PHProjectCategory, str)
8
8
 
9
9
  @min_os_level("10.13")
10
- def testConstants(self):
10
+ def test_constants(self):
11
11
  self.assertIsInstance(PhotosUI.PHProjectTypeUndefined, str)
12
12
 
13
13
  @min_os_level("10.14")
@@ -0,0 +1,12 @@
1
+ from PyObjCTools.TestSupport import TestCase
2
+ import PhotosUI
3
+
4
+
5
+ class TestPHPhotoUIError(TestCase):
6
+ def test_enums(self):
7
+ self.assertIsEnumType(PhotosUI.PHPhotosUIError)
8
+ self.assertEqual(PhotosUI.PHPhotosUIAssetCollectionNotFoundError, 1)
9
+ self.assertEqual(PhotosUI.PHPhotosUIAssetCollectionNotWritableError, 2)
10
+ self.assertEqual(PhotosUI.PHPhotosUIAssetCollectionCreationFailedError, 3)
11
+ self.assertEqual(PhotosUI.PHPhotosUISharedAlbumMigrationInProgressError, 100)
12
+ self.assertEqual(PhotosUI.PHPhotosUIICloudPhotosNotEnabledError, 101)
@@ -0,0 +1,76 @@
1
+ from PyObjCTools.TestSupport import TestCase, min_sdk_level, min_os_level
2
+ import PhotosUI
3
+
4
+
5
+ class TestPHPicker(TestCase):
6
+ def test_enums(self):
7
+ self.assertIsEnumType(PhotosUI.PHPickerConfigurationAssetRepresentationMode)
8
+ self.assertEqual(
9
+ PhotosUI.PHPickerConfigurationAssetRepresentationModeAutomatic, 0
10
+ )
11
+ self.assertEqual(
12
+ PhotosUI.PHPickerConfigurationAssetRepresentationModeCurrent, 1
13
+ )
14
+ self.assertEqual(
15
+ PhotosUI.PHPickerConfigurationAssetRepresentationModeCompatible, 2
16
+ )
17
+
18
+ self.assertIsEnumType(PhotosUI.PHPickerConfigurationSelection)
19
+ self.assertEqual(PhotosUI.PHPickerConfigurationSelectionDefault, 0)
20
+ self.assertEqual(PhotosUI.PHPickerConfigurationSelectionOrdered, 1)
21
+ self.assertEqual(PhotosUI.PHPickerConfigurationSelectionContinuous, 2)
22
+ self.assertEqual(PhotosUI.PHPickerConfigurationSelectionContinuousAndOrdered, 3)
23
+
24
+ self.assertIsEnumType(PhotosUI.PHPickerMode)
25
+ self.assertEqual(PhotosUI.PHPickerModeDefault, 0)
26
+ self.assertEqual(PhotosUI.PHPickerModeCompact, 1)
27
+
28
+ self.assertIsEnumType(PhotosUI.PHPickerCapabilities)
29
+ self.assertEqual(PhotosUI.PHPickerCapabilitiesNone, 0)
30
+ self.assertEqual(PhotosUI.PHPickerCapabilitiesSearch, 1 << 0)
31
+ self.assertEqual(PhotosUI.PHPickerCapabilitiesStagingArea, 1 << 1)
32
+ self.assertEqual(PhotosUI.PHPickerCapabilitiesCollectionNavigation, 1 << 2)
33
+ self.assertEqual(PhotosUI.PHPickerCapabilitiesSelectionActions, 1 << 3)
34
+ self.assertEqual(
35
+ PhotosUI.PHPickerCapabilitiesSensitivityAnalysisIntervention, 1 << 4
36
+ )
37
+ self.assertEqual(
38
+ PhotosUI.PHPickerCapabilitiesAutomaticModalInPresentation, 1 << 5
39
+ )
40
+ self.assertEqual(
41
+ PhotosUI.PHPickerCapabilitiesAutomaticPreferredContentSize, 1 << 6
42
+ )
43
+ self.assertEqual(PhotosUI.PHPickerCapabilitiesSidebar, 1 << 7)
44
+
45
+ self.assertIsEnumType(PhotosUI.PHPickerMetadataOptions)
46
+ self.assertEqual(PhotosUI.PHPickerMetadataOptionsNone, 0)
47
+ self.assertEqual(PhotosUI.PHPickerMetadataOptionsRemoveLocation, 1 << 0)
48
+ self.assertEqual(PhotosUI.PHPickerMetadataOptionsRemoveCaptions, 1 << 1)
49
+ self.assertEqual(
50
+ PhotosUI.PHPickerMetadataOptionsRemoveAppleReferenceImage, 1 << 2
51
+ )
52
+ self.assertEqual(PhotosUI.PHPickerMetadataOptionsRemoveKeywords, 1 << 3)
53
+
54
+ self.assertIsEnumType(PhotosUI.PHPickerResultThumbnailSize)
55
+ self.assertEqual(PhotosUI.PHPickerResultThumbnailSizeSmall, 1)
56
+ self.assertEqual(PhotosUI.PHPickerResultThumbnailSizeStandard, 2)
57
+
58
+ self.assertIsEnumType(PhotosUI.PHPickerSecondaryButtonType)
59
+ self.assertEqual(PhotosUI.PHPickerSecondaryButtonTypeAutomatic, 0)
60
+ self.assertEqual(PhotosUI.PHPickerSecondaryButtonTypeNone, 1)
61
+ self.assertEqual(PhotosUI.PHPickerSecondaryButtonTypeCancel, 2)
62
+ self.assertEqual(PhotosUI.PHPickerSecondaryButtonTypeBack, 3)
63
+ self.assertEqual(PhotosUI.PHPickerSecondaryButtonTypeClose, 4)
64
+ self.assertEqual(PhotosUI.PHPickerSecondaryButtonTypeClear, 5)
65
+
66
+ @min_os_level("27.3")
67
+ def test_methods(self):
68
+ self.assertArgIsBlock(
69
+ PhotosUI.PHPickerResult.requestThumbnailImageURLForPreferredSize_resultHandler_,
70
+ 1,
71
+ b"v@@",
72
+ )
73
+
74
+ @min_sdk_level("13.0")
75
+ def test_protocols(self):
76
+ self.assertProtocolExists("PHPickerViewControllerDelegate", PhotosUI)