Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 12/11/19 in all areas

  1. Gustav Schubert

    XE5 > RIO

    I don't know if it works, I am just learning - how to code against the api, I only compile and read some interesting code. It is for the original poster to test it out, waiting ...
  2. Gustav Schubert

    XE5 > RIO

    Yes, this compiles - with small changes - and looks much better. AVCaptureStillImageOutput = interface(iOSapi.AVFoundation.AVCaptureStillImageOutput) ['{A1669519-9901-489E-BDD1-A0E697C8C6CB}'] procedure addObserver(observer: Pointer; forKeyPath: NSString; options: NSKeyValueObservingOptions; context: Pointer); cdecl; procedure captureStillImageAsynchronouslyFromConnection(connection: AVCaptureConnection; completionHandler: TAVCaptureCompletionHandler); cdecl; end; TAVCaptureStillImageOutput = class(TOCGenericImport<AVCaptureStillImageOutputClass, AVCaptureStillImageOutput>) end; // objc_msgSendP4((FStillImageOutput as ILocalObject).GetObjectID, // sel_getUid('addObserver:forKeyPath:options:context:'), // FVideoCaptureDelegate.GetObjectID, // (StrToNSStr('capturingStillImage') as ILocalObject).GetObjectID, // NSKeyValueObservingOptionNew, // (FAVCaptureStillImageIsCapturingStillImageContext as ILocalObject).GetObjectID); TAVCaptureStillImageOutput.Wrap(FStillImageOutput).addObserver( FVideoCaptureDelegate.GetObjectID, StrToNSStr('capturingStillImage'), NSKeyValueObservingOptionNew, NSObjectToID(FAVCaptureStillImageIsCapturingStillImageContext)); { [stillImageOutput addObserver:self forKeyPath:@"capturingStillImage" options:NSKeyValueObservingOptionNew context:AVCaptureStillImageIsCapturingStillImageContext]; } Source Link.
  3. Dave Nottage

    XE5 > RIO

    If FStillImageOutput is a AVCaptureStillImageOutput, you could do this: AVCaptureStillImageOutput = interface(iOSapi.AVFoundation.AVCaptureStillImageOutput) ['{A1669519-9901-489E-BDD1-A0E697C8C6CB}'] procedure addObserver(observer: NSObject; forKeyPath: NSString; options: NSKeyValueObservingOptions; context: Pointer); cdecl; end; TAVCaptureStillImageOutput = class(TOCGenericImport<AVCaptureStillImageOutputClass, AVCaptureStillImageOutput>) end; ... TAVCaptureStillImageOutput.Wrap(FStillImageOutput).addObserver(FVideoCaptureDelegate, NSObjectToID(StrToNSStr('capturingStillImage')), NSKeyValueObservingOptionNew, NSObjectToID(FAVCaptureStillImageIsCapturingStillImageContext)); NSObjectToID comes from Macapi.Helpers
  4. For extracting resources Google for PE resource editor. You don't have to rebuild bpl again, just put your VCL Style in common path where IDE can find it (where other VCL Styles are located) and then change following keys in registry: Computer\HKEY_CURRENT_USER\Software\Embarcadero\BDS\20.0\Theme Key: Theme Value: Custom Key: VCLStyle Value: YourStyleName (That would be the name you give in VCL Style Editor under Name Unfortunately, VCL Styles are bitmap based and you cannot just change few RGB color values, you have to edit bitmaps. You can export complete style as one PNG and then you can edit colors in some image editing tool. After you are done, import new image back in. You will also need to go to Style -> Assign Colors to apply colors from bitmap back to Colors and SysColors. After that check if all those colors are correct (I think few were not assigned correctly) Depending on how much customizing you need and want, it can be a lot of work. I modified Light theme to grayscale, but that was rather easy as I just converted whole png to grayscale (except for the close button)
  5. KodeZwerg

    Windows Ini File Helper Unit

    From point of now it does not support duplicates nor comments. It wont beautify target .ini. It just work 🙂 In attachment is a Build where i started make a Class of it, Only String and Integer are supported by now. AES128 encryption has been added. IniHelper.7z
×