Re: X11/C++ question

1999-11-03 Thread Thomas David Rivers
> > In message <[EMAIL PROTECTED]> Chuck Robey >writes: > : Uhhh? I've long since got the answer I wanted, but this seems a complete > : mystery, so I'll bite, what's a OI_add_event? From some package? Can't > : find a man page on it. > > OI was a native C++ toolkit that had a nice interface

Re: X11/C++ question

1999-11-03 Thread Warner Losh
In message <[EMAIL PROTECTED]> Chuck Robey writes: : Uhhh? I've long since got the answer I wanted, but this seems a complete : mystery, so I'll bite, what's a OI_add_event? From some package? Can't : find a man page on it. OI was a native C++ toolkit that had a nice interface and was ported t

Re: X11/C++ question

1999-11-03 Thread Chuck Robey
On Wed, 3 Nov 1999, Warner Losh wrote: > In message <[EMAIL PROTECTED]> Chuck Robey >writes: > : Does anyone (anyone, that is, who's coded X11 applications) know how you > : handle X11 callbacks to C++ object methods? > > OI_add_event(3OI) :-) Uhhh? I've long since got the answer I wanted, bu

Re: X11/C++ question

1999-11-03 Thread Warner Losh
In message <[EMAIL PROTECTED]> Chuck Robey writes: : Does anyone (anyone, that is, who's coded X11 applications) know how you : handle X11 callbacks to C++ object methods? OI_add_event(3OI) :-) Warner To Unsubscribe: send mail to [EMAIL PROTECTED] with "unsubscribe freebsd-hackers" in the bod

Re: X11/C++ question

1999-10-27 Thread Chuck Robey
On Wed, 27 Oct 1999, Wes Peters wrote: > Chuck Robey wrote: > > > > On Tue, 26 Oct 1999 [EMAIL PROTECTED] wrote: > > > > > > > > Thomas David Rivers writes: > > > > If you mean Xt (and possibly Motif) - the answer is "very carefully." > > > [...] > > > > > > You're approach would probably wor

Re: X11/C++ question

1999-10-27 Thread Wes Peters
Chuck Robey wrote: > > On Tue, 26 Oct 1999 [EMAIL PROTECTED] wrote: > > > > > Thomas David Rivers writes: > > > If you mean Xt (and possibly Motif) - the answer is "very carefully." > > [...] > > > > You're approach would probably work, but there's an easier way. > > See topic 28 in the Xt FAQ

Re: X11/C++ question

1999-10-27 Thread Ville-Pertti Keinonen
[EMAIL PROTECTED] (Chuck Robey) writes: > Boy, I sure wish Java compiled and ran natively. I'd stop using C++ > forever. gcc-2.95.1 + libgcj already works, at least for simple programs. On FreeBSD 3.x programs seem to work as long as you use statically linked libraries (shared libraries cause

Re: X11/C++ question

1999-10-26 Thread Alexey Zelkin
hi, >> Does anyone (anyone, that is, who's coded X11 applications) know how you >> handle X11 callbacks to C++ object methods? >> >> Thanks, TDR> If you mean Xt (and possibly Motif) - the answer is "very carefully." TDR> The Xt callbacks are C based, so you typically can't directly call a

Re: X11/C++ question

1999-10-26 Thread Brian Fundakowski Feldman
On Tue, 26 Oct 1999, Chris Costello wrote: > On Tue, Oct 26, 1999, Thomas David Rivers wrote: > > extern "C" { > > > > void > > callback_function(arg1) > > void *arg1; > > { > > /* Call the method */ > >myclass::mymethod(arg1); > >As f

Re: X11/C++ question

1999-10-26 Thread Chuck Robey
On Tue, 26 Oct 1999, Bakul Shah wrote: > Allow me add something to what the FAQ-Xt says. > > I find it more convenient to immediately call a non-static > function as shown below (using a slightly modified example > from the FAQ). Just got out of the shower, where I was wondering why they didn't

Re: X11/C++ question

1999-10-26 Thread Bakul Shah
Allow me add something to what the FAQ-Xt says. I find it more convenient to immediately call a non-static function as shown below (using a slightly modified example from the FAQ). class Icon { public: Icon(Widget*); private: static void static_callback(Icon*)

Re: X11/C++ question

1999-10-26 Thread Chuck Robey
On Tue, 26 Oct 1999 [EMAIL PROTECTED] wrote: > > Thomas David Rivers writes: > > If you mean Xt (and possibly Motif) - the answer is "very carefully." > [...] > > You're approach would probably work, but there's an easier way. > See topic 28 in the Xt FAQ. > > ftp://ftp.x.org/contrib/faqs/FA

Re: X11/C++ question

1999-10-26 Thread Thomas David Rivers
> Then you just stick a C wrapper function around every C++ callback you > want to register, is that it? Seems a bit inelegant, but I suppose, if > the ultimate test of elegance is that "it's the only one that works", then > it's perhaps elegant *enough*. I believe someone posted a better solu

Re: X11/C++ question

1999-10-26 Thread Chuck Robey
On Wed, 27 Oct 1999, Daniel O'Connor wrote: > > On 27-Oct-99 Thomas David Rivers wrote: > > If you mean Xt (and possibly Motif) - the answer is "very carefully." > > Or you could just use a toolkit written for C++ or with C++ shims already.. ie > Qt or GTK.. If I wanted to just get X11 done,

Re: X11/C++ question

1999-10-26 Thread Chuck Robey
On Tue, 26 Oct 1999, Thomas David Rivers wrote: > > > > Does anyone (anyone, that is, who's coded X11 applications) know how you > > handle X11 callbacks to C++ object methods? > > > > Thanks, > > If you mean Xt (and possibly Motif) - the answer is "very carefully." > > The Xt callbacks are

Re: X11/C++ question

1999-10-26 Thread tbuswell
Thomas David Rivers writes: > If you mean Xt (and possibly Motif) - the answer is "very carefully." [...] You're approach would probably work, but there's an easier way. See topic 28 in the Xt FAQ. ftp://ftp.x.org/contrib/faqs/FAQ-Xt It's not name mangling causing problems, it's lack of "thi

Re: X11/C++ question

1999-10-26 Thread Chris Costello
On Tue, Oct 26, 1999, Thomas David Rivers wrote: > extern "C" { > > void > callback_function(arg1) > void *arg1; > { > /* Call the method */ > myclass::mymethod(arg1); As far as I've seen, you can't directly call a class method withou

Re: X11/C++ question

1999-10-26 Thread Daniel O'Connor
On 27-Oct-99 Thomas David Rivers wrote: > And, wasn't there a freely available C++ shim for motif floating around > at one time? I don't know.. My X experience begins and ends with Tk :) (Don't like Motif either ;) --- Daniel O'Connor software and network engineer for Genesis Software - http:

Re: X11/C++ question

1999-10-26 Thread Thomas David Rivers
> > On 27-Oct-99 Thomas David Rivers wrote: > > If you mean Xt (and possibly Motif) - the answer is "very carefully." > > Or you could just use a toolkit written for C++ or with C++ shims already.. ie > Qt or GTK.. > Good point! Also - I think there were some articles on how to do this in t

Re: X11/C++ question

1999-10-26 Thread Daniel O'Connor
On 27-Oct-99 Thomas David Rivers wrote: > If you mean Xt (and possibly Motif) - the answer is "very carefully." Or you could just use a toolkit written for C++ or with C++ shims already.. ie Qt or GTK.. --- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.

Re: X11/C++ question

1999-10-26 Thread Thomas David Rivers
> > Does anyone (anyone, that is, who's coded X11 applications) know how you > handle X11 callbacks to C++ object methods? > > Thanks, If you mean Xt (and possibly Motif) - the answer is "very carefully." The Xt callbacks are C based, so you typically can't directly call a C++ method. Bu