Added a 'activate' signal, which is emitted when the 'Enter' key is pressed

This commit is contained in:
Neil J. Patel
2007-06-07 21:23:07 +00:00
parent 42ebf073bd
commit 3649b4734b
4 changed files with 41 additions and 0 deletions

View File

@ -17,6 +17,12 @@ on_key_release_cb (ClutterStage *stage, ClutterEvent *event, ClutterEntry *entry
}
}
static void
on_entry_activated (ClutterEntry *entry, gpointer null)
{
g_print ("Activated: %s\n", clutter_entry_get_text (entry));
}
int
main (int argc, char *argv[])
{
@ -55,6 +61,8 @@ main (int argc, char *argv[])
g_signal_connect (entry, "text-changed",
G_CALLBACK (on_entry_text_changed), NULL);
*/
g_signal_connect (entry, "activate",
G_CALLBACK (on_entry_activated), NULL);
clutter_main();
return 0;