Re: [gtk-list] Re: Gtk Question
- From: "Shawn T. Amundson" <amundson gimp org>
- To: iisteve iifeak swan ac uk
- cc: gtk-list redhat com
- Subject: Re: [gtk-list] Re: Gtk Question
- Date: Thu, 28 May 1998 10:01:05 -0700 (PDT)
On Thu, 28 May 1998, Steve Hosgood wrote:
> Guys (Owen, Shawn, Tim etc): Achint Sandhu has just been caught by this,
> I got caught by it a few weeks ago, everyone gets caught by it! You are being
> very patient in pointing out the same solution time and time again, but don't
> you think it might be time to add a routine 'gtk_event_signal_connect()' to
> the API? It would look just like 'gtk_signal_connect()', but would insist on
> a GTK_EVENT_SIGNAL_FUNC as its 3rd arg.
>
> With a bit of careful prototyping, you'd be able to get the C compiler to
> spot when yet another newbie is trying to connect the wrong sort of callback
> to the wrong sort of signal.
>
> It might save you having to type so many replies like this one from Tim!
The API for GTK 1.0.x series is fixed, so I'll assume you mean for
GTK 1.1+. ;-)
I don't think adding another signal_connect function really changes
anything; the prototypes very too much (As Tony already pointed out).
The problem then is how do you check a function prototype once you've
voided out all that data to pass it to gtk_signal_connect... And more
importantly would the solution even be usable? Basically I think you
would have to have one function prototype and then one of the arguments
be dynamic callback content (such as a special Object you could cast to
get at the correct callback data). I don't think that would be much
better.
--
Shawn T. Amundson
amundson@gimp.org http://www.gimp.org/~amundson
"The assumption that the universe looks the same in every
direction is clearly not true in reality." - Stephen Hawking
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]