-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefs.h
82 lines (70 loc) · 1.16 KB
/
defs.h
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
/* See LICENSE file for copyright and license details. */
#ifndef DEFS_H
#define DEFS_H
#include <vlc/vlc.h>
#define APIKEY "e233c13d38d96e3a3a0474723f6b3fcd21904979"
#define ERROR 0
#define SUCCESS 1
#define FALSE 0
#define TRUE 1
#define HALFDELAY 50
#define DELAYESC 10
struct info {
/*
* Main section
*/
int quit;
int state;
int pstate; /* Previous state */
/*
* Play section
*/
char *playtoken;
libvlc_instance_t *vlc_inst;
libvlc_media_player_t *vlc_mp;
struct mix *m;
/*
* Select section
*/
struct mix **mlist;
size_t mlist_size;
int select_pos;
/*
* Search section
*/
int cursor_pos;
char *search_str;
struct search_node *slist_head;
/*
* Drawing section
*/
int scroll;
};
struct mix {
int id;
char *name;
int user_id;
char *description;
int likes_count;
int plays_count;
char *tags;
int liked;
int finished;
int track_count;
struct track **track;
};
struct track {
int id;
char *name;
char *performer;
char *url;
int last;
int reported;
int skip_allowed;
};
struct search_node {
struct search_node *next;
wchar_t c;
};
enum states {START, SEARCH, SEARCHING, SELECT, PLAY};
#endif