How to overgive a gtk-widget a funktion?
- From: Elfriede Eisserer <ceisserer utanet at>
- To: gtk-list gnome org
- Subject: How to overgive a gtk-widget a funktion?
- Date: Wed, 19 Sep 2001 07:47:41 +0200
Hi!
How can I overgive a gtk-widget or Object to an funktion?
An example: I want to use the widget spin in the funktion and ask the
the spin-button value as int. For example some code:
gint funktion(??????????)
{
gint wert;
wert = get_value_as_int(??spin);
}
int main()
{
GtkWidget *spin;
GtkWidget *button;
gtk_main(&argc, &argv)
spin = Gtk_spin_button_new(some_parameters);
gtk_signal_connect(button, "clicked", GTK_SIGNAL_FUNC
(funktion),?????? ;
gtk_main_end();
}
The Code is not right or complete of course,its only for exaple. So I
want to ask the value of spin in the funktion - but I dont want to
define spin global and I dont know how to get spin into the funktion so
that I can use it. When I wrote ??? it mean that I dont know what I must
use.
So please if somebody know what I mean please right my code and send it
back to the mailing-list. Thank you!
Mfg Linuxhippy
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]