[MacRuby-devel] Exposing c structs and functions : Addendum
John Shea
johnmacshea at gmail.com
Thu Dec 18 22:36:21 PST 2008
Hi again Jim,
another note, down the bottom of the MacRuby tutorial
http://www.macruby.org/trac/wiki/MacRubyTutorial, you will see the words:
"On some occasions. you will want to load bridge support files that you
personally generated using gen_bridge_metadata(1). To do that, you can use
the Kernel#load_bridge_support_file method."
And then an example follows, perhaps that will work for you.
Best of luck,
John
On Thu, Dec 18, 2008 at 4:29 PM, Jim Getzen <jim at getzen.name> wrote:
> Is there a way to expose some c structs and functions from a custom
> Objective-C framework to MacRuby?
>
> For instance, in my framework I have a 3-D point struct, such as:
> typedef struct {
> CGFloat x, y, z;
> } JPoint3;
>
> In addition, I have creation functions such as 'JPoint3Make(x, y, z)' etc.
>
> How do I make these usable from MacRuby, like NSPoint and NSMakePoint are?
>
> Jim
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20081219/71265262/attachment.html>
More information about the MacRuby-devel
mailing list