static gboolean shoes_app_gtk_motion(GtkWidget *widget, GdkEventMotion *event, gpointer data) { GdkModifierType state; shoes_app *app = (shoes_app *)data; if (!event->is_hint) { shoes_canvas *canvas; Data_Get_Struct(app->canvas, shoes_canvas, canvas); state = (GdkModifierType)event->state; shoes_app_motion(app, (int)event->x, (int)event->y + canvas->slot.scrolly); } return TRUE; }
shoes_code shoes_app_goto(shoes_app *app, char *path) { shoes_code code = SHOES_OK; const char http_scheme[] = "http://"; if (strlen(path) > strlen(http_scheme) && strncmp(http_scheme, path, strlen(http_scheme)) == 0) { shoes_browser_open(path); } else { code = shoes_app_visit(app, path); if (code == SHOES_OK) { shoes_app_motion(app, app->mousex, app->mousey); shoes_slot_repaint(app->slot); } } return code; }