Hmmmm… the lack of any type of responses to my previous questions
isn’t giving me a great deal of confidence that I’ll be able to
accomplish my task. However, I’ll ask again:
Is there any kind of documentation/tutorial around about how you create
a new set of bindings? I can appreciate that the macros and all of the
supporting functions are really there for a reason, but so far, I
haven’t really been able to figure out what I’m supposed to do beyond
cloning the boilerplate-like code in the existing bindings.
I figured out a way to get my struct problem solved using the raw Ruby
Data_Wrap_Struct and Data_Get_Struct, but I’m sure that I should be
doing it a different way. I’ve seen places in the source where some
helper structs were created (GdkAtomData) so that things could
participate in the various BOXED macros, but I’m not really sure if
that’s the path I need to go down or not. How do I decide?
At the moment, I have basic class/method functionality working fine for
normal types. This is pretty-much what I can do from cloning the
bindings that I see. However, I’m now having trouble trying to figure
out how to marshal my struct for callback functions. This is
essentially a show-stopper for what I’m doing at the moment.
I’ve tried the G_DEF_SIGNAL_FUNC approach, but I’m sure that since I
didn’t use the appropriate gobject/boxed magic earlier, I can’t use this
macro. I’ve no idea where to go from here.
I’ve now spent about 10 hours on this trying to figure out what I need
to do to get this part of the binding working. I really don’t think
what I’m trying to do is that hard, however, I haven’t found the key to
unlock all of the magic in the core ruby-gnome2 libraries.
After figuring out how to deal with arbitrary structures and callbacks,
I think I’ve more-or-less got an understanding of how to implement a new
library binding, and I can probably finish the rest of what I need in a
day or two.
ANY ideas/assistance with how to attack the above would be really,
Thanks in advance,