Exemplo n.º 1
0
gint keypress_cb (GtkWidget *w, GdkEvent *e, void *v)
{
   switch (e->key.keyval)
     {
      case GDK_Return:
	ok_cb (NULL, NULL);
	return (TRUE);
      case GDK_Escape:
	cancel_cb(NULL, NULL);
	return (TRUE);
      default:
	return (FALSE);
     }
};
Exemplo n.º 2
0
/*
 * This callback is called when is double-clicked on icon box inside icon list; since all childs when
 * are double-clicked get focus automatically, this forwarding to ok_cb(), who checks what child is
 * focused, is valid
 */
void iconbox_cb(Fl_Widget*, void* w) {
	ok_cb(NULL, w);
}