├── README.md ├── .gitattributes ├── .gitignore ├── iOS-16_4 ├── iOSapi.AVFAudio.pas ├── iOSapi.CoreAudio.pas ├── README.md ├── iOSapi.AudioUnit.pas ├── iOSapi.MobileCoreServices.pas ├── iOSapi.AdSupport.pas ├── iOSapi.iAd.pas ├── iOSapi.Twitter.pas ├── iOSapi.NewsstandKit.pas ├── iOSapi.PushKit.pas ├── iOSapi.MediaToolbox.pas ├── iOSapi.OpenGLES.pas ├── iOSapi.MessageUI.pas ├── iOSapi.EventKitUI.pas ├── iOSapi.CoreAudioKit.pas ├── iOSapi.Social.pas ├── iOSapi.MediaAccessibility.pas ├── iOSapi.ExternalAccessory.pas └── iOSapi.Accounts.pas ├── iOSapi.IOKit.pas ├── iOSapi.AdSupport.pas ├── iOSapi.PhotosUI.pas ├── iOSapi.MediaToolbox.pas ├── iOSapi.Twitter.pas ├── iOSapi.NewsstandKit.pas ├── iOSapi.PushKit.pas ├── iOSapi.LocalAuthentication.pas ├── iOSapi.OpenGLES.pas ├── iOSapi.QuickLook.pas ├── iOSapi.SafariServices.pas ├── iOSapi.CoreAudioKit.pas ├── iOSapi.MessageUI.pas ├── iOSapi.EventKitUI.pas ├── iOSapi.ExternalAccessory.pas ├── iOSapi.Social.pas ├── iOSapi.MediaAccessibility.pas ├── iOSapi.AVKit.pas ├── iOSapi.CoreTelephony.pas └── iOSapi.Accounts.pas /README.md: -------------------------------------------------------------------------------- 1 | # ios-object-pascal-wrapper 2 | 3 | Translated with SDKTransform 22 using CLANG 3.3 against IOS 9.3 SDK frameworks. 4 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | 7 | # Standard to msysgit 8 | *.doc diff=astextplain 9 | *.DOC diff=astextplain 10 | *.docx diff=astextplain 11 | *.DOCX diff=astextplain 12 | *.dot diff=astextplain 13 | *.DOT diff=astextplain 14 | *.pdf diff=astextplain 15 | *.PDF diff=astextplain 16 | *.rtf diff=astextplain 17 | *.RTF diff=astextplain 18 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Windows image file caches 2 | Thumbs.db 3 | ehthumbs.db 4 | 5 | # Folder config file 6 | Desktop.ini 7 | 8 | # Recycle Bin used on file shares 9 | $RECYCLE.BIN/ 10 | 11 | # Windows Installer files 12 | *.cab 13 | *.msi 14 | *.msm 15 | *.msp 16 | 17 | # Windows shortcuts 18 | *.lnk 19 | 20 | # ========================= 21 | # Operating System Files 22 | # ========================= 23 | 24 | # OSX 25 | # ========================= 26 | 27 | .DS_Store 28 | .AppleDouble 29 | .LSOverride 30 | 31 | # Thumbnails 32 | ._* 33 | 34 | # Files that might appear in the root of a volume 35 | .DocumentRevisions-V100 36 | .fseventsd 37 | .Spotlight-V100 38 | .TemporaryItems 39 | .Trashes 40 | .VolumeIcon.icns 41 | 42 | # Directories potentially created on remote AFP share 43 | .AppleDB 44 | .AppleDesktop 45 | Network Trash Folder 46 | Temporary Items 47 | .apdisk 48 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.AVFAudio.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework AVFAudio 12 | // 13 | 14 | unit iOSapi.AVFAudio; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.Foundation; 27 | 28 | // ===== External functions ===== 29 | 30 | const 31 | libAVFAudio = '/System/Library/Frameworks/AVFAudio.framework/AVFAudio'; 32 | 33 | implementation 34 | 35 | {$IF defined(IOS) and NOT defined(CPUARM)} 36 | 37 | uses 38 | Posix.Dlfcn; 39 | 40 | var 41 | AVFAudioModule: THandle; 42 | 43 | {$ENDIF IOS} 44 | {$IF defined(IOS) and NOT defined(CPUARM)} 45 | 46 | initialization 47 | 48 | AVFAudioModule := dlopen(MarshaledAString(libAVFAudio), RTLD_LAZY); 49 | 50 | finalization 51 | 52 | dlclose(AVFAudioModule); 53 | {$ENDIF IOS} 54 | 55 | end. 56 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.CoreAudio.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework CoreAudio 12 | // 13 | 14 | unit iOSapi.CoreAudio; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.Foundation; 27 | 28 | // ===== External functions ===== 29 | 30 | const 31 | libCoreAudio = '/System/Library/Frameworks/CoreAudio.framework/CoreAudio'; 32 | 33 | implementation 34 | 35 | {$IF defined(IOS) and NOT defined(CPUARM)} 36 | 37 | uses 38 | Posix.Dlfcn; 39 | 40 | var 41 | CoreAudioModule: THandle; 42 | 43 | {$ENDIF IOS} 44 | {$IF defined(IOS) and NOT defined(CPUARM)} 45 | 46 | initialization 47 | 48 | CoreAudioModule := dlopen(MarshaledAString(libCoreAudio), RTLD_LAZY); 49 | 50 | finalization 51 | 52 | dlclose(CoreAudioModule); 53 | {$ENDIF IOS} 54 | 55 | end. 56 | -------------------------------------------------------------------------------- /iOSapi.IOKit.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework IOKit 12 | // 13 | 14 | unit iOSapi.IOKit; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.Foundation; 29 | 30 | // ===== External functions ===== 31 | 32 | const 33 | libIOKit = '/System/Library/Frameworks/IOKit.framework/IOKit'; 34 | 35 | implementation 36 | 37 | {$IF defined(IOS) and NOT defined(CPUARM)} 38 | 39 | uses 40 | Posix.Dlfcn; 41 | 42 | var 43 | IOKitModule: THandle; 44 | 45 | {$ENDIF IOS} 46 | {$IF defined(IOS) and NOT defined(CPUARM)} 47 | 48 | initialization 49 | 50 | IOKitModule := dlopen(MarshaledAString(libIOKit), RTLD_LAZY); 51 | 52 | finalization 53 | 54 | dlclose(IOKitModule); 55 | {$ENDIF IOS} 56 | 57 | end. 58 | -------------------------------------------------------------------------------- /iOS-16_4/README.md: -------------------------------------------------------------------------------- 1 | # iPhoneOS 16.4 Pascal wrapper 2 | 3 | Imported with SDKTransform from RAD Studio 11.3 Alexandria and [SDKTransform Assistant](https://github.com/DeveloppeurPascal/delphi-sdktransform/tree/master/SDKTransformAssistant). 4 | 5 | iOS 16.4 was bind into Xcode 13.4.1 (june 2023). 6 | 7 | Those frameworks have been added with the path $(SDKROOT)/System/Library/Frameworks to the default RAD Studio iOS SDK frameworks list : 8 | 9 | Accounts 10 | AudioUnit 11 | AVKit 12 | CloudKit 13 | CoreAudioKit 14 | CoreBluetooth 15 | CoreData 16 | CoreMotion 17 | EventKit 18 | EventKitUI 19 | ExternalAccessory 20 | GameController 21 | GameKit 22 | GSS 23 | HealthKit 24 | HomeKit 25 | IOKit 26 | MediaAccessibility 27 | MultipeerConnectivity 28 | NetworkExtension 29 | NewsstandKit 30 | OpenAL 31 | PassKit 32 | Photos 33 | PhotosUI 34 | PushKit 35 | QuickLook 36 | SceneKit 37 | Social 38 | SpriteKit 39 | Twitter 40 | VideoToolbox 41 | 42 | Add the ones you need to your iPhoneOS or iPhoneSimulator SDK and refresh the files in Tools / Options / Deployment / SDK Manager. 43 | 44 | Before using a "fresh" API in a program, don't forget to check Apple documentation and add a test of current i(Pad)OS version to prevent app crashes by using too recent API. 45 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.AudioUnit.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework AudioUnit 12 | // 13 | 14 | unit iOSapi.AudioUnit; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.Foundation, 27 | iOSapi.UIKit; 28 | 29 | // ===== External functions ===== 30 | 31 | const 32 | libAudioUnit = '/System/Library/Frameworks/AudioUnit.framework/AudioUnit'; 33 | 34 | implementation 35 | 36 | {$IF defined(IOS) and NOT defined(CPUARM)} 37 | 38 | uses 39 | Posix.Dlfcn; 40 | 41 | var 42 | AudioUnitModule: THandle; 43 | 44 | {$ENDIF IOS} 45 | {$IF defined(IOS) and NOT defined(CPUARM)} 46 | 47 | initialization 48 | 49 | AudioUnitModule := dlopen(MarshaledAString(libAudioUnit), RTLD_LAZY); 50 | 51 | finalization 52 | 53 | dlclose(AudioUnitModule); 54 | {$ENDIF IOS} 55 | 56 | end. 57 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.MobileCoreServices.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework MobileCoreServices 12 | // 13 | 14 | unit iOSapi.MobileCoreServices; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.Foundation; 27 | 28 | // ===== External functions ===== 29 | 30 | const 31 | libMobileCoreServices = 32 | '/System/Library/Frameworks/MobileCoreServices.framework/MobileCoreServices'; 33 | 34 | implementation 35 | 36 | {$IF defined(IOS) and NOT defined(CPUARM)} 37 | 38 | uses 39 | Posix.Dlfcn; 40 | 41 | var 42 | MobileCoreServicesModule: THandle; 43 | 44 | {$ENDIF IOS} 45 | {$IF defined(IOS) and NOT defined(CPUARM)} 46 | 47 | initialization 48 | 49 | MobileCoreServicesModule := dlopen(MarshaledAString(libMobileCoreServices), 50 | RTLD_LAZY); 51 | 52 | finalization 53 | 54 | dlclose(MobileCoreServicesModule); 55 | {$ENDIF IOS} 56 | 57 | end. 58 | -------------------------------------------------------------------------------- /iOSapi.AdSupport.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework AdSupport 12 | // 13 | 14 | unit iOSapi.AdSupport; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.Foundation; 29 | 30 | type 31 | 32 | // ===== Forward declarations ===== 33 | {$M+} 34 | ASIdentifierManager = interface; 35 | 36 | // ===== Interface declarations ===== 37 | 38 | ASIdentifierManagerClass = interface(NSObjectClass) 39 | ['{7FDE511A-AD7C-4218-A85C-AA4A3B45913B}'] 40 | { class } function sharedManager: ASIdentifierManager; cdecl; 41 | end; 42 | 43 | ASIdentifierManager = interface(NSObject) 44 | ['{DF6B7B58-B8A4-4672-9552-C61786F0DAAE}'] 45 | function advertisingIdentifier: NSUUID; cdecl; 46 | function isAdvertisingTrackingEnabled: Boolean; cdecl; 47 | end; 48 | 49 | TASIdentifierManager = class(TOCGenericImport) 51 | end; 52 | 53 | PASIdentifierManager = Pointer; 54 | 55 | // ===== External functions ===== 56 | 57 | const 58 | libAdSupport = '/System/Library/Frameworks/AdSupport.framework/AdSupport'; 59 | 60 | implementation 61 | 62 | {$IF defined(IOS) and NOT defined(CPUARM)} 63 | 64 | uses 65 | Posix.Dlfcn; 66 | 67 | var 68 | AdSupportModule: THandle; 69 | 70 | {$ENDIF IOS} 71 | {$IF defined(IOS) and NOT defined(CPUARM)} 72 | 73 | initialization 74 | 75 | AdSupportModule := dlopen(MarshaledAString(libAdSupport), RTLD_LAZY); 76 | 77 | finalization 78 | 79 | dlclose(AdSupportModule); 80 | {$ENDIF IOS} 81 | 82 | end. 83 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.AdSupport.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework AdSupport 12 | // 13 | 14 | unit iOSapi.AdSupport; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.Foundation; 27 | 28 | type 29 | 30 | // ===== Forward declarations ===== 31 | {$M+} 32 | ASIdentifierManager = interface; 33 | 34 | // ===== Interface declarations ===== 35 | 36 | ASIdentifierManagerClass = interface(NSObjectClass) 37 | ['{04B5015E-27EC-4314-9847-3E4F54B2A98C}'] 38 | { class } function sharedManager: ASIdentifierManager; cdecl; 39 | end; 40 | 41 | ASIdentifierManager = interface(NSObject) 42 | ['{D547E829-78D3-4E7E-A49C-C941814158D7}'] 43 | function advertisingIdentifier: NSUUID; cdecl; 44 | function isAdvertisingTrackingEnabled: Boolean; cdecl; 45 | procedure clearAdvertisingIdentifier; cdecl; 46 | end; 47 | 48 | TASIdentifierManager = class(TOCGenericImport) 50 | end; 51 | 52 | PASIdentifierManager = Pointer; 53 | 54 | // ===== External functions ===== 55 | 56 | const 57 | libAdSupport = '/System/Library/Frameworks/AdSupport.framework/AdSupport'; 58 | 59 | implementation 60 | 61 | {$IF defined(IOS) and NOT defined(CPUARM)} 62 | 63 | uses 64 | Posix.Dlfcn; 65 | 66 | var 67 | AdSupportModule: THandle; 68 | 69 | {$ENDIF IOS} 70 | {$IF defined(IOS) and NOT defined(CPUARM)} 71 | 72 | initialization 73 | 74 | AdSupportModule := dlopen(MarshaledAString(libAdSupport), RTLD_LAZY); 75 | 76 | finalization 77 | 78 | dlclose(AdSupportModule); 79 | {$ENDIF IOS} 80 | 81 | end. 82 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.iAd.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework iAd 12 | // 13 | 14 | unit iOSapi.iAd; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.Foundation; 27 | 28 | const 29 | ADClientErrorUnknown = 0; 30 | ADClientErrorTrackingRestrictedOrDenied = 1; 31 | ADClientErrorLimitAdTracking = ADClientErrorTrackingRestrictedOrDenied; 32 | ADClientErrorMissingData = 2; 33 | ADClientErrorCorruptResponse = 3; 34 | ADClientErrorRequestClientError = 4; 35 | ADClientErrorRequestServerError = 5; 36 | ADClientErrorRequestNetworkError = 6; 37 | ADClientErrorUnsupportedPlatform = 7; 38 | 39 | type 40 | 41 | // ===== Forward declarations ===== 42 | {$M+} 43 | ADClient = interface; 44 | 45 | // ===== Framework typedefs ===== 46 | {$M+} 47 | NSInteger = Integer; 48 | PNSInteger = ^NSInteger; 49 | 50 | ADClientError = NSInteger; 51 | TiAdCompletionHandler = procedure(param1: NSDictionary; param2: NSError) 52 | of object; 53 | // ===== Interface declarations ===== 54 | 55 | ADClientClass = interface(NSObjectClass) 56 | ['{EF561626-C23D-4FA9-9A55-74A2794C905B}'] 57 | { class } function sharedClient: ADClient; cdecl; 58 | end; 59 | 60 | ADClient = interface(NSObject) 61 | ['{CE82872D-36A2-4927-A868-6C263B4AC84A}'] 62 | procedure requestAttributionDetailsWithBlock(completionHandler 63 | : TiAdCompletionHandler); cdecl; 64 | procedure addClientToSegments(segmentIdentifiers: NSArray; 65 | replaceExisting: Boolean); cdecl; 66 | end; 67 | 68 | TADClient = class(TOCGenericImport) 69 | end; 70 | 71 | PADClient = Pointer; 72 | 73 | // ===== Exported string consts ===== 74 | 75 | function ADClientErrorDomain: NSString; 76 | function __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_15_0: Pointer; 77 | 78 | 79 | // ===== External functions ===== 80 | 81 | const 82 | libiAd = '/System/Library/Frameworks/iAd.framework/iAd'; 83 | 84 | implementation 85 | 86 | {$IF defined(IOS) and NOT defined(CPUARM)} 87 | 88 | uses 89 | Posix.Dlfcn; 90 | 91 | var 92 | iAdModule: THandle; 93 | 94 | {$ENDIF IOS} 95 | 96 | function ADClientErrorDomain: NSString; 97 | begin 98 | Result := CocoaNSStringConst(libiAd, 'ADClientErrorDomain'); 99 | end; 100 | 101 | function __AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_15_0: Pointer; 102 | begin 103 | Result := CocoaPointerConst(libiAd, 104 | '__AVAILABILITY_INTERNAL__IPHONE_7_1_DEP__IPHONE_15_0'); 105 | end; 106 | 107 | {$IF defined(IOS) and NOT defined(CPUARM)} 108 | 109 | initialization 110 | 111 | iAdModule := dlopen(MarshaledAString(libiAd), RTLD_LAZY); 112 | 113 | finalization 114 | 115 | dlclose(iAdModule); 116 | {$ENDIF IOS} 117 | 118 | end. 119 | -------------------------------------------------------------------------------- /iOSapi.PhotosUI.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework PhotosUI 12 | // 13 | 14 | unit iOSapi.PhotosUI; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.Foundation, 29 | iOSapi.Photos, 30 | iOSapi.UIKit; 31 | 32 | const 33 | PHLivePhotoBadgeOptionsOverContent = 1 shl 0; 34 | PHLivePhotoBadgeOptionsLiveOff = 1 shl 1; 35 | PHLivePhotoViewPlaybackStyleUndefined = 0; 36 | PHLivePhotoViewPlaybackStyleFull = 1; 37 | PHLivePhotoViewPlaybackStyleHint = 2; 38 | 39 | type 40 | 41 | // ===== Forward declarations ===== 42 | {$M+} 43 | PHContentEditingController = interface; 44 | PHLivePhotoViewDelegate = interface; 45 | PHLivePhotoView = interface; 46 | 47 | // ===== Framework typedefs ===== 48 | {$M+} 49 | TPhotosUICompletionHandler = procedure(param1: PHContentEditingOutput) 50 | of object; 51 | NSUInteger = Cardinal; 52 | PHLivePhotoBadgeOptions = NSUInteger; 53 | NSInteger = Integer; 54 | PHLivePhotoViewPlaybackStyle = NSInteger; 55 | // ===== Interface declarations ===== 56 | 57 | PHLivePhotoViewClass = interface(UIViewClass) 58 | ['{27503C3A-CCFF-4050-94CE-43E5D90C90D0}'] 59 | { class } function livePhotoBadgeImageWithOptions 60 | (badgeOptions: PHLivePhotoBadgeOptions): UIImage; cdecl; 61 | end; 62 | 63 | PHLivePhotoView = interface(UIView) 64 | ['{91F057A9-55FA-46CE-9B0C-91C33B3A8858}'] 65 | procedure setDelegate(delegate: Pointer); cdecl; 66 | function delegate: Pointer; cdecl; 67 | procedure setLivePhoto(livePhoto: PHLivePhoto); cdecl; 68 | function livePhoto: PHLivePhoto; cdecl; 69 | procedure setMuted(muted: Boolean); cdecl; 70 | function isMuted: Boolean; cdecl; 71 | function playbackGestureRecognizer: UIGestureRecognizer; cdecl; 72 | procedure startPlaybackWithStyle(playbackStyle 73 | : PHLivePhotoViewPlaybackStyle); cdecl; 74 | procedure stopPlayback; cdecl; 75 | end; 76 | 77 | TPHLivePhotoView = class(TOCGenericImport) 79 | end; 80 | 81 | PPHLivePhotoView = Pointer; 82 | 83 | // ===== Protocol declarations ===== 84 | 85 | PHContentEditingController = interface(IObjectiveC) 86 | ['{1E07EA30-0E2F-4FEE-873F-7FFC65DDB3F3}'] 87 | function canHandleAdjustmentData(adjustmentData: PHAdjustmentData) 88 | : Boolean; cdecl; 89 | procedure startContentEditingWithInput(contentEditingInput 90 | : PHContentEditingInput; placeholderImage: UIImage); cdecl; 91 | procedure finishContentEditingWithCompletionHandler(completionHandler 92 | : TPhotosUICompletionHandler); cdecl; 93 | procedure cancelContentEditing; cdecl; 94 | function shouldShowCancelConfirmation: Boolean; cdecl; 95 | end; 96 | 97 | PHLivePhotoViewDelegate = interface(IObjectiveC) 98 | ['{55CB9CA4-0D09-4C93-B9E1-76F0469AACC2}'] 99 | [MethodName('livePhotoView:willBeginPlaybackWithStyle:')] 100 | procedure livePhotoViewWillBeginPlaybackWithStyle(livePhotoView 101 | : PHLivePhotoView; willBeginPlaybackWithStyle 102 | : PHLivePhotoViewPlaybackStyle); cdecl; 103 | [MethodName('livePhotoView:didEndPlaybackWithStyle:')] 104 | procedure livePhotoViewDidEndPlaybackWithStyle(livePhotoView 105 | : PHLivePhotoView; didEndPlaybackWithStyle 106 | : PHLivePhotoViewPlaybackStyle); cdecl; 107 | end; 108 | 109 | // ===== External functions ===== 110 | 111 | const 112 | libPhotosUI = '/System/Library/Frameworks/PhotosUI.framework/PhotosUI'; 113 | 114 | implementation 115 | 116 | {$IF defined(IOS) and NOT defined(CPUARM)} 117 | 118 | uses 119 | Posix.Dlfcn; 120 | 121 | var 122 | PhotosUIModule: THandle; 123 | 124 | {$ENDIF IOS} 125 | {$IF defined(IOS) and NOT defined(CPUARM)} 126 | 127 | initialization 128 | 129 | PhotosUIModule := dlopen(MarshaledAString(libPhotosUI), RTLD_LAZY); 130 | 131 | finalization 132 | 133 | dlclose(PhotosUIModule); 134 | {$ENDIF IOS} 135 | 136 | end. 137 | -------------------------------------------------------------------------------- /iOSapi.MediaToolbox.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework MediaToolbox 12 | // 13 | 14 | unit iOSapi.MediaToolbox; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.CoreAudio, 29 | iOSapi.CoreMedia, 30 | iOSapi.Foundation; 31 | 32 | const 33 | kMTAudioProcessingTapCreationFlag_PreEffects = (1 shl 0); 34 | kMTAudioProcessingTapCreationFlag_PostEffects = (1 shl 1); 35 | kMTAudioProcessingTapFlag_StartOfStream = (1 shl 8); 36 | kMTAudioProcessingTapFlag_EndOfStream = (1 shl 9); 37 | kMTAudioProcessingTapCallbacksVersion_0 = 0; 38 | 39 | type 40 | // ===== Framework typedefs ===== 41 | {$M+} 42 | MTAudioProcessingTapRef = Pointer; 43 | CFTypeID = LongWord; 44 | MTAudioProcessingTapCreationFlags = LongWord; 45 | MTAudioProcessingTapFlags = LongWord; 46 | MTAudioProcessingTapInitCallback = procedure(param1: MTAudioProcessingTapRef; 47 | param2: Pointer; param3: Pointer); cdecl; 48 | MTAudioProcessingTapFinalizeCallback = procedure 49 | (param1: MTAudioProcessingTapRef); cdecl; 50 | CMItemCount = LongInt; 51 | MTAudioProcessingTapPrepareCallback = procedure 52 | (param1: MTAudioProcessingTapRef; param2: CMItemCount; 53 | param3: Pointer); cdecl; 54 | MTAudioProcessingTapUnprepareCallback = procedure 55 | (param1: MTAudioProcessingTapRef); cdecl; 56 | MTAudioProcessingTapProcessCallback = procedure 57 | (param1: MTAudioProcessingTapRef; param2: CMItemCount; 58 | param3: MTAudioProcessingTapFlags; param4: Pointer; param5: PLongInt; 59 | param6: PLongWord); cdecl; 60 | 61 | MTAudioProcessingTapCallbacks = record 62 | version: Integer; 63 | clientInfo: Pointer; 64 | init: MTAudioProcessingTapInitCallback; 65 | finalize: MTAudioProcessingTapFinalizeCallback; 66 | prepare: MTAudioProcessingTapPrepareCallback; 67 | unprepare: MTAudioProcessingTapUnprepareCallback; 68 | process: MTAudioProcessingTapProcessCallback; 69 | end; 70 | 71 | PMTAudioProcessingTapCallbacks = ^MTAudioProcessingTapCallbacks; 72 | 73 | CFAllocatorRef = Pointer; 74 | OSStatus = Int32; 75 | FourCharCode = UInt32; 76 | CMMediaType = FourCharCode; 77 | CFStringRef = Pointer; 78 | // ===== External functions ===== 79 | 80 | const 81 | libMediaToolbox = 82 | '/System/Library/Frameworks/MediaToolbox.framework/MediaToolbox'; 83 | function MTAudioProcessingTapGetTypeID: CFTypeID; cdecl; 84 | external libMediaToolbox name _PU + 'MTAudioProcessingTapGetTypeID'; 85 | function MTAudioProcessingTapCreate(allocator: CFAllocatorRef; 86 | callbacks: Pointer; flags: MTAudioProcessingTapCreationFlags; tapOut: Pointer) 87 | : OSStatus; cdecl; external libMediaToolbox name _PU + 88 | 'MTAudioProcessingTapCreate'; 89 | function MTAudioProcessingTapGetStorage(tap: MTAudioProcessingTapRef): Pointer; 90 | cdecl; external libMediaToolbox name _PU + 'MTAudioProcessingTapGetStorage'; 91 | function MTAudioProcessingTapGetSourceAudio(tap: MTAudioProcessingTapRef; 92 | numberFrames: CMItemCount; bufferListInOut: Pointer; flagsOut: PLongWord; 93 | timeRangeOut: Pointer; numberFramesOut: PLongInt): OSStatus; cdecl; 94 | external libMediaToolbox name _PU + 'MTAudioProcessingTapGetSourceAudio'; 95 | function MTCopyLocalizedNameForMediaType(mediaType: CMMediaType): CFStringRef; 96 | cdecl; external libMediaToolbox name _PU + 'MTCopyLocalizedNameForMediaType'; 97 | function MTCopyLocalizedNameForMediaSubType(mediaType: CMMediaType; 98 | mediaSubType: FourCharCode): CFStringRef; cdecl; 99 | external libMediaToolbox name _PU + 'MTCopyLocalizedNameForMediaSubType'; 100 | 101 | implementation 102 | 103 | {$IF defined(IOS) and NOT defined(CPUARM)} 104 | 105 | uses 106 | Posix.Dlfcn; 107 | 108 | var 109 | MediaToolboxModule: THandle; 110 | 111 | {$ENDIF IOS} 112 | {$IF defined(IOS) and NOT defined(CPUARM)} 113 | 114 | initialization 115 | 116 | MediaToolboxModule := dlopen(MarshaledAString(libMediaToolbox), RTLD_LAZY); 117 | 118 | finalization 119 | 120 | dlclose(MediaToolboxModule); 121 | {$ENDIF IOS} 122 | 123 | end. 124 | -------------------------------------------------------------------------------- /iOSapi.Twitter.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework Twitter 12 | // 13 | 14 | unit iOSapi.Twitter; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.Accounts, 28 | iOSapi.CocoaTypes, 29 | iOSapi.Foundation, 30 | iOSapi.Social, 31 | iOSapi.UIKit; 32 | 33 | const 34 | TWRequestMethodGET = SLRequestMethodGET; 35 | TWRequestMethodPOST = SLRequestMethodPOST; 36 | TWRequestMethodDELETE = SLRequestMethodDELETE; 37 | TWTweetComposeViewControllerResultCancelled = 38 | SLComposeViewControllerResultCancelled; 39 | TWTweetComposeViewControllerResultDone = SLComposeViewControllerResultDone; 40 | 41 | type 42 | 43 | // ===== Forward declarations ===== 44 | {$M+} 45 | TWRequest = interface; 46 | TWTweetComposeViewController = interface; 47 | 48 | // ===== Framework typedefs ===== 49 | {$M+} 50 | NSInteger = Integer; 51 | SLRequestMethod = NSInteger; 52 | TWRequestMethod = SLRequestMethod; 53 | SLRequestHandler = procedure(param1: NSData; param2: NSHTTPURLResponse; 54 | param3: NSError) of object; 55 | TWRequestHandler = SLRequestHandler; 56 | SLComposeViewControllerResult = NSInteger; 57 | TWTweetComposeViewControllerResult = SLComposeViewControllerResult; 58 | SLComposeViewControllerCompletionHandler = procedure 59 | (param1: SLComposeViewControllerResult) of object; 60 | TWTweetComposeViewControllerCompletionHandler = 61 | SLComposeViewControllerCompletionHandler; 62 | // ===== Interface declarations ===== 63 | 64 | TWRequestClass = interface(NSObjectClass) 65 | ['{5BC53F4A-66E0-4178-A352-DF3B7FF01416}'] 66 | end; 67 | 68 | TWRequest = interface(NSObject) 69 | ['{1C968E2E-0CA2-44CC-97B0-7C19EF5C6BD4}'] 70 | function initWithURL(url: NSURL; parameters: NSDictionary; 71 | requestMethod: TWRequestMethod): Pointer; cdecl; 72 | procedure setAccount(account: ACAccount); cdecl; 73 | function account: ACAccount; cdecl; 74 | function requestMethod: TWRequestMethod; cdecl; 75 | function url: NSURL; cdecl; 76 | function parameters: NSDictionary; cdecl; 77 | procedure addMultiPartData(data: NSData; withName: NSString; 78 | &type: NSString); cdecl; 79 | function signedURLRequest: NSURLRequest; cdecl; 80 | procedure performRequestWithHandler(handler: TWRequestHandler); cdecl; 81 | end; 82 | 83 | TTWRequest = class(TOCGenericImport) 84 | end; 85 | 86 | PTWRequest = Pointer; 87 | 88 | TWTweetComposeViewControllerClass = interface(UIViewControllerClass) 89 | ['{CAEDF7B8-3434-4025-968C-D74C97207A07}'] 90 | { class } function canSendTweet: Boolean; cdecl; 91 | end; 92 | 93 | TWTweetComposeViewController = interface(UIViewController) 94 | ['{3CAD83D4-171D-446E-AF39-DABF79C46B35}'] 95 | function setInitialText(text: NSString): Boolean; cdecl; 96 | function addImage(image: UIImage): Boolean; cdecl; 97 | function removeAllImages: Boolean; cdecl; 98 | function addURL(url: NSURL): Boolean; cdecl; 99 | function removeAllURLs: Boolean; cdecl; 100 | procedure setCompletionHandler(completionHandler 101 | : TWTweetComposeViewControllerCompletionHandler); cdecl; 102 | function completionHandler 103 | : TWTweetComposeViewControllerCompletionHandler; cdecl; 104 | end; 105 | 106 | TTWTweetComposeViewController = class 107 | (TOCGenericImport) 109 | end; 110 | 111 | PTWTweetComposeViewController = Pointer; 112 | 113 | // ===== External functions ===== 114 | 115 | const 116 | libTwitter = '/System/Library/Frameworks/Twitter.framework/Twitter'; 117 | 118 | implementation 119 | 120 | {$IF defined(IOS) and NOT defined(CPUARM)} 121 | 122 | uses 123 | Posix.Dlfcn; 124 | 125 | var 126 | TwitterModule: THandle; 127 | 128 | {$ENDIF IOS} 129 | {$IF defined(IOS) and NOT defined(CPUARM)} 130 | 131 | initialization 132 | 133 | TwitterModule := dlopen(MarshaledAString(libTwitter), RTLD_LAZY); 134 | 135 | finalization 136 | 137 | dlclose(TwitterModule); 138 | {$ENDIF IOS} 139 | 140 | end. 141 | -------------------------------------------------------------------------------- /iOSapi.NewsstandKit.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework NewsstandKit 12 | // 13 | 14 | unit iOSapi.NewsstandKit; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.Foundation; 29 | 30 | const 31 | NKIssueContentStatusNone = 0; 32 | NKIssueContentStatusDownloading = 1; 33 | NKIssueContentStatusAvailable = 2; 34 | 35 | type 36 | 37 | // ===== Forward declarations ===== 38 | {$M+} 39 | NKIssue = interface; 40 | NKAssetDownload = interface; 41 | NKLibrary = interface; 42 | NKAssetDownloadAdditions = interface; 43 | 44 | // ===== Framework typedefs ===== 45 | {$M+} 46 | NSInteger = Integer; 47 | NKIssueContentStatus = NSInteger; 48 | // ===== Interface declarations ===== 49 | 50 | NKIssueClass = interface(NSObjectClass) 51 | ['{C970D91A-0681-48F7-8A8A-30C4006807E2}'] 52 | end; 53 | 54 | NKIssue = interface(NSObject) 55 | ['{ECF5C8AD-3FC3-4C11-87D5-03E680F3DF71}'] 56 | function downloadingAssets: NSArray; cdecl; 57 | function contentURL: NSURL; cdecl; 58 | function status: NKIssueContentStatus; cdecl; 59 | function name: NSString; cdecl; 60 | function date: NSDate; cdecl; 61 | function addAssetWithRequest(request: NSURLRequest): NKAssetDownload; cdecl; 62 | end; 63 | 64 | TNKIssue = class(TOCGenericImport) 65 | end; 66 | 67 | PNKIssue = Pointer; 68 | 69 | NKAssetDownloadClass = interface(NSObjectClass) 70 | ['{5BB85842-6154-4EB0-AEF6-5218A1F5BB26}'] 71 | end; 72 | 73 | NKAssetDownload = interface(NSObject) 74 | ['{7ED0D4AF-6228-4F77-9617-F4227325843D}'] 75 | function issue: NKIssue; cdecl; 76 | function identifier: NSString; cdecl; 77 | procedure setUserInfo(userInfo: NSDictionary); cdecl; 78 | function userInfo: NSDictionary; cdecl; 79 | function URLRequest: NSURLRequest; cdecl; 80 | function downloadWithDelegate(delegate: Pointer): NSURLConnection; cdecl; 81 | end; 82 | 83 | TNKAssetDownload = class(TOCGenericImport) 85 | end; 86 | 87 | PNKAssetDownload = Pointer; 88 | 89 | NKLibraryClass = interface(NSObjectClass) 90 | ['{240B1757-0555-45AB-A62B-2B672E8E997A}'] 91 | { class } function sharedLibrary: NKLibrary; cdecl; 92 | end; 93 | 94 | NKLibrary = interface(NSObject) 95 | ['{6B64BA48-5607-47AF-A0C4-8F71F1AD2AB1}'] 96 | function issues: NSArray; cdecl; 97 | function downloadingAssets: NSArray; cdecl; 98 | procedure setCurrentlyReadingIssue(currentlyReadingIssue: NKIssue); cdecl; 99 | function currentlyReadingIssue: NKIssue; cdecl; 100 | function issueWithName(name: NSString): NKIssue; cdecl; 101 | function addIssueWithName(name: NSString; date: NSDate): NKIssue; cdecl; 102 | procedure removeIssue(issue: NKIssue); cdecl; 103 | end; 104 | 105 | TNKLibrary = class(TOCGenericImport) 106 | end; 107 | 108 | PNKLibrary = Pointer; 109 | 110 | NKAssetDownloadAdditions = interface(IObjectiveC) 111 | ['{87ECE995-B2B3-4437-9EF1-9C2F2EBE0735}'] 112 | function newsstandAssetDownload: NKAssetDownload; cdecl; 113 | end; 114 | 115 | // ===== Exported string consts ===== 116 | 117 | function NKIssueDownloadCompletedNotification: NSString; 118 | 119 | 120 | // ===== External functions ===== 121 | 122 | const 123 | libNewsstandKit = 124 | '/System/Library/Frameworks/NewsstandKit.framework/NewsstandKit'; 125 | 126 | implementation 127 | 128 | {$IF defined(IOS) and NOT defined(CPUARM)} 129 | 130 | uses 131 | Posix.Dlfcn; 132 | 133 | var 134 | NewsstandKitModule: THandle; 135 | 136 | {$ENDIF IOS} 137 | 138 | function NKIssueDownloadCompletedNotification: NSString; 139 | begin 140 | Result := CocoaNSStringConst(libNewsstandKit, 141 | 'NKIssueDownloadCompletedNotification'); 142 | end; 143 | 144 | {$IF defined(IOS) and NOT defined(CPUARM)} 145 | 146 | initialization 147 | 148 | NewsstandKitModule := dlopen(MarshaledAString(libNewsstandKit), RTLD_LAZY); 149 | 150 | finalization 151 | 152 | dlclose(NewsstandKitModule); 153 | {$ENDIF IOS} 154 | 155 | end. 156 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.Twitter.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework Twitter 12 | // 13 | 14 | unit iOSapi.Twitter; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.Accounts, 26 | iOSapi.CocoaTypes, 27 | iOSapi.Foundation, 28 | iOSapi.Social, 29 | iOSapi.UIKit; 30 | 31 | const 32 | TWRequestMethodGET = SLRequestMethodGET; 33 | TWRequestMethodPOST = SLRequestMethodPOST; 34 | TWRequestMethodDELETE = SLRequestMethodDELETE; 35 | TWTweetComposeViewControllerResultCancelled = 36 | SLComposeViewControllerResultCancelled; 37 | TWTweetComposeViewControllerResultDone = SLComposeViewControllerResultDone; 38 | 39 | type 40 | 41 | // ===== Forward declarations ===== 42 | {$M+} 43 | TWRequest = interface; 44 | TWTweetComposeViewController = interface; 45 | 46 | // ===== Framework typedefs ===== 47 | {$M+} 48 | NSInteger = Integer; 49 | PNSInteger = ^NSInteger; 50 | 51 | SLRequestMethod = NSInteger; 52 | TWRequestMethod = SLRequestMethod; 53 | PTWRequestMethod = ^TWRequestMethod; 54 | SLRequestHandler = procedure(param1: NSData; param2: NSHTTPURLResponse; 55 | param3: NSError) of object; 56 | TWRequestHandler = SLRequestHandler; 57 | SLComposeViewControllerResult = NSInteger; 58 | TWTweetComposeViewControllerResult = SLComposeViewControllerResult; 59 | PTWTweetComposeViewControllerResult = ^TWTweetComposeViewControllerResult; 60 | SLComposeViewControllerCompletionHandler = procedure 61 | (param1: SLComposeViewControllerResult) of object; 62 | TWTweetComposeViewControllerCompletionHandler = 63 | SLComposeViewControllerCompletionHandler; 64 | // ===== Interface declarations ===== 65 | 66 | TWRequestClass = interface(NSObjectClass) 67 | ['{D198AB62-03BF-4E9F-A13F-EC9680F7EAAA}'] 68 | end; 69 | 70 | TWRequest = interface(NSObject) 71 | ['{64CCDA81-A654-4CDE-8257-942FB9ECF987}'] 72 | function initWithURL(url: NSURL; parameters: NSDictionary; 73 | requestMethod: TWRequestMethod): Pointer; cdecl; 74 | procedure setAccount(account: ACAccount); cdecl; 75 | function account: ACAccount; cdecl; 76 | function requestMethod: TWRequestMethod; cdecl; 77 | function url: NSURL; cdecl; 78 | function parameters: NSDictionary; cdecl; 79 | procedure addMultiPartData(data: NSData; withName: NSString; 80 | &type: NSString); cdecl; 81 | function signedURLRequest: NSURLRequest; cdecl; 82 | procedure performRequestWithHandler(handler: TWRequestHandler); cdecl; 83 | end; 84 | 85 | TTWRequest = class(TOCGenericImport) 86 | end; 87 | 88 | PTWRequest = Pointer; 89 | 90 | TWTweetComposeViewControllerClass = interface(UIViewControllerClass) 91 | ['{9C87FD42-3D64-4CE0-B391-25491CE33334}'] 92 | { class } function canSendTweet: Boolean; cdecl; 93 | end; 94 | 95 | TWTweetComposeViewController = interface(UIViewController) 96 | ['{8AD00FDF-7D3E-44BD-93E9-50C925F68215}'] 97 | function setInitialText(text: NSString): Boolean; cdecl; 98 | function addImage(image: UIImage): Boolean; cdecl; 99 | function removeAllImages: Boolean; cdecl; 100 | function addURL(url: NSURL): Boolean; cdecl; 101 | function removeAllURLs: Boolean; cdecl; 102 | procedure setCompletionHandler(completionHandler 103 | : TWTweetComposeViewControllerCompletionHandler); cdecl; 104 | function completionHandler 105 | : TWTweetComposeViewControllerCompletionHandler; cdecl; 106 | end; 107 | 108 | TTWTweetComposeViewController = class 109 | (TOCGenericImport) 111 | end; 112 | 113 | PTWTweetComposeViewController = Pointer; 114 | 115 | // ===== External functions ===== 116 | 117 | const 118 | libTwitter = '/System/Library/Frameworks/Twitter.framework/Twitter'; 119 | 120 | implementation 121 | 122 | {$IF defined(IOS) and NOT defined(CPUARM)} 123 | 124 | uses 125 | Posix.Dlfcn; 126 | 127 | var 128 | TwitterModule: THandle; 129 | 130 | {$ENDIF IOS} 131 | {$IF defined(IOS) and NOT defined(CPUARM)} 132 | 133 | initialization 134 | 135 | TwitterModule := dlopen(MarshaledAString(libTwitter), RTLD_LAZY); 136 | 137 | finalization 138 | 139 | dlclose(TwitterModule); 140 | {$ENDIF IOS} 141 | 142 | end. 143 | -------------------------------------------------------------------------------- /iOSapi.PushKit.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework PushKit 12 | // 13 | 14 | unit iOSapi.PushKit; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.Foundation; 29 | 30 | type 31 | 32 | // ===== Forward declarations ===== 33 | {$M+} 34 | PKPushCredentials = interface; 35 | PKPushPayload = interface; 36 | PKPushRegistryDelegate = interface; 37 | PKPushRegistry = interface; 38 | 39 | // ===== Framework typedefs ===== 40 | {$M+} 41 | dispatch_queue_t = Pointer; 42 | // ===== Interface declarations ===== 43 | 44 | PKPushCredentialsClass = interface(NSObjectClass) 45 | ['{CD9399CE-EEA2-4A94-8680-1B8EEF468ED0}'] 46 | end; 47 | 48 | PKPushCredentials = interface(NSObject) 49 | ['{FA94AD35-A118-4EB8-90DD-AB9C084617BE}'] 50 | function &type: NSString; cdecl; 51 | function token: NSData; cdecl; 52 | end; 53 | 54 | TPKPushCredentials = class(TOCGenericImport) 56 | end; 57 | 58 | PPKPushCredentials = Pointer; 59 | 60 | PKPushPayloadClass = interface(NSObjectClass) 61 | ['{579EED35-845B-49B8-B52A-23D0AED4F154}'] 62 | end; 63 | 64 | PKPushPayload = interface(NSObject) 65 | ['{8C4DFED0-FB16-41ED-ABB1-9F969F1FABF9}'] 66 | function &type: NSString; cdecl; 67 | function dictionaryPayload: NSDictionary; cdecl; 68 | end; 69 | 70 | TPKPushPayload = class(TOCGenericImport) 71 | end; 72 | 73 | PPKPushPayload = Pointer; 74 | 75 | PKPushRegistryClass = interface(NSObjectClass) 76 | ['{F8264110-A4BA-48F0-B27B-A9025BF3C400}'] 77 | end; 78 | 79 | PKPushRegistry = interface(NSObject) 80 | ['{5D555774-EC0B-45D1-B3D2-23803C02E0A0}'] 81 | procedure setDelegate(delegate: Pointer); cdecl; 82 | function delegate: Pointer; cdecl; 83 | procedure setDesiredPushTypes(desiredPushTypes: NSSet); cdecl; 84 | function desiredPushTypes: NSSet; cdecl; 85 | function pushTokenForType(&type: NSString): NSData; cdecl; 86 | function initWithQueue(queue: dispatch_queue_t) 87 | : Pointer { instancetype }; cdecl; 88 | end; 89 | 90 | TPKPushRegistry = class(TOCGenericImport) 91 | end; 92 | 93 | PPKPushRegistry = Pointer; 94 | 95 | // ===== Protocol declarations ===== 96 | 97 | PKPushRegistryDelegate = interface(IObjectiveC) 98 | ['{81D5E7D8-7042-407C-8D97-793C5DE0E374}'] 99 | [MethodName('pushRegistry:didUpdatePushCredentials:forType:')] 100 | procedure pushRegistryDidUpdatePushCredentialsForType 101 | (registry: PKPushRegistry; didUpdatePushCredentials: PKPushCredentials; 102 | forType: NSString); cdecl; 103 | [MethodName('pushRegistry:didReceiveIncomingPushWithPayload:forType:')] 104 | procedure pushRegistryDidReceiveIncomingPushWithPayloadForType 105 | (registry: PKPushRegistry; didReceiveIncomingPushWithPayload 106 | : PKPushPayload; forType: NSString); cdecl; 107 | [MethodName('pushRegistry:didInvalidatePushTokenForType:')] 108 | procedure pushRegistryDidInvalidatePushTokenForType 109 | (registry: PKPushRegistry; 110 | didInvalidatePushTokenForType: NSString); cdecl; 111 | end; 112 | 113 | // ===== Exported string consts ===== 114 | 115 | function PKPushTypeVoIP: NSString; 116 | function PKPushTypeComplication: NSString; 117 | 118 | 119 | // ===== External functions ===== 120 | 121 | const 122 | libPushKit = '/System/Library/Frameworks/PushKit.framework/PushKit'; 123 | 124 | implementation 125 | 126 | {$IF defined(IOS) and NOT defined(CPUARM)} 127 | 128 | uses 129 | Posix.Dlfcn; 130 | 131 | var 132 | PushKitModule: THandle; 133 | 134 | {$ENDIF IOS} 135 | 136 | function PKPushTypeVoIP: NSString; 137 | begin 138 | Result := CocoaNSStringConst(libPushKit, 'PKPushTypeVoIP'); 139 | end; 140 | 141 | function PKPushTypeComplication: NSString; 142 | begin 143 | Result := CocoaNSStringConst(libPushKit, 'PKPushTypeComplication'); 144 | end; 145 | 146 | {$IF defined(IOS) and NOT defined(CPUARM)} 147 | 148 | initialization 149 | 150 | PushKitModule := dlopen(MarshaledAString(libPushKit), RTLD_LAZY); 151 | 152 | finalization 153 | 154 | dlclose(PushKitModule); 155 | {$ENDIF IOS} 156 | 157 | end. 158 | -------------------------------------------------------------------------------- /iOSapi.LocalAuthentication.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework LocalAuthentication 12 | // 13 | 14 | unit iOSapi.LocalAuthentication; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.Foundation, 29 | iOSapi.Security; 30 | 31 | const 32 | LAPolicyDeviceOwnerAuthenticationWithBiometrics = 1; 33 | LAPolicyDeviceOwnerAuthentication = 2; 34 | LACredentialTypeApplicationPassword = 0; 35 | LAAccessControlOperationCreateItem = 0; 36 | LAAccessControlOperationUseItem = 1; 37 | LAAccessControlOperationCreateKey = 2; 38 | LAAccessControlOperationUseKeySign = 3; 39 | LAErrorAuthenticationFailed = -1; 40 | LAErrorUserCancel = -2; 41 | LAErrorUserFallback = -3; 42 | LAErrorSystemCancel = -4; 43 | LAErrorPasscodeNotSet = -5; 44 | LAErrorTouchIDNotAvailable = -6; 45 | LAErrorTouchIDNotEnrolled = -7; 46 | LAErrorTouchIDLockout = -8; 47 | LAErrorAppCancel = -9; 48 | LAErrorInvalidContext = -10; 49 | 50 | type 51 | 52 | // ===== Forward declarations ===== 53 | {$M+} 54 | LAContext = interface; 55 | 56 | // ===== Framework typedefs ===== 57 | {$M+} 58 | NSInteger = Integer; 59 | LAPolicy = NSInteger; 60 | NSTimeInterval = Double; 61 | TLocalAuthenticationReply = procedure(param1: Boolean; param2: NSError) 62 | of object; 63 | LACredentialType = NSInteger; 64 | SecAccessControlRef = Pointer; 65 | LAAccessControlOperation = NSInteger; 66 | LAError = NSInteger; 67 | // ===== Interface declarations ===== 68 | 69 | LAContextClass = interface(NSObjectClass) 70 | ['{90938FAC-60C5-43A2-A3C8-3CEA6626BA7C}'] 71 | end; 72 | 73 | LAContext = interface(NSObject) 74 | ['{1E809F4B-33BA-4683-84FB-80345F1D89DE}'] 75 | function canEvaluatePolicy(policy: LAPolicy; error: NSError) 76 | : Boolean; cdecl; 77 | procedure evaluatePolicy(policy: LAPolicy; localizedReason: NSString; 78 | reply: TLocalAuthenticationReply); cdecl; 79 | procedure invalidate; cdecl; 80 | function setCredential(credential: NSData; &type: LACredentialType) 81 | : Boolean; cdecl; 82 | function isCredentialSet(&type: LACredentialType): Boolean; cdecl; 83 | procedure evaluateAccessControl(accessControl: SecAccessControlRef; 84 | operation: LAAccessControlOperation; localizedReason: NSString; 85 | reply: TLocalAuthenticationReply); cdecl; 86 | procedure setLocalizedFallbackTitle(localizedFallbackTitle 87 | : NSString); cdecl; 88 | function localizedFallbackTitle: NSString; cdecl; 89 | procedure setMaxBiometryFailures(maxBiometryFailures: NSNumber); cdecl; 90 | function maxBiometryFailures: NSNumber; cdecl; 91 | function evaluatedPolicyDomainState: NSData; cdecl; 92 | procedure setTouchIDAuthenticationAllowableReuseDuration 93 | (touchIDAuthenticationAllowableReuseDuration: NSTimeInterval); cdecl; 94 | function touchIDAuthenticationAllowableReuseDuration: NSTimeInterval; cdecl; 95 | end; 96 | 97 | TLAContext = class(TOCGenericImport) 98 | end; 99 | 100 | PLAContext = Pointer; 101 | 102 | // ===== Exported string consts ===== 103 | 104 | function LATouchIDAuthenticationMaximumAllowableReuseDuration: Pointer; 105 | function LAErrorDomain: NSString; 106 | 107 | 108 | // ===== External functions ===== 109 | 110 | const 111 | libLocalAuthentication = 112 | '/System/Library/Frameworks/LocalAuthentication.framework/LocalAuthentication'; 113 | 114 | implementation 115 | 116 | {$IF defined(IOS) and NOT defined(CPUARM)} 117 | 118 | uses 119 | Posix.Dlfcn; 120 | 121 | var 122 | LocalAuthenticationModule: THandle; 123 | 124 | {$ENDIF IOS} 125 | 126 | function LAErrorDomain: NSString; 127 | begin 128 | Result := CocoaNSStringConst(libLocalAuthentication, 'LAErrorDomain'); 129 | end; 130 | 131 | function LATouchIDAuthenticationMaximumAllowableReuseDuration: Pointer; 132 | begin 133 | Result := CocoaPointerConst(libLocalAuthentication, 134 | 'LATouchIDAuthenticationMaximumAllowableReuseDuration'); 135 | end; 136 | 137 | {$IF defined(IOS) and NOT defined(CPUARM)} 138 | 139 | initialization 140 | 141 | LocalAuthenticationModule := dlopen(MarshaledAString(libLocalAuthentication), 142 | RTLD_LAZY); 143 | 144 | finalization 145 | 146 | dlclose(LocalAuthenticationModule); 147 | {$ENDIF IOS} 148 | 149 | end. 150 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.NewsstandKit.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework NewsstandKit 12 | // 13 | 14 | unit iOSapi.NewsstandKit; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.Foundation; 27 | 28 | const 29 | NKIssueContentStatusNone = 0; 30 | NKIssueContentStatusDownloading = 1; 31 | NKIssueContentStatusAvailable = 2; 32 | 33 | type 34 | 35 | // ===== Forward declarations ===== 36 | {$M+} 37 | NKIssue = interface; 38 | NKAssetDownload = interface; 39 | NKLibrary = interface; 40 | NKAssetDownloadAdditions = interface; 41 | 42 | // ===== Framework typedefs ===== 43 | {$M+} 44 | NSInteger = Integer; 45 | PNSInteger = ^NSInteger; 46 | 47 | NKIssueContentStatus = NSInteger; 48 | // ===== Interface declarations ===== 49 | 50 | NKIssueClass = interface(NSObjectClass) 51 | ['{3862C39F-4360-423C-8282-92799F9AE938}'] 52 | end; 53 | 54 | NKIssue = interface(NSObject) 55 | ['{990A8425-E7ED-43EE-8D8D-8A6824CE4536}'] 56 | function downloadingAssets: NSArray; cdecl; 57 | function contentURL: NSURL; cdecl; 58 | function status: NKIssueContentStatus; cdecl; 59 | function name: NSString; cdecl; 60 | function date: NSDate; cdecl; 61 | function addAssetWithRequest(request: NSURLRequest): NKAssetDownload; cdecl; 62 | end; 63 | 64 | TNKIssue = class(TOCGenericImport) 65 | end; 66 | 67 | PNKIssue = Pointer; 68 | 69 | NKAssetDownloadClass = interface(NSObjectClass) 70 | ['{111A2D5E-57F2-4B05-8255-CCE0697BA6B0}'] 71 | end; 72 | 73 | NKAssetDownload = interface(NSObject) 74 | ['{CD6A9C0C-8CAE-4F4A-BA3F-B5E8842A3BDD}'] 75 | function issue: NKIssue; cdecl; 76 | function identifier: NSString; cdecl; 77 | procedure setUserInfo(userInfo: NSDictionary); cdecl; 78 | function userInfo: NSDictionary; cdecl; 79 | function URLRequest: NSURLRequest; cdecl; 80 | function downloadWithDelegate(delegate: Pointer): NSURLConnection; cdecl; 81 | end; 82 | 83 | TNKAssetDownload = class(TOCGenericImport) 85 | end; 86 | 87 | PNKAssetDownload = Pointer; 88 | 89 | NKLibraryClass = interface(NSObjectClass) 90 | ['{EC77DF93-FECB-4D03-BBAC-71B7DE3D3679}'] 91 | { class } function sharedLibrary: NKLibrary; cdecl; 92 | end; 93 | 94 | NKLibrary = interface(NSObject) 95 | ['{E6783674-8819-40EE-8324-F97DB788225A}'] 96 | function issues: NSArray; cdecl; 97 | function downloadingAssets: NSArray; cdecl; 98 | procedure setCurrentlyReadingIssue(currentlyReadingIssue: NKIssue); cdecl; 99 | function currentlyReadingIssue: NKIssue; cdecl; 100 | function issueWithName(name: NSString): NKIssue; cdecl; 101 | function addIssueWithName(name: NSString; date: NSDate): NKIssue; cdecl; 102 | procedure removeIssue(issue: NKIssue); cdecl; 103 | end; 104 | 105 | TNKLibrary = class(TOCGenericImport) 106 | end; 107 | 108 | PNKLibrary = Pointer; 109 | 110 | NKAssetDownloadAdditions = interface(IObjectiveC) 111 | ['{D42A4126-13EA-469D-95F4-B1715DE00F0F}'] 112 | function newsstandAssetDownload: NKAssetDownload; cdecl; 113 | end; 114 | 115 | // ===== Exported string consts ===== 116 | 117 | function NKIssueDownloadCompletedNotification: NSString; 118 | function __AVAILABILITY_INTERNAL__IPHONE_: Pointer; 119 | 120 | 121 | // ===== External functions ===== 122 | 123 | const 124 | libNewsstandKit = 125 | '/System/Library/Frameworks/NewsstandKit.framework/NewsstandKit'; 126 | 127 | implementation 128 | 129 | {$IF defined(IOS) and NOT defined(CPUARM)} 130 | 131 | uses 132 | Posix.Dlfcn; 133 | 134 | var 135 | NewsstandKitModule: THandle; 136 | 137 | {$ENDIF IOS} 138 | 139 | function NKIssueDownloadCompletedNotification: NSString; 140 | begin 141 | Result := CocoaNSStringConst(libNewsstandKit, 142 | 'NKIssueDownloadCompletedNotification'); 143 | end; 144 | 145 | function __AVAILABILITY_INTERNAL__IPHONE_: Pointer; 146 | begin 147 | Result := CocoaPointerConst(libNewsstandKit, 148 | '__AVAILABILITY_INTERNAL__IPHONE_'); 149 | end; 150 | 151 | {$IF defined(IOS) and NOT defined(CPUARM)} 152 | 153 | initialization 154 | 155 | NewsstandKitModule := dlopen(MarshaledAString(libNewsstandKit), RTLD_LAZY); 156 | 157 | finalization 158 | 159 | dlclose(NewsstandKitModule); 160 | {$ENDIF IOS} 161 | 162 | end. 163 | -------------------------------------------------------------------------------- /iOSapi.OpenGLES.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework OpenGLES 12 | // 13 | 14 | unit iOSapi.OpenGLES; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.Foundation; 29 | 30 | const 31 | kEAGLRenderingAPIOpenGLES1 = 1; 32 | kEAGLRenderingAPIOpenGLES2 = 2; 33 | kEAGLRenderingAPIOpenGLES3 = 3; 34 | 35 | type 36 | 37 | // ===== Forward declarations ===== 38 | {$M+} 39 | EAGLSharegroup = interface; 40 | EAGLContext = interface; 41 | EAGLDrawable = interface; 42 | 43 | // ===== Framework typedefs ===== 44 | {$M+} 45 | NSUInteger = Cardinal; 46 | EAGLRenderingAPI = NSUInteger; 47 | // ===== Interface declarations ===== 48 | 49 | EAGLSharegroupClass = interface(NSObjectClass) 50 | ['{A2BA2BEB-8D0C-4527-9F19-2B34A087A543}'] 51 | end; 52 | 53 | EAGLSharegroup = interface(NSObject) 54 | ['{29DF543A-A1D8-4D64-8ACF-D3D09E20C05E}'] 55 | procedure setDebugLabel(debugLabel: NSString); cdecl; 56 | function debugLabel: NSString; cdecl; 57 | end; 58 | 59 | TEAGLSharegroup = class(TOCGenericImport) 60 | end; 61 | 62 | PEAGLSharegroup = Pointer; 63 | 64 | EAGLContextClass = interface(NSObjectClass) 65 | ['{8832DC09-F4C2-4AEA-B08D-330DD1276AF2}'] 66 | { class } function setCurrentContext(context: EAGLContext): Boolean; cdecl; 67 | { class } function currentContext: EAGLContext; cdecl; 68 | end; 69 | 70 | EAGLContext = interface(NSObject) 71 | ['{AE2917EF-2CBD-4139-A55C-4D9E1FFE9C79}'] 72 | [MethodName('initWithAPI:')] 73 | function initWithAPI(api: EAGLRenderingAPI) 74 | : Pointer { instancetype }; cdecl; 75 | [MethodName('initWithAPI:sharegroup:')] 76 | function initWithAPISharegroup(api: EAGLRenderingAPI; 77 | sharegroup: EAGLSharegroup): Pointer { instancetype }; cdecl; 78 | function api: EAGLRenderingAPI; cdecl; 79 | function sharegroup: EAGLSharegroup; cdecl; 80 | procedure setDebugLabel(debugLabel: NSString); cdecl; 81 | function debugLabel: NSString; cdecl; 82 | procedure setMultiThreaded(multiThreaded: Boolean); cdecl; 83 | function isMultiThreaded: Boolean; cdecl; 84 | function renderbufferStorage(target: NSUInteger; fromDrawable: Pointer) 85 | : Boolean; cdecl; 86 | function presentRenderbuffer(target: NSUInteger): Boolean; cdecl; 87 | end; 88 | 89 | TEAGLContext = class(TOCGenericImport) 90 | end; 91 | 92 | PEAGLContext = Pointer; 93 | 94 | // ===== Protocol declarations ===== 95 | 96 | EAGLDrawable = interface(IObjectiveC) 97 | ['{57C3E850-9DA3-4F45-9A64-C9F10406391A}'] 98 | procedure setDrawableProperties(drawableProperties: NSDictionary); cdecl; 99 | function drawableProperties: NSDictionary; cdecl; 100 | end; 101 | 102 | // ===== Exported string consts ===== 103 | 104 | function kEAGLDrawablePropertyRetainedBacking: NSString; 105 | function kEAGLDrawablePropertyColorFormat: NSString; 106 | function kEAGLColorFormatRGBA8: NSString; 107 | function kEAGLColorFormatRGB565: NSString; 108 | function kEAGLColorFormatSRGBA8: NSString; 109 | 110 | 111 | // ===== External functions ===== 112 | 113 | const 114 | libOpenGLES = '/System/Library/Frameworks/OpenGLES.framework/OpenGLES'; 115 | procedure EAGLGetVersion(major: PCardinal; minor: PCardinal); cdecl; 116 | external libOpenGLES name _PU + 'EAGLGetVersion'; 117 | 118 | implementation 119 | 120 | {$IF defined(IOS) and NOT defined(CPUARM)} 121 | 122 | uses 123 | Posix.Dlfcn; 124 | 125 | var 126 | OpenGLESModule: THandle; 127 | 128 | {$ENDIF IOS} 129 | 130 | function kEAGLDrawablePropertyRetainedBacking: NSString; 131 | begin 132 | Result := CocoaNSStringConst(libOpenGLES, 133 | 'kEAGLDrawablePropertyRetainedBacking'); 134 | end; 135 | 136 | function kEAGLDrawablePropertyColorFormat: NSString; 137 | begin 138 | Result := CocoaNSStringConst(libOpenGLES, 'kEAGLDrawablePropertyColorFormat'); 139 | end; 140 | 141 | function kEAGLColorFormatRGBA8: NSString; 142 | begin 143 | Result := CocoaNSStringConst(libOpenGLES, 'kEAGLColorFormatRGBA8'); 144 | end; 145 | 146 | function kEAGLColorFormatRGB565: NSString; 147 | begin 148 | Result := CocoaNSStringConst(libOpenGLES, 'kEAGLColorFormatRGB565'); 149 | end; 150 | 151 | function kEAGLColorFormatSRGBA8: NSString; 152 | begin 153 | Result := CocoaNSStringConst(libOpenGLES, 'kEAGLColorFormatSRGBA8'); 154 | end; 155 | 156 | {$IF defined(IOS) and NOT defined(CPUARM)} 157 | 158 | initialization 159 | 160 | OpenGLESModule := dlopen(MarshaledAString(libOpenGLES), RTLD_LAZY); 161 | 162 | finalization 163 | 164 | dlclose(OpenGLESModule); 165 | {$ENDIF IOS} 166 | 167 | end. 168 | -------------------------------------------------------------------------------- /iOSapi.QuickLook.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework QuickLook 12 | // 13 | 14 | unit iOSapi.QuickLook; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.CoreGraphics, 29 | iOSapi.Foundation, 30 | iOSapi.UIKit; 31 | 32 | type 33 | 34 | // ===== Forward declarations ===== 35 | {$M+} 36 | QLPreviewItem = interface; 37 | QLPreviewControllerDelegate = interface; 38 | QLPreviewControllerDataSource = interface; 39 | QLPreviewController = interface; 40 | QLPreviewConvenienceAdditions = interface; 41 | 42 | // ===== Framework typedefs ===== 43 | {$M+} 44 | NSInteger = Integer; 45 | CGFloat = Single; 46 | CGPoint = CGPoint = record x: CGFloat; 47 | y: 48 | CGFloat; 49 | end; 50 | PCGPoint = ^CGPoint;; 51 | CGSize = CGSize = record width: CGFloat; 52 | height: 53 | CGFloat; 54 | end; 55 | PCGSize = ^CGSize;; 56 | CGRect = CGRect = record origin: CGPoint; 57 | size: 58 | CGSize; 59 | end; 60 | PCGRect = ^CGRect;; 61 | // ===== Interface declarations ===== 62 | 63 | QLPreviewControllerClass = interface(UIViewControllerClass) 64 | ['{E21A292A-9CDD-409D-ABFE-A54329315034}'] 65 | { class } function canPreviewItem(item: Pointer): Boolean; 66 | cdecl; 67 | end; 68 | QLPreviewController = interface(UIViewController) 69 | ['{5621F000-E0B2-4249-8EAB-C252E39C41F1}'] 70 | procedure setDataSource(dataSource: Pointer); 71 | cdecl; 72 | 73 | function dataSource: Pointer; cdecl; 74 | procedure reloadData; cdecl; 75 | procedure refreshCurrentPreviewItem; cdecl; 76 | procedure setCurrentPreviewItemIndex(currentPreviewItemIndex 77 | : NSInteger); cdecl; 78 | function currentPreviewItemIndex: NSInteger; cdecl; 79 | function currentPreviewItem: Pointer; cdecl; 80 | procedure setDelegate(delegate: Pointer); cdecl; 81 | function delegate: Pointer; cdecl; 82 | end; 83 | 84 | TQLPreviewController = class 85 | (TOCGenericImport) 86 | end; 87 | PQLPreviewController = Pointer; 88 | 89 | QLPreviewConvenienceAdditions = interface(IObjectiveC) 90 | ['{96090CBB-055D-400F-89C2-DB2CD6202710}'] 91 | end; 92 | 93 | // ===== Protocol declarations ===== 94 | 95 | QLPreviewItem = interface(IObjectiveC) 96 | ['{A154E505-79A1-47F0-9E24-72B7CC6CC1AC}'] 97 | function previewItemURL: NSURL; 98 | cdecl; 99 | function previewItemTitle: NSString; cdecl; 100 | end; 101 | 102 | QLPreviewControllerDelegate = interface(IObjectiveC) 103 | ['{E2E10D58-F498-4A6E-8DC2-6E8C4E35523C}'] 104 | procedure previewControllerWillDismiss(controller: QLPreviewController); 105 | cdecl; 106 | procedure previewControllerDidDismiss(controller: QLPreviewController); cdecl; 107 | [MethodName('previewController:shouldOpenURL:forPreviewItem:')] 108 | function previewControllerShouldOpenURLForPreviewItem 109 | (controller: QLPreviewController; shouldOpenURL: NSURL; 110 | forPreviewItem: Pointer): Boolean; cdecl; 111 | [MethodName('previewController:frameForPreviewItem:inSourceView:')] 112 | function previewControllerFrameForPreviewItemInSourceView 113 | (controller: QLPreviewController; frameForPreviewItem: Pointer; 114 | inSourceView: UIView): CGRect; cdecl; 115 | [MethodName 116 | ('previewController:transitionImageForPreviewItem:contentRect:')] 117 | function previewControllerTransitionImageForPreviewItemContentRect 118 | (controller: QLPreviewController; 119 | transitionImageForPreviewItem: Pointer; contentRect: Pointer) 120 | : UIImage; cdecl; 121 | end; 122 | 123 | QLPreviewControllerDataSource = interface(IObjectiveC) 124 | ['{45F98891-8756-4F5E-860F-8AA7D0A11725}'] 125 | function numberOfPreviewItemsInPreviewController 126 | (controller: QLPreviewController): NSInteger; 127 | cdecl; 128 | function previewController(controller: QLPreviewController; 129 | previewItemAtIndex: NSInteger): Pointer; cdecl; 130 | end; 131 | 132 | // ===== External functions ===== 133 | 134 | const 135 | libQuickLook = '/System/Library/Frameworks/QuickLook.framework/QuickLook'; 136 | 137 | implementation 138 | 139 | {$IF defined(IOS) and NOT defined(CPUARM)} 140 | 141 | uses 142 | Posix.Dlfcn; 143 | 144 | var 145 | QuickLookModule: THandle; 146 | 147 | {$ENDIF IOS} 148 | {$IF defined(IOS) and NOT defined(CPUARM)} 149 | 150 | initialization 151 | 152 | QuickLookModule := dlopen(MarshaledAString(libQuickLook), RTLD_LAZY); 153 | 154 | finalization 155 | 156 | dlclose(QuickLookModule); 157 | {$ENDIF IOS} 158 | 159 | end. 160 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.PushKit.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework PushKit 12 | // 13 | 14 | unit iOSapi.PushKit; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.Foundation; 27 | 28 | type 29 | 30 | // ===== Forward declarations ===== 31 | {$M+} 32 | PKPushCredentials = interface; 33 | PKPushPayload = interface; 34 | PKPushRegistryDelegate = interface; 35 | PKPushRegistry = interface; 36 | 37 | // ===== Framework typedefs ===== 38 | {$M+} 39 | PKPushType = NSString; 40 | PPKPushType = ^PKPushType; 41 | dispatch_queue_t = Pointer; 42 | Pdispatch_queue_t = ^dispatch_queue_t; 43 | TPushKitWithCompletionHandler = procedure() of object; 44 | // ===== Interface declarations ===== 45 | 46 | PKPushCredentialsClass = interface(NSObjectClass) 47 | ['{3D25ED18-383E-4005-9267-008707C3A377}'] 48 | end; 49 | 50 | PKPushCredentials = interface(NSObject) 51 | ['{46BADA68-C8D3-4D24-8F9B-D09D0136D916}'] 52 | function &type: PKPushType; cdecl; 53 | function token: NSData; cdecl; 54 | end; 55 | 56 | TPKPushCredentials = class(TOCGenericImport) 58 | end; 59 | 60 | PPKPushCredentials = Pointer; 61 | 62 | PKPushPayloadClass = interface(NSObjectClass) 63 | ['{78791817-3FBB-47B9-8A93-B32208D5763E}'] 64 | end; 65 | 66 | PKPushPayload = interface(NSObject) 67 | ['{339807B6-838B-402E-B111-A16D95342C5E}'] 68 | function &type: PKPushType; cdecl; 69 | function dictionaryPayload: NSDictionary; cdecl; 70 | end; 71 | 72 | TPKPushPayload = class(TOCGenericImport) 73 | end; 74 | 75 | PPKPushPayload = Pointer; 76 | 77 | PKPushRegistryClass = interface(NSObjectClass) 78 | ['{8554AD1C-BC41-4820-92A5-D6D35CD9B2A7}'] 79 | end; 80 | 81 | PKPushRegistry = interface(NSObject) 82 | ['{7C433B18-9EAE-480E-AB4B-AB1F8884DA6A}'] 83 | procedure setDelegate(delegate: Pointer); cdecl; 84 | function delegate: Pointer; cdecl; 85 | procedure setDesiredPushTypes(desiredPushTypes: NSSet); cdecl; 86 | function desiredPushTypes: NSSet; cdecl; 87 | function pushTokenForType(&type: PKPushType): NSData; cdecl; 88 | function initWithQueue(queue: dispatch_queue_t) 89 | : Pointer { instancetype }; cdecl; 90 | end; 91 | 92 | TPKPushRegistry = class(TOCGenericImport) 93 | end; 94 | 95 | PPKPushRegistry = Pointer; 96 | 97 | // ===== Protocol declarations ===== 98 | 99 | PKPushRegistryDelegate = interface(IObjectiveC) 100 | ['{1DCD4854-BEBC-4CD1-8D36-967B34C3161F}'] 101 | [MethodName('pushRegistry:didUpdatePushCredentials:forType:')] 102 | procedure pushRegistryDidUpdatePushCredentialsForType 103 | (registry: PKPushRegistry; didUpdatePushCredentials: PKPushCredentials; 104 | forType: PKPushType); cdecl; 105 | [MethodName('pushRegistry:didReceiveIncomingPushWithPayload:forType:')] 106 | procedure pushRegistryDidReceiveIncomingPushWithPayloadForType 107 | (registry: PKPushRegistry; didReceiveIncomingPushWithPayload 108 | : PKPushPayload; forType: PKPushType); cdecl; 109 | [MethodName 110 | ('pushRegistry:didReceiveIncomingPushWithPayload:forType:withCompletionHandler:') 111 | ] 112 | procedure pushRegistryDidReceiveIncomingPushWithPayloadForTypeWithCompletionHandler 113 | (registry: PKPushRegistry; didReceiveIncomingPushWithPayload 114 | : PKPushPayload; forType: PKPushType; 115 | withCompletionHandler: TPushKitWithCompletionHandler); cdecl; 116 | [MethodName('pushRegistry:didInvalidatePushTokenForType:')] 117 | procedure pushRegistryDidInvalidatePushTokenForType 118 | (registry: PKPushRegistry; 119 | didInvalidatePushTokenForType: PKPushType); cdecl; 120 | end; 121 | 122 | // ===== Exported string consts ===== 123 | 124 | function PKPushTypeVoIP: Pointer; 125 | function PKPushTypeComplication: Pointer; 126 | function PKPushTypeFileProvider: Pointer; 127 | 128 | 129 | // ===== External functions ===== 130 | 131 | const 132 | libPushKit = '/System/Library/Frameworks/PushKit.framework/PushKit'; 133 | 134 | implementation 135 | 136 | {$IF defined(IOS) and NOT defined(CPUARM)} 137 | 138 | uses 139 | Posix.Dlfcn; 140 | 141 | var 142 | PushKitModule: THandle; 143 | 144 | {$ENDIF IOS} 145 | 146 | function PKPushTypeVoIP: Pointer; 147 | begin 148 | Result := CocoaPointerConst(libPushKit, 'PKPushTypeVoIP'); 149 | end; 150 | 151 | function PKPushTypeComplication: Pointer; 152 | begin 153 | Result := CocoaPointerConst(libPushKit, 'PKPushTypeComplication'); 154 | end; 155 | 156 | function PKPushTypeFileProvider: Pointer; 157 | begin 158 | Result := CocoaPointerConst(libPushKit, 'PKPushTypeFileProvider'); 159 | end; 160 | 161 | {$IF defined(IOS) and NOT defined(CPUARM)} 162 | 163 | initialization 164 | 165 | PushKitModule := dlopen(MarshaledAString(libPushKit), RTLD_LAZY); 166 | 167 | finalization 168 | 169 | dlclose(PushKitModule); 170 | {$ENDIF IOS} 171 | 172 | end. 173 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.MediaToolbox.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework MediaToolbox 12 | // 13 | 14 | unit iOSapi.MediaToolbox; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.CoreMedia, 27 | iOSapi.Foundation; 28 | 29 | const 30 | kMTAudioProcessingTapCreationFlag_PreEffects = (1 shl 0); 31 | kMTAudioProcessingTapCreationFlag_PostEffects = (1 shl 1); 32 | kMTAudioProcessingTapFlag_StartOfStream = (1 shl 8); 33 | kMTAudioProcessingTapFlag_EndOfStream = (1 shl 9); 34 | kMTAudioProcessingTapCallbacksVersion_0 = 0; 35 | 36 | type 37 | // ===== Framework typedefs ===== 38 | {$M+} 39 | MTAudioProcessingTapRef = Pointer; 40 | PMTAudioProcessingTapRef = ^MTAudioProcessingTapRef; 41 | CFTypeID = LongWord; 42 | PCFTypeID = ^CFTypeID; 43 | 44 | MTAudioProcessingTapCreationFlags = LongWord; 45 | PMTAudioProcessingTapCreationFlags = ^MTAudioProcessingTapCreationFlags; 46 | MTAudioProcessingTapFlags = LongWord; 47 | PMTAudioProcessingTapFlags = ^MTAudioProcessingTapFlags; 48 | MTAudioProcessingTapInitCallback = procedure(param1: MTAudioProcessingTapRef; 49 | param2: Pointer; param3: Pointer); cdecl; 50 | PMTAudioProcessingTapInitCallback = ^MTAudioProcessingTapInitCallback; 51 | MTAudioProcessingTapFinalizeCallback = procedure 52 | (param1: MTAudioProcessingTapRef); cdecl; 53 | PMTAudioProcessingTapFinalizeCallback = ^MTAudioProcessingTapFinalizeCallback; 54 | CFIndex = LongInt; 55 | PCFIndex = ^CFIndex; 56 | 57 | CMItemCount = CFIndex; 58 | PCMItemCount = ^CMItemCount; 59 | MTAudioProcessingTapPrepareCallback = procedure 60 | (param1: MTAudioProcessingTapRef; param2: CMItemCount; 61 | param3: PInteger); cdecl; 62 | PMTAudioProcessingTapPrepareCallback = ^MTAudioProcessingTapPrepareCallback; 63 | MTAudioProcessingTapUnprepareCallback = procedure 64 | (param1: MTAudioProcessingTapRef); cdecl; 65 | PMTAudioProcessingTapUnprepareCallback = ^ 66 | MTAudioProcessingTapUnprepareCallback; 67 | MTAudioProcessingTapProcessCallback = procedure 68 | (param1: MTAudioProcessingTapRef; param2: CMItemCount; 69 | param3: MTAudioProcessingTapFlags; param4: PInteger; param5: PCMItemCount; 70 | param6: PMTAudioProcessingTapFlags); cdecl; 71 | PMTAudioProcessingTapProcessCallback = ^MTAudioProcessingTapProcessCallback; 72 | 73 | MTAudioProcessingTapCallbacks = record 74 | version: Integer; 75 | clientInfo: Pointer; 76 | init: MTAudioProcessingTapInitCallback; 77 | finalize: MTAudioProcessingTapFinalizeCallback; 78 | prepare: MTAudioProcessingTapPrepareCallback; 79 | unprepare: MTAudioProcessingTapUnprepareCallback; 80 | process: MTAudioProcessingTapProcessCallback; 81 | end; 82 | 83 | PMTAudioProcessingTapCallbacks = ^MTAudioProcessingTapCallbacks; 84 | 85 | CFAllocatorRef = Pointer; 86 | PCFAllocatorRef = ^CFAllocatorRef; 87 | OSStatus = Int32; 88 | POSStatus = ^OSStatus; 89 | FourCharCode = UInt32; 90 | PFourCharCode = ^FourCharCode; 91 | CMMediaType = FourCharCode; 92 | PCMMediaType = ^CMMediaType; 93 | CFStringRef = Pointer; 94 | PCFStringRef = ^CFStringRef; 95 | // ===== External functions ===== 96 | 97 | const 98 | libMediaToolbox = 99 | '/System/Library/Frameworks/MediaToolbox.framework/MediaToolbox'; 100 | function MTAudioProcessingTapGetTypeID: CFTypeID; cdecl; 101 | external libMediaToolbox name _PU + 'MTAudioProcessingTapGetTypeID'; 102 | function MTAudioProcessingTapCreate(allocator: CFAllocatorRef; 103 | callbacks: PMTAudioProcessingTapCallbacks; 104 | flags: MTAudioProcessingTapCreationFlags; tapOut: PMTAudioProcessingTapRef) 105 | : OSStatus; cdecl; external libMediaToolbox name _PU + 106 | 'MTAudioProcessingTapCreate'; 107 | function MTAudioProcessingTapGetStorage(tap: MTAudioProcessingTapRef): Pointer; 108 | cdecl; external libMediaToolbox name _PU + 'MTAudioProcessingTapGetStorage'; 109 | function MTAudioProcessingTapGetSourceAudio(tap: MTAudioProcessingTapRef; 110 | numberFrames: CMItemCount; bufferListInOut: PInteger; 111 | flagsOut: PMTAudioProcessingTapFlags; timeRangeOut: Pointer; 112 | numberFramesOut: PCMItemCount): OSStatus; cdecl; 113 | external libMediaToolbox name _PU + 'MTAudioProcessingTapGetSourceAudio'; 114 | function MTCopyLocalizedNameForMediaType(mediaType: CMMediaType): CFStringRef; 115 | cdecl; external libMediaToolbox name _PU + 'MTCopyLocalizedNameForMediaType'; 116 | function MTCopyLocalizedNameForMediaSubType(mediaType: CMMediaType; 117 | mediaSubType: FourCharCode): CFStringRef; cdecl; 118 | external libMediaToolbox name _PU + 'MTCopyLocalizedNameForMediaSubType'; 119 | 120 | implementation 121 | 122 | {$IF defined(IOS) and NOT defined(CPUARM)} 123 | 124 | uses 125 | Posix.Dlfcn; 126 | 127 | var 128 | MediaToolboxModule: THandle; 129 | 130 | {$ENDIF IOS} 131 | {$IF defined(IOS) and NOT defined(CPUARM)} 132 | 133 | initialization 134 | 135 | MediaToolboxModule := dlopen(MarshaledAString(libMediaToolbox), RTLD_LAZY); 136 | 137 | finalization 138 | 139 | dlclose(MediaToolboxModule); 140 | {$ENDIF IOS} 141 | 142 | end. 143 | -------------------------------------------------------------------------------- /iOSapi.SafariServices.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework SafariServices 12 | // 13 | 14 | unit iOSapi.SafariServices; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.Foundation, 29 | iOSapi.UIKit; 30 | 31 | const 32 | SFContentBlockerNoExtensionFound = 1; 33 | SFContentBlockerNoAttachmentFound = 2; 34 | SFContentBlockerLoadingInterrupted = 3; 35 | SSReadingListErrorURLSchemeNotAllowed = 1; 36 | 37 | type 38 | 39 | // ===== Forward declarations ===== 40 | {$M+} 41 | SFContentBlockerManager = interface; 42 | SFSafariViewControllerDelegate = interface; 43 | SFSafariViewController = interface; 44 | SSReadingList = interface; 45 | 46 | // ===== Framework typedefs ===== 47 | {$M+} 48 | NSInteger = Integer; 49 | SFContentBlockerErrorCode = NSInteger; 50 | TSafariServicesCompletionHandler = procedure(param1: NSError) of object; 51 | SSReadingListErrorCode = NSInteger; 52 | // ===== Interface declarations ===== 53 | 54 | SFContentBlockerManagerClass = interface(NSObjectClass) 55 | ['{94BF17BD-4DA7-4446-B327-57F28622A166}'] 56 | { class } procedure reloadContentBlockerWithIdentifier(identifier: NSString; 57 | completionHandler: TSafariServicesCompletionHandler); cdecl; 58 | end; 59 | 60 | SFContentBlockerManager = interface(NSObject) 61 | ['{7401F107-850D-4736-A9F5-745E56E93901}'] 62 | end; 63 | 64 | TSFContentBlockerManager = class 65 | (TOCGenericImport) 66 | end; 67 | 68 | PSFContentBlockerManager = Pointer; 69 | 70 | SFSafariViewControllerClass = interface(UIViewControllerClass) 71 | ['{42C51848-7D34-4D7B-A36C-90F69FF006C4}'] 72 | end; 73 | 74 | SFSafariViewController = interface(UIViewController) 75 | ['{127A8D1E-D068-432D-975E-C1246F49EB92}'] 76 | procedure setDelegate(delegate: Pointer); cdecl; 77 | function delegate: Pointer; cdecl; 78 | [MethodName('initWithURL:entersReaderIfAvailable:')] 79 | function initWithURLEntersReaderIfAvailable(URL: NSURL; 80 | entersReaderIfAvailable: Boolean): Pointer { instancetype }; cdecl; 81 | [MethodName('initWithURL:')] 82 | function initWithURL(URL: NSURL): Pointer { instancetype }; cdecl; 83 | end; 84 | 85 | TSFSafariViewController = class(TOCGenericImport) 87 | end; 88 | 89 | PSFSafariViewController = Pointer; 90 | 91 | SSReadingListClass = interface(NSObjectClass) 92 | ['{BD663A99-430E-4FFE-B55B-B2BA1BF01C90}'] 93 | { class } function defaultReadingList: SSReadingList; cdecl; 94 | { class } function supportsURL(URL: NSURL): Boolean; cdecl; 95 | end; 96 | 97 | SSReadingList = interface(NSObject) 98 | ['{995BDDFF-AD60-425F-AF83-D7D7DF36EB2E}'] 99 | function addReadingListItemWithURL(URL: NSURL; title: NSString; 100 | previewText: NSString; error: NSError): Boolean; cdecl; 101 | end; 102 | 103 | TSSReadingList = class(TOCGenericImport) 104 | end; 105 | 106 | PSSReadingList = Pointer; 107 | 108 | // ===== Protocol declarations ===== 109 | 110 | SFSafariViewControllerDelegate = interface(IObjectiveC) 111 | ['{2192FE6E-19BD-4494-828F-84FC6212C98E}'] 112 | [MethodName('safariViewController:activityItemsForURL:title:')] 113 | function safariViewControllerActivityItemsForURLTitle 114 | (controller: SFSafariViewController; activityItemsForURL: NSURL; 115 | title: NSString): NSArray; cdecl; 116 | procedure safariViewControllerDidFinish(controller 117 | : SFSafariViewController); cdecl; 118 | [MethodName('safariViewController:didCompleteInitialLoad:')] 119 | procedure safariViewControllerDidCompleteInitialLoad 120 | (controller: SFSafariViewController; 121 | didCompleteInitialLoad: Boolean); cdecl; 122 | end; 123 | 124 | // ===== Exported string consts ===== 125 | 126 | function SFContentBlockerErrorDomain: NSString; 127 | function SSReadingListErrorDomain: NSString; 128 | 129 | 130 | // ===== External functions ===== 131 | 132 | const 133 | libSafariServices = 134 | '/System/Library/Frameworks/SafariServices.framework/SafariServices'; 135 | 136 | implementation 137 | 138 | {$IF defined(IOS) and NOT defined(CPUARM)} 139 | 140 | uses 141 | Posix.Dlfcn; 142 | 143 | var 144 | SafariServicesModule: THandle; 145 | 146 | {$ENDIF IOS} 147 | 148 | function SFContentBlockerErrorDomain: NSString; 149 | begin 150 | Result := CocoaNSStringConst(libSafariServices, 151 | 'SFContentBlockerErrorDomain'); 152 | end; 153 | 154 | function SSReadingListErrorDomain: NSString; 155 | begin 156 | Result := CocoaNSStringConst(libSafariServices, 'SSReadingListErrorDomain'); 157 | end; 158 | 159 | {$IF defined(IOS) and NOT defined(CPUARM)} 160 | 161 | initialization 162 | 163 | SafariServicesModule := dlopen(MarshaledAString(libSafariServices), RTLD_LAZY); 164 | 165 | finalization 166 | 167 | dlclose(SafariServicesModule); 168 | {$ENDIF IOS} 169 | 170 | end. 171 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.OpenGLES.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework OpenGLES 12 | // 13 | 14 | unit iOSapi.OpenGLES; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.Foundation, 27 | iOSapi.IOSurface; 28 | 29 | const 30 | kEAGLRenderingAPIOpenGLES1 = 1; 31 | kEAGLRenderingAPIOpenGLES2 = 2; 32 | kEAGLRenderingAPIOpenGLES3 = 3; 33 | 34 | type 35 | 36 | // ===== Forward declarations ===== 37 | {$M+} 38 | EAGLSharegroup = interface; 39 | EAGLContext = interface; 40 | EAGLDrawable = interface; 41 | 42 | // ===== Framework typedefs ===== 43 | {$M+} 44 | NSUInteger = Cardinal; 45 | PNSUInteger = ^NSUInteger; 46 | 47 | EAGLRenderingAPI = NSUInteger; 48 | CFTimeInterval = Double; 49 | PCFTimeInterval = ^CFTimeInterval; 50 | 51 | IOSurfaceRef = Pointer; 52 | PIOSurfaceRef = ^IOSurfaceRef; 53 | // ===== Interface declarations ===== 54 | 55 | EAGLSharegroupClass = interface(NSObjectClass) 56 | ['{9853EC86-DB99-42BF-8233-225DC837A8B2}'] 57 | end; 58 | 59 | EAGLSharegroup = interface(NSObject) 60 | ['{41941226-9DEA-4DC5-9C74-BC669E43C0C5}'] 61 | procedure setDebugLabel(debugLabel: NSString); cdecl; 62 | function debugLabel: NSString; cdecl; 63 | end; 64 | 65 | TEAGLSharegroup = class(TOCGenericImport) 66 | end; 67 | 68 | PEAGLSharegroup = Pointer; 69 | 70 | EAGLContextClass = interface(NSObjectClass) 71 | ['{635042C6-EDA1-4C48-9ED4-AD7C3C0A07D9}'] 72 | { class } function setCurrentContext(context: EAGLContext): Boolean; cdecl; 73 | { class } function currentContext: EAGLContext; cdecl; 74 | end; 75 | 76 | EAGLContext = interface(NSObject) 77 | ['{C8BFDCD8-4A88-48D9-B050-D7052E9F495B}'] 78 | [MethodName('initWithAPI:')] 79 | function initWithAPI(api: EAGLRenderingAPI) 80 | : Pointer { instancetype }; cdecl; 81 | [MethodName('initWithAPI:sharegroup:')] 82 | function initWithAPISharegroup(api: EAGLRenderingAPI; 83 | sharegroup: EAGLSharegroup): Pointer { instancetype }; cdecl; 84 | function api: EAGLRenderingAPI; cdecl; 85 | function sharegroup: EAGLSharegroup; cdecl; 86 | procedure setDebugLabel(debugLabel: NSString); cdecl; 87 | function debugLabel: NSString; cdecl; 88 | procedure setMultiThreaded(multiThreaded: Boolean); cdecl; 89 | function isMultiThreaded: Boolean; cdecl; 90 | function renderbufferStorage(target: NSUInteger; fromDrawable: Pointer) 91 | : Boolean; cdecl; 92 | [MethodName('presentRenderbuffer:')] 93 | function presentRenderbuffer(target: NSUInteger): Boolean; cdecl; 94 | [MethodName('presentRenderbuffer:atTime:')] 95 | function presentRenderbufferAtTime(target: NSUInteger; 96 | atTime: CFTimeInterval): Boolean; cdecl; 97 | [MethodName('presentRenderbuffer:afterMinimumDuration:')] 98 | function presentRenderbufferAfterMinimumDuration(target: NSUInteger; 99 | afterMinimumDuration: CFTimeInterval): Boolean; cdecl; 100 | function texImageIOSurface(IOSurface: IOSurfaceRef; target: NSUInteger; 101 | internalFormat: NSUInteger; width: LongWord; height: LongWord; 102 | format: NSUInteger; &type: NSUInteger; plane: LongWord): Boolean; cdecl; 103 | end; 104 | 105 | TEAGLContext = class(TOCGenericImport) 106 | end; 107 | 108 | PEAGLContext = Pointer; 109 | 110 | // ===== Protocol declarations ===== 111 | 112 | EAGLDrawable = interface(IObjectiveC) 113 | ['{955F9280-98AE-4435-8506-D277DD8CFDC4}'] 114 | procedure setDrawableProperties(drawableProperties: NSDictionary); cdecl; 115 | function drawableProperties: NSDictionary; cdecl; 116 | end; 117 | 118 | // ===== Exported string consts ===== 119 | 120 | function kEAGLDrawablePropertyRetainedBacking: NSString; 121 | function kEAGLDrawablePropertyColorFormat: NSString; 122 | function kEAGLColorFormatRGBA8: NSString; 123 | function kEAGLColorFormatRGB565: NSString; 124 | function kEAGLColorFormatSRGBA8: NSString; 125 | 126 | 127 | // ===== External functions ===== 128 | 129 | const 130 | libOpenGLES = '/System/Library/Frameworks/OpenGLES.framework/OpenGLES'; 131 | procedure EAGLGetVersion(major: PCardinal; minor: PCardinal); cdecl; 132 | external libOpenGLES name _PU + 'EAGLGetVersion'; 133 | 134 | implementation 135 | 136 | {$IF defined(IOS) and NOT defined(CPUARM)} 137 | 138 | uses 139 | Posix.Dlfcn; 140 | 141 | var 142 | OpenGLESModule: THandle; 143 | 144 | {$ENDIF IOS} 145 | 146 | function kEAGLDrawablePropertyRetainedBacking: NSString; 147 | begin 148 | Result := CocoaNSStringConst(libOpenGLES, 149 | 'kEAGLDrawablePropertyRetainedBacking'); 150 | end; 151 | 152 | function kEAGLDrawablePropertyColorFormat: NSString; 153 | begin 154 | Result := CocoaNSStringConst(libOpenGLES, 'kEAGLDrawablePropertyColorFormat'); 155 | end; 156 | 157 | function kEAGLColorFormatRGBA8: NSString; 158 | begin 159 | Result := CocoaNSStringConst(libOpenGLES, 'kEAGLColorFormatRGBA8'); 160 | end; 161 | 162 | function kEAGLColorFormatRGB565: NSString; 163 | begin 164 | Result := CocoaNSStringConst(libOpenGLES, 'kEAGLColorFormatRGB565'); 165 | end; 166 | 167 | function kEAGLColorFormatSRGBA8: NSString; 168 | begin 169 | Result := CocoaNSStringConst(libOpenGLES, 'kEAGLColorFormatSRGBA8'); 170 | end; 171 | 172 | {$IF defined(IOS) and NOT defined(CPUARM)} 173 | 174 | initialization 175 | 176 | OpenGLESModule := dlopen(MarshaledAString(libOpenGLES), RTLD_LAZY); 177 | 178 | finalization 179 | 180 | dlclose(OpenGLESModule); 181 | {$ENDIF IOS} 182 | 183 | end. 184 | -------------------------------------------------------------------------------- /iOSapi.CoreAudioKit.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework CoreAudioKit 12 | // 13 | 14 | unit iOSapi.CoreAudioKit; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.AudioUnit, 28 | iOSapi.CocoaTypes, 29 | iOSapi.CoreGraphics, 30 | iOSapi.Foundation, 31 | iOSapi.UIKit; 32 | 33 | type 34 | 35 | // ===== Forward declarations ===== 36 | {$M+} 37 | AUViewController = interface; 38 | AUAudioUnit_ViewController = interface; 39 | CABTMIDICentralViewController = interface; 40 | CABTMIDILocalPeripheralViewController = interface; 41 | CAInterAppAudioSwitcherView = interface; 42 | CAInterAppAudioTransportView = interface; 43 | 44 | // ===== Framework typedefs ===== 45 | {$M+} 46 | AUViewControllerBase = UIViewController; 47 | TCoreAudioKitCompletionHandler = procedure(param1: AUViewControllerBase) 48 | of object; 49 | AudioComponentInstance = Pointer; 50 | AudioUnit = AudioComponentInstance; 51 | CGFloat = Single; 52 | // ===== Interface declarations ===== 53 | 54 | AUViewControllerClass = interface(UIViewControllerClass) 55 | ['{C07A29AC-CE9C-4F66-8FB1-53F71344CABA}'] 56 | end; 57 | 58 | AUViewController = interface(UIViewController) 59 | ['{99F17CA7-0F72-4B77-80FD-5914F77E971E}'] 60 | end; 61 | 62 | TAUViewController = class(TOCGenericImport) 64 | end; 65 | 66 | PAUViewController = Pointer; 67 | 68 | AUAudioUnit_ViewController = interface(IObjectiveC) 69 | ['{145AA248-0948-4E04-A0C1-B6A50A89B685}'] 70 | procedure requestViewControllerWithCompletionHandler(completionHandler 71 | : TCoreAudioKitCompletionHandler); cdecl; 72 | end; 73 | 74 | CABTMIDICentralViewControllerClass = interface(UITableViewControllerClass) 75 | ['{6536170A-ECFE-4F06-9DCF-F734E2BECE00}'] 76 | end; 77 | 78 | CABTMIDICentralViewController = interface(UITableViewController) 79 | ['{D4A5A069-4BBD-4D79-9965-286A4F5339E3}'] 80 | end; 81 | 82 | TCABTMIDICentralViewController = class 83 | (TOCGenericImport) 85 | end; 86 | 87 | PCABTMIDICentralViewController = Pointer; 88 | 89 | CABTMIDILocalPeripheralViewControllerClass = interface(UIViewControllerClass) 90 | ['{44EE236B-E60B-471B-9BCA-042F3DCE70FC}'] 91 | end; 92 | 93 | CABTMIDILocalPeripheralViewController = interface(UIViewController) 94 | ['{DF96F955-8A63-4AC2-8ACC-CB4D8116AB78}'] 95 | end; 96 | 97 | TCABTMIDILocalPeripheralViewController = class 98 | (TOCGenericImport) 100 | end; 101 | 102 | PCABTMIDILocalPeripheralViewController = Pointer; 103 | 104 | CAInterAppAudioSwitcherViewClass = interface(UIViewClass) 105 | ['{2A26C9C9-402C-4E01-BE34-CA8C99ADBB8A}'] 106 | end; 107 | 108 | CAInterAppAudioSwitcherView = interface(UIView) 109 | ['{EBFBD867-415C-471F-B381-DCA32134AD16}'] 110 | procedure setShowingAppNames(showingAppNames: Boolean); cdecl; 111 | function isShowingAppNames: Boolean; cdecl; 112 | procedure setOutputAudioUnit(au: AudioUnit); cdecl; 113 | function contentWidth: CGFloat; cdecl; 114 | end; 115 | 116 | TCAInterAppAudioSwitcherView = class 117 | (TOCGenericImport) 119 | end; 120 | 121 | PCAInterAppAudioSwitcherView = Pointer; 122 | 123 | CAInterAppAudioTransportViewClass = interface(UIViewClass) 124 | ['{B59AA9A5-3AF0-44BC-AC19-284A7EF9E0B3}'] 125 | end; 126 | 127 | CAInterAppAudioTransportView = interface(UIView) 128 | ['{D64FA21F-1BDA-4CA1-B211-6CC71970B509}'] 129 | procedure setEnabled(enabled: Boolean); cdecl; 130 | function isEnabled: Boolean; cdecl; 131 | function isPlaying: Boolean; cdecl; 132 | function isRecording: Boolean; cdecl; 133 | function isConnected: Boolean; cdecl; 134 | procedure setLabelColor(labelColor: UIColor); cdecl; 135 | function labelColor: UIColor; cdecl; 136 | procedure setCurrentTimeLabelFont(currentTimeLabelFont: UIFont); cdecl; 137 | function currentTimeLabelFont: UIFont; cdecl; 138 | procedure setRewindButtonColor(rewindButtonColor: UIColor); cdecl; 139 | function rewindButtonColor: UIColor; cdecl; 140 | procedure setPlayButtonColor(playButtonColor: UIColor); cdecl; 141 | function playButtonColor: UIColor; cdecl; 142 | procedure setPauseButtonColor(pauseButtonColor: UIColor); cdecl; 143 | function pauseButtonColor: UIColor; cdecl; 144 | procedure setRecordButtonColor(recordButtonColor: UIColor); cdecl; 145 | function recordButtonColor: UIColor; cdecl; 146 | procedure setOutputAudioUnit(au: AudioUnit); cdecl; 147 | end; 148 | 149 | TCAInterAppAudioTransportView = class 150 | (TOCGenericImport) 152 | end; 153 | 154 | PCAInterAppAudioTransportView = Pointer; 155 | 156 | // ===== External functions ===== 157 | 158 | const 159 | libCoreAudioKit = 160 | '/System/Library/Frameworks/CoreAudioKit.framework/CoreAudioKit'; 161 | 162 | implementation 163 | 164 | {$IF defined(IOS) and NOT defined(CPUARM)} 165 | 166 | uses 167 | Posix.Dlfcn; 168 | 169 | var 170 | CoreAudioKitModule: THandle; 171 | 172 | {$ENDIF IOS} 173 | {$IF defined(IOS) and NOT defined(CPUARM)} 174 | 175 | initialization 176 | 177 | CoreAudioKitModule := dlopen(MarshaledAString(libCoreAudioKit), RTLD_LAZY); 178 | 179 | finalization 180 | 181 | dlclose(CoreAudioKitModule); 182 | {$ENDIF IOS} 183 | 184 | end. 185 | -------------------------------------------------------------------------------- /iOSapi.MessageUI.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework MessageUI 12 | // 13 | 14 | unit iOSapi.MessageUI; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.Foundation, 29 | iOSapi.UIKit; 30 | 31 | const 32 | MFMailComposeResultCancelled = 0; 33 | MFMailComposeResultSaved = 1; 34 | MFMailComposeResultSent = 2; 35 | MFMailComposeResultFailed = 3; 36 | MFMailComposeErrorCodeSaveFailed = 0; 37 | MFMailComposeErrorCodeSendFailed = 1; 38 | MessageComposeResultCancelled = 0; 39 | MessageComposeResultSent = 1; 40 | MessageComposeResultFailed = 2; 41 | 42 | type 43 | 44 | // ===== Forward declarations ===== 45 | {$M+} 46 | MFMailComposeViewControllerDelegate = interface; 47 | MFMailComposeViewController = interface; 48 | MFMessageComposeViewControllerDelegate = interface; 49 | MFMessageComposeViewController = interface; 50 | 51 | // ===== Framework typedefs ===== 52 | {$M+} 53 | MFMailComposeResult = Cardinal; 54 | MFMailComposeErrorCode = Cardinal; 55 | MessageComposeResult = Cardinal; 56 | // ===== Interface declarations ===== 57 | 58 | MFMailComposeViewControllerClass = interface(UINavigationControllerClass) 59 | ['{23041F7D-6F10-4351-BE7C-C606BF9A8165}'] 60 | { class } function canSendMail: Boolean; cdecl; 61 | end; 62 | 63 | MFMailComposeViewController = interface(UINavigationController) 64 | ['{F4D14FF1-B13C-4BCE-A5BA-84F05CE11E94}'] 65 | procedure setMailComposeDelegate(mailComposeDelegate: Pointer); cdecl; 66 | function mailComposeDelegate: Pointer; cdecl; 67 | procedure setSubject(subject: NSString); cdecl; 68 | procedure setToRecipients(toRecipients: NSArray); cdecl; 69 | procedure setCcRecipients(ccRecipients: NSArray); cdecl; 70 | procedure setBccRecipients(bccRecipients: NSArray); cdecl; 71 | procedure setMessageBody(body: NSString; isHTML: Boolean); cdecl; 72 | procedure addAttachmentData(attachment: NSData; mimeType: NSString; 73 | fileName: NSString); cdecl; 74 | end; 75 | 76 | TMFMailComposeViewController = class 77 | (TOCGenericImport) 79 | end; 80 | 81 | PMFMailComposeViewController = Pointer; 82 | 83 | MFMessageComposeViewControllerClass = interface(UINavigationControllerClass) 84 | ['{EDF3ABDC-3B86-4274-804F-2E7B38B9D3BF}'] 85 | { class } function canSendText: Boolean; cdecl; 86 | { class } function canSendSubject: Boolean; cdecl; 87 | { class } function canSendAttachments: Boolean; cdecl; 88 | { class } function isSupportedAttachmentUTI(uti: NSString): Boolean; cdecl; 89 | end; 90 | 91 | MFMessageComposeViewController = interface(UINavigationController) 92 | ['{658B22D4-708A-4A95-B5F3-DB8B5C4943CF}'] 93 | procedure setMessageComposeDelegate(messageComposeDelegate: Pointer); cdecl; 94 | function messageComposeDelegate: Pointer; cdecl; 95 | procedure disableUserAttachments; cdecl; 96 | procedure setRecipients(recipients: NSArray); cdecl; 97 | function recipients: NSArray; cdecl; 98 | procedure setBody(body: NSString); cdecl; 99 | function body: NSString; cdecl; 100 | procedure setSubject(subject: NSString); cdecl; 101 | function subject: NSString; cdecl; 102 | function attachments: NSArray; cdecl; 103 | function addAttachmentURL(attachmentURL: NSURL; 104 | withAlternateFilename: NSString): Boolean; cdecl; 105 | function addAttachmentData(attachmentData: NSData; typeIdentifier: NSString; 106 | fileName: NSString): Boolean; cdecl; 107 | end; 108 | 109 | TMFMessageComposeViewController = class 110 | (TOCGenericImport) 112 | end; 113 | 114 | PMFMessageComposeViewController = Pointer; 115 | 116 | // ===== Protocol declarations ===== 117 | 118 | MFMailComposeViewControllerDelegate = interface(IObjectiveC) 119 | ['{27703958-2E37-4491-8D21-CF7BD14DB724}'] 120 | procedure mailComposeController(controller: MFMailComposeViewController; 121 | didFinishWithResult: MFMailComposeResult; error: NSError); cdecl; 122 | end; 123 | 124 | MFMessageComposeViewControllerDelegate = interface(IObjectiveC) 125 | ['{5B8114E8-DA1B-40FD-9D01-E81BC4B31978}'] 126 | procedure messageComposeViewController(controller 127 | : MFMessageComposeViewController; 128 | didFinishWithResult: MessageComposeResult); cdecl; 129 | end; 130 | 131 | // ===== Exported string consts ===== 132 | 133 | function MFMailComposeErrorDomain: NSString; 134 | function MFMessageComposeViewControllerAttachmentURL: NSString; 135 | function MFMessageComposeViewControllerAttachmentAlternateFilename: NSString; 136 | function MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification 137 | : NSString; 138 | function MFMessageComposeViewControllerTextMessageAvailabilityKey: NSString; 139 | 140 | 141 | // ===== External functions ===== 142 | 143 | const 144 | libMessageUI = '/System/Library/Frameworks/MessageUI.framework/MessageUI'; 145 | 146 | implementation 147 | 148 | {$IF defined(IOS) and NOT defined(CPUARM)} 149 | 150 | uses 151 | Posix.Dlfcn; 152 | 153 | var 154 | MessageUIModule: THandle; 155 | 156 | {$ENDIF IOS} 157 | 158 | function MFMailComposeErrorDomain: NSString; 159 | begin 160 | Result := CocoaNSStringConst(libMessageUI, 'MFMailComposeErrorDomain'); 161 | end; 162 | 163 | function MFMessageComposeViewControllerAttachmentURL: NSString; 164 | begin 165 | Result := CocoaNSStringConst(libMessageUI, 166 | 'MFMessageComposeViewControllerAttachmentURL'); 167 | end; 168 | 169 | function MFMessageComposeViewControllerAttachmentAlternateFilename: NSString; 170 | begin 171 | Result := CocoaNSStringConst(libMessageUI, 172 | 'MFMessageComposeViewControllerAttachmentAlternateFilename'); 173 | end; 174 | 175 | function MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification 176 | : NSString; 177 | begin 178 | Result := CocoaNSStringConst(libMessageUI, 179 | 'MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification'); 180 | end; 181 | 182 | function MFMessageComposeViewControllerTextMessageAvailabilityKey: NSString; 183 | begin 184 | Result := CocoaNSStringConst(libMessageUI, 185 | 'MFMessageComposeViewControllerTextMessageAvailabilityKey'); 186 | end; 187 | 188 | {$IF defined(IOS) and NOT defined(CPUARM)} 189 | 190 | initialization 191 | 192 | MessageUIModule := dlopen(MarshaledAString(libMessageUI), RTLD_LAZY); 193 | 194 | finalization 195 | 196 | dlclose(MessageUIModule); 197 | {$ENDIF IOS} 198 | 199 | end. 200 | -------------------------------------------------------------------------------- /iOSapi.EventKitUI.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework EventKitUI 12 | // 13 | 14 | unit iOSapi.EventKitUI; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.EventKit, 29 | iOSapi.Foundation, 30 | iOSapi.UIKit; 31 | 32 | const 33 | EKCalendarChooserSelectionStyleSingle = 0; 34 | EKCalendarChooserSelectionStyleMultiple = 1; 35 | EKCalendarChooserDisplayAllCalendars = 0; 36 | EKCalendarChooserDisplayWritableCalendarsOnly = 1; 37 | EKEventEditViewActionCanceled = 0; 38 | EKEventEditViewActionSaved = 1; 39 | EKEventEditViewActionDeleted = 2; 40 | EKEventEditViewActionCancelled = EKEventEditViewActionCanceled; 41 | EKEventViewActionDone = 0; 42 | EKEventViewActionResponded = 1; 43 | EKEventViewActionDeleted = 2; 44 | 45 | type 46 | 47 | // ===== Forward declarations ===== 48 | {$M+} 49 | EKCalendarChooserDelegate = interface; 50 | EKCalendarChooser = interface; 51 | EKEventEditViewDelegate = interface; 52 | EKEventEditViewController = interface; 53 | EKEventViewDelegate = interface; 54 | EKEventViewController = interface; 55 | 56 | // ===== Framework typedefs ===== 57 | {$M+} 58 | NSInteger = Integer; 59 | EKCalendarChooserSelectionStyle = NSInteger; 60 | EKCalendarChooserDisplayStyle = NSInteger; 61 | NSUInteger = Cardinal; 62 | EKEntityType = NSUInteger; 63 | EKEventEditViewAction = NSInteger; 64 | EKEventViewAction = NSInteger; 65 | // ===== Interface declarations ===== 66 | 67 | EKCalendarChooserClass = interface(UIViewControllerClass) 68 | ['{F34345CE-A042-4BB2-BF48-1BCA82CDEEBD}'] 69 | end; 70 | 71 | EKCalendarChooser = interface(UIViewController) 72 | ['{87530007-958C-472A-B688-860063B6BA5B}'] 73 | [MethodName('initWithSelectionStyle:displayStyle:eventStore:')] 74 | function initWithSelectionStyleDisplayStyleEventStore(selectionStyle 75 | : EKCalendarChooserSelectionStyle; 76 | displayStyle: EKCalendarChooserDisplayStyle; eventStore: EKEventStore) 77 | : Pointer; cdecl; 78 | [MethodName('initWithSelectionStyle:displayStyle:entityType:eventStore:')] 79 | function initWithSelectionStyleDisplayStyleEntityTypeEventStore 80 | (style: EKCalendarChooserSelectionStyle; 81 | displayStyle: EKCalendarChooserDisplayStyle; entityType: EKEntityType; 82 | eventStore: EKEventStore): Pointer; cdecl; 83 | function selectionStyle: EKCalendarChooserSelectionStyle; cdecl; 84 | procedure setDelegate(delegate: Pointer); cdecl; 85 | function delegate: Pointer; cdecl; 86 | procedure setShowsDoneButton(showsDoneButton: Boolean); cdecl; 87 | function showsDoneButton: Boolean; cdecl; 88 | procedure setShowsCancelButton(showsCancelButton: Boolean); cdecl; 89 | function showsCancelButton: Boolean; cdecl; 90 | procedure setSelectedCalendars(selectedCalendars: NSSet); cdecl; 91 | function selectedCalendars: NSSet; cdecl; 92 | end; 93 | 94 | TEKCalendarChooser = class(TOCGenericImport) 96 | end; 97 | 98 | PEKCalendarChooser = Pointer; 99 | 100 | EKEventEditViewControllerClass = interface(UINavigationControllerClass) 101 | ['{3F086835-BAA8-4370-9928-2A91EE1593A8}'] 102 | end; 103 | 104 | EKEventEditViewController = interface(UINavigationController) 105 | ['{B2D32269-6251-4F90-9FB0-1FC4584920ED}'] 106 | procedure setEditViewDelegate(editViewDelegate: Pointer); cdecl; 107 | function editViewDelegate: Pointer; cdecl; 108 | procedure setEventStore(eventStore: EKEventStore); cdecl; 109 | function eventStore: EKEventStore; cdecl; 110 | procedure setEvent(event: EKEvent); cdecl; 111 | function event: EKEvent; cdecl; 112 | procedure cancelEditing; cdecl; 113 | end; 114 | 115 | TEKEventEditViewController = class 116 | (TOCGenericImport) 118 | end; 119 | 120 | PEKEventEditViewController = Pointer; 121 | 122 | EKEventViewControllerClass = interface(UIViewControllerClass) 123 | ['{9811AC4F-112B-4E0F-AB8A-2640D310A034}'] 124 | end; 125 | 126 | EKEventViewController = interface(UIViewController) 127 | ['{3734E069-E1A0-4CAA-A41C-CE0C89E4FA12}'] 128 | procedure setDelegate(delegate: Pointer); cdecl; 129 | function delegate: Pointer; cdecl; 130 | procedure setEvent(event: EKEvent); cdecl; 131 | function event: EKEvent; cdecl; 132 | procedure setAllowsEditing(allowsEditing: Boolean); cdecl; 133 | function allowsEditing: Boolean; cdecl; 134 | procedure setAllowsCalendarPreview(allowsCalendarPreview: Boolean); cdecl; 135 | function allowsCalendarPreview: Boolean; cdecl; 136 | end; 137 | 138 | TEKEventViewController = class(TOCGenericImport) 140 | end; 141 | 142 | PEKEventViewController = Pointer; 143 | 144 | // ===== Protocol declarations ===== 145 | 146 | EKCalendarChooserDelegate = interface(IObjectiveC) 147 | ['{209FA6BF-F6C9-4FF4-95F9-B1523079F491}'] 148 | procedure calendarChooserSelectionDidChange(calendarChooser 149 | : EKCalendarChooser); cdecl; 150 | procedure calendarChooserDidFinish(calendarChooser 151 | : EKCalendarChooser); cdecl; 152 | procedure calendarChooserDidCancel(calendarChooser 153 | : EKCalendarChooser); cdecl; 154 | end; 155 | 156 | EKEventEditViewDelegate = interface(IObjectiveC) 157 | ['{636FD9A4-D2ED-4155-8FA3-0B4DD1A1980D}'] 158 | procedure eventEditViewController(controller: EKEventEditViewController; 159 | didCompleteWithAction: EKEventEditViewAction); cdecl; 160 | function eventEditViewControllerDefaultCalendarForNewEvents 161 | (controller: EKEventEditViewController): EKCalendar; cdecl; 162 | end; 163 | 164 | EKEventViewDelegate = interface(IObjectiveC) 165 | ['{97EE893A-41D6-45A4-BF4C-8E0B0D1F0E17}'] 166 | procedure eventViewController(controller: EKEventViewController; 167 | didCompleteWithAction: EKEventViewAction); cdecl; 168 | end; 169 | 170 | // ===== External functions ===== 171 | 172 | const 173 | libEventKitUI = '/System/Library/Frameworks/EventKitUI.framework/EventKitUI'; 174 | 175 | implementation 176 | 177 | {$IF defined(IOS) and NOT defined(CPUARM)} 178 | 179 | uses 180 | Posix.Dlfcn; 181 | 182 | var 183 | EventKitUIModule: THandle; 184 | 185 | {$ENDIF IOS} 186 | {$IF defined(IOS) and NOT defined(CPUARM)} 187 | 188 | initialization 189 | 190 | EventKitUIModule := dlopen(MarshaledAString(libEventKitUI), RTLD_LAZY); 191 | 192 | finalization 193 | 194 | dlclose(EventKitUIModule); 195 | {$ENDIF IOS} 196 | 197 | end. 198 | -------------------------------------------------------------------------------- /iOSapi.ExternalAccessory.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework ExternalAccessory 12 | // 13 | 14 | unit iOSapi.ExternalAccessory; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.Foundation; 29 | 30 | const 31 | EAConnectionIDNone = 0; 32 | EABluetoothAccessoryPickerAlreadyConnected = 0; 33 | EABluetoothAccessoryPickerResultNotFound = 1; 34 | EABluetoothAccessoryPickerResultCancelled = 2; 35 | EABluetoothAccessoryPickerResultFailed = 3; 36 | EAWiFiUnconfiguredAccessoryPropertySupportsAirPlay = (1 shl 0); 37 | EAWiFiUnconfiguredAccessoryPropertySupportsAirPrint = (1 shl 1); 38 | EAWiFiUnconfiguredAccessoryPropertySupportsHomeKit = (1 shl 2); 39 | EAWiFiUnconfiguredAccessoryBrowserStateWiFiUnavailable = 0; 40 | EAWiFiUnconfiguredAccessoryBrowserStateStopped = 1; 41 | EAWiFiUnconfiguredAccessoryBrowserStateSearching = 2; 42 | EAWiFiUnconfiguredAccessoryBrowserStateConfiguring = 3; 43 | EAWiFiUnconfiguredAccessoryConfigurationStatusSuccess = 0; 44 | EAWiFiUnconfiguredAccessoryConfigurationStatusUserCancelledConfiguration = 1; 45 | EAWiFiUnconfiguredAccessoryConfigurationStatusFailed = 2; 46 | 47 | type 48 | 49 | // ===== Forward declarations ===== 50 | {$M+} 51 | EAAccessoryDelegate = interface; 52 | EAWiFiUnconfiguredAccessory = interface; 53 | EAWiFiUnconfiguredAccessoryBrowserDelegate = interface; 54 | EAWiFiUnconfiguredAccessoryBrowser = interface; 55 | 56 | // ===== Framework typedefs ===== 57 | {$M+} 58 | NSInteger = Integer; 59 | EABluetoothAccessoryPickerErrorCode = NSInteger; 60 | EABluetoothAccessoryPickerCompletion = procedure(param1: NSError) of object; 61 | NSUInteger = Cardinal; 62 | EAWiFiUnconfiguredAccessoryProperties = NSUInteger; 63 | EAWiFiUnconfiguredAccessoryBrowserState = NSInteger; 64 | EAWiFiUnconfiguredAccessoryConfigurationStatus = NSInteger; 65 | dispatch_queue_t = Pointer; 66 | // ===== Interface declarations ===== 67 | 68 | EAWiFiUnconfiguredAccessoryClass = interface(NSObjectClass) 69 | ['{2FAC18D8-549D-4B25-8AC8-9C3535207230}'] 70 | end; 71 | 72 | EAWiFiUnconfiguredAccessory = interface(NSObject) 73 | ['{1395986B-793F-4F40-8745-30614F04B2FD}'] 74 | function name: NSString; cdecl; 75 | function manufacturer: NSString; cdecl; 76 | function model: NSString; cdecl; 77 | function ssid: NSString; cdecl; 78 | function macAddress: NSString; cdecl; 79 | function properties: EAWiFiUnconfiguredAccessoryProperties; cdecl; 80 | end; 81 | 82 | TEAWiFiUnconfiguredAccessory = class 83 | (TOCGenericImport) 85 | end; 86 | 87 | PEAWiFiUnconfiguredAccessory = Pointer; 88 | 89 | EAWiFiUnconfiguredAccessoryBrowserClass = interface(NSObjectClass) 90 | ['{912FC18C-57E2-4948-84FD-7D3E12A37ED1}'] 91 | end; 92 | 93 | EAWiFiUnconfiguredAccessoryBrowser = interface(NSObject) 94 | ['{9CED06A9-BB97-43E2-8F86-DD1FA0C6EA5A}'] 95 | procedure setDelegate(delegate: Pointer); cdecl; 96 | function delegate: Pointer; cdecl; 97 | function unconfiguredAccessories: NSSet; cdecl; 98 | function initWithDelegate(delegate: Pointer; queue: dispatch_queue_t) 99 | : Pointer { instancetype }; cdecl; 100 | procedure startSearchingForUnconfiguredAccessoriesMatchingPredicate 101 | (predicate: NSPredicate); cdecl; 102 | procedure stopSearchingForUnconfiguredAccessories; cdecl; 103 | procedure configureAccessory(accessory: EAWiFiUnconfiguredAccessory; 104 | withConfigurationUIOnViewController: UIViewController); cdecl; 105 | end; 106 | 107 | TEAWiFiUnconfiguredAccessoryBrowser = class 108 | (TOCGenericImport) 110 | end; 111 | 112 | PEAWiFiUnconfiguredAccessoryBrowser = Pointer; 113 | 114 | // ===== Protocol declarations ===== 115 | 116 | EAAccessoryDelegate = interface(IObjectiveC) 117 | ['{5A05CE63-6708-4989-8E13-852619C56D3B}'] 118 | procedure accessoryDidDisconnect(accessory: Pointer); cdecl; 119 | end; 120 | 121 | EAWiFiUnconfiguredAccessoryBrowserDelegate = interface(IObjectiveC) 122 | ['{2F6ED635-D17A-4EA3-BEF8-5C2BCDA526CB}'] 123 | [MethodName('accessoryBrowser:didUpdateState:')] 124 | procedure accessoryBrowserDidUpdateState 125 | (browser: EAWiFiUnconfiguredAccessoryBrowser; 126 | didUpdateState: EAWiFiUnconfiguredAccessoryBrowserState); cdecl; 127 | [MethodName('accessoryBrowser:didFindUnconfiguredAccessories:')] 128 | procedure accessoryBrowserDidFindUnconfiguredAccessories 129 | (browser: EAWiFiUnconfiguredAccessoryBrowser; 130 | didFindUnconfiguredAccessories: NSSet); cdecl; 131 | [MethodName('accessoryBrowser:didRemoveUnconfiguredAccessories:')] 132 | procedure accessoryBrowserDidRemoveUnconfiguredAccessories 133 | (browser: EAWiFiUnconfiguredAccessoryBrowser; 134 | didRemoveUnconfiguredAccessories: NSSet); cdecl; 135 | [MethodName('accessoryBrowser:didFinishConfiguringAccessory:withStatus:')] 136 | procedure accessoryBrowserDidFinishConfiguringAccessoryWithStatus 137 | (browser: EAWiFiUnconfiguredAccessoryBrowser; 138 | didFinishConfiguringAccessory: EAWiFiUnconfiguredAccessory; 139 | withStatus: EAWiFiUnconfiguredAccessoryConfigurationStatus); cdecl; 140 | end; 141 | 142 | // ===== Exported string consts ===== 143 | 144 | function NSString: Pointer; 145 | function NSString: Pointer; 146 | function NSString: Pointer; 147 | function NSString: Pointer; 148 | function NSString: Pointer; 149 | 150 | 151 | // ===== External functions ===== 152 | 153 | const 154 | libExternalAccessory = 155 | '/System/Library/Frameworks/ExternalAccessory.framework/ExternalAccessory'; 156 | 157 | implementation 158 | 159 | {$IF defined(IOS) and NOT defined(CPUARM)} 160 | 161 | uses 162 | Posix.Dlfcn; 163 | 164 | var 165 | ExternalAccessoryModule: THandle; 166 | 167 | {$ENDIF IOS} 168 | 169 | function NSString: Pointer; 170 | begin 171 | Result := CocoaPointerConst(libExternalAccessory, 'NSString'); 172 | end; 173 | 174 | function NSString: Pointer; 175 | begin 176 | Result := CocoaPointerConst(libExternalAccessory, 'NSString'); 177 | end; 178 | 179 | function NSString: Pointer; 180 | begin 181 | Result := CocoaPointerConst(libExternalAccessory, 'NSString'); 182 | end; 183 | 184 | function NSString: Pointer; 185 | begin 186 | Result := CocoaPointerConst(libExternalAccessory, 'NSString'); 187 | end; 188 | 189 | function NSString: Pointer; 190 | begin 191 | Result := CocoaPointerConst(libExternalAccessory, 'NSString'); 192 | end; 193 | 194 | {$IF defined(IOS) and NOT defined(CPUARM)} 195 | 196 | initialization 197 | 198 | ExternalAccessoryModule := dlopen(MarshaledAString(libExternalAccessory), 199 | RTLD_LAZY); 200 | 201 | finalization 202 | 203 | dlclose(ExternalAccessoryModule); 204 | {$ENDIF IOS} 205 | 206 | end. 207 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.MessageUI.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework MessageUI 12 | // 13 | 14 | unit iOSapi.MessageUI; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.Foundation, 27 | iOSapi.UIKit; 28 | 29 | const 30 | MFMailComposeResultCancelled = 0; 31 | MFMailComposeResultSaved = 1; 32 | MFMailComposeResultSent = 2; 33 | MFMailComposeResultFailed = 3; 34 | MFMailComposeErrorCodeSaveFailed = 0; 35 | MFMailComposeErrorCodeSendFailed = 1; 36 | MessageComposeResultCancelled = 0; 37 | MessageComposeResultSent = 1; 38 | MessageComposeResultFailed = 2; 39 | 40 | type 41 | 42 | // ===== Forward declarations ===== 43 | {$M+} 44 | MFMailComposeViewControllerDelegate = interface; 45 | MFMailComposeViewController = interface; 46 | MFMessageComposeViewControllerDelegate = interface; 47 | MFMessageComposeViewController = interface; 48 | 49 | // ===== Framework typedefs ===== 50 | {$M+} 51 | NSInteger = Integer; 52 | PNSInteger = ^NSInteger; 53 | 54 | MFMailComposeResult = NSInteger; 55 | NSErrorDomain = NSString; 56 | PNSErrorDomain = ^NSErrorDomain; 57 | MFMailComposeErrorCode = NSInteger; 58 | MessageComposeResult = NSInteger; 59 | // ===== Interface declarations ===== 60 | 61 | MFMailComposeViewControllerClass = interface(UINavigationControllerClass) 62 | ['{48900D35-78E5-461A-B6C3-18C3758CFA2B}'] 63 | { class } function canSendMail: Boolean; cdecl; 64 | end; 65 | 66 | MFMailComposeViewController = interface(UINavigationController) 67 | ['{6132C279-AF15-4D2B-9D2D-9274F76D3877}'] 68 | procedure setMailComposeDelegate(mailComposeDelegate: Pointer); cdecl; 69 | function mailComposeDelegate: Pointer; cdecl; 70 | procedure setSubject(subject: NSString); cdecl; 71 | procedure setToRecipients(toRecipients: NSArray); cdecl; 72 | procedure setCcRecipients(ccRecipients: NSArray); cdecl; 73 | procedure setBccRecipients(bccRecipients: NSArray); cdecl; 74 | procedure setMessageBody(body: NSString; isHTML: Boolean); cdecl; 75 | procedure addAttachmentData(attachment: NSData; mimeType: NSString; 76 | fileName: NSString); cdecl; 77 | procedure setPreferredSendingEmailAddress(emailAddress: NSString); cdecl; 78 | end; 79 | 80 | TMFMailComposeViewController = class 81 | (TOCGenericImport) 83 | end; 84 | 85 | PMFMailComposeViewController = Pointer; 86 | 87 | MFMessageComposeViewControllerClass = interface(UINavigationControllerClass) 88 | ['{A4B28EEE-F1BC-454E-96CD-6222B013BE5F}'] 89 | { class } function canSendText: Boolean; cdecl; 90 | { class } function canSendSubject: Boolean; cdecl; 91 | { class } function canSendAttachments: Boolean; cdecl; 92 | { class } function isSupportedAttachmentUTI(uti: NSString): Boolean; cdecl; 93 | end; 94 | 95 | MFMessageComposeViewController = interface(UINavigationController) 96 | ['{973448C6-6EA1-47EB-87DE-61DBB5274753}'] 97 | procedure setMessageComposeDelegate(messageComposeDelegate: Pointer); cdecl; 98 | function messageComposeDelegate: Pointer; cdecl; 99 | procedure disableUserAttachments; cdecl; 100 | procedure setRecipients(recipients: NSArray); cdecl; 101 | function recipients: NSArray; cdecl; 102 | procedure setBody(body: NSString); cdecl; 103 | function body: NSString; cdecl; 104 | procedure setSubject(subject: NSString); cdecl; 105 | function subject: NSString; cdecl; 106 | function attachments: NSArray; cdecl; 107 | procedure setMessage(message: MSMessage); cdecl; 108 | function message: MSMessage; cdecl; 109 | function addAttachmentURL(attachmentURL: NSURL; 110 | withAlternateFilename: NSString): Boolean; cdecl; 111 | function addAttachmentData(attachmentData: NSData; typeIdentifier: NSString; 112 | fileName: NSString): Boolean; cdecl; 113 | function insertCollaborationItemProvider(itemProvider: NSItemProvider) 114 | : Boolean; cdecl; 115 | end; 116 | 117 | TMFMessageComposeViewController = class 118 | (TOCGenericImport) 120 | end; 121 | 122 | PMFMessageComposeViewController = Pointer; 123 | 124 | // ===== Protocol declarations ===== 125 | 126 | MFMailComposeViewControllerDelegate = interface(IObjectiveC) 127 | ['{BCCF8E32-DBE5-45A4-A8B8-5B14E60F2D6F}'] 128 | procedure mailComposeController(controller: MFMailComposeViewController; 129 | didFinishWithResult: MFMailComposeResult; error: NSError); cdecl; 130 | end; 131 | 132 | MFMessageComposeViewControllerDelegate = interface(IObjectiveC) 133 | ['{1F9C32BB-4077-452B-9B6C-32B6D1F03C81}'] 134 | procedure messageComposeViewController(controller 135 | : MFMessageComposeViewController; 136 | didFinishWithResult: MessageComposeResult); cdecl; 137 | end; 138 | 139 | // ===== Exported string consts ===== 140 | 141 | function MFMailComposeErrorDomain: Pointer; 142 | function MFMessageComposeViewControllerAttachmentURL: NSString; 143 | function MFMessageComposeViewControllerAttachmentAlternateFilename: NSString; 144 | function MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification 145 | : NSString; 146 | function MFMessageComposeViewControllerTextMessageAvailabilityKey: NSString; 147 | 148 | 149 | // ===== External functions ===== 150 | 151 | const 152 | libMessageUI = '/System/Library/Frameworks/MessageUI.framework/MessageUI'; 153 | 154 | implementation 155 | 156 | {$IF defined(IOS) and NOT defined(CPUARM)} 157 | 158 | uses 159 | Posix.Dlfcn; 160 | 161 | var 162 | MessageUIModule: THandle; 163 | 164 | {$ENDIF IOS} 165 | 166 | function MFMessageComposeViewControllerAttachmentURL: NSString; 167 | begin 168 | Result := CocoaNSStringConst(libMessageUI, 169 | 'MFMessageComposeViewControllerAttachmentURL'); 170 | end; 171 | 172 | function MFMessageComposeViewControllerAttachmentAlternateFilename: NSString; 173 | begin 174 | Result := CocoaNSStringConst(libMessageUI, 175 | 'MFMessageComposeViewControllerAttachmentAlternateFilename'); 176 | end; 177 | 178 | function MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification 179 | : NSString; 180 | begin 181 | Result := CocoaNSStringConst(libMessageUI, 182 | 'MFMessageComposeViewControllerTextMessageAvailabilityDidChangeNotification'); 183 | end; 184 | 185 | function MFMessageComposeViewControllerTextMessageAvailabilityKey: NSString; 186 | begin 187 | Result := CocoaNSStringConst(libMessageUI, 188 | 'MFMessageComposeViewControllerTextMessageAvailabilityKey'); 189 | end; 190 | 191 | function MFMailComposeErrorDomain: Pointer; 192 | begin 193 | Result := CocoaPointerConst(libMessageUI, 'MFMailComposeErrorDomain'); 194 | end; 195 | 196 | {$IF defined(IOS) and NOT defined(CPUARM)} 197 | 198 | initialization 199 | 200 | MessageUIModule := dlopen(MarshaledAString(libMessageUI), RTLD_LAZY); 201 | 202 | finalization 203 | 204 | dlclose(MessageUIModule); 205 | {$ENDIF IOS} 206 | 207 | end. 208 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.EventKitUI.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework EventKitUI 12 | // 13 | 14 | unit iOSapi.EventKitUI; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.EventKit, 27 | iOSapi.Foundation, 28 | iOSapi.UIKit; 29 | 30 | const 31 | EKCalendarChooserSelectionStyleSingle = 0; 32 | EKCalendarChooserSelectionStyleMultiple = 1; 33 | EKCalendarChooserDisplayAllCalendars = 0; 34 | EKCalendarChooserDisplayWritableCalendarsOnly = 1; 35 | EKEventEditViewActionCanceled = 0; 36 | EKEventEditViewActionSaved = 1; 37 | EKEventEditViewActionDeleted = 2; 38 | EKEventEditViewActionCancelled = EKEventEditViewActionCanceled; 39 | EKEventViewActionDone = 0; 40 | EKEventViewActionResponded = 1; 41 | EKEventViewActionDeleted = 2; 42 | 43 | type 44 | 45 | // ===== Forward declarations ===== 46 | {$M+} 47 | EKCalendarChooserDelegate = interface; 48 | EKCalendarChooser = interface; 49 | EKEventEditViewDelegate = interface; 50 | EKEventEditViewController = interface; 51 | EKEventViewDelegate = interface; 52 | EKEventViewController = interface; 53 | EKDayOccurrenceView = interface; 54 | 55 | // ===== Framework typedefs ===== 56 | {$M+} 57 | NSInteger = Integer; 58 | PNSInteger = ^NSInteger; 59 | 60 | EKCalendarChooserSelectionStyle = NSInteger; 61 | EKCalendarChooserDisplayStyle = NSInteger; 62 | NSUInteger = Cardinal; 63 | PNSUInteger = ^NSUInteger; 64 | 65 | EKEntityType = NSUInteger; 66 | EKEventEditViewAction = NSInteger; 67 | EKEventViewAction = NSInteger; 68 | UIUserInterfaceSizeClass = NSInteger; 69 | // ===== Interface declarations ===== 70 | 71 | EKCalendarChooserClass = interface(UIViewControllerClass) 72 | ['{8BB61E32-2674-483F-B2B8-A953E7163D41}'] 73 | end; 74 | 75 | EKCalendarChooser = interface(UIViewController) 76 | ['{0E0C504B-0B03-48B3-992D-D2A78DD7183E}'] 77 | [MethodName('initWithSelectionStyle:displayStyle:eventStore:')] 78 | function initWithSelectionStyleDisplayStyleEventStore(selectionStyle 79 | : EKCalendarChooserSelectionStyle; 80 | displayStyle: EKCalendarChooserDisplayStyle; eventStore: EKEventStore) 81 | : Pointer; cdecl; 82 | [MethodName('initWithSelectionStyle:displayStyle:entityType:eventStore:')] 83 | function initWithSelectionStyleDisplayStyleEntityTypeEventStore 84 | (style: EKCalendarChooserSelectionStyle; 85 | displayStyle: EKCalendarChooserDisplayStyle; entityType: EKEntityType; 86 | eventStore: EKEventStore): Pointer; cdecl; 87 | function selectionStyle: EKCalendarChooserSelectionStyle; cdecl; 88 | procedure setDelegate(delegate: Pointer); cdecl; 89 | function delegate: Pointer; cdecl; 90 | procedure setShowsDoneButton(showsDoneButton: Boolean); cdecl; 91 | function showsDoneButton: Boolean; cdecl; 92 | procedure setShowsCancelButton(showsCancelButton: Boolean); cdecl; 93 | function showsCancelButton: Boolean; cdecl; 94 | procedure setSelectedCalendars(selectedCalendars: NSSet); cdecl; 95 | function selectedCalendars: NSSet; cdecl; 96 | end; 97 | 98 | TEKCalendarChooser = class(TOCGenericImport) 100 | end; 101 | 102 | PEKCalendarChooser = Pointer; 103 | 104 | EKEventEditViewControllerClass = interface(UINavigationControllerClass) 105 | ['{494578FB-18EB-4AC8-888A-3D60EE3A3F9B}'] 106 | end; 107 | 108 | EKEventEditViewController = interface(UINavigationController) 109 | ['{C96234D3-D0C1-42AE-816C-A3CBE5AA2698}'] 110 | procedure setEditViewDelegate(editViewDelegate: Pointer); cdecl; 111 | function editViewDelegate: Pointer; cdecl; 112 | procedure setEventStore(eventStore: EKEventStore); cdecl; 113 | function eventStore: EKEventStore; cdecl; 114 | procedure setEvent(event: EKEvent); cdecl; 115 | function event: EKEvent; cdecl; 116 | procedure cancelEditing; cdecl; 117 | end; 118 | 119 | TEKEventEditViewController = class 120 | (TOCGenericImport) 122 | end; 123 | 124 | PEKEventEditViewController = Pointer; 125 | 126 | EKEventViewControllerClass = interface(UIViewControllerClass) 127 | ['{4DDEB409-CFC4-4063-B73D-0023925A6DC0}'] 128 | end; 129 | 130 | EKEventViewController = interface(UIViewController) 131 | ['{86CF98FC-DE2C-49A9-BDE2-C0DA09F63309}'] 132 | procedure setDelegate(delegate: Pointer); cdecl; 133 | function delegate: Pointer; cdecl; 134 | procedure setEvent(event: EKEvent); cdecl; 135 | function event: EKEvent; cdecl; 136 | procedure setAllowsEditing(allowsEditing: Boolean); cdecl; 137 | function allowsEditing: Boolean; cdecl; 138 | procedure setAllowsCalendarPreview(allowsCalendarPreview: Boolean); cdecl; 139 | function allowsCalendarPreview: Boolean; cdecl; 140 | end; 141 | 142 | TEKEventViewController = class(TOCGenericImport) 144 | end; 145 | 146 | PEKEventViewController = Pointer; 147 | 148 | EKDayOccurrenceView = interface(IObjectiveC) 149 | ['{3F605498-7B70-4481-9D9C-DA76A5EB489D}'] 150 | function ek_defaultOccurrenceSecondaryTextFont: UIFont; cdecl; 151 | function ek_defaultOccurrencePrimaryTextFontForSizeClass 152 | (sizeClass: UIUserInterfaceSizeClass): UIFont; cdecl; 153 | function ek_defaultOccurrenceSmallPrimaryTextFontForSizeClass 154 | (sizeClass: UIUserInterfaceSizeClass): UIFont; cdecl; 155 | end; 156 | 157 | // ===== Protocol declarations ===== 158 | 159 | EKCalendarChooserDelegate = interface(IObjectiveC) 160 | ['{1A1B6DB7-B039-4019-B8FC-3D3B03DF106E}'] 161 | procedure calendarChooserSelectionDidChange(calendarChooser 162 | : EKCalendarChooser); cdecl; 163 | procedure calendarChooserDidFinish(calendarChooser 164 | : EKCalendarChooser); cdecl; 165 | procedure calendarChooserDidCancel(calendarChooser 166 | : EKCalendarChooser); cdecl; 167 | end; 168 | 169 | EKEventEditViewDelegate = interface(IObjectiveC) 170 | ['{E1EB6CB9-A8FC-44BC-B235-6D519CA8B049}'] 171 | procedure eventEditViewController(controller: EKEventEditViewController; 172 | didCompleteWithAction: EKEventEditViewAction); cdecl; 173 | function eventEditViewControllerDefaultCalendarForNewEvents 174 | (controller: EKEventEditViewController): EKCalendar; cdecl; 175 | end; 176 | 177 | EKEventViewDelegate = interface(IObjectiveC) 178 | ['{1AC3C8C4-6F44-4658-A526-1BF830B3723E}'] 179 | procedure eventViewController(controller: EKEventViewController; 180 | didCompleteWithAction: EKEventViewAction); cdecl; 181 | end; 182 | 183 | // ===== External functions ===== 184 | 185 | const 186 | libEventKitUI = '/System/Library/Frameworks/EventKitUI.framework/EventKitUI'; 187 | function EventKitUIBundle: Pointer { NSBundle }; cdecl; 188 | external libEventKitUI name _PU + 'EventKitUIBundle'; 189 | 190 | implementation 191 | 192 | {$IF defined(IOS) and NOT defined(CPUARM)} 193 | 194 | uses 195 | Posix.Dlfcn; 196 | 197 | var 198 | EventKitUIModule: THandle; 199 | 200 | {$ENDIF IOS} 201 | {$IF defined(IOS) and NOT defined(CPUARM)} 202 | 203 | initialization 204 | 205 | EventKitUIModule := dlopen(MarshaledAString(libEventKitUI), RTLD_LAZY); 206 | 207 | finalization 208 | 209 | dlclose(EventKitUIModule); 210 | {$ENDIF IOS} 211 | 212 | end. 213 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.CoreAudioKit.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework CoreAudioKit 12 | // 13 | 14 | unit iOSapi.CoreAudioKit; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.AudioToolbox, 26 | iOSapi.CocoaTypes, 27 | iOSapi.Foundation, 28 | iOSapi.UIKit; 29 | 30 | type 31 | 32 | // ===== Forward declarations ===== 33 | {$M+} 34 | AUViewController = interface; 35 | AUAudioUnitViewConfiguration = interface; 36 | AUAudioUnit_ViewController = interface; 37 | AUGenericViewController = interface; 38 | CABTMIDICentralViewController = interface; 39 | CABTMIDILocalPeripheralViewController = interface; 40 | CAInterAppAudioSwitcherView = interface; 41 | CAInterAppAudioTransportView = interface; 42 | 43 | // ===== Framework typedefs ===== 44 | {$M+} 45 | AUViewControllerBase = UIViewController; 46 | PAUViewControllerBase = ^AUViewControllerBase; 47 | CGFloat = Single; 48 | PCGFloat = ^CGFloat; 49 | 50 | TCoreAudioKitCompletionHandler = procedure(param1: AUViewControllerBase) 51 | of object; 52 | AUViewColor = UIColor; 53 | PAUViewColor = ^AUViewColor; 54 | AudioComponentInstance = Pointer; 55 | PAudioComponentInstance = ^AudioComponentInstance; 56 | AudioUnit = AudioComponentInstance; 57 | PAudioUnit = ^AudioUnit; 58 | // ===== Interface declarations ===== 59 | 60 | AUViewControllerClass = interface(UIViewControllerClass) 61 | ['{47E53F23-C4E2-4927-BBF3-5417939431D8}'] 62 | end; 63 | 64 | AUViewController = interface(UIViewController) 65 | ['{B18DDF95-AAA2-44E4-9EB4-09BF51C919FA}'] 66 | end; 67 | 68 | TAUViewController = class(TOCGenericImport) 70 | end; 71 | 72 | PAUViewController = Pointer; 73 | 74 | AUAudioUnitViewConfigurationClass = interface(NSObjectClass) 75 | ['{5D19C609-4809-4775-981C-CD582C923EFA}'] 76 | end; 77 | 78 | AUAudioUnitViewConfiguration = interface(NSObject) 79 | ['{CD55F601-A196-40AF-B470-97775A222748}'] 80 | function initWithWidth(width: CGFloat; height: CGFloat; 81 | hostHasController: Boolean): Pointer { instancetype }; cdecl; 82 | function width: CGFloat; cdecl; 83 | function height: CGFloat; cdecl; 84 | function hostHasController: Boolean; cdecl; 85 | end; 86 | 87 | TAUAudioUnitViewConfiguration = class 88 | (TOCGenericImport) 90 | end; 91 | 92 | PAUAudioUnitViewConfiguration = Pointer; 93 | 94 | AUAudioUnit_ViewController = interface(IObjectiveC) 95 | ['{D1A14E66-6A28-4134-85A0-85614131B0AE}'] 96 | procedure requestViewControllerWithCompletionHandler(completionHandler 97 | : TCoreAudioKitCompletionHandler); cdecl; 98 | function supportedViewConfigurations(availableViewConfigurations: NSArray) 99 | : NSIndexSet; cdecl; 100 | procedure selectViewConfiguration(viewConfiguration 101 | : AUAudioUnitViewConfiguration); cdecl; 102 | end; 103 | 104 | AUGenericViewControllerClass = interface(UIViewControllerClass) 105 | ['{23E5B91A-CB8D-497E-A727-65FA323A38BB}'] 106 | end; 107 | 108 | AUGenericViewController = interface(UIViewController) 109 | ['{F4C6208A-A819-4E39-B7E1-FEDD9592D8A0}'] 110 | procedure setAuAudioUnit(auAudioUnit: auAudioUnit); cdecl; 111 | function auAudioUnit: auAudioUnit; cdecl; 112 | end; 113 | 114 | TAUGenericViewController = class 115 | (TOCGenericImport) 116 | end; 117 | 118 | PAUGenericViewController = Pointer; 119 | 120 | CABTMIDICentralViewControllerClass = interface(UITableViewControllerClass) 121 | ['{AA4629E7-B269-4465-BD83-F93B85789C62}'] 122 | end; 123 | 124 | CABTMIDICentralViewController = interface(UITableViewController) 125 | ['{B56D16AD-8B7D-4E68-BFED-7B2595AF3129}'] 126 | end; 127 | 128 | TCABTMIDICentralViewController = class 129 | (TOCGenericImport) 131 | end; 132 | 133 | PCABTMIDICentralViewController = Pointer; 134 | 135 | CABTMIDILocalPeripheralViewControllerClass = interface(UIViewControllerClass) 136 | ['{D1B1EC6E-D49E-4F79-AFC5-125761E4B21F}'] 137 | end; 138 | 139 | CABTMIDILocalPeripheralViewController = interface(UIViewController) 140 | ['{52D52154-0505-4D21-8B4F-5F48FB552B45}'] 141 | end; 142 | 143 | TCABTMIDILocalPeripheralViewController = class 144 | (TOCGenericImport) 146 | end; 147 | 148 | PCABTMIDILocalPeripheralViewController = Pointer; 149 | 150 | CAInterAppAudioSwitcherViewClass = interface(UIViewClass) 151 | ['{EB28C04D-2FB7-49F9-8615-D045AF40AAAA}'] 152 | end; 153 | 154 | CAInterAppAudioSwitcherView = interface(UIView) 155 | ['{1DA43094-1442-42AB-87CC-5BD76F100F32}'] 156 | procedure setShowingAppNames(showingAppNames: Boolean); cdecl; 157 | function isShowingAppNames: Boolean; cdecl; 158 | procedure setOutputAudioUnit(au: AudioUnit); cdecl; 159 | function contentWidth: CGFloat; cdecl; 160 | end; 161 | 162 | TCAInterAppAudioSwitcherView = class 163 | (TOCGenericImport) 165 | end; 166 | 167 | PCAInterAppAudioSwitcherView = Pointer; 168 | 169 | CAInterAppAudioTransportViewClass = interface(UIViewClass) 170 | ['{7F12469D-6ED4-43B0-B1F1-8556A2011EED}'] 171 | end; 172 | 173 | CAInterAppAudioTransportView = interface(UIView) 174 | ['{57478B96-DEDC-4CAB-B7A4-4D312B4CE80B}'] 175 | procedure setEnabled(enabled: Boolean); cdecl; 176 | function isEnabled: Boolean; cdecl; 177 | function isPlaying: Boolean; cdecl; 178 | function isRecording: Boolean; cdecl; 179 | function isConnected: Boolean; cdecl; 180 | procedure setLabelColor(labelColor: UIColor); cdecl; 181 | function labelColor: UIColor; cdecl; 182 | procedure setCurrentTimeLabelFont(currentTimeLabelFont: UIFont); cdecl; 183 | function currentTimeLabelFont: UIFont; cdecl; 184 | procedure setRewindButtonColor(rewindButtonColor: UIColor); cdecl; 185 | function rewindButtonColor: UIColor; cdecl; 186 | procedure setPlayButtonColor(playButtonColor: UIColor); cdecl; 187 | function playButtonColor: UIColor; cdecl; 188 | procedure setPauseButtonColor(pauseButtonColor: UIColor); cdecl; 189 | function pauseButtonColor: UIColor; cdecl; 190 | procedure setRecordButtonColor(recordButtonColor: UIColor); cdecl; 191 | function recordButtonColor: UIColor; cdecl; 192 | procedure setOutputAudioUnit(au: AudioUnit); cdecl; 193 | end; 194 | 195 | TCAInterAppAudioTransportView = class 196 | (TOCGenericImport) 198 | end; 199 | 200 | PCAInterAppAudioTransportView = Pointer; 201 | 202 | // ===== External functions ===== 203 | 204 | const 205 | libCoreAudioKit = 206 | '/System/Library/Frameworks/CoreAudioKit.framework/CoreAudioKit'; 207 | 208 | implementation 209 | 210 | {$IF defined(IOS) and NOT defined(CPUARM)} 211 | 212 | uses 213 | Posix.Dlfcn; 214 | 215 | var 216 | CoreAudioKitModule: THandle; 217 | 218 | {$ENDIF IOS} 219 | {$IF defined(IOS) and NOT defined(CPUARM)} 220 | 221 | initialization 222 | 223 | CoreAudioKitModule := dlopen(MarshaledAString(libCoreAudioKit), RTLD_LAZY); 224 | 225 | finalization 226 | 227 | dlclose(CoreAudioKitModule); 228 | {$ENDIF IOS} 229 | 230 | end. 231 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.Social.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework Social 12 | // 13 | 14 | unit iOSapi.Social; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.Accounts, 26 | iOSapi.CocoaTypes, 27 | iOSapi.Foundation, 28 | iOSapi.UIKit; 29 | 30 | const 31 | SLComposeViewControllerResultCancelled = 0; 32 | SLComposeViewControllerResultDone = 1; 33 | SLRequestMethodGET = 0; 34 | SLRequestMethodPOST = 1; 35 | SLRequestMethodDELETE = 2; 36 | SLRequestMethodPUT = 3; 37 | 38 | type 39 | 40 | // ===== Forward declarations ===== 41 | {$M+} 42 | SLComposeServiceViewController = interface; 43 | SLComposeSheetConfigurationItem = interface; 44 | SLComposeViewController = interface; 45 | SLRequest = interface; 46 | 47 | // ===== Framework typedefs ===== 48 | {$M+} 49 | SLComposeSheetConfigurationItemTapHandler = procedure() of object; 50 | NSInteger = Integer; 51 | PNSInteger = ^NSInteger; 52 | 53 | SLComposeViewControllerResult = NSInteger; 54 | SLComposeViewControllerCompletionHandler = procedure 55 | (param1: SLComposeViewControllerResult) of object; 56 | SLRequestMethod = NSInteger; 57 | SLRequestHandler = procedure(param1: NSData; param2: NSHTTPURLResponse; 58 | param3: NSError) of object; 59 | // ===== Interface declarations ===== 60 | 61 | SLComposeServiceViewControllerClass = interface(UIViewControllerClass) 62 | ['{AA9CA082-ADC8-45E5-8CBA-42991538E628}'] 63 | end; 64 | 65 | SLComposeServiceViewController = interface(UIViewController) 66 | ['{24FF5ADD-A129-45B6-8FEC-BE70ED731D98}'] 67 | procedure presentationAnimationDidFinish; cdecl; 68 | function textView: UITextView; cdecl; 69 | function contentText: NSString; cdecl; 70 | procedure setPlaceholder(placeholder: NSString); cdecl; 71 | function placeholder: NSString; cdecl; 72 | procedure didSelectPost; cdecl; 73 | procedure didSelectCancel; cdecl; 74 | procedure cancel; cdecl; 75 | function isContentValid: Boolean; cdecl; 76 | procedure validateContent; cdecl; 77 | procedure setCharactersRemaining(charactersRemaining: NSNumber); cdecl; 78 | function charactersRemaining: NSNumber; cdecl; 79 | function configurationItems: NSArray; cdecl; 80 | procedure reloadConfigurationItems; cdecl; 81 | procedure pushConfigurationViewController(viewController 82 | : UIViewController); cdecl; 83 | procedure popConfigurationViewController; cdecl; 84 | function loadPreviewView: UIView; cdecl; 85 | procedure setAutoCompletionViewController(autoCompletionViewController 86 | : UIViewController); cdecl; 87 | function autoCompletionViewController: UIViewController; cdecl; 88 | end; 89 | 90 | TSLComposeServiceViewController = class 91 | (TOCGenericImport) 93 | end; 94 | 95 | PSLComposeServiceViewController = Pointer; 96 | 97 | SLComposeSheetConfigurationItemClass = interface(NSObjectClass) 98 | ['{8E0B9CBF-404D-40DA-BE59-A35EE7848D1C}'] 99 | end; 100 | 101 | SLComposeSheetConfigurationItem = interface(NSObject) 102 | ['{B4E6BD23-9A43-487C-94FD-A2288B4838DB}'] 103 | function init: Pointer { instancetype }; cdecl; 104 | procedure setTitle(title: NSString); cdecl; 105 | function title: NSString; cdecl; 106 | procedure setValue(value: NSString); cdecl; 107 | function value: NSString; cdecl; 108 | procedure setValuePending(valuePending: Boolean); cdecl; 109 | function valuePending: Boolean; cdecl; 110 | procedure setTapHandler(tapHandler 111 | : SLComposeSheetConfigurationItemTapHandler); cdecl; 112 | function tapHandler: SLComposeSheetConfigurationItemTapHandler; cdecl; 113 | end; 114 | 115 | TSLComposeSheetConfigurationItem = class 116 | (TOCGenericImport) 118 | end; 119 | 120 | PSLComposeSheetConfigurationItem = Pointer; 121 | 122 | SLComposeViewControllerClass = interface(UIViewControllerClass) 123 | ['{A13E123A-22FD-419F-A8DA-DA86DB854821}'] 124 | { class } function isAvailableForServiceType(serviceType: NSString) 125 | : Boolean; cdecl; 126 | { class } function composeViewControllerForServiceType 127 | (serviceType: NSString): SLComposeViewController; cdecl; 128 | end; 129 | 130 | SLComposeViewController = interface(UIViewController) 131 | ['{FC7BE346-2C10-4D32-8985-8B14BD1DC6CF}'] 132 | function serviceType: NSString; cdecl; 133 | function setInitialText(text: NSString): Boolean; cdecl; 134 | function addImage(image: UIImage): Boolean; cdecl; 135 | function removeAllImages: Boolean; cdecl; 136 | function addURL(url: NSURL): Boolean; cdecl; 137 | function removeAllURLs: Boolean; cdecl; 138 | procedure setCompletionHandler(completionHandler 139 | : SLComposeViewControllerCompletionHandler); cdecl; 140 | function completionHandler: SLComposeViewControllerCompletionHandler; cdecl; 141 | end; 142 | 143 | TSLComposeViewController = class 144 | (TOCGenericImport) 145 | end; 146 | 147 | PSLComposeViewController = Pointer; 148 | 149 | SLRequestClass = interface(NSObjectClass) 150 | ['{9F71A0A7-8D84-4ED4-8479-B2E6F940D98C}'] 151 | { class } function requestForServiceType(serviceType: NSString; 152 | requestMethod: SLRequestMethod; url: NSURL; parameters: NSDictionary) 153 | : SLRequest; cdecl; 154 | end; 155 | 156 | SLRequest = interface(NSObject) 157 | ['{BC4E365D-389D-49C4-B874-D0820B034D72}'] 158 | procedure setAccount(account: ACAccount); cdecl; 159 | function account: ACAccount; cdecl; 160 | function requestMethod: SLRequestMethod; cdecl; 161 | function url: NSURL; cdecl; 162 | function parameters: NSDictionary; cdecl; 163 | procedure addMultipartData(data: NSData; withName: NSString; 164 | &type: NSString; filename: NSString); cdecl; 165 | function preparedURLRequest: NSURLRequest; cdecl; 166 | procedure performRequestWithHandler(handler: SLRequestHandler); cdecl; 167 | end; 168 | 169 | TSLRequest = class(TOCGenericImport) 170 | end; 171 | 172 | PSLRequest = Pointer; 173 | 174 | // ===== Exported string consts ===== 175 | 176 | function SLServiceTypeTwitter: NSString; 177 | function SLServiceTypeFacebook: NSString; 178 | function SLServiceTypeSinaWeibo: NSString; 179 | function SLServiceTypeTencentWeibo: NSString; 180 | function SLServiceTypeLinkedIn: NSString; 181 | 182 | 183 | // ===== External functions ===== 184 | 185 | const 186 | libSocial = '/System/Library/Frameworks/Social.framework/Social'; 187 | 188 | implementation 189 | 190 | {$IF defined(IOS) and NOT defined(CPUARM)} 191 | 192 | uses 193 | Posix.Dlfcn; 194 | 195 | var 196 | SocialModule: THandle; 197 | 198 | {$ENDIF IOS} 199 | 200 | function SLServiceTypeTwitter: NSString; 201 | begin 202 | Result := CocoaNSStringConst(libSocial, 'SLServiceTypeTwitter'); 203 | end; 204 | 205 | function SLServiceTypeFacebook: NSString; 206 | begin 207 | Result := CocoaNSStringConst(libSocial, 'SLServiceTypeFacebook'); 208 | end; 209 | 210 | function SLServiceTypeSinaWeibo: NSString; 211 | begin 212 | Result := CocoaNSStringConst(libSocial, 'SLServiceTypeSinaWeibo'); 213 | end; 214 | 215 | function SLServiceTypeTencentWeibo: NSString; 216 | begin 217 | Result := CocoaNSStringConst(libSocial, 'SLServiceTypeTencentWeibo'); 218 | end; 219 | 220 | function SLServiceTypeLinkedIn: NSString; 221 | begin 222 | Result := CocoaNSStringConst(libSocial, 'SLServiceTypeLinkedIn'); 223 | end; 224 | 225 | {$IF defined(IOS) and NOT defined(CPUARM)} 226 | 227 | initialization 228 | 229 | SocialModule := dlopen(MarshaledAString(libSocial), RTLD_LAZY); 230 | 231 | finalization 232 | 233 | dlclose(SocialModule); 234 | {$ENDIF IOS} 235 | 236 | end. 237 | -------------------------------------------------------------------------------- /iOSapi.Social.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework Social 12 | // 13 | 14 | unit iOSapi.Social; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.Accounts, 28 | iOSapi.CocoaTypes, 29 | iOSapi.Foundation, 30 | iOSapi.UIKit; 31 | 32 | const 33 | SLComposeViewControllerResultCancelled = 0; 34 | SLComposeViewControllerResultDone = 1; 35 | SLRequestMethodGET = 0; 36 | SLRequestMethodPOST = 1; 37 | SLRequestMethodDELETE = 2; 38 | SLRequestMethodPUT = 3; 39 | 40 | type 41 | 42 | // ===== Forward declarations ===== 43 | {$M+} 44 | SLComposeServiceViewController = interface; 45 | SLComposeSheetConfigurationItem = interface; 46 | SLComposeViewController = interface; 47 | SLRequest = interface; 48 | 49 | // ===== Framework typedefs ===== 50 | {$M+} 51 | SLComposeSheetConfigurationItemTapHandler = procedure() of object; 52 | NSInteger = Integer; 53 | SLComposeViewControllerResult = NSInteger; 54 | SLComposeViewControllerCompletionHandler = procedure 55 | (param1: SLComposeViewControllerResult) of object; 56 | SLRequestMethod = NSInteger; 57 | SLRequestHandler = procedure(param1: NSData; param2: NSHTTPURLResponse; 58 | param3: NSError) of object; 59 | // ===== Interface declarations ===== 60 | 61 | SLComposeServiceViewControllerClass = interface(UIViewControllerClass) 62 | ['{F5A34022-CBE7-426B-B8DB-BE0BA9D7DA87}'] 63 | end; 64 | 65 | SLComposeServiceViewController = interface(UIViewController) 66 | ['{920A2E0F-042F-46AE-AA56-9F4C06227F92}'] 67 | procedure presentationAnimationDidFinish; cdecl; 68 | function textView: UITextView; cdecl; 69 | function contentText: NSString; cdecl; 70 | procedure setPlaceholder(placeholder: NSString); cdecl; 71 | function placeholder: NSString; cdecl; 72 | procedure didSelectPost; cdecl; 73 | procedure didSelectCancel; cdecl; 74 | procedure cancel; cdecl; 75 | function isContentValid: Boolean; cdecl; 76 | procedure validateContent; cdecl; 77 | procedure setCharactersRemaining(charactersRemaining: NSNumber); cdecl; 78 | function charactersRemaining: NSNumber; cdecl; 79 | function configurationItems: NSArray; cdecl; 80 | procedure reloadConfigurationItems; cdecl; 81 | procedure pushConfigurationViewController(viewController 82 | : UIViewController); cdecl; 83 | procedure popConfigurationViewController; cdecl; 84 | function loadPreviewView: UIView; cdecl; 85 | procedure setAutoCompletionViewController(autoCompletionViewController 86 | : UIViewController); cdecl; 87 | function autoCompletionViewController: UIViewController; cdecl; 88 | end; 89 | 90 | TSLComposeServiceViewController = class 91 | (TOCGenericImport) 93 | end; 94 | 95 | PSLComposeServiceViewController = Pointer; 96 | 97 | SLComposeSheetConfigurationItemClass = interface(NSObjectClass) 98 | ['{6E957D2C-209A-43F5-A6CE-FB63F644BD71}'] 99 | end; 100 | 101 | SLComposeSheetConfigurationItem = interface(NSObject) 102 | ['{9048ABD2-8DBC-4BC6-A180-9B78C80E0869}'] 103 | function init: Pointer { instancetype }; cdecl; 104 | procedure setTitle(title: NSString); cdecl; 105 | function title: NSString; cdecl; 106 | procedure setValue(value: NSString); cdecl; 107 | function value: NSString; cdecl; 108 | procedure setValuePending(valuePending: Boolean); cdecl; 109 | function valuePending: Boolean; cdecl; 110 | procedure setTapHandler(tapHandler 111 | : SLComposeSheetConfigurationItemTapHandler); cdecl; 112 | function tapHandler: SLComposeSheetConfigurationItemTapHandler; cdecl; 113 | end; 114 | 115 | TSLComposeSheetConfigurationItem = class 116 | (TOCGenericImport) 118 | end; 119 | 120 | PSLComposeSheetConfigurationItem = Pointer; 121 | 122 | SLComposeViewControllerClass = interface(UIViewControllerClass) 123 | ['{BEA6AF8C-4929-4A2E-A2D4-3E2AF1898091}'] 124 | { class } function isAvailableForServiceType(serviceType: NSString) 125 | : Boolean; cdecl; 126 | { class } function composeViewControllerForServiceType 127 | (serviceType: NSString): SLComposeViewController; cdecl; 128 | end; 129 | 130 | SLComposeViewController = interface(UIViewController) 131 | ['{134E76EC-B207-4012-AD25-B29BA6FAC107}'] 132 | function serviceType: NSString; cdecl; 133 | function setInitialText(text: NSString): Boolean; cdecl; 134 | function addImage(image: UIImage): Boolean; cdecl; 135 | function removeAllImages: Boolean; cdecl; 136 | function addURL(url: NSURL): Boolean; cdecl; 137 | function removeAllURLs: Boolean; cdecl; 138 | procedure setCompletionHandler(completionHandler 139 | : SLComposeViewControllerCompletionHandler); cdecl; 140 | function completionHandler: SLComposeViewControllerCompletionHandler; cdecl; 141 | end; 142 | 143 | TSLComposeViewController = class 144 | (TOCGenericImport) 145 | end; 146 | 147 | PSLComposeViewController = Pointer; 148 | 149 | SLRequestClass = interface(NSObjectClass) 150 | ['{383E3F40-6250-40A7-965D-6EFA639BF97C}'] 151 | { class } function requestForServiceType(serviceType: NSString; 152 | requestMethod: SLRequestMethod; url: NSURL; parameters: NSDictionary) 153 | : SLRequest; cdecl; 154 | end; 155 | 156 | SLRequest = interface(NSObject) 157 | ['{40C20D17-36ED-42DB-810F-4251BD3A66BA}'] 158 | procedure setAccount(account: ACAccount); cdecl; 159 | function account: ACAccount; cdecl; 160 | function requestMethod: SLRequestMethod; cdecl; 161 | function url: NSURL; cdecl; 162 | function parameters: NSDictionary; cdecl; 163 | procedure addMultipartData(data: NSData; withName: NSString; 164 | &type: NSString; filename: NSString); cdecl; 165 | function preparedURLRequest: NSURLRequest; cdecl; 166 | procedure performRequestWithHandler(handler: SLRequestHandler); cdecl; 167 | end; 168 | 169 | TSLRequest = class(TOCGenericImport) 170 | end; 171 | 172 | PSLRequest = Pointer; 173 | 174 | // ===== Exported string consts ===== 175 | 176 | function SLServiceTypeTwitter: NSString; 177 | function SLServiceTypeFacebook: NSString; 178 | function SLServiceTypeSinaWeibo: NSString; 179 | function SLServiceTypeTencentWeibo: NSString; 180 | function SLServiceTypeLinkedIn: NSString; 181 | 182 | 183 | // ===== External functions ===== 184 | 185 | const 186 | libSocial = '/System/Library/Frameworks/Social.framework/Social'; 187 | 188 | implementation 189 | 190 | {$IF defined(IOS) and NOT defined(CPUARM)} 191 | 192 | uses 193 | Posix.Dlfcn; 194 | 195 | var 196 | SocialModule: THandle; 197 | 198 | {$ENDIF IOS} 199 | 200 | function SLServiceTypeTwitter: NSString; 201 | begin 202 | Result := CocoaNSStringConst(libSocial, 'SLServiceTypeTwitter'); 203 | end; 204 | 205 | function SLServiceTypeFacebook: NSString; 206 | begin 207 | Result := CocoaNSStringConst(libSocial, 'SLServiceTypeFacebook'); 208 | end; 209 | 210 | function SLServiceTypeSinaWeibo: NSString; 211 | begin 212 | Result := CocoaNSStringConst(libSocial, 'SLServiceTypeSinaWeibo'); 213 | end; 214 | 215 | function SLServiceTypeTencentWeibo: NSString; 216 | begin 217 | Result := CocoaNSStringConst(libSocial, 'SLServiceTypeTencentWeibo'); 218 | end; 219 | 220 | function SLServiceTypeLinkedIn: NSString; 221 | begin 222 | Result := CocoaNSStringConst(libSocial, 'SLServiceTypeLinkedIn'); 223 | end; 224 | 225 | {$IF defined(IOS) and NOT defined(CPUARM)} 226 | 227 | initialization 228 | 229 | SocialModule := dlopen(MarshaledAString(libSocial), RTLD_LAZY); 230 | 231 | finalization 232 | 233 | dlclose(SocialModule); 234 | {$ENDIF IOS} 235 | 236 | end. 237 | -------------------------------------------------------------------------------- /iOSapi.MediaAccessibility.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework MediaAccessibility 12 | // 13 | 14 | unit iOSapi.MediaAccessibility; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.CoreGraphics, 29 | iOSapi.CoreText, 30 | iOSapi.Foundation; 31 | 32 | const 33 | kMACaptionAppearanceDomainDefault = 0; 34 | kMACaptionAppearanceDomainUser = 1; 35 | kMACaptionAppearanceDisplayTypeForcedOnly = 0; 36 | kMACaptionAppearanceDisplayTypeAutomatic = 1; 37 | kMACaptionAppearanceDisplayTypeAlwaysOn = 2; 38 | kMACaptionAppearanceBehaviorUseValue = 0; 39 | kMACaptionAppearanceBehaviorUseContentIfAvailable = 1; 40 | kMACaptionAppearanceFontStyleDefault = 0; 41 | kMACaptionAppearanceFontStyleMonospacedWithSerif = 1; 42 | kMACaptionAppearanceFontStyleProportionalWithSerif = 2; 43 | kMACaptionAppearanceFontStyleMonospacedWithoutSerif = 3; 44 | kMACaptionAppearanceFontStyleProportionalWithoutSerif = 4; 45 | kMACaptionAppearanceFontStyleCasual = 5; 46 | kMACaptionAppearanceFontStyleCursive = 6; 47 | kMACaptionAppearanceFontStyleSmallCapital = 7; 48 | kMACaptionAppearanceTextEdgeStyleUndefined = 0; 49 | kMACaptionAppearanceTextEdgeStyleNone = 1; 50 | kMACaptionAppearanceTextEdgeStyleRaised = 2; 51 | kMACaptionAppearanceTextEdgeStyleDepressed = 3; 52 | kMACaptionAppearanceTextEdgeStyleUniform = 4; 53 | kMACaptionAppearanceTextEdgeStyleDropShadow = 5; 54 | 55 | type 56 | // ===== Framework typedefs ===== 57 | {$M+} 58 | CFStringRef = Pointer; 59 | CFArrayRef = Pointer; 60 | CFIndex = LongInt; 61 | MACaptionAppearanceDomain = CFIndex; 62 | MACaptionAppearanceDisplayType = CFIndex; 63 | MACaptionAppearanceBehavior = CFIndex; 64 | MACaptionAppearanceFontStyle = CFIndex; 65 | MACaptionAppearanceTextEdgeStyle = CFIndex; 66 | CGColorRef = Pointer; 67 | CGFloat = Single; 68 | CTFontDescriptorRef = Pointer; 69 | // ===== Exported string consts ===== 70 | 71 | function kMAAudibleMediaSettingsChangedNotification: Pointer; 72 | function MAMediaCharacteristicDescribesVideoForAccessibility: Pointer; 73 | function kMACaptionAppearanceSettingsChangedNotification: Pointer; 74 | function MAMediaCharacteristicDescribesMusicAndSoundForAccessibility: Pointer; 75 | function MAMediaCharacteristicTranscribesSpokenDialogForAccessibility: Pointer; 76 | 77 | 78 | // ===== External functions ===== 79 | 80 | const 81 | libMediaAccessibility = 82 | '/System/Library/Frameworks/MediaAccessibility.framework/MediaAccessibility'; 83 | function MAAudibleMediaCopyPreferredCharacteristics: CFArrayRef; cdecl; 84 | external libMediaAccessibility name _PU + 85 | 'MAAudibleMediaCopyPreferredCharacteristics'; 86 | function MACaptionAppearanceAddSelectedLanguage 87 | (domain: MACaptionAppearanceDomain; language: CFStringRef): Integer; cdecl; 88 | external libMediaAccessibility name _PU + 89 | 'MACaptionAppearanceAddSelectedLanguage'; 90 | function MACaptionAppearanceCopySelectedLanguages 91 | (domain: MACaptionAppearanceDomain): CFArrayRef; cdecl; 92 | external libMediaAccessibility name _PU + 93 | 'MACaptionAppearanceCopySelectedLanguages'; 94 | function MACaptionAppearanceGetDisplayType(domain: MACaptionAppearanceDomain) 95 | : MACaptionAppearanceDisplayType; cdecl; 96 | external libMediaAccessibility name _PU + 'MACaptionAppearanceGetDisplayType'; 97 | procedure MACaptionAppearanceSetDisplayType(domain: MACaptionAppearanceDomain; 98 | displayType: MACaptionAppearanceDisplayType); cdecl; 99 | external libMediaAccessibility name _PU + 'MACaptionAppearanceSetDisplayType'; 100 | function MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics 101 | (domain: MACaptionAppearanceDomain): CFArrayRef; cdecl; 102 | external libMediaAccessibility name _PU + 103 | 'MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics'; 104 | function MACaptionAppearanceCopyForegroundColor 105 | (domain: MACaptionAppearanceDomain; behavior: CFIndex): CGColorRef; cdecl; 106 | external libMediaAccessibility name _PU + 107 | 'MACaptionAppearanceCopyForegroundColor'; 108 | function MACaptionAppearanceCopyBackgroundColor 109 | (domain: MACaptionAppearanceDomain; behavior: CFIndex): CGColorRef; cdecl; 110 | external libMediaAccessibility name _PU + 111 | 'MACaptionAppearanceCopyBackgroundColor'; 112 | function MACaptionAppearanceCopyWindowColor(domain: MACaptionAppearanceDomain; 113 | behavior: CFIndex): CGColorRef; cdecl; 114 | external libMediaAccessibility name _PU + 115 | 'MACaptionAppearanceCopyWindowColor'; 116 | function MACaptionAppearanceGetForegroundOpacity 117 | (domain: MACaptionAppearanceDomain; behavior: CFIndex): CGFloat; cdecl; 118 | external libMediaAccessibility name _PU + 119 | 'MACaptionAppearanceGetForegroundOpacity'; 120 | function MACaptionAppearanceGetBackgroundOpacity 121 | (domain: MACaptionAppearanceDomain; behavior: CFIndex): CGFloat; cdecl; 122 | external libMediaAccessibility name _PU + 123 | 'MACaptionAppearanceGetBackgroundOpacity'; 124 | function MACaptionAppearanceGetWindowOpacity(domain: MACaptionAppearanceDomain; 125 | behavior: CFIndex): CGFloat; cdecl; 126 | external libMediaAccessibility name _PU + 127 | 'MACaptionAppearanceGetWindowOpacity'; 128 | function MACaptionAppearanceGetWindowRoundedCornerRadius 129 | (domain: MACaptionAppearanceDomain; behavior: CFIndex): CGFloat; cdecl; 130 | external libMediaAccessibility name _PU + 131 | 'MACaptionAppearanceGetWindowRoundedCornerRadius'; 132 | function MACaptionAppearanceCopyFontDescriptorForStyle 133 | (domain: MACaptionAppearanceDomain; behavior: CFIndex; 134 | fontStyle: MACaptionAppearanceFontStyle): CTFontDescriptorRef; cdecl; 135 | external libMediaAccessibility name _PU + 136 | 'MACaptionAppearanceCopyFontDescriptorForStyle'; 137 | function MACaptionAppearanceGetRelativeCharacterSize 138 | (domain: MACaptionAppearanceDomain; behavior: CFIndex): CGFloat; cdecl; 139 | external libMediaAccessibility name _PU + 140 | 'MACaptionAppearanceGetRelativeCharacterSize'; 141 | function MACaptionAppearanceGetTextEdgeStyle(domain: MACaptionAppearanceDomain; 142 | behavior: CFIndex): MACaptionAppearanceTextEdgeStyle; cdecl; 143 | external libMediaAccessibility name _PU + 144 | 'MACaptionAppearanceGetTextEdgeStyle'; 145 | 146 | implementation 147 | 148 | {$IF defined(IOS) and NOT defined(CPUARM)} 149 | 150 | uses 151 | Posix.Dlfcn; 152 | 153 | var 154 | MediaAccessibilityModule: THandle; 155 | 156 | {$ENDIF IOS} 157 | 158 | function kMAAudibleMediaSettingsChangedNotification: Pointer; 159 | begin 160 | Result := CocoaPointerConst(libMediaAccessibility, 161 | 'kMAAudibleMediaSettingsChangedNotification'); 162 | end; 163 | 164 | function MAMediaCharacteristicDescribesVideoForAccessibility: Pointer; 165 | begin 166 | Result := CocoaPointerConst(libMediaAccessibility, 167 | 'MAMediaCharacteristicDescribesVideoForAccessibility'); 168 | end; 169 | 170 | function kMACaptionAppearanceSettingsChangedNotification: Pointer; 171 | begin 172 | Result := CocoaPointerConst(libMediaAccessibility, 173 | 'kMACaptionAppearanceSettingsChangedNotification'); 174 | end; 175 | 176 | function MAMediaCharacteristicDescribesMusicAndSoundForAccessibility: Pointer; 177 | begin 178 | Result := CocoaPointerConst(libMediaAccessibility, 179 | 'MAMediaCharacteristicDescribesMusicAndSoundForAccessibility'); 180 | end; 181 | 182 | function MAMediaCharacteristicTranscribesSpokenDialogForAccessibility: Pointer; 183 | begin 184 | Result := CocoaPointerConst(libMediaAccessibility, 185 | 'MAMediaCharacteristicTranscribesSpokenDialogForAccessibility'); 186 | end; 187 | 188 | {$IF defined(IOS) and NOT defined(CPUARM)} 189 | 190 | initialization 191 | 192 | MediaAccessibilityModule := dlopen(MarshaledAString(libMediaAccessibility), 193 | RTLD_LAZY); 194 | 195 | finalization 196 | 197 | dlclose(MediaAccessibilityModule); 198 | {$ENDIF IOS} 199 | 200 | end. 201 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.MediaAccessibility.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework MediaAccessibility 12 | // 13 | 14 | unit iOSapi.MediaAccessibility; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.CoreGraphics, 27 | iOSapi.CoreText, 28 | iOSapi.Foundation; 29 | 30 | const 31 | kMACaptionAppearanceDomainDefault = 0; 32 | kMACaptionAppearanceDomainUser = 1; 33 | kMACaptionAppearanceDisplayTypeForcedOnly = 0; 34 | kMACaptionAppearanceDisplayTypeAutomatic = 1; 35 | kMACaptionAppearanceDisplayTypeAlwaysOn = 2; 36 | kMACaptionAppearanceBehaviorUseValue = 0; 37 | kMACaptionAppearanceBehaviorUseContentIfAvailable = 1; 38 | kMACaptionAppearanceFontStyleDefault = 0; 39 | kMACaptionAppearanceFontStyleMonospacedWithSerif = 1; 40 | kMACaptionAppearanceFontStyleProportionalWithSerif = 2; 41 | kMACaptionAppearanceFontStyleMonospacedWithoutSerif = 3; 42 | kMACaptionAppearanceFontStyleProportionalWithoutSerif = 4; 43 | kMACaptionAppearanceFontStyleCasual = 5; 44 | kMACaptionAppearanceFontStyleCursive = 6; 45 | kMACaptionAppearanceFontStyleSmallCapital = 7; 46 | kMACaptionAppearanceTextEdgeStyleUndefined = 0; 47 | kMACaptionAppearanceTextEdgeStyleNone = 1; 48 | kMACaptionAppearanceTextEdgeStyleRaised = 2; 49 | kMACaptionAppearanceTextEdgeStyleDepressed = 3; 50 | kMACaptionAppearanceTextEdgeStyleUniform = 4; 51 | kMACaptionAppearanceTextEdgeStyleDropShadow = 5; 52 | 53 | type 54 | // ===== Framework typedefs ===== 55 | {$M+} 56 | CFStringRef = Pointer; 57 | PCFStringRef = ^CFStringRef; 58 | CFArrayRef = Pointer; 59 | PCFArrayRef = ^CFArrayRef; 60 | CFIndex = LongInt; 61 | PCFIndex = ^CFIndex; 62 | 63 | MACaptionAppearanceDomain = CFIndex; 64 | MACaptionAppearanceDisplayType = CFIndex; 65 | MACaptionAppearanceBehavior = CFIndex; 66 | MACaptionAppearanceFontStyle = CFIndex; 67 | MACaptionAppearanceTextEdgeStyle = CFIndex; 68 | CGColorRef = Pointer; 69 | PCGColorRef = ^CGColorRef; 70 | CGFloat = Single; 71 | PCGFloat = ^CGFloat; 72 | 73 | CTFontDescriptorRef = Pointer; 74 | PCTFontDescriptorRef = ^CTFontDescriptorRef; 75 | CFURLRef = Pointer; 76 | PCFURLRef = ^CFURLRef; 77 | // ===== Exported string consts ===== 78 | 79 | function kMAAudibleMediaSettingsChangedNotification: Pointer; 80 | function MAMediaCharacteristicDescribesVideoForAccessibility: Pointer; 81 | function kMACaptionAppearanceSettingsChangedNotification: Pointer; 82 | function MAMediaCharacteristicDescribesMusicAndSoundForAccessibility: Pointer; 83 | function MAMediaCharacteristicTranscribesSpokenDialogForAccessibility: Pointer; 84 | function kMADimFlashingLightsChangedNotification: Pointer; 85 | 86 | 87 | // ===== External functions ===== 88 | 89 | const 90 | libMediaAccessibility = 91 | '/System/Library/Frameworks/MediaAccessibility.framework/MediaAccessibility'; 92 | function MAAudibleMediaCopyPreferredCharacteristics: CFArrayRef; cdecl; 93 | external libMediaAccessibility name _PU + 94 | 'MAAudibleMediaCopyPreferredCharacteristics'; 95 | procedure MACaptionAppearanceDidDisplayCaptions(strings: CFArrayRef); cdecl; 96 | external libMediaAccessibility name _PU + 97 | 'MACaptionAppearanceDidDisplayCaptions'; 98 | function MACaptionAppearanceAddSelectedLanguage 99 | (domain: MACaptionAppearanceDomain; language: CFStringRef): Integer; cdecl; 100 | external libMediaAccessibility name _PU + 101 | 'MACaptionAppearanceAddSelectedLanguage'; 102 | function MACaptionAppearanceCopySelectedLanguages 103 | (domain: MACaptionAppearanceDomain): CFArrayRef; cdecl; 104 | external libMediaAccessibility name _PU + 105 | 'MACaptionAppearanceCopySelectedLanguages'; 106 | function MACaptionAppearanceGetDisplayType(domain: MACaptionAppearanceDomain) 107 | : MACaptionAppearanceDisplayType; cdecl; 108 | external libMediaAccessibility name _PU + 'MACaptionAppearanceGetDisplayType'; 109 | procedure MACaptionAppearanceSetDisplayType(domain: MACaptionAppearanceDomain; 110 | displayType: MACaptionAppearanceDisplayType); cdecl; 111 | external libMediaAccessibility name _PU + 'MACaptionAppearanceSetDisplayType'; 112 | function MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics 113 | (domain: MACaptionAppearanceDomain): CFArrayRef; cdecl; 114 | external libMediaAccessibility name _PU + 115 | 'MACaptionAppearanceCopyPreferredCaptioningMediaCharacteristics'; 116 | function MACaptionAppearanceCopyForegroundColor 117 | (domain: MACaptionAppearanceDomain; behavior: PMACaptionAppearanceBehavior) 118 | : CGColorRef; cdecl; external libMediaAccessibility name _PU + 119 | 'MACaptionAppearanceCopyForegroundColor'; 120 | function MACaptionAppearanceCopyBackgroundColor 121 | (domain: MACaptionAppearanceDomain; behavior: PMACaptionAppearanceBehavior) 122 | : CGColorRef; cdecl; external libMediaAccessibility name _PU + 123 | 'MACaptionAppearanceCopyBackgroundColor'; 124 | function MACaptionAppearanceCopyWindowColor(domain: MACaptionAppearanceDomain; 125 | behavior: PMACaptionAppearanceBehavior): CGColorRef; cdecl; 126 | external libMediaAccessibility name _PU + 127 | 'MACaptionAppearanceCopyWindowColor'; 128 | function MACaptionAppearanceGetForegroundOpacity 129 | (domain: MACaptionAppearanceDomain; behavior: PMACaptionAppearanceBehavior) 130 | : CGFloat; cdecl; external libMediaAccessibility name _PU + 131 | 'MACaptionAppearanceGetForegroundOpacity'; 132 | function MACaptionAppearanceGetBackgroundOpacity 133 | (domain: MACaptionAppearanceDomain; behavior: PMACaptionAppearanceBehavior) 134 | : CGFloat; cdecl; external libMediaAccessibility name _PU + 135 | 'MACaptionAppearanceGetBackgroundOpacity'; 136 | function MACaptionAppearanceGetWindowOpacity(domain: MACaptionAppearanceDomain; 137 | behavior: PMACaptionAppearanceBehavior): CGFloat; cdecl; 138 | external libMediaAccessibility name _PU + 139 | 'MACaptionAppearanceGetWindowOpacity'; 140 | function MACaptionAppearanceGetWindowRoundedCornerRadius 141 | (domain: MACaptionAppearanceDomain; behavior: PMACaptionAppearanceBehavior) 142 | : CGFloat; cdecl; external libMediaAccessibility name _PU + 143 | 'MACaptionAppearanceGetWindowRoundedCornerRadius'; 144 | function MACaptionAppearanceCopyFontDescriptorForStyle 145 | (domain: MACaptionAppearanceDomain; behavior: PMACaptionAppearanceBehavior; 146 | fontStyle: MACaptionAppearanceFontStyle): CTFontDescriptorRef; cdecl; 147 | external libMediaAccessibility name _PU + 148 | 'MACaptionAppearanceCopyFontDescriptorForStyle'; 149 | function MACaptionAppearanceGetRelativeCharacterSize 150 | (domain: MACaptionAppearanceDomain; behavior: PMACaptionAppearanceBehavior) 151 | : CGFloat; cdecl; external libMediaAccessibility name _PU + 152 | 'MACaptionAppearanceGetRelativeCharacterSize'; 153 | function MACaptionAppearanceGetTextEdgeStyle(domain: MACaptionAppearanceDomain; 154 | behavior: PMACaptionAppearanceBehavior): MACaptionAppearanceTextEdgeStyle; 155 | cdecl; external libMediaAccessibility name _PU + 156 | 'MACaptionAppearanceGetTextEdgeStyle'; 157 | function MAImageCaptioningCopyCaption(url: CFURLRef; error: Pointer) 158 | : CFStringRef; cdecl; external libMediaAccessibility name _PU + 159 | 'MAImageCaptioningCopyCaption'; 160 | function MAImageCaptioningSetCaption(url: CFURLRef; &string: CFStringRef; 161 | error: Pointer): Integer; cdecl; 162 | external libMediaAccessibility name _PU + 'MAImageCaptioningSetCaption'; 163 | function MAImageCaptioningCopyMetadataTagPath: CFStringRef; cdecl; 164 | external libMediaAccessibility name _PU + 165 | 'MAImageCaptioningCopyMetadataTagPath'; 166 | 167 | implementation 168 | 169 | {$IF defined(IOS) and NOT defined(CPUARM)} 170 | 171 | uses 172 | Posix.Dlfcn; 173 | 174 | var 175 | MediaAccessibilityModule: THandle; 176 | 177 | {$ENDIF IOS} 178 | 179 | function kMAAudibleMediaSettingsChangedNotification: Pointer; 180 | begin 181 | Result := CocoaPointerConst(libMediaAccessibility, 182 | 'kMAAudibleMediaSettingsChangedNotification'); 183 | end; 184 | 185 | function MAMediaCharacteristicDescribesVideoForAccessibility: Pointer; 186 | begin 187 | Result := CocoaPointerConst(libMediaAccessibility, 188 | 'MAMediaCharacteristicDescribesVideoForAccessibility'); 189 | end; 190 | 191 | function kMACaptionAppearanceSettingsChangedNotification: Pointer; 192 | begin 193 | Result := CocoaPointerConst(libMediaAccessibility, 194 | 'kMACaptionAppearanceSettingsChangedNotification'); 195 | end; 196 | 197 | function MAMediaCharacteristicDescribesMusicAndSoundForAccessibility: Pointer; 198 | begin 199 | Result := CocoaPointerConst(libMediaAccessibility, 200 | 'MAMediaCharacteristicDescribesMusicAndSoundForAccessibility'); 201 | end; 202 | 203 | function MAMediaCharacteristicTranscribesSpokenDialogForAccessibility: Pointer; 204 | begin 205 | Result := CocoaPointerConst(libMediaAccessibility, 206 | 'MAMediaCharacteristicTranscribesSpokenDialogForAccessibility'); 207 | end; 208 | 209 | function kMADimFlashingLightsChangedNotification: Pointer; 210 | begin 211 | Result := CocoaPointerConst(libMediaAccessibility, 212 | 'kMADimFlashingLightsChangedNotification'); 213 | end; 214 | 215 | {$IF defined(IOS) and NOT defined(CPUARM)} 216 | 217 | initialization 218 | 219 | MediaAccessibilityModule := dlopen(MarshaledAString(libMediaAccessibility), 220 | RTLD_LAZY); 221 | 222 | finalization 223 | 224 | dlclose(MediaAccessibilityModule); 225 | {$ENDIF IOS} 226 | 227 | end. 228 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.ExternalAccessory.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework ExternalAccessory 12 | // 13 | 14 | unit iOSapi.ExternalAccessory; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.Foundation; 27 | 28 | const 29 | EAConnectionIDNone = 0; 30 | EABluetoothAccessoryPickerAlreadyConnected = 0; 31 | EABluetoothAccessoryPickerResultNotFound = 1; 32 | EABluetoothAccessoryPickerResultCancelled = 2; 33 | EABluetoothAccessoryPickerResultFailed = 3; 34 | EAWiFiUnconfiguredAccessoryPropertySupportsAirPlay = (1 shl 0); 35 | EAWiFiUnconfiguredAccessoryPropertySupportsAirPrint = (1 shl 1); 36 | EAWiFiUnconfiguredAccessoryPropertySupportsHomeKit = (1 shl 2); 37 | EAWiFiUnconfiguredAccessoryBrowserStateWiFiUnavailable = 0; 38 | EAWiFiUnconfiguredAccessoryBrowserStateStopped = 1; 39 | EAWiFiUnconfiguredAccessoryBrowserStateSearching = 2; 40 | EAWiFiUnconfiguredAccessoryBrowserStateConfiguring = 3; 41 | EAWiFiUnconfiguredAccessoryConfigurationStatusSuccess = 0; 42 | EAWiFiUnconfiguredAccessoryConfigurationStatusUserCancelledConfiguration = 1; 43 | EAWiFiUnconfiguredAccessoryConfigurationStatusFailed = 2; 44 | 45 | type 46 | 47 | // ===== Forward declarations ===== 48 | {$M+} 49 | EAAccessoryDelegate = interface; 50 | EAAccessory = interface; 51 | EAAccessoryManager = interface; 52 | EASession = interface; 53 | EAWiFiUnconfiguredAccessory = interface; 54 | EAWiFiUnconfiguredAccessoryBrowserDelegate = interface; 55 | EAWiFiUnconfiguredAccessoryBrowser = interface; 56 | 57 | // ===== Framework typedefs ===== 58 | {$M+} 59 | NSUInteger = Cardinal; 60 | PNSUInteger = ^NSUInteger; 61 | 62 | NSInteger = Integer; 63 | PNSInteger = ^NSInteger; 64 | 65 | EABluetoothAccessoryPickerErrorCode = NSInteger; 66 | EABluetoothAccessoryPickerCompletion = procedure(param1: NSError) of object; 67 | EAWiFiUnconfiguredAccessoryProperties = NSUInteger; 68 | EAWiFiUnconfiguredAccessoryBrowserState = NSInteger; 69 | EAWiFiUnconfiguredAccessoryConfigurationStatus = NSInteger; 70 | dispatch_queue_t = Pointer; 71 | Pdispatch_queue_t = ^dispatch_queue_t; 72 | // ===== Interface declarations ===== 73 | 74 | EAAccessoryClass = interface(NSObjectClass) 75 | ['{002B713B-1B14-4A15-B3BB-0E9B44994996}'] 76 | end; 77 | 78 | EAAccessory = interface(NSObject) 79 | ['{C16EF115-E26B-46D2-9347-79F718749170}'] 80 | function isConnected: Boolean; cdecl; 81 | function connectionID: NSUInteger; cdecl; 82 | function manufacturer: NSString; cdecl; 83 | function name: NSString; cdecl; 84 | function modelNumber: NSString; cdecl; 85 | function serialNumber: NSString; cdecl; 86 | function firmwareRevision: NSString; cdecl; 87 | function hardwareRevision: NSString; cdecl; 88 | function dockType: NSString; cdecl; 89 | function protocolStrings: NSArray; cdecl; 90 | procedure setDelegate(delegate: Pointer); cdecl; 91 | function delegate: Pointer; cdecl; 92 | end; 93 | 94 | TEAAccessory = class(TOCGenericImport) 95 | end; 96 | 97 | PEAAccessory = Pointer; 98 | 99 | EAAccessoryManagerClass = interface(NSObjectClass) 100 | ['{C524AEC6-536C-4BD5-B007-58635A9A69CC}'] 101 | { class } function sharedAccessoryManager: EAAccessoryManager; cdecl; 102 | end; 103 | 104 | EAAccessoryManager = interface(NSObject) 105 | ['{9836DF91-AED4-4B50-A3C3-F5B0F507B970}'] 106 | procedure showBluetoothAccessoryPickerWithNameFilter(predicate: NSPredicate; 107 | completion: EABluetoothAccessoryPickerCompletion); cdecl; 108 | procedure registerForLocalNotifications; cdecl; 109 | procedure unregisterForLocalNotifications; cdecl; 110 | function connectedAccessories: NSArray; cdecl; 111 | end; 112 | 113 | TEAAccessoryManager = class(TOCGenericImport) 115 | end; 116 | 117 | PEAAccessoryManager = Pointer; 118 | 119 | EASessionClass = interface(NSObjectClass) 120 | ['{A41AC492-CDAE-46DF-94AF-412FFCD78461}'] 121 | end; 122 | 123 | EASession = interface(NSObject) 124 | ['{08DA892A-6341-4641-9DC0-BED4916CF8A1}'] 125 | function initWithAccessory(accessory: EAAccessory; forProtocol: NSString) 126 | : Pointer { instancetype }; cdecl; 127 | function accessory: EAAccessory; cdecl; 128 | function protocolString: NSString; cdecl; 129 | function inputStream: NSInputStream; cdecl; 130 | function outputStream: NSOutputStream; cdecl; 131 | end; 132 | 133 | TEASession = class(TOCGenericImport) 134 | end; 135 | 136 | PEASession = Pointer; 137 | 138 | EAWiFiUnconfiguredAccessoryClass = interface(NSObjectClass) 139 | ['{9BA741BE-EC1C-4FAA-B1A2-7EFBF0CB8AE9}'] 140 | end; 141 | 142 | EAWiFiUnconfiguredAccessory = interface(NSObject) 143 | ['{6618DB79-D9FB-4207-9D0F-302EE7577B00}'] 144 | function name: NSString; cdecl; 145 | function manufacturer: NSString; cdecl; 146 | function model: NSString; cdecl; 147 | function ssid: NSString; cdecl; 148 | function macAddress: NSString; cdecl; 149 | function properties: EAWiFiUnconfiguredAccessoryProperties; cdecl; 150 | end; 151 | 152 | TEAWiFiUnconfiguredAccessory = class 153 | (TOCGenericImport) 155 | end; 156 | 157 | PEAWiFiUnconfiguredAccessory = Pointer; 158 | 159 | EAWiFiUnconfiguredAccessoryBrowserClass = interface(NSObjectClass) 160 | ['{92FFB6C6-1B37-4C78-B858-E02E0A5627E7}'] 161 | end; 162 | 163 | EAWiFiUnconfiguredAccessoryBrowser = interface(NSObject) 164 | ['{541BA38D-DC5D-4B86-BD4A-24331F43DE0B}'] 165 | procedure setDelegate(delegate: Pointer); cdecl; 166 | function delegate: Pointer; cdecl; 167 | function unconfiguredAccessories: NSSet; cdecl; 168 | function initWithDelegate(delegate: Pointer; queue: dispatch_queue_t) 169 | : Pointer { instancetype }; cdecl; 170 | procedure startSearchingForUnconfiguredAccessoriesMatchingPredicate 171 | (predicate: NSPredicate); cdecl; 172 | procedure stopSearchingForUnconfiguredAccessories; cdecl; 173 | procedure configureAccessory(accessory: EAWiFiUnconfiguredAccessory; 174 | withConfigurationUIOnViewController: UIViewController); cdecl; 175 | end; 176 | 177 | TEAWiFiUnconfiguredAccessoryBrowser = class 178 | (TOCGenericImport) 180 | end; 181 | 182 | PEAWiFiUnconfiguredAccessoryBrowser = Pointer; 183 | 184 | // ===== Protocol declarations ===== 185 | 186 | EAAccessoryDelegate = interface(IObjectiveC) 187 | ['{D7BEAEA7-A6C7-4A3B-AF91-575DAF2EF308}'] 188 | procedure accessoryDidDisconnect(accessory: EAAccessory); cdecl; 189 | end; 190 | 191 | EAWiFiUnconfiguredAccessoryBrowserDelegate = interface(IObjectiveC) 192 | ['{2C9B8308-BD1C-45E9-9396-6C020E6C5E53}'] 193 | [MethodName('accessoryBrowser:didUpdateState:')] 194 | procedure accessoryBrowserDidUpdateState 195 | (browser: EAWiFiUnconfiguredAccessoryBrowser; 196 | didUpdateState: EAWiFiUnconfiguredAccessoryBrowserState); cdecl; 197 | [MethodName('accessoryBrowser:didFindUnconfiguredAccessories:')] 198 | procedure accessoryBrowserDidFindUnconfiguredAccessories 199 | (browser: EAWiFiUnconfiguredAccessoryBrowser; 200 | didFindUnconfiguredAccessories: NSSet); cdecl; 201 | [MethodName('accessoryBrowser:didRemoveUnconfiguredAccessories:')] 202 | procedure accessoryBrowserDidRemoveUnconfiguredAccessories 203 | (browser: EAWiFiUnconfiguredAccessoryBrowser; 204 | didRemoveUnconfiguredAccessories: NSSet); cdecl; 205 | [MethodName('accessoryBrowser:didFinishConfiguringAccessory:withStatus:')] 206 | procedure accessoryBrowserDidFinishConfiguringAccessoryWithStatus 207 | (browser: EAWiFiUnconfiguredAccessoryBrowser; 208 | didFinishConfiguringAccessory: EAWiFiUnconfiguredAccessory; 209 | withStatus: EAWiFiUnconfiguredAccessoryConfigurationStatus); cdecl; 210 | end; 211 | 212 | // ===== Exported string consts ===== 213 | 214 | function EABluetoothAccessoryPickerErrorDomain: NSString; 215 | function EAAccessoryDidConnectNotification: NSString; 216 | function EAAccessoryDidDisconnectNotification: NSString; 217 | function EAAccessoryKey: NSString; 218 | function EAAccessorySelectedKey: NSString; 219 | 220 | 221 | // ===== External functions ===== 222 | 223 | const 224 | libExternalAccessory = 225 | '/System/Library/Frameworks/ExternalAccessory.framework/ExternalAccessory'; 226 | 227 | implementation 228 | 229 | {$IF defined(IOS) and NOT defined(CPUARM)} 230 | 231 | uses 232 | Posix.Dlfcn; 233 | 234 | var 235 | ExternalAccessoryModule: THandle; 236 | 237 | {$ENDIF IOS} 238 | 239 | function EABluetoothAccessoryPickerErrorDomain: NSString; 240 | begin 241 | Result := CocoaNSStringConst(libExternalAccessory, 242 | 'EABluetoothAccessoryPickerErrorDomain'); 243 | end; 244 | 245 | function EAAccessoryDidConnectNotification: NSString; 246 | begin 247 | Result := CocoaNSStringConst(libExternalAccessory, 248 | 'EAAccessoryDidConnectNotification'); 249 | end; 250 | 251 | function EAAccessoryDidDisconnectNotification: NSString; 252 | begin 253 | Result := CocoaNSStringConst(libExternalAccessory, 254 | 'EAAccessoryDidDisconnectNotification'); 255 | end; 256 | 257 | function EAAccessoryKey: NSString; 258 | begin 259 | Result := CocoaNSStringConst(libExternalAccessory, 'EAAccessoryKey'); 260 | end; 261 | 262 | function EAAccessorySelectedKey: NSString; 263 | begin 264 | Result := CocoaNSStringConst(libExternalAccessory, 'EAAccessorySelectedKey'); 265 | end; 266 | 267 | {$IF defined(IOS) and NOT defined(CPUARM)} 268 | 269 | initialization 270 | 271 | ExternalAccessoryModule := dlopen(MarshaledAString(libExternalAccessory), 272 | RTLD_LAZY); 273 | 274 | finalization 275 | 276 | dlclose(ExternalAccessoryModule); 277 | {$ENDIF IOS} 278 | 279 | end. 280 | -------------------------------------------------------------------------------- /iOSapi.AVKit.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework AVKit 12 | // 13 | 14 | unit iOSapi.AVKit; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.CoreGraphics, 29 | iOSapi.Foundation, 30 | iOSapi.UIKit; 31 | 32 | const 33 | AVKitErrorUnknown = -1000; 34 | AVKitErrorPictureInPictureStartFailed = -1001; 35 | 36 | type 37 | 38 | // ===== Forward declarations ===== 39 | {$M+} 40 | AVPictureInPictureControllerDelegate = interface; 41 | AVPictureInPictureController = interface; 42 | AVPlayerViewControllerDelegate = interface; 43 | AVPlayerViewController = interface; 44 | 45 | // ===== Framework typedefs ===== 46 | {$M+} 47 | NSInteger = Integer; 48 | AVKitError = NSInteger; 49 | TAVKitRestoreUserInterfaceForPictureInPictureStopWithCompletionHandler = 50 | procedure(param1: Boolean) of object; 51 | CGFloat = Single; 52 | CGPoint = CGPoint = record x: CGFloat; 53 | y: 54 | CGFloat; 55 | end; 56 | PCGPoint = ^CGPoint;; 57 | CGSize = CGSize = record width: CGFloat; 58 | height: 59 | CGFloat; 60 | end; 61 | PCGSize = ^CGSize;; 62 | CGRect = CGRect = record origin: CGPoint; 63 | size: 64 | CGSize; 65 | end; 66 | PCGRect = ^CGRect;; 67 | // ===== Interface declarations ===== 68 | 69 | AVPictureInPictureControllerClass = interface(NSObjectClass) 70 | ['{D04BB352-D373-4339-80C2-23A78A2D8871}'] 71 | { class } function isPictureInPictureSupported: Boolean; 72 | cdecl; 73 | 74 | { class } function pictureInPictureButtonStartImageCompatibleWithTraitCollection 75 | (traitCollection: UITraitCollection): UIImage; cdecl; 76 | { class } function pictureInPictureButtonStopImageCompatibleWithTraitCollection 77 | (traitCollection: UITraitCollection): UIImage; cdecl; 78 | end; 79 | AVPictureInPictureController = interface(NSObject) 80 | ['{7F9F4DB5-F0EA-42E5-BD9D-DF080E286390}'] 81 | function initWithPlayerLayer(playerLayer: AVPlayerLayer) 82 | : Pointer { instancetype }; 83 | cdecl; 84 | 85 | function playerLayer: AVPlayerLayer; cdecl; 86 | procedure setDelegate(delegate: Pointer); cdecl; 87 | function delegate: Pointer; cdecl; 88 | procedure startPictureInPicture; cdecl; 89 | procedure stopPictureInPicture; cdecl; 90 | function isPictureInPicturePossible: Boolean; cdecl; 91 | function isPictureInPictureActive: Boolean; cdecl; 92 | function isPictureInPictureSuspended: Boolean; cdecl; 93 | end; 94 | 95 | TAVPictureInPictureController = class 96 | (TOCGenericImport) 98 | end; 99 | PAVPictureInPictureController = Pointer; 100 | 101 | AVPlayerViewControllerClass = interface(UIViewControllerClass) 102 | ['{FF5FC14F-89CA-4411-B0C4-1B36F7A021BD}'] 103 | end; 104 | AVPlayerViewController = interface(UIViewController) 105 | ['{1228EDFA-FC29-4AC7-8E9B-3378EC863D72}'] 106 | procedure setPlayer(player: AVPlayer); 107 | cdecl; 108 | function player: AVPlayer; cdecl; 109 | procedure setShowsPlaybackControls(showsPlaybackControls: Boolean); cdecl; 110 | function showsPlaybackControls: Boolean; cdecl; 111 | procedure setVideoGravity(videoGravity: NSString); cdecl; 112 | function videoGravity: NSString; cdecl; 113 | function isReadyForDisplay: Boolean; cdecl; 114 | function videoBounds: CGRect; cdecl; 115 | function contentOverlayView: UIView; cdecl; 116 | procedure setAllowsPictureInPicturePlayback 117 | (allowsPictureInPicturePlayback: Boolean); cdecl; 118 | function allowsPictureInPicturePlayback: Boolean; cdecl; 119 | procedure setDelegate(delegate: Pointer); cdecl; 120 | function delegate: Pointer; cdecl; 121 | end; 122 | 123 | TAVPlayerViewController = class 124 | (TOCGenericImport) 126 | end; 127 | PAVPlayerViewController = Pointer; 128 | 129 | // ===== Protocol declarations ===== 130 | 131 | AVPictureInPictureControllerDelegate = interface(IObjectiveC) 132 | ['{FCA64854-EB86-4F63-8C9F-45FAA5901EB0}'] 133 | procedure pictureInPictureControllerWillStartPictureInPicture 134 | (pictureInPictureController: AVPictureInPictureController); 135 | cdecl; 136 | procedure pictureInPictureControllerDidStartPictureInPicture 137 | (pictureInPictureController 138 | : AVPictureInPictureController); cdecl; 139 | [MethodName 140 | ('pictureInPictureController:failedToStartPictureInPictureWithError:') 141 | ] 142 | procedure pictureInPictureControllerFailedToStartPictureInPictureWithError 143 | (pictureInPictureController 144 | : AVPictureInPictureController; 145 | failedToStartPictureInPictureWithError: NSError); cdecl; 146 | procedure pictureInPictureControllerWillStopPictureInPicture 147 | (pictureInPictureController 148 | : AVPictureInPictureController); cdecl; 149 | procedure pictureInPictureControllerDidStopPictureInPicture 150 | (pictureInPictureController 151 | : AVPictureInPictureController); cdecl; 152 | [MethodName 153 | ('pictureInPictureController:restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:') 154 | ] 155 | procedure pictureInPictureControllerRestoreUserInterfaceForPictureInPictureStopWithCompletionHandler 156 | (pictureInPictureController 157 | : AVPictureInPictureController; 158 | restoreUserInterfaceForPictureInPictureStopWithCompletionHandler 159 | : TAVKitRestoreUserInterfaceForPictureInPictureStopWithCompletionHandler); 160 | cdecl; 161 | end; 162 | 163 | AVPlayerViewControllerDelegate = interface(IObjectiveC) 164 | ['{8FB8AD96-8ADB-4521-A591-16E61D9FC81F}'] 165 | procedure playerViewControllerWillStartPictureInPicture 166 | (playerViewController: AVPlayerViewController); 167 | cdecl; 168 | procedure playerViewControllerDidStartPictureInPicture 169 | (playerViewController 170 | : AVPlayerViewController); cdecl; 171 | [MethodName 172 | ('playerViewController:failedToStartPictureInPictureWithError:') 173 | ] 174 | procedure playerViewControllerFailedToStartPictureInPictureWithError 175 | (playerViewController: AVPlayerViewController; 176 | failedToStartPictureInPictureWithError 177 | : NSError); cdecl; 178 | procedure playerViewControllerWillStopPictureInPicture 179 | (playerViewController 180 | : AVPlayerViewController); cdecl; 181 | procedure playerViewControllerDidStopPictureInPicture 182 | (playerViewController 183 | : AVPlayerViewController); cdecl; 184 | function playerViewControllerShouldAutomaticallyDismissAtPictureInPictureStart 185 | (playerViewController 186 | : AVPlayerViewController): Boolean; cdecl; 187 | [MethodName 188 | ('playerViewController:restoreUserInterfaceForPictureInPictureStopWithCompletionHandler:') 189 | ] 190 | procedure playerViewControllerRestoreUserInterfaceForPictureInPictureStopWithCompletionHandler 191 | (playerViewController 192 | : AVPlayerViewController; 193 | restoreUserInterfaceForPictureInPictureStopWithCompletionHandler 194 | : TAVKitRestoreUserInterfaceForPictureInPictureStopWithCompletionHandler); 195 | cdecl; 196 | end; 197 | 198 | // ===== Exported string consts ===== 199 | 200 | function AVKitErrorDomain: NSString; 201 | 202 | 203 | // ===== External functions ===== 204 | 205 | const 206 | libAVKit = 207 | '/System/Library/Frameworks/AVKit.framework/AVKit'; 208 | 209 | implementation 210 | 211 | {$IF defined(IOS) and NOT defined(CPUARM)} 212 | 213 | uses 214 | Posix.Dlfcn; 215 | 216 | var 217 | AVKitModule: THandle; 218 | 219 | {$ENDIF IOS} 220 | 221 | function AVKitErrorDomain: NSString; 222 | begin 223 | Result := CocoaNSStringConst(libAVKit, 'AVKitErrorDomain'); 224 | end; 225 | 226 | {$IF defined(IOS) and NOT defined(CPUARM)} 227 | 228 | initialization 229 | 230 | AVKitModule := dlopen(MarshaledAString(libAVKit), RTLD_LAZY); 231 | 232 | finalization 233 | 234 | dlclose(AVKitModule); 235 | {$ENDIF IOS} 236 | 237 | end. 238 | -------------------------------------------------------------------------------- /iOSapi.CoreTelephony.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework CoreTelephony 12 | // 13 | 14 | unit iOSapi.CoreTelephony; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.Foundation; 29 | 30 | const 31 | kCTErrorDomainNoError = 0; 32 | kCTErrorDomainPOSIX = 1; 33 | kCTErrorDomainMach = 2; 34 | kCTCellularDataRestrictedStateUnknown = 0; 35 | kCTCellularDataRestricted = 1; 36 | kCTCellularDataNotRestricted = 2; 37 | 38 | type 39 | 40 | // ===== Forward declarations ===== 41 | {$M+} 42 | CTCall = interface; 43 | CTCallCenter = interface; 44 | CTCarrier = interface; 45 | CTCellularData = interface; 46 | CTSubscriber = interface; 47 | CTSubscriberInfo = interface; 48 | CTTelephonyNetworkInfo = interface; 49 | 50 | // ===== Framework typedefs ===== 51 | {$M+} 52 | 53 | CTError = record 54 | domain: Int32; 55 | error: Int32; 56 | end; 57 | 58 | PCTError = ^CTError; 59 | 60 | TCoreTelephonyCallEventHandler = procedure(param1: CTCall) of object; 61 | NSUInteger = Cardinal; 62 | CTCellularDataRestrictedState = NSUInteger; 63 | CellularDataRestrictionDidUpdateNotifier = procedure 64 | (param1: CTCellularDataRestrictedState) of object; 65 | TCoreTelephonySubscriberCellularProviderDidUpdateNotifier = procedure 66 | (param1: CTCarrier) of object; 67 | // ===== Interface declarations ===== 68 | 69 | CTCallClass = interface(NSObjectClass) 70 | ['{7333E325-C817-4441-9597-11429D0BACCA}'] 71 | end; 72 | 73 | CTCall = interface(NSObject) 74 | ['{94C077D3-2A92-444B-9CB1-54A9C7114131}'] 75 | function callState: NSString; cdecl; 76 | function callID: NSString; cdecl; 77 | end; 78 | 79 | TCTCall = class(TOCGenericImport) 80 | end; 81 | 82 | PCTCall = Pointer; 83 | 84 | CTCallCenterClass = interface(NSObjectClass) 85 | ['{8A3FDBD1-343B-403C-AD0C-3812FF0E17F8}'] 86 | end; 87 | 88 | CTCallCenter = interface(NSObject) 89 | ['{A0D57431-40AD-4832-A8B3-FCF236AFDBD6}'] 90 | function currentCalls: NSSet; cdecl; 91 | procedure setCallEventHandler(callEventHandler 92 | : TCoreTelephonyCallEventHandler); cdecl; 93 | function callEventHandler: TCoreTelephonyCallEventHandler; cdecl; 94 | end; 95 | 96 | TCTCallCenter = class(TOCGenericImport) 97 | end; 98 | 99 | PCTCallCenter = Pointer; 100 | 101 | CTCarrierClass = interface(NSObjectClass) 102 | ['{C2D9CBAA-D783-488B-8638-E2D02FACC836}'] 103 | end; 104 | 105 | CTCarrier = interface(NSObject) 106 | ['{A5F148CA-6205-44A4-A8EA-D9F3766A4240}'] 107 | function carrierName: NSString; cdecl; 108 | function mobileCountryCode: NSString; cdecl; 109 | function mobileNetworkCode: NSString; cdecl; 110 | function isoCountryCode: NSString; cdecl; 111 | function allowsVOIP: Boolean; cdecl; 112 | end; 113 | 114 | TCTCarrier = class(TOCGenericImport) 115 | end; 116 | 117 | PCTCarrier = Pointer; 118 | 119 | CTCellularDataClass = interface(NSObjectClass) 120 | ['{B140FD4E-8197-4C0A-96B4-E4B4054AF4C0}'] 121 | end; 122 | 123 | CTCellularData = interface(NSObject) 124 | ['{50A49764-F89C-4042-BC23-7FA90ACB13B3}'] 125 | procedure setCellularDataRestrictionDidUpdateNotifier 126 | (CellularDataRestrictionDidUpdateNotifier 127 | : CellularDataRestrictionDidUpdateNotifier); cdecl; 128 | function CellularDataRestrictionDidUpdateNotifier 129 | : CellularDataRestrictionDidUpdateNotifier; cdecl; 130 | function restrictedState: CTCellularDataRestrictedState; cdecl; 131 | end; 132 | 133 | TCTCellularData = class(TOCGenericImport) 134 | end; 135 | 136 | PCTCellularData = Pointer; 137 | 138 | CTSubscriberClass = interface(NSObjectClass) 139 | ['{CBC3E2BE-DE15-418C-84EF-62E564258E04}'] 140 | end; 141 | 142 | CTSubscriber = interface(NSObject) 143 | ['{16467BE6-040D-4693-BACA-D0C48B50326F}'] 144 | function carrierToken: NSData; cdecl; 145 | end; 146 | 147 | TCTSubscriber = class(TOCGenericImport) 148 | end; 149 | 150 | PCTSubscriber = Pointer; 151 | 152 | CTSubscriberInfoClass = interface(NSObjectClass) 153 | ['{5A1B2051-7BFD-4C90-A337-BBEA9666380F}'] 154 | { class } function subscriber: CTSubscriber; cdecl; 155 | end; 156 | 157 | CTSubscriberInfo = interface(NSObject) 158 | ['{F7FF8555-0158-456A-8147-D179191E7DF7}'] 159 | end; 160 | 161 | TCTSubscriberInfo = class(TOCGenericImport) 163 | end; 164 | 165 | PCTSubscriberInfo = Pointer; 166 | 167 | CTTelephonyNetworkInfoClass = interface(NSObjectClass) 168 | ['{7F830403-94F6-4C9E-8107-293AA4ECDC1B}'] 169 | end; 170 | 171 | CTTelephonyNetworkInfo = interface(NSObject) 172 | ['{7D3F1DB8-199D-4802-B5C0-6C55E8500C80}'] 173 | function subscriberCellularProvider: CTCarrier; cdecl; 174 | procedure setSubscriberCellularProviderDidUpdateNotifier 175 | (subscriberCellularProviderDidUpdateNotifier 176 | : TCoreTelephonySubscriberCellularProviderDidUpdateNotifier); cdecl; 177 | function subscriberCellularProviderDidUpdateNotifier 178 | : TCoreTelephonySubscriberCellularProviderDidUpdateNotifier; cdecl; 179 | function currentRadioAccessTechnology: NSString; cdecl; 180 | end; 181 | 182 | TCTTelephonyNetworkInfo = class(TOCGenericImport) 184 | end; 185 | 186 | PCTTelephonyNetworkInfo = Pointer; 187 | 188 | // ===== Exported string consts ===== 189 | 190 | function CTCallStateDialing: NSString; 191 | function CTCallStateIncoming: NSString; 192 | function CTCallStateConnected: NSString; 193 | function CTCallStateDisconnected: NSString; 194 | function CTSubscriberTokenRefreshed: NSString; 195 | function CTRadioAccessTechnologyDidChangeNotification: NSString; 196 | function CTRadioAccessTechnologyGPRS: NSString; 197 | function CTRadioAccessTechnologyEdge: NSString; 198 | function CTRadioAccessTechnologyWCDMA: NSString; 199 | function CTRadioAccessTechnologyHSDPA: NSString; 200 | function CTRadioAccessTechnologyHSUPA: NSString; 201 | function CTRadioAccessTechnologyCDMA1x: NSString; 202 | function CTRadioAccessTechnologyCDMAEVDORev0: NSString; 203 | function CTRadioAccessTechnologyCDMAEVDORevA: NSString; 204 | function CTRadioAccessTechnologyCDMAEVDORevB: NSString; 205 | function CTRadioAccessTechnologyeHRPD: NSString; 206 | function CTRadioAccessTechnologyLTE: NSString; 207 | 208 | 209 | // ===== External functions ===== 210 | 211 | const 212 | libCoreTelephony = 213 | '/System/Library/Frameworks/CoreTelephony.framework/CoreTelephony'; 214 | 215 | implementation 216 | 217 | {$IF defined(IOS) and NOT defined(CPUARM)} 218 | 219 | uses 220 | Posix.Dlfcn; 221 | 222 | var 223 | CoreTelephonyModule: THandle; 224 | 225 | {$ENDIF IOS} 226 | 227 | function CTCallStateDialing: NSString; 228 | begin 229 | Result := CocoaNSStringConst(libCoreTelephony, 'CTCallStateDialing'); 230 | end; 231 | 232 | function CTCallStateIncoming: NSString; 233 | begin 234 | Result := CocoaNSStringConst(libCoreTelephony, 'CTCallStateIncoming'); 235 | end; 236 | 237 | function CTCallStateConnected: NSString; 238 | begin 239 | Result := CocoaNSStringConst(libCoreTelephony, 'CTCallStateConnected'); 240 | end; 241 | 242 | function CTCallStateDisconnected: NSString; 243 | begin 244 | Result := CocoaNSStringConst(libCoreTelephony, 'CTCallStateDisconnected'); 245 | end; 246 | 247 | function CTSubscriberTokenRefreshed: NSString; 248 | begin 249 | Result := CocoaNSStringConst(libCoreTelephony, 'CTSubscriberTokenRefreshed'); 250 | end; 251 | 252 | function CTRadioAccessTechnologyDidChangeNotification: NSString; 253 | begin 254 | Result := CocoaNSStringConst(libCoreTelephony, 255 | 'CTRadioAccessTechnologyDidChangeNotification'); 256 | end; 257 | 258 | function CTRadioAccessTechnologyGPRS: NSString; 259 | begin 260 | Result := CocoaNSStringConst(libCoreTelephony, 'CTRadioAccessTechnologyGPRS'); 261 | end; 262 | 263 | function CTRadioAccessTechnologyEdge: NSString; 264 | begin 265 | Result := CocoaNSStringConst(libCoreTelephony, 'CTRadioAccessTechnologyEdge'); 266 | end; 267 | 268 | function CTRadioAccessTechnologyWCDMA: NSString; 269 | begin 270 | Result := CocoaNSStringConst(libCoreTelephony, 271 | 'CTRadioAccessTechnologyWCDMA'); 272 | end; 273 | 274 | function CTRadioAccessTechnologyHSDPA: NSString; 275 | begin 276 | Result := CocoaNSStringConst(libCoreTelephony, 277 | 'CTRadioAccessTechnologyHSDPA'); 278 | end; 279 | 280 | function CTRadioAccessTechnologyHSUPA: NSString; 281 | begin 282 | Result := CocoaNSStringConst(libCoreTelephony, 283 | 'CTRadioAccessTechnologyHSUPA'); 284 | end; 285 | 286 | function CTRadioAccessTechnologyCDMA1x: NSString; 287 | begin 288 | Result := CocoaNSStringConst(libCoreTelephony, 289 | 'CTRadioAccessTechnologyCDMA1x'); 290 | end; 291 | 292 | function CTRadioAccessTechnologyCDMAEVDORev0: NSString; 293 | begin 294 | Result := CocoaNSStringConst(libCoreTelephony, 295 | 'CTRadioAccessTechnologyCDMAEVDORev0'); 296 | end; 297 | 298 | function CTRadioAccessTechnologyCDMAEVDORevA: NSString; 299 | begin 300 | Result := CocoaNSStringConst(libCoreTelephony, 301 | 'CTRadioAccessTechnologyCDMAEVDORevA'); 302 | end; 303 | 304 | function CTRadioAccessTechnologyCDMAEVDORevB: NSString; 305 | begin 306 | Result := CocoaNSStringConst(libCoreTelephony, 307 | 'CTRadioAccessTechnologyCDMAEVDORevB'); 308 | end; 309 | 310 | function CTRadioAccessTechnologyeHRPD: NSString; 311 | begin 312 | Result := CocoaNSStringConst(libCoreTelephony, 313 | 'CTRadioAccessTechnologyeHRPD'); 314 | end; 315 | 316 | function CTRadioAccessTechnologyLTE: NSString; 317 | begin 318 | Result := CocoaNSStringConst(libCoreTelephony, 'CTRadioAccessTechnologyLTE'); 319 | end; 320 | 321 | {$IF defined(IOS) and NOT defined(CPUARM)} 322 | 323 | initialization 324 | 325 | CoreTelephonyModule := dlopen(MarshaledAString(libCoreTelephony), RTLD_LAZY); 326 | 327 | finalization 328 | 329 | dlclose(CoreTelephonyModule); 330 | {$ENDIF IOS} 331 | 332 | end. 333 | -------------------------------------------------------------------------------- /iOS-16_4/iOSapi.Accounts.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework Accounts 12 | // 13 | 14 | unit iOSapi.Accounts; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Mach, 23 | Macapi.ObjCRuntime, 24 | Macapi.ObjectiveC, 25 | iOSapi.CocoaTypes, 26 | iOSapi.Foundation; 27 | 28 | const 29 | ACAccountCredentialRenewResultRenewed = 0; 30 | ACAccountCredentialRenewResultRejected = 1; 31 | ACAccountCredentialRenewResultFailed = 2; 32 | ACErrorUnknown = 1; 33 | ACErrorAccountMissingRequiredProperty = 2; 34 | ACErrorAccountAuthenticationFailed = 3; 35 | ACErrorAccountTypeInvalid = 4; 36 | ACErrorAccountAlreadyExists = 5; 37 | ACErrorAccountNotFound = 6; 38 | ACErrorPermissionDenied = 7; 39 | ACErrorAccessInfoInvalid = 8; 40 | ACErrorClientPermissionDenied = 9; 41 | ACErrorAccessDeniedByProtectionPolicy = 10; 42 | ACErrorCredentialNotFound = 11; 43 | ACErrorFetchCredentialFailed = 12; 44 | ACErrorStoreCredentialFailed = 13; 45 | ACErrorRemoveCredentialFailed = 14; 46 | ACErrorUpdatingNonexistentAccount = 15; 47 | ACErrorInvalidClientBundleID = 16; 48 | ACErrorDeniedByPlugin = 17; 49 | ACErrorCoreDataSaveFailed = 18; 50 | ACErrorFailedSerializingAccountInfo = 19; 51 | ACErrorInvalidCommand = 20; 52 | ACErrorMissingTransportMessageID = 21; 53 | ACErrorCredentialItemNotFound = 22; 54 | ACErrorCredentialItemNotExpired = 23; 55 | 56 | type 57 | 58 | // ===== Forward declarations ===== 59 | {$M+} 60 | ACAccountType = interface; 61 | ACAccountCredential = interface; 62 | ACAccount = interface; 63 | ACAccountStore = interface; 64 | 65 | // ===== Framework typedefs ===== 66 | {$M+} 67 | NSInteger = Integer; 68 | PNSInteger = ^NSInteger; 69 | 70 | ACAccountCredentialRenewResult = NSInteger; 71 | ACAccountStoreSaveCompletionHandler = procedure(param1: Boolean; 72 | param2: NSError) of object; 73 | ACAccountStoreRemoveCompletionHandler = procedure(param1: Boolean; 74 | param2: NSError) of object; 75 | ACAccountStoreRequestAccessCompletionHandler = procedure(param1: Boolean; 76 | param2: NSError) of object; 77 | ACAccountStoreCredentialRenewalHandler = procedure 78 | (param1: ACAccountCredentialRenewResult; param2: NSError) of object; 79 | ACErrorCode = Cardinal; 80 | // ===== Interface declarations ===== 81 | 82 | ACAccountTypeClass = interface(NSObjectClass) 83 | ['{C01A8646-92BE-4F80-A6EC-4C0394650F43}'] 84 | end; 85 | 86 | ACAccountType = interface(NSObject) 87 | ['{0F26D200-5AA9-4ABB-A79A-80462C4296BF}'] 88 | function accountTypeDescription: NSString; cdecl; 89 | function identifier: NSString; cdecl; 90 | function accessGranted: Boolean; cdecl; 91 | end; 92 | 93 | TACAccountType = class(TOCGenericImport) 94 | end; 95 | 96 | PACAccountType = Pointer; 97 | 98 | ACAccountCredentialClass = interface(NSObjectClass) 99 | ['{C503DB30-AC7C-4D35-891D-F1CAC9095A5A}'] 100 | end; 101 | 102 | ACAccountCredential = interface(NSObject) 103 | ['{DAF5D3FE-4479-429C-9F3D-91016A3E9FE3}'] 104 | function initWithOAuthToken(token: NSString; tokenSecret: NSString) 105 | : Pointer { instancetype }; cdecl; 106 | function initWithOAuth2Token(token: NSString; refreshToken: NSString; 107 | expiryDate: NSDate): Pointer { instancetype }; cdecl; 108 | procedure setOauthToken(oauthToken: NSString); cdecl; 109 | function oauthToken: NSString; cdecl; 110 | end; 111 | 112 | TACAccountCredential = class(TOCGenericImport) 114 | end; 115 | 116 | PACAccountCredential = Pointer; 117 | 118 | ACAccountClass = interface(NSObjectClass) 119 | ['{2822D7F2-DFD6-44D9-AED8-1FE298B1A06D}'] 120 | end; 121 | 122 | ACAccount = interface(NSObject) 123 | ['{693B6386-9214-44DE-88FE-7C9E6D4CA931}'] 124 | function initWithAccountType(&type: ACAccountType) 125 | : Pointer { instancetype }; cdecl; 126 | function identifier: NSString; cdecl; 127 | procedure setAccountType(accountType: ACAccountType); cdecl; 128 | function accountType: ACAccountType; cdecl; 129 | procedure setAccountDescription(accountDescription: NSString); cdecl; 130 | function accountDescription: NSString; cdecl; 131 | procedure setUsername(username: NSString); cdecl; 132 | function username: NSString; cdecl; 133 | function userFullName: NSString; cdecl; 134 | procedure setCredential(credential: ACAccountCredential); cdecl; 135 | function credential: ACAccountCredential; cdecl; 136 | end; 137 | 138 | TACAccount = class(TOCGenericImport) 139 | end; 140 | 141 | PACAccount = Pointer; 142 | 143 | ACAccountStoreClass = interface(NSObjectClass) 144 | ['{632E11E1-B457-41C5-A8EC-EE91650ABBC0}'] 145 | end; 146 | 147 | ACAccountStore = interface(NSObject) 148 | ['{354B1793-E291-4D98-82AF-EE801B323971}'] 149 | function Accounts: NSArray; cdecl; 150 | function accountWithIdentifier(identifier: NSString): ACAccount; cdecl; 151 | function accountTypeWithAccountTypeIdentifier(typeIdentifier: NSString) 152 | : ACAccountType; cdecl; 153 | function accountsWithAccountType(accountType: ACAccountType) 154 | : NSArray; cdecl; 155 | procedure saveAccount(account: ACAccount; 156 | withCompletionHandler: ACAccountStoreSaveCompletionHandler); cdecl; 157 | [MethodName('requestAccessToAccountsWithType:withCompletionHandler:')] 158 | procedure requestAccessToAccountsWithTypeWithCompletionHandler 159 | (accountType: ACAccountType; 160 | withCompletionHandler 161 | : ACAccountStoreRequestAccessCompletionHandler); cdecl; 162 | [MethodName('requestAccessToAccountsWithType:options:completion:')] 163 | procedure requestAccessToAccountsWithTypeOptionsCompletion 164 | (accountType: ACAccountType; options: NSDictionary; 165 | completion: ACAccountStoreRequestAccessCompletionHandler); cdecl; 166 | procedure renewCredentialsForAccount(account: ACAccount; 167 | completion: ACAccountStoreCredentialRenewalHandler); cdecl; 168 | procedure removeAccount(account: ACAccount; 169 | withCompletionHandler: ACAccountStoreRemoveCompletionHandler); cdecl; 170 | end; 171 | 172 | TACAccountStore = class(TOCGenericImport) 173 | end; 174 | 175 | PACAccountStore = Pointer; 176 | 177 | // ===== Exported string consts ===== 178 | 179 | function ACAccountStoreDidChangeNotification: NSString; 180 | function ACAccountTypeIdentifierTwitter: NSString; 181 | function ACAccountTypeIdentifierFacebook: NSString; 182 | function ACAccountTypeIdentifierSinaWeibo: NSString; 183 | function ACAccountTypeIdentifierTencentWeibo: NSString; 184 | function ACAccountTypeIdentifierLinkedIn: NSString; 185 | function ACFacebookAppIdKey: NSString; 186 | function ACFacebookPermissionsKey: NSString; 187 | function ACFacebookAudienceKey: NSString; 188 | function ACFacebookAudienceEveryone: NSString; 189 | function ACFacebookAudienceFriends: NSString; 190 | function ACFacebookAudienceOnlyMe: NSString; 191 | function ACLinkedInAppIdKey: NSString; 192 | function ACLinkedInPermissionsKey: NSString; 193 | function ACTencentWeiboAppIdKey: NSString; 194 | function ACErrorDomain: NSString; 195 | 196 | 197 | // ===== External functions ===== 198 | 199 | const 200 | libAccounts = '/System/Library/Frameworks/Accounts.framework/Accounts'; 201 | 202 | implementation 203 | 204 | {$IF defined(IOS) and NOT defined(CPUARM)} 205 | 206 | uses 207 | Posix.Dlfcn; 208 | 209 | var 210 | AccountsModule: THandle; 211 | 212 | {$ENDIF IOS} 213 | 214 | function ACAccountStoreDidChangeNotification: NSString; 215 | begin 216 | Result := CocoaNSStringConst(libAccounts, 217 | 'ACAccountStoreDidChangeNotification'); 218 | end; 219 | 220 | function ACAccountTypeIdentifierTwitter: NSString; 221 | begin 222 | Result := CocoaNSStringConst(libAccounts, 'ACAccountTypeIdentifierTwitter'); 223 | end; 224 | 225 | function ACAccountTypeIdentifierFacebook: NSString; 226 | begin 227 | Result := CocoaNSStringConst(libAccounts, 'ACAccountTypeIdentifierFacebook'); 228 | end; 229 | 230 | function ACAccountTypeIdentifierSinaWeibo: NSString; 231 | begin 232 | Result := CocoaNSStringConst(libAccounts, 'ACAccountTypeIdentifierSinaWeibo'); 233 | end; 234 | 235 | function ACAccountTypeIdentifierTencentWeibo: NSString; 236 | begin 237 | Result := CocoaNSStringConst(libAccounts, 238 | 'ACAccountTypeIdentifierTencentWeibo'); 239 | end; 240 | 241 | function ACAccountTypeIdentifierLinkedIn: NSString; 242 | begin 243 | Result := CocoaNSStringConst(libAccounts, 'ACAccountTypeIdentifierLinkedIn'); 244 | end; 245 | 246 | function ACFacebookAppIdKey: NSString; 247 | begin 248 | Result := CocoaNSStringConst(libAccounts, 'ACFacebookAppIdKey'); 249 | end; 250 | 251 | function ACFacebookPermissionsKey: NSString; 252 | begin 253 | Result := CocoaNSStringConst(libAccounts, 'ACFacebookPermissionsKey'); 254 | end; 255 | 256 | function ACFacebookAudienceKey: NSString; 257 | begin 258 | Result := CocoaNSStringConst(libAccounts, 'ACFacebookAudienceKey'); 259 | end; 260 | 261 | function ACFacebookAudienceEveryone: NSString; 262 | begin 263 | Result := CocoaNSStringConst(libAccounts, 'ACFacebookAudienceEveryone'); 264 | end; 265 | 266 | function ACFacebookAudienceFriends: NSString; 267 | begin 268 | Result := CocoaNSStringConst(libAccounts, 'ACFacebookAudienceFriends'); 269 | end; 270 | 271 | function ACFacebookAudienceOnlyMe: NSString; 272 | begin 273 | Result := CocoaNSStringConst(libAccounts, 'ACFacebookAudienceOnlyMe'); 274 | end; 275 | 276 | function ACLinkedInAppIdKey: NSString; 277 | begin 278 | Result := CocoaNSStringConst(libAccounts, 'ACLinkedInAppIdKey'); 279 | end; 280 | 281 | function ACLinkedInPermissionsKey: NSString; 282 | begin 283 | Result := CocoaNSStringConst(libAccounts, 'ACLinkedInPermissionsKey'); 284 | end; 285 | 286 | function ACTencentWeiboAppIdKey: NSString; 287 | begin 288 | Result := CocoaNSStringConst(libAccounts, 'ACTencentWeiboAppIdKey'); 289 | end; 290 | 291 | function ACErrorDomain: NSString; 292 | begin 293 | Result := CocoaNSStringConst(libAccounts, 'ACErrorDomain'); 294 | end; 295 | 296 | {$IF defined(IOS) and NOT defined(CPUARM)} 297 | 298 | initialization 299 | 300 | AccountsModule := dlopen(MarshaledAString(libAccounts), RTLD_LAZY); 301 | 302 | finalization 303 | 304 | dlclose(AccountsModule); 305 | {$ENDIF IOS} 306 | 307 | end. 308 | -------------------------------------------------------------------------------- /iOSapi.Accounts.pas: -------------------------------------------------------------------------------- 1 | { *********************************************************** } 2 | { } 3 | { CodeGear Delphi Runtime Library } 4 | { } 5 | { Copyright(c) 2012-2014 Embarcadero Technologies, Inc. } 6 | { } 7 | { *********************************************************** } 8 | 9 | // 10 | // Delphi-Objective-C Bridge 11 | // Interfaces for Cocoa framework Accounts 12 | // 13 | 14 | unit iOSapi.Accounts; 15 | 16 | interface 17 | 18 | uses 19 | Macapi.CoreFoundation, 20 | Macapi.CoreServices, 21 | Macapi.Dispatch, 22 | Macapi.Foundation, 23 | Macapi.Mach, 24 | Macapi.ObjCRuntime, 25 | Macapi.ObjectiveC, 26 | Macapi.QuartzCore, 27 | iOSapi.CocoaTypes, 28 | iOSapi.Foundation; 29 | 30 | const 31 | ACAccountCredentialRenewResultRenewed = 0; 32 | ACAccountCredentialRenewResultRejected = 1; 33 | ACAccountCredentialRenewResultFailed = 2; 34 | ACErrorUnknown = 1; 35 | ACErrorAccountMissingRequiredProperty = 2; 36 | ACErrorAccountAuthenticationFailed = 3; 37 | ACErrorAccountTypeInvalid = 4; 38 | ACErrorAccountAlreadyExists = 5; 39 | ACErrorAccountNotFound = 6; 40 | ACErrorPermissionDenied = 7; 41 | ACErrorAccessInfoInvalid = 8; 42 | ACErrorClientPermissionDenied = 9; 43 | ACErrorAccessDeniedByProtectionPolicy = 10; 44 | ACErrorCredentialNotFound = 11; 45 | ACErrorFetchCredentialFailed = 12; 46 | ACErrorStoreCredentialFailed = 13; 47 | ACErrorRemoveCredentialFailed = 14; 48 | ACErrorUpdatingNonexistentAccount = 15; 49 | ACErrorInvalidClientBundleID = 16; 50 | ACErrorDeniedByPlugin = 17; 51 | ACErrorCoreDataSaveFailed = 18; 52 | ACErrorFailedSerializingAccountInfo = 19; 53 | ACErrorInvalidCommand = 20; 54 | ACErrorMissingTransportMessageID = 21; 55 | ACErrorCredentialItemNotFound = 22; 56 | ACErrorCredentialItemNotExpired = 23; 57 | 58 | type 59 | 60 | // ===== Forward declarations ===== 61 | {$M+} 62 | ACAccountType = interface; 63 | ACAccountCredential = interface; 64 | ACAccount = interface; 65 | ACAccountStore = interface; 66 | 67 | // ===== Framework typedefs ===== 68 | {$M+} 69 | NSInteger = Integer; 70 | ACAccountCredentialRenewResult = NSInteger; 71 | ACAccountStoreSaveCompletionHandler = procedure(param1: Boolean; 72 | param2: NSError) of object; 73 | ACAccountStoreRemoveCompletionHandler = procedure(param1: Boolean; 74 | param2: NSError) of object; 75 | ACAccountStoreRequestAccessCompletionHandler = procedure(param1: Boolean; 76 | param2: NSError) of object; 77 | ACAccountStoreCredentialRenewalHandler = procedure 78 | (param1: ACAccountCredentialRenewResult; param2: NSError) of object; 79 | ACErrorCode = Cardinal; 80 | // ===== Interface declarations ===== 81 | 82 | ACAccountTypeClass = interface(NSObjectClass) 83 | ['{829694E1-7A28-418B-8E8A-00FDFD40A51B}'] 84 | end; 85 | 86 | ACAccountType = interface(NSObject) 87 | ['{479922BC-DCFD-4883-BDC6-0687172438A4}'] 88 | function accountTypeDescription: NSString; cdecl; 89 | function identifier: NSString; cdecl; 90 | function accessGranted: Boolean; cdecl; 91 | end; 92 | 93 | TACAccountType = class(TOCGenericImport) 94 | end; 95 | 96 | PACAccountType = Pointer; 97 | 98 | ACAccountCredentialClass = interface(NSObjectClass) 99 | ['{53A85F29-8D86-4445-9268-346B736C3029}'] 100 | end; 101 | 102 | ACAccountCredential = interface(NSObject) 103 | ['{224D30B9-4618-4D7F-9F17-07361E444F40}'] 104 | function initWithOAuthToken(token: NSString; tokenSecret: NSString) 105 | : Pointer { instancetype }; cdecl; 106 | function initWithOAuth2Token(token: NSString; refreshToken: NSString; 107 | expiryDate: NSDate): Pointer { instancetype }; cdecl; 108 | procedure setOauthToken(oauthToken: NSString); cdecl; 109 | function oauthToken: NSString; cdecl; 110 | end; 111 | 112 | TACAccountCredential = class(TOCGenericImport) 114 | end; 115 | 116 | PACAccountCredential = Pointer; 117 | 118 | ACAccountClass = interface(NSObjectClass) 119 | ['{718EF0A3-D30E-4570-A1D8-252B2392A4C8}'] 120 | end; 121 | 122 | ACAccount = interface(NSObject) 123 | ['{4FE256F6-3201-48A8-9ABA-547A4BF03D66}'] 124 | function initWithAccountType(&type: ACAccountType) 125 | : Pointer { instancetype }; cdecl; 126 | function identifier: NSString; cdecl; 127 | procedure setAccountType(accountType: ACAccountType); cdecl; 128 | function accountType: ACAccountType; cdecl; 129 | procedure setAccountDescription(accountDescription: NSString); cdecl; 130 | function accountDescription: NSString; cdecl; 131 | procedure setUsername(username: NSString); cdecl; 132 | function username: NSString; cdecl; 133 | function userFullName: NSString; cdecl; 134 | procedure setCredential(credential: ACAccountCredential); cdecl; 135 | function credential: ACAccountCredential; cdecl; 136 | end; 137 | 138 | TACAccount = class(TOCGenericImport) 139 | end; 140 | 141 | PACAccount = Pointer; 142 | 143 | ACAccountStoreClass = interface(NSObjectClass) 144 | ['{3AECC229-444C-4A62-99CA-721618B142B6}'] 145 | end; 146 | 147 | ACAccountStore = interface(NSObject) 148 | ['{57B09B8C-01D7-42AA-BBA1-D8EA8A252067}'] 149 | function Accounts: NSArray; cdecl; 150 | function accountWithIdentifier(identifier: NSString): ACAccount; cdecl; 151 | function accountTypeWithAccountTypeIdentifier(typeIdentifier: NSString) 152 | : ACAccountType; cdecl; 153 | function accountsWithAccountType(accountType: ACAccountType) 154 | : NSArray; cdecl; 155 | procedure saveAccount(account: ACAccount; 156 | withCompletionHandler: ACAccountStoreSaveCompletionHandler); cdecl; 157 | [MethodName('requestAccessToAccountsWithType:withCompletionHandler:')] 158 | procedure requestAccessToAccountsWithTypeWithCompletionHandler 159 | (accountType: ACAccountType; 160 | withCompletionHandler 161 | : ACAccountStoreRequestAccessCompletionHandler); cdecl; 162 | [MethodName('requestAccessToAccountsWithType:options:completion:')] 163 | procedure requestAccessToAccountsWithTypeOptionsCompletion 164 | (accountType: ACAccountType; options: NSDictionary; 165 | completion: ACAccountStoreRequestAccessCompletionHandler); cdecl; 166 | procedure renewCredentialsForAccount(account: ACAccount; 167 | completion: ACAccountStoreCredentialRenewalHandler); cdecl; 168 | procedure removeAccount(account: ACAccount; 169 | withCompletionHandler: ACAccountStoreRemoveCompletionHandler); cdecl; 170 | end; 171 | 172 | TACAccountStore = class(TOCGenericImport) 173 | end; 174 | 175 | PACAccountStore = Pointer; 176 | 177 | // ===== Exported string consts ===== 178 | 179 | function ACAccountStoreDidChangeNotification: NSString; 180 | function ACAccountTypeIdentifierTwitter: NSString; 181 | function ACAccountTypeIdentifierFacebook: NSString; 182 | function ACAccountTypeIdentifierSinaWeibo: NSString; 183 | function ACAccountTypeIdentifierTencentWeibo: NSString; 184 | function ACAccountTypeIdentifierLinkedIn: NSString; 185 | function ACFacebookAppIdKey: NSString; 186 | function ACFacebookPermissionsKey: NSString; 187 | function ACFacebookAudienceKey: NSString; 188 | function ACFacebookAudienceEveryone: NSString; 189 | function ACFacebookAudienceFriends: NSString; 190 | function ACFacebookAudienceOnlyMe: NSString; 191 | function ACLinkedInAppIdKey: NSString; 192 | function ACLinkedInPermissionsKey: NSString; 193 | function ACTencentWeiboAppIdKey: NSString; 194 | function ACErrorDomain: NSString; 195 | 196 | 197 | // ===== External functions ===== 198 | 199 | const 200 | libAccounts = '/System/Library/Frameworks/Accounts.framework/Accounts'; 201 | 202 | implementation 203 | 204 | {$IF defined(IOS) and NOT defined(CPUARM)} 205 | 206 | uses 207 | Posix.Dlfcn; 208 | 209 | var 210 | AccountsModule: THandle; 211 | 212 | {$ENDIF IOS} 213 | 214 | function ACAccountStoreDidChangeNotification: NSString; 215 | begin 216 | Result := CocoaNSStringConst(libAccounts, 217 | 'ACAccountStoreDidChangeNotification'); 218 | end; 219 | 220 | function ACAccountTypeIdentifierTwitter: NSString; 221 | begin 222 | Result := CocoaNSStringConst(libAccounts, 'ACAccountTypeIdentifierTwitter'); 223 | end; 224 | 225 | function ACAccountTypeIdentifierFacebook: NSString; 226 | begin 227 | Result := CocoaNSStringConst(libAccounts, 'ACAccountTypeIdentifierFacebook'); 228 | end; 229 | 230 | function ACAccountTypeIdentifierSinaWeibo: NSString; 231 | begin 232 | Result := CocoaNSStringConst(libAccounts, 'ACAccountTypeIdentifierSinaWeibo'); 233 | end; 234 | 235 | function ACAccountTypeIdentifierTencentWeibo: NSString; 236 | begin 237 | Result := CocoaNSStringConst(libAccounts, 238 | 'ACAccountTypeIdentifierTencentWeibo'); 239 | end; 240 | 241 | function ACAccountTypeIdentifierLinkedIn: NSString; 242 | begin 243 | Result := CocoaNSStringConst(libAccounts, 'ACAccountTypeIdentifierLinkedIn'); 244 | end; 245 | 246 | function ACFacebookAppIdKey: NSString; 247 | begin 248 | Result := CocoaNSStringConst(libAccounts, 'ACFacebookAppIdKey'); 249 | end; 250 | 251 | function ACFacebookPermissionsKey: NSString; 252 | begin 253 | Result := CocoaNSStringConst(libAccounts, 'ACFacebookPermissionsKey'); 254 | end; 255 | 256 | function ACFacebookAudienceKey: NSString; 257 | begin 258 | Result := CocoaNSStringConst(libAccounts, 'ACFacebookAudienceKey'); 259 | end; 260 | 261 | function ACFacebookAudienceEveryone: NSString; 262 | begin 263 | Result := CocoaNSStringConst(libAccounts, 'ACFacebookAudienceEveryone'); 264 | end; 265 | 266 | function ACFacebookAudienceFriends: NSString; 267 | begin 268 | Result := CocoaNSStringConst(libAccounts, 'ACFacebookAudienceFriends'); 269 | end; 270 | 271 | function ACFacebookAudienceOnlyMe: NSString; 272 | begin 273 | Result := CocoaNSStringConst(libAccounts, 'ACFacebookAudienceOnlyMe'); 274 | end; 275 | 276 | function ACLinkedInAppIdKey: NSString; 277 | begin 278 | Result := CocoaNSStringConst(libAccounts, 'ACLinkedInAppIdKey'); 279 | end; 280 | 281 | function ACLinkedInPermissionsKey: NSString; 282 | begin 283 | Result := CocoaNSStringConst(libAccounts, 'ACLinkedInPermissionsKey'); 284 | end; 285 | 286 | function ACTencentWeiboAppIdKey: NSString; 287 | begin 288 | Result := CocoaNSStringConst(libAccounts, 'ACTencentWeiboAppIdKey'); 289 | end; 290 | 291 | function ACErrorDomain: NSString; 292 | begin 293 | Result := CocoaNSStringConst(libAccounts, 'ACErrorDomain'); 294 | end; 295 | 296 | {$IF defined(IOS) and NOT defined(CPUARM)} 297 | 298 | initialization 299 | 300 | AccountsModule := dlopen(MarshaledAString(libAccounts), RTLD_LAZY); 301 | 302 | finalization 303 | 304 | dlclose(AccountsModule); 305 | {$ENDIF IOS} 306 | 307 | end. 308 | --------------------------------------------------------------------------------