From: Tom Tromey <tromey@cygnus.com>
To: osk@hem.passagen.se
Cc: java-discuss@sourceware.cygnus.com
Subject: Re: CNI and interface methods
Date: Sat, 01 Apr 2000 00:00:00 -0000 [thread overview]
Message-ID: <200001252326.PAA03187@ferrule.cygnus.com> (raw)
In-Reply-To: <20000125234733.A865@strix.eductussyd.se>
>>>>> "Oskar" == Oskar Liljeblad <osk@hem.passagen.se> writes:
Oskar> I read in the CNI documentation that it is not possible to call
Oskar> methods using interface references. Do I have an old egcs/gcj
Oskar> (2.95.2)? If not, any ideas when this will this be possible?
This hasn't changed -- there is no way to directly make a call from
C++ via an interface reference. As far as I know, nobody is working
on this, so I don't know when it will be possible.
Oskar> Are there any tricks to use meanwhile? I'm experimenting with
Oskar> Gtk bindings using CNI, and using interfaces for signal
Oskar> listeners is (usually) necessary.
Yeah, I like the signal/interface approach too. Are you generating
the bindings automatically from gtk.def?
Anyway, you can use _Jv_LookupInterfaceMethod to look up the method
via an interface, and then call it directly (you get back a raw
pointer which you can treat as a function pointer; be sure to pass the
object reference as the first argument). If you do this, though, be
warned that this interface isn't really exported, and we might change
it randomly.
Tom
next prev parent reply other threads:[~2000-04-01 0:00 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-01 0:00 Oskar Liljeblad
2000-04-01 0:00 ` Tom Tromey [this message]
2009-04-02 19:38 Stephen Kell
2009-04-03 8:37 ` Andrew Haley
2009-04-03 10:35 ` Bryce McKinlay
2009-04-03 13:57 ` Stephen Kell
2009-04-03 14:13 ` Andrew Haley
2009-04-03 18:42 ` Stephen Kell
[not found] ` <7230133d0904030328o55069f0do9147f879bcbd5e4f@mail.gmail.com>
2009-04-03 10:44 ` Andrew Haley
2009-04-03 18:54 ` Stephen Kell
2009-04-03 19:06 ` David Daney
2009-04-04 9:12 ` Andrew Haley
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200001252326.PAA03187@ferrule.cygnus.com \
--to=tromey@cygnus.com \
--cc=java-discuss@sourceware.cygnus.com \
--cc=osk@hem.passagen.se \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).