Page 1 of 1

OSX API imports

Posted: Wed Sep 16, 2015 6:11 am
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") .

Re: OSX API imports

Posted: Wed Sep 16, 2015 8:00 am
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.

Re: OSX API imports

Posted: Wed Sep 16, 2015 9:22 am
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 ?

Re: OSX API imports

Posted: Wed Sep 16, 2015 11:14 am
by Fred
Looks good to me. Better create a new foundation.pb file so it keeps organized