- From: "Michael J. Hammel" <mjhammel fastlane net>
- To: gtk-list redhat com
- Subject: gtk_signal_connect() w/key_press_event
- Date: Wed, 13 May 1998 19:58:03 -0600 (MDT)
Using gtk_signal_connect() for a key_press_event in a GtkText widget causes
the callback routine to be passed the widget id of the GtkText widget and
the GdkEventKey structure. However, there doesn't appear to be any way to
pass in user data to this callback. How can you pass in the user data (arg
4 of gtk_signal_connect()) to the callback? I need to pass in a data
structure of information to this callback. Is that what the "string"
element of the GdkEventKey structure is for? If so, should that be an
opaque gpointer instead of a gchar type?
If this isn't possible using gtk_signal_connect(), how can I catch keystrokes
in a GtkText widget and have them cause a callback to be called with my data
structure passed in to it?
Michael J. Hammel | Simba: "Hey, why'd you do that?"
The Graphics Muse | Baboon: "It doesn't matter! Its in the past!"
firstname.lastname@example.org | The Lion King
] [Thread Prev