Re: Casting GTKWidgets - Urgent
- From: "Iain" <tigermilk btinternet com>
- To: "Naheed Vora" <nv linuxstart com>, <gtk-app-devel-list gnome org>
- Subject: Re: Casting GTKWidgets - Urgent
- Date: Mon, 2 Oct 2000 20:30:15 +0100
I am quoting this from gtk manual which deals with the callback
function. It clearly states that the second argument is what the
userinputs in the text_entry, which actually I want to catch...
void enter_callback( GtkWidget *widget,
GtkWidget *entry )
{
gchar *entry_text;
entry_text = gtk_entry_get_text(GTK_ENTRY(entry));
printf("Entry contents: %s\n", entry_text);
}
The changed signal on GtkEditable is like this
void enter_callback (GtkEditable *editable,
gpointer user_data);
User_data is whatever you specified as the last argument to
gtk_signal_connect.
your function should be
void enter_callback (GtkEditable *editable,
gpointer user_data)
{
gchar *entry_text;
entry_text = gtk_entry_get_text (GTK_ENTRY (editable));
printf("Entry contents: %s\n", entry_text);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]