struct uctrl *uc = dlg_find_byctrl(dp, ctrl);  switch (ctrl->generic.type) { case CTRL_CHECKBOX: case CTRL_BUTTON:  gtk_widget_grab_focus(uc->toplevel); break; case CTRL_FILESELECT: case CTRL_FONTSELECT: case CTRL_EDITBOX:  gtk_widget_grab_focus(uc->entry); break; case CTRL_RADIO:  { int i; for (i = 0; i < ctrl->radio.nbuttons; i++) if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON(uc->buttons[i]))) { gtk_widget_grab_focus(uc->buttons[i]); } } break; case CTRL_LISTBOX:  if (uc->optmenu) { gtk_widget_grab_focus(uc->optmenu); } else { assert(uc->list != NULL); gtk_container_focus(GTK_CONTAINER(uc->list), GTK_DIR_TAB_FORWARD); } break; }
void dlg_set_focus(union control *ctrl, void *dlg){    struct dlgparam *dp = (struct dlgparam *)dlg;    /* FIXME */}