<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>But what about creating objects and calling methods, or whatever they're called in Objective-C?</div><div><br></div><div>Also be aware if you want to use any structures from the older interfaces and Carbon they have byte alignment and must be declared specially. I have an interface file for most Carbon stuff, but it's a bit large at 3.2MB (~500KB compressed). I can mail it if you need it.</div><div><br></div><br><div><div>On Mar 17, 2013, at 7:12 AM, Dragiša Durić wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">After a hint from Anthony, and a share of mining, mostly due to being first-time OSX Doc Miner :), here comes result. Example code:<div><br></div><div>== CoureFoundation.i3 ==</div><div><div>INTERFACE CoreFoundation;</div><div><br></div><div>IMPORT Ctypes;</div><div><br></div><div>TYPE</div><div> TypeRef = ADDRESS;</div><div> DataRef = ADDRESS;</div><div> AllocatorRef = ADDRESS;</div><div> Index = Ctypes.long_int;</div><div><br></div><div><* EXTERNAL CFRelease *></div><div>PROCEDURE Release(cf: TypeRef);</div><div> </div><div><* EXTERNAL CFDataCreate *></div><div>PROCEDURE DataCreate(allocator: AllocatorRef; bytes: Ctypes.void_star; length: Index): DataRef;</div><div><br></div><div>(* Not exactly CF, but I can split later, if need be to grow this</div><div>*)</div><div><br></div><div>END CoreFoundation.</div></div><div>== m3makefile ==</div><div>…</div><div><div>proc use_framework(FW) is</div><div> configure_c_compiler()</div><div> SYSTEM_CC = SYSTEM_CC & " -framework " & FW</div><div>end</div><div><br></div><div>if equal(TARGET, "AMD64_DARWIN")</div><div> use_framework("CoreFoundation")</div><div> use_framework("Security")</div></div><div>...</div><div>===</div><div><br></div><div>I named things like this so I can "IMPORT CoreFoundation AS CF" later and use names like CF.Release().</div><div><br></div><div>Hope it saves few hours to somebody else :).<br><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Divided by a common language</div><div><br></div><div>Dragiša Durić</div><div><a href="mailto:dragisha@m3w.org">dragisha@m3w.org</a></div><div><br></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br><div><div>On Mar 17, 2013, at 3:37 AM, Antony Hosking wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=utf-8"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Should be simple addresses.<div><br>
<br><div><div>On Mar 16, 2013, at 6:34 PM, Dragiša Durić <<a href="mailto:dragisha@m3w.org">dragisha@m3w.org</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">To resolve an issue with a project, I need to wrap few functions from Security framework on OSX Lion. I have no experience on this level with OSX programming.<div><br></div><div>I did a lot of such work on Linux and Windows, and all I needed there is to match signatures of functions, structure of types, and refer m3makefile to right libraries. Also, I did similar work for various non-framework libraries on OSX, and it is Unix all the way.</div><div><br></div><div>Anyone with CF/framework related experience? Do I need some special voodoo for handling various CF opaque objects or they are simple addresses?</div><div><br></div><div>TIA,</div><div>dd</div><div><br><div apple-content-edited="true">
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>--</div><div>Divided by a common language</div><div><br></div><div>Dragiša Durić</div><div><a href="mailto:dragisha@m3w.org">dragisha@m3w.org</a></div><div><br></div></div><br class="Apple-interchange-newline"><br class="Apple-interchange-newline">
</div>
<br></div></div></blockquote></div><br></div></div></blockquote></div><br></div></div></blockquote></div><br></body></html>