Пример #1
0
static int mp3_do_keystroke(GR_EVENT * event)
{
	switch (event->type) {
	case GR_EVENT_TYPE_KEY_DOWN:
		switch (event->keystroke.ch) {
		case '\r':
		case '\n':
			break;
		case 'm':
			decoding_finished = 1;
			break;
		case '4':
		case 'f':
			play_next_track();
			break;
		case '5':
		case 'w':
			play_prev_track();
			break;
		case '1':
		case 'd':
			mp3_pause = !mp3_pause;
			if (mp3_pause) {
				pz_draw_header(_("MP3 Playback - ||"));
			}
			else {
				pz_draw_header(_("MP3 Playback"));
			}
			break;
		case '3':
		case 'l':
			vol_delta--;
			break;
		case '2':
		case 'r':
			vol_delta++;
			break;
		}
		break;
	}
	return 1;
}
Пример #2
0
static void dbus_prev_handler(struct con_win *cwin)
{
	play_prev_track(cwin);
}