Debian Codegraph @

src/term.h

raw
1 /*
2 term: terminal control
3
4 copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
5 see COPYING and AUTHORS files in distribution or http://mpg123.org
6 initially written by Michael Hipp
7 */
8
9 #ifndef _MPG123_TERM_H_
10 #define _MPG123_TERM_H_
11
12 #include "mpg123app.h"
13 #include "audio.h"
14
15 /*
16 * Defines the keybindings in term.c - change to your
17 * own preferences.
18 */
19
20 #define MPG123_HELP_KEY 'h'
21 #define MPG123_BACK_KEY 'b'
22 #define MPG123_NEXT_KEY 'f'
23 #define MPG123_PAUSE_KEY 'p'
24 #define MPG123_LOOP_KEY 'o'
25 #define MPG123_QUIT_KEY 'q'
26 /* space bar is alias for that */
27 #define MPG123_STOP_KEY 's'
28 #define MPG123_REWIND_KEY ','
29 #define MPG123_FORWARD_KEY '.'
30 /* This is convenient on QWERTZ-keyboards. */
31 #define MPG123_FAST_REWIND_KEY ';'
32 #define MPG123_FAST_FORWARD_KEY ':'
33 #define MPG123_FINE_REWIND_KEY '<'
34 #define MPG123_FINE_FORWARD_KEY '>'
35 /* You probably want to use the following bindings instead
36 * on a standard QWERTY-keyboard:
37 */
38
39 /* #define MPG123_FAST_REWIND_KEY '<' */
40 /* #define MPG123_FAST_FORWARD_KEY '>' */
41 /* #define MPG123_FINE_REWIND_KEY ';' */
42 /* #define MPG123_FINE_FORWARD_KEY ':' */
43
44 #define MPG123_VOL_UP_KEY '+'
45 #define MPG123_VOL_DOWN_KEY '-'
46 #define MPG123_VOL_MUTE_KEY 'u'
47 #define MPG123_VERBOSE_KEY 'v'
48 #define MPG123_RVA_KEY 'r'
49 #define MPG123_PLAYLIST_KEY 'l'
50 #define MPG123_PREV_KEY 'd'
51 #define MPG123_MPEG_KEY 'm'
52 #define MPG123_TAG_KEY 't'
53 #define MPG123_PITCH_UP_KEY 'c'
54 #define MPG123_PITCH_BUP_KEY 'C'
55 #define MPG123_PITCH_DOWN_KEY 'x'
56 #define MPG123_PITCH_BDOWN_KEY 'X'
57 #define MPG123_PITCH_ZERO_KEY 'w'
58
59 #define MPG123_EQ_RESET_KEY 'e'
60 #define MPG123_EQ_SHOW_KEY 'E'
61 #define MPG123_BASS_UP_KEY 'A'
62 #define MPG123_BASS_DOWN_KEY 'a'
63 #define MPG123_MID_UP_KEY 'J'
64 #define MPG123_MID_DOWN_KEY 'j'
65 #define MPG123_TREBLE_UP_KEY 'N'
66 #define MPG123_TREBLE_DOWN_KEY 'n'
67
68 #define MPG123_BOOKMARK_KEY 'k'
69 /* This counts as "undocumented" and can disappear */
70 #define MPG123_FRAME_INDEX_KEY 'i'
71 #define MPG123_VARIOUS_INFO_KEY 'I'
72
73 #define MPG123_PREV_DIR_KEY '['
74 #define MPG123_NEXT_DIR_KEY ']'
75
76 /* The normal and big pitch adjustment done on key presses. */
77 #define MPG123_PITCH_VAL 0.001
78 #define MPG123_PITCH_BVAL 0.01
79
80 #define MPG123_PAUSED_STRING "Looping.\b\b\b\b\b\b\b\b"
81 #define MPG123_STOPPED_STRING "Stopped.\b\b\b\b\b\b\b\b"
82 #define MPG123_AB_STRING "Loop A-?\b\b\b\b\b\b\b\b"
83 #define MPG123_EMPTY_STRING " \b\b\b\b\b\b\b\b"
84
85 /* Need it as string for the param struct, change according to the above. */
86 #define MPG123_TERM_USR1 "s"
87 #define MPG123_TERM_USR2 "f"
88
89
90 int term_init(void); // -1 on error, 0 success or no terminal desired
91 void term_exit(void);
92 void term_new_track(void); // prepare for a new track being played
93 off_t term_control(mpg123_handle *mh, out123_handle *ao);
94 void term_hint(void); /* Print a message hinting at terminal usage. */
95
96 #endif