How can it do that?
- From: "hzeng" <hzeng hf tvia com>
- To: <gtk-list gnome org>
- Subject: How can it do that?
- Date: Mon, 21 Jan 2002 12:36:32 +0800
Hello,
I find the interest thing in many example code that you can create many same type of widgets use
a same widget name, but the system can differ these widgets although they have the same name.
such as:
Widget *button;
button=gtk_button_new_with_label("button1");
gtk_signal_connect(GTKOBJECT(button),"clicked",GTK_SIGNAL_FUNC(callback),(gpointer)"button1");
...
button=gtk_button_new_with_label("button2");
gtk_signal_connect(GTKOBJECT(button),"clicked",GTK_SIGNAL_FUNC(callback),(gpointer)"button2");
...
At this situation, the system still can know the "clicked" signal is come from button1 or come from button2 and the
callback founction can print different message. I am wondered about these. Can I get the reason?
Thank you very much
Hzeng
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]