Recent

Author Topic: macOS 11 Cocoa headers  (Read 6231 times)

Ryan Joseph

  • Newbie
  • Posts: 4
macOS 11 Cocoa headers
« on: September 06, 2021, 04:46:50 pm »
After 7 years I have finally parsed a new batch of macOS Cocoa headers. The main reason this took so long is because Apple added generics to Objective-C and this of course totally broke my naive regex based parser. :)

Besides some new frameworks and APIs cblock's are finally supported. I think this means the headers requires FPC 3.0.2+ but that should be assumed anyways.

I didn't parse every single framework in the SDK but if I'm missing an important one please let me know and I'll add it. Since the parser is error prone and mistakes will be made across version please submit pull requests for changes that break existing projects.

https://github.com/genericptr/MacOS_11_0

Because some frameworks were deprecated or likely not to change I have included them into a new merged repository which will contain a mix of older and newer frameworks. Currently this is just the most recent 11.3 SDK and a number of older frameworks from the FPC RTL CocoaAll which is based on 10.10.

https://github.com/genericptr/CocoaAll

Fred vS

  • Hero Member
  • *****
  • Posts: 3414
    • StrumPract is the musicians best friend
Re: macOS 11 Cocoa headers
« Reply #1 on: September 06, 2021, 05:18:51 pm »
Hello Ryan Joseph.

Many thanks to share your code.

May I ask you what can be done with this headers?
Is it possible to create fpc-applications without the use of LCL-Cocoa (like it can be done with X11 headers for Linux) ?

Do you have some demos of fpc-Cocoa applications using your headers?

Thanks.

Fre;D


I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

Ryan Joseph

  • Newbie
  • Posts: 4
Re: macOS 11 Cocoa headers
« Reply #2 on: September 06, 2021, 09:51:58 pm »
These are used for the Lazarus Cocoa widget set but I'm not a Lazarus user myself so I don't know many details.

I do have some example apps which are pure native Cocoa and don't use Lazarus.

https://github.com/genericptr/Cocoa-Pascal-Examples

Fred vS

  • Hero Member
  • *****
  • Posts: 3414
    • StrumPract is the musicians best friend
Re: macOS 11 Cocoa headers
« Reply #3 on: September 06, 2021, 10:02:18 pm »
I do have some example apps which are pure native Cocoa and don't use Lazarus.

https://github.com/genericptr/Cocoa-Pascal-Examples

EXCELLENT!

I will deeply study it (but not test it because I dont have a Mac).

Many thanks (and maybe your work can be used for fpGUI/MSEgui too).

Fre;D

« Last Edit: September 07, 2021, 11:58:47 pm by trev »
I use Lazarus 2.2.0 32/64 and FPC 3.2.2 32/64 on Debian 11 64 bit, Windows 10, Windows 7 32/64, Windows XP 32,  FreeBSD 64.
Widgetset: fpGUI, MSEgui, Win32, GTK2, Qt.

https://github.com/fredvs
https://gitlab.com/fredvs
https://codeberg.org/fredvs

edgarrod71

  • Jr. Member
  • **
  • Posts: 68
Re: macOS 11 Cocoa headers
« Reply #4 on: November 23, 2021, 06:50:01 pm »
Nowadays is not so expensive finding an used Mac

Hansaplast

  • Hero Member
  • *****
  • Posts: 689
  • Tweaking4All.com
    • Tweaking4All
Re: macOS 11 Cocoa headers
« Reply #5 on: September 17, 2024, 12:44:49 pm »
How do I use these in Lazarus? (asked the question here as well - but did not get a relevant response)

 

TinyPortal © 2005-2018