-
Notifications
You must be signed in to change notification settings - Fork 1
/
JMTCCallbacks.java
67 lines (65 loc) · 2.3 KB
/
JMTCCallbacks.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
package io.github.selemba1000;
/**
* Class to group all different callbacks.
*/
@SuppressWarnings("CanBeFinal")
public class JMTCCallbacks {
/**
* Callback for when Play button is pressed in UI or as MediaKey.
*/
public JMTCButtonCallback onPlay = () -> {
};
/**
* Callback for when Pause button is pressed in UI or as MediaKey.
*/
public JMTCButtonCallback onPause = () -> {
};
/**
* Callback for when Stop button is pressed in UI or as MediaKey.
*/
public JMTCButtonCallback onStop = () -> {
};
/**
* Callback for when Next button is pressed in UI or as MediaKey.
*/
public JMTCButtonCallback onNext = () -> {
};
/**
* Callback for when Previous button is pressed in UI or as MediaKey.
*/
public JMTCButtonCallback onPrevious = () -> {
};
/**
* Callback for when the seek bar is moved in UI.
*/
public JMTCSeekCallback onSeek = (Long x) -> {
};
/**
* Callback for when the shuffle button is pressed in UI.
* var x is true if shuffle is supposed to be enabled, false otherwise
* @apiNote The state of shuffle is not automatically updated. Should be manually updated in callback, or ignored if not applicable.
*/
public JMTCValueChangedCallback<Boolean> onShuffle = (Boolean x) -> {
};
/**
* Callback for when the rate slider is moved in UI.
* var x is the new rate value
* @apiNote The state of rate is not automatically updated. Should be manually updated in callback, or ignored if not applicable.
*/
public JMTCValueChangedCallback<Double> onRate = (Double x) -> {
};
/**
* Callback for when the loop button is pressed in UI.
* var x is the new loop status
* @apiNote The state of loop is not automatically updated. Should be manually updated in callback, or ignored if not applicable.
*/
public JMTCValueChangedCallback<JMTCParameters.LoopStatus> onLoop = (JMTCParameters.LoopStatus x) -> {
};
/**
* Callback for when the volume slider is moved in UI.
* var x is the new volume value
* @apiNote The state of volume is not automatically updated. Should be manually updated in callback, or ignored if not applicable.
*/
public JMTCValueChangedCallback<Double> onVolume = (Double x) -> {
};
}