Example #1
0
/*
 * meh_screen_popup_update udpates the content of the popup screen.
 */
int meh_screen_popup_update(struct App* app, Screen* screen) {
	/* Animate the fading rect. */
	meh_screen_update_transitions(screen);

	PopupData* data = meh_screen_popup_get_data(screen);

	/* update the src screen */
	meh_message_send(app, data->src_screen, MEH_MSG_UPDATE, NULL);

	return 0;
}
Example #2
0
/*
 * meh_screen_starting_update received a call by the main_loop when we 
 * can update this screen.
 */
int meh_screen_starting_update(App* app, Screen* screen) {
	/* Animate the splashscreen */
	meh_screen_update_transitions(screen);

	StartingData* data = meh_screen_starting_get_data(screen);
	g_assert(data != NULL);

	/*
	 * Wait 5s before going to the next screen.
	 */
	if (SDL_GetTicks() > 5000 && data->done == FALSE) {
		meh_screen_starting_go_to_next_screen(app, screen);
		data->done = TRUE; /* don't redo it while the fading screen is refreshing */
	}

	return 0;
}
Example #3
0
/*
 * meh_screen_popup_update udpates the content of the popup screen.
 */
int meh_screen_popup_update(struct App* app, Screen* screen) {
    /* Animate the fading rect. */
    meh_screen_update_transitions(screen);

    PopupData* data = meh_screen_popup_get_data(screen);

    /* update the src screen */
    meh_message_send(app, data->src_screen, MEH_MSG_UPDATE, NULL);

    /* quit the screen at the end of the exit animation. */
    if (data->quitting && data->background_widget->y.ended) {
        meh_app_set_current_screen(app, data->src_screen, TRUE);
        meh_screen_destroy(screen);
    }

    return 0;
}
Example #4
0
/*
 * meh_screen_launch_update udpates the content of the launch screen.
 */
int meh_screen_launch_update(struct App* app, Screen* screen) {
	/* Animate the fading rect. */
	meh_screen_update_transitions(screen);

	LaunchData* data = meh_screen_launch_get_data(screen);
	g_assert(data != NULL);

	/* update the src screen */
	meh_message_send(app, data->src_screen, MEH_MSG_UPDATE, NULL);
		
	if (data->fade_widget->a.ended == TRUE) {
		/* it's time to start the executable and to switch back to the src screen */
		meh_app_start_executable(app, data->platform, data->executable);
		meh_app_set_current_screen(app, data->src_screen, TRUE);
		meh_screen_destroy(screen); /* destroy the launch screen */
	}

	return 0;
}
Example #5
0
/*
 * meh_screen_mapping_update received a call by the main_loop when we 
 * can update this screen.
 */
int meh_screen_mapping_update(App* app, Screen* screen) {
	/* update the transition of the current screen */
	meh_screen_update_transitions(screen);

	return 0;
}