Re: [gtk-list] How do I send multiple args?
- From: Havoc Pennington <rhp zirx pair com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] How do I send multiple args?
- Date: Tue, 2 Mar 1999 18:33:22 -0500 (EST)
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
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]