[Lazarus] Adding Mac specific functionality

[Lazarus] Adding Mac specific functionality

I’m working on a Lazarus program for another person and I’d like to use a feature of the Mac Cocoa framework which doesn’t exist in Lazarus.

I’m happy to add this myself and submit a patch (because it’s helpful for other users) but what is the protocol for doing this? I could add an accessor function into the control (TMemo) but it would route to a Cocoa control and it wouldn’t have any affect on Windows/Linux.

Here is the code in question which I’ve added via an ifdef for now but Lazarus should expose “setFocusRingType” in the main interface because it’s important on OS X.

Re: [Lazarus] Adding Mac specific functionality

> On Feb 5, 2019, at 9:24 AM, Ryan Joseph via lazarus <[hidden email]> wrote:
>
> I’m working on a Lazarus program for another person and I’d like to use a feature of the Mac Cocoa framework which doesn’t exist in Lazarus.
>
> I’m happy to add this myself and submit a patch (because it’s helpful for other users) but what is the protocol for doing this? I could add an accessor function into the control (TMemo) but it would route to a Cocoa control and it wouldn’t have any affect on Windows/Linux.
>
> Here is the code in question which I’ve added via an ifdef for now but Lazarus should expose “setFocusRingType” in the main interface because it’s important on OS X.
>
> {$ifdef DARWIN}
> NSTextView(Memo1.Handle).setFocusRingType(NSFocusRingTypeNone);
> {$endif}
>
> Regards,
> Ryan Joseph
>
> --
> _______________________________________________
> lazarus mailing list
> [hidden email]> https://lists.lazarus-ide.org/listinfo/lazarus