Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
From: Paul Tomblin <ptomblin@xcski.com>
To: axp-list@redhat.com
Subject: Re: C++ gurus; AbiWord pointer casting on Alpha
Date: Mon, 16 Nov 1998 20:12:39 -0500	[thread overview]
Message-ID: <19981116201239.B22040@xcski.com> (raw)
In-Reply-To: <Pine.LNX.3.95.981116185150.3945C-100000@norad.dodds.net>; from Bibek Sahu on Mon, Nov 16, 1998 at 06:56:55PM -0600

Quoting Bibek Sahu (scorpio@dodds.net):
> 	On a whim, I decided to test this.  I compiled and ran the
> 'testgtk' program that came with gtk+, testing specifically those parts of
> it that used 'callback_action'.  It worked flawlessly.
> 
> 	Although I don't know the code well enough to be positive, it
> appears that 'callback_action' is supposed to be data rather than a
> function pointer.  The 'callback_data' member, defined to be of type
> gpointer, which is in all the structures that include callback_action
> might be more appropriate if you need a pointer.

I've never done any gtk programming, but one of the weirdnesses you get used
to in Xt and Motif programming is the XtCallback structure.  Callbacks are
called with three arguments, the last two are of type XtPointer, which is
usually typedefed as void*.  But they are often used, both in the Xt libraries
itself and in user code, to pass integers instead of pointers.


-- 
"Linux's homebase is currently commodity network and server infrastructure. By
folding extended functionality ... into today's commodity services, we raise
the bar & change the rules of the game."
- Microsoft leaks their strategy for monopolizing the Internet and the desktop.


  reply	other threads:[~1998-11-17  1:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-11-16 10:44 C++ gurus; AbiWord pointer casting on Alpha Shaw Terwilliger
1998-11-17  0:56 ` Bibek Sahu
1998-11-17  1:12   ` Paul Tomblin [this message]
     [not found] <3650D107.CDA25BE0@postman.abisource.com>
1998-11-19 22:26 ` Bibek Sahu
1998-11-19 23:02   ` Bibek Sahu
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox