[prev in list] [next in list] [prev in thread] [next in thread]
List: gtk
Subject: [gtk-list] Re: How do I send multiple args?
From: Havoc Pennington <rhp () zirx ! pair ! com>
Date: 1999-03-02 23:33:22
[Download RAW message or body]
On Tue, 2 Mar 1999, David J. Topper wrote:
>
> gtk_signal_connect_object (GTK_OBJECT (play_button), "clicked",
> GTK_SIGNAL_FUNC(cb_send_play_cmd), "PLAY", 1);
>
This isn't legal C given the signature of the function, plus you
probably mean gtk_signal_connect(), not gtk_signal_connect_object().
> but I'm being told that's too many arguments to
> gtk_signal_connect_object(). Is there no way to send more than one
> argument to a callback?
Not like this. But yes.
> Please don't tell me I need to send it all via
> a struct ... that seems like a real pain in the neck.
>
Welcome to the C programming language.
A struct is one way. Another is to use gtk_object_set_data() and
gtk_object_get_data() to store and retrieve the data attached to some
GtkObject, such as the one emitting the "clicked" signal. Another is
global variables.
Havoc
--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic