3 messages in net.java.dev.jna.usersRe: [jna-users] Attempting to access ...
FromSent OnAttachments
Richard OteroNov 12, 2007 6:29 pm 
Albert StrasheimNov 12, 2007 8:32 pm 
Timothy WallNov 13, 2007 5:37 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [jna-users] Attempting to access GNU Triangulated Surface Library through JNAActions...
From:Albert Strasheim (full@gmail.com)
Date:Nov 12, 2007 8:32:53 pm
List:net.java.dev.jna.users

Hello

----- Original Message ----- From: "Richard Otero" <rich@gmail.com> To: <use@jna.dev.java.net> Sent: Tuesday, November 13, 2007 4:29 AM Subject: [jna-users] Attempting to access GNU Triangulated Surface Library through JNA

I believe that I would have to create classes that extend Structure for GtsSurface, GtsSurfaceClass, GtsFaceClass, GtsEdgeClass, GtsVertexClass and onwards recursively until I get to inputs such as double, int, char, etc. Wanted to make sure of this before I got too deep.

Check carefully if you really need to map the internals of these structures, or whether you can manipulate them as opaque pointers using the functions provided by the library.

If you can use opaque pointers, you'd do something like this:

import com.sun.jna.Pointer; import com.sun.jna.PointerType; public class GtsWhateverPointer extends PointerType { public EnginePointer() { } public EnginePointer(final Pointer p) { super(p); } }

And then wrap your functions like this:

GtsSurfaceClassPointer gts_surface_class(); GtsSurfacePointer gts_surface_new(GtsSurfaceClassPointer klass, /* etc */);

Do I have to include the functions that I believe I would need a Callback for?

Hopefully the library will allow you to set the pointers for which you need to configure a callback using some other function in the library.

Hope this helps.

Cheers,

Albert