OSX API imports

Mac OSX specific forum
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3944
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

OSX API imports

Post by wilbert »

For Windows there's the possibility using WebSVN to contribute API imports.
Is this possible for OSX as well Fred ?

One of the API procedures I would like to be available is sel_registerName(str.p-ascii) .
It would be nice if this could be called with an underscore without the need of an import statement in the PureBasic source.
Like sel_registerName_("modifierFlags") .
Windows (x64)
Raspberry Pi OS (Arm64)
Fred
Administrator
Administrator
Posts: 18499
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: OSX API imports

Post by Fred »

Yes, you can. If you want write access just tell me so I can give it to you and you can update the file with the function you need.
wilbert
PureBasic Expert
PureBasic Expert
Posts: 3944
Joined: Sun Aug 08, 2004 5:21 am
Location: Netherlands

Re: OSX API imports

Post by wilbert »

Fred wrote:Yes, you can. If you want write access just tell me so I can give it to you and you can update the file with the function you need.
That would be nice.

Am I correct it should look like this ?

Code: Select all

XIncludeFile "common.pbi"

ImportC "-framework Foundation"
  ApiC(sel_registerName, (str.p-utf8))
EndImport
and if so, do I create a file for it named foundation.pb , objcruntime.pb or add it to one of the other files ?
Windows (x64)
Raspberry Pi OS (Arm64)
Fred
Administrator
Administrator
Posts: 18499
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Re: OSX API imports

Post by Fred »

Looks good to me. Better create a new foundation.pb file so it keeps organized
Post Reply