Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 09/23/22 in all areas

  1. Dave Nottage

    Detect shake gesture on IOS

    I've created a gist here, but also including it in this post: unit Unit1; interface uses System.SysUtils, System.Types, System.UITypes, System.Classes, System.Variants, FMX.Types, FMX.Controls, FMX.Forms, FMX.Graphics, FMX.Dialogs, FMX.StdCtrls, FMX.Controls.Presentation, System.TypInfo, Macapi.ObjectiveC, Macapi.Helpers, iOSapi.UIKit, iOSapi.Foundation; type IShakeView = interface(UIView) ['{21B0BCE6-8D07-40BA-943C-DC4B1A99D3CA}'] function canBecomeFirstResponder: Boolean; cdecl; procedure motionBegan(motion: UIEventSubtype; withEvent: UIEvent); cdecl; procedure motionEnded(motion: UIEventSubtype; withEvent: UIEvent); cdecl; end; TShakeView = class(TOCLocal) private FOnShake: TNotifyEvent; procedure DoShake; function GetView: UIView; procedure InitView; protected function GetObjectiveCClass: PTypeInfo; override; public { IShakeView } function canBecomeFirstResponder: Boolean; cdecl; procedure motionBegan(motion: UIEventSubtype; withEvent: UIEvent); cdecl; procedure motionEnded(motion: UIEventSubtype; withEvent: UIEvent); cdecl; public constructor Create; procedure BecomeFirstResponder; property View: UIView read GetView; property OnShake: TNotifyEvent read FOnShake write FOnShake; end; TForm1 = class(TForm) Label1: TLabel; Button1: TButton; procedure Button1Click(Sender: TObject); private FShakeView: TShakeView; procedure ShakeViewShakeHandler(Sender: TObject); public constructor Create(AOwner: TComponent); override; destructor Destroy; override; end; var Form1: TForm1; implementation {$R *.fmx} uses FMX.Platform.iOS; { TShakeView } constructor TShakeView.Create; begin inherited; InitView; end; procedure TShakeView.InitView; var LView: Pointer; begin // Using a zero-sized rect because this view won't actually be seen LView := GetView.initWithFrame(CGRectFromRect(TRectF.Empty)); if GetObjectID <> LView then UpdateObjectID(LView); end; procedure TShakeView.BecomeFirstResponder; begin GetView.becomeFirstResponder; end; function TShakeView.canBecomeFirstResponder: Boolean; begin Result := True; end; procedure TShakeView.DoShake; begin if Assigned(FOnShake) then FOnShake(Self); end; function TShakeView.GetObjectiveCClass: PTypeInfo; begin Result := TypeInfo(IShakeView); end; function TShakeView.GetView: UIView; begin Result := UIView(Super); end; procedure TShakeView.motionBegan(motion: UIEventSubtype; withEvent: UIEvent); begin // end; procedure TShakeView.motionEnded(motion: UIEventSubtype; withEvent: UIEvent); begin if withEvent.subtype = UIEventSubtypeMotionShake then DoShake; end; { TForm1 } constructor TForm1.Create(AOwner: TComponent); begin inherited; FShakeView := TShakeView.Create; FShakeView.OnShake := ShakeViewShakeHandler; WindowHandleToPlatform(Handle).View.addSubview(FShakeView.View); Button1Click(Button1); end; destructor TForm1.Destroy; begin FShakeView.Free; inherited; end; procedure TForm1.Button1Click(Sender: TObject); begin FShakeView.BecomeFirstResponder; Label1.Text := 'Waiting for shake'; end; procedure TForm1.ShakeViewShakeHandler(Sender: TObject); begin Label1.Text := 'Shaked me!'; end; end.
  2. We have used https://www.mitov.com/products/videolab#overview for 13 years. Excellent library to which I owe my company's product's success on Windows and macOS. His tools are threaded, which means you get maximum through-put and the VCL doesn't freeze. Free trial and free to non-commercial organizations. The installer puts some demo programs here C:\Program Files (x86)\Embarcadero\Studio\22.0\LabPacks\Demos. You'll find one there that lets you process frame by frame either a live feed or file playback. Just drop a few components on a designer, hook them up, and grab the "Frame Ready" event to process your data. Check out some of his other tools. He has some real-time tools that do pattern recognition and may be all you need. Boian Mitov is brilliant, IMO. His tools are the best we could find. No royalties necessary. No confusion about FFMPEG patent licensing, which we always worried about. The attached sample has a video feed (of a telescope spectrometer) on the left and some data extracted on the Mitov plot on the right. Tom
  3. gkobler

    wuppdi Welcome Page for Delphi 11 Alexandria?

    Fixed Add a setup form Fixed Fixed Same to mee, but at the moment no solution! May it's a Delphi problem.
  4. See https://www.trichview.com/features/rvmedia.html
  5. Alexander Elagin

    Developer Express gave up on FMX

    After a bit of googling I got the following information regarding DevExpress. 1. While the management and a group of developers are located in USA, almost all development and support team are in Russia (namely, in Tula, Kaluga and St.Peterburg). A rather old article in Russian briefly introduces the company: https://habr.com/ru/company/developersoft/blog/104047/ 2. From this page we can find out the web address of the russian branch: https://www.developersoft.ru Exploring this site (description, portfolio, history...) it is easy to see that this is really the other face of DevExpress, or at least the company which does all the work. 3. And now the most interesting statement from the mentioned page: That is, the Company is suspending all hiring and operations indefinitely as of March 2, 2022. 4. Conclusion. Given the current political and economical situation (first of all, blocking of virtually all payments between Russia and the western world, meaning that the developers cannot be paid) it means that either DevExpress management has to be able to relocate the development and support team somewhere outside the russian borders, or it has to hire an absolutely new team as a replacement, or cease any development until all this madness ends. All the information is from the internet, I'd prefer not to trust it 100%, but unfortunately it seems too matching to be true.
×