Debian Codegraph @

contrib/rplaytool-1.1/misc.h

raw symbols SCIP
1 /* $Id: misc.h,v 1.2 1998/08/13 06:13:20 boyns Exp $ */
2
3 /*
4 * Copyright (C) 1995 Mark Boyns <[email protected]>
5 *
6 * This file is part of rplaytool.
7 *
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 #ifndef _misc_h
24 #define _misc_h
25
26 #include <stdio.h>
27 #include <sys/param.h>
28 #include <sys/types.h>
29 #include <xview/xview.h>
30
31 #define STATE_NONE 0
32 #define STATE_PLAY 1
33 #define STATE_STOP 2
34 #define STATE_PAUSE 3
35 #define STATE_CONTINUE 4
36
37 /* Icons */
38 typedef struct
39 {
40 Server_image image;
41 unsigned short *bits;
42 }
43 SOME_ICON;
44 #define ICON_PLAY 0
45 #define ICON_PLAY1 1
46 #define ICON_PLAY2 2
47 #define ICON_PLAY3 3
48 #define ICON_PLAY4 4
49 #define ICON_PAUSE 5
50 #define ICON_PAUSE1 6
51 #define ICON_PAUSE2 7
52 #define ICON_PAUSE3 8
53 #define ICON_PAUSE4 9
54 #define ICON_DIRECTORY 10
55 #define ICON_SOUND 11
56 #define ICON_ARROW 12
57 #define ICON_NONE 13
58 #define ICON_FILE 14
59 #define ICON_WATCH 15
60 #define NUMBER_OF_ICONS 16
61
62 typedef struct
63 {
64 char filename[MAXPATHLEN];
65 char name[MAXPATHLEN];
66 int volume;
67 int sample_rate;
68 int delay;
69 }
70 INFO;
71
72 typedef struct
73 {
74 int id;
75 int size;
76 int curr;
77 Xv_opaque list;
78 int auto_play;
79 time_t mtime;
80 char filename[MAXPATHLEN];
81 int delay;
82 }
83 PLAYLIST;
84
85 #define NUMBER_OF_PLAYLISTS 4
86
87 extern PLAYLIST playlist[NUMBER_OF_PLAYLISTS];
88 extern int curr_playlist;
89 extern SOME_ICON icons[NUMBER_OF_ICONS];
90 extern int client_id;
91
92 #ifdef __STDC__
93 extern int notice (Xv_opaque panel, char *button1, char *button2, char *fmt, ...);
94 #else
95 extern int notice (/* Xv_opaque frame, char *button1, char *button2, char *fmt, ... */ );
96 #endif
97 extern void sort_list (/* Xv_opaque list */);
98 extern void busy (/* Xv_opaque frame, int flag */);
99 extern void do_playlist_init (/* int list */);
100 extern void do_playlist_reset (/* int list */);
101 extern void do_playlist_add (/* list, index, sound_dir, sound_name */);
102 extern void do_playlist_append (/* list, sound_dir, sound_name */);
103 extern void do_playlist_move (/* list, from, to */);
104 extern void do_playlist_delete_all (/* int list */);
105 extern void do_playlist_delete (/* int list, int index */);
106 extern void do_playlist_stop (/* int list */);
107 extern void playlist_scan ();
108 extern void do_playlist_load (/* int list, FILE *fp */);
109 extern void do_playlist_save (/* int list, FILE *fp */);
110 extern void play_playlist (/* int list */);
111 extern void playlist_update_icons (/* int list */);
112
113 #endif /* _misc_h */