oops, that commit wasn't so clean
[hrr.git] / main.h
blob2a8d6139c031c109520ebfae9194adb4a9a1befb
1 /*
2 -----BEGIN PGP SIGNED MESSAGE-----
3 Hash: SHA1
5 m m mm mmm .----------. .---------------------. mmm mm m m
6 8 8 88 888 | .--------` | .------------------` 888 88 8 8
7 8 8 88 888 | ```````|`V```````| |``||``|`````| 888 88 8 8
8 8 8 88 888 `------ | | [] | |``````|| | [] | 888 88 8 8
9 8 8 88 888 |`````` | | | ````|```` | | 888 88 8 8
10 ` ` `` ``` ``````````````> |````````````| |`` ``` `` ` `
11 ==============` `---`
12 L A B O R A T O R I E S
14 This file is part of Hacker Radio Rec.
16 Hacker Radio Rec is free software: you can redistribute it and/or
17 modify it under the terms of the GNU General Public License as
18 published by the Free Software Foundation, either version 3 of
19 the License or (at your option) any later version.
21 Hacker Radio Rec is distributed in the hope that it will be
22 useful, but WITHOUT ANY WARRANTY; without even the implied
23 warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
24 See the GNU General Public License for more details.
26 Copyright (C) 2009, Thea DeSilva
27 You can find a copy of GNU General Public License in COPYING
30 #define BIRTHDAY "Mon Sep 14 16:14:11 CDT 2009"
32 #define PROT \
33 pthread_mutex_lock(&mtx); \
34 HOST_BLOCK;
36 #define UNPROT \
37 pthread_mutex_unlock(&mtx); \
38 HOST_UNBLOCK;
40 #define TRACK_SIZE 175
41 #define TRACKS 6
42 #define STACK_SIZE 5
44 #define MAX_CHARS 1024
46 #define VX(X) (Sint32)(((float)X/800.0f)*(float)gui_screen->w)
47 #define VY(X) (Sint32)(((float)X/600.0f)*(float)gui_screen->h)
49 #define fround(x) ((x)>=0.0f?(Sint32)((x)+0.5f):(Sint32)((x)-0.5f))
51 typedef struct {
52 void *grp;
53 void *gc;
54 void *updater;
55 } stk_t;
57 extern stk_t stk[STACK_SIZE];
58 extern Sint32 stk_pointer;
60 extern struct select_file_t *cue_file;
62 #define POP_TIMEBAR \
63 stk[stk_pointer].grp = current_grp; \
64 stk[stk_pointer].gc = gc; \
65 stk[stk_pointer++].updater = intern_update; \
66 current_grp = time_bar_grp; \
67 gc = time_bar_bmp; \
68 intern_update = sub_update;
70 #define POP_SUB \
71 stk[stk_pointer].grp = current_grp; \
72 stk[stk_pointer].gc = gc; \
73 stk[stk_pointer++].updater = intern_update; \
74 current_grp = sub_grp; \
75 gc = sub; \
76 intern_update = sub_update;
78 #define POP_MAIN \
79 stk[stk_pointer].grp = current_grp; \
80 stk[stk_pointer].gc = gc; \
81 stk[stk_pointer++].updater = intern_update; \
82 current_grp = main_grp; \
83 gc = gui_screen; \
84 intern_update = norm_update;
86 #define PUSH \
87 current_grp = stk[--stk_pointer].grp; \
88 gc = stk[stk_pointer].gc; \
89 intern_update = stk[stk_pointer].updater;
91 extern struct menu_entry_t menu_button_text[];
93 extern char tmp_path[MAX_CHARS];
95 extern struct object_t *vert, *time_bar, *main_obj;
97 extern struct object_t *start_obj, *stop_obj, *pause_obj, *play_obj, *end_obj, *rec_obj;
98 extern struct object_t *progress_bar, *message_bar, *memory_bar;
100 extern SDL_Surface *ctx_old_gc, *time_bar_bmp;
101 extern group_t *ctx_old;
102 void *ctx_updater;
104 extern group_t *main_grp, *sub_grp, *splash_grp, *time_bar_grp, *menu_grp, *menu_wave_grp;
106 void terminate(int sigraised, siginfo_t *info, void *a);
108 void update_memory_bar(void);
110 void loader(void);
112 Thank you for your attention
113 -----BEGIN PGP SIGNATURE-----
114 Version: GnuPG v1.4.9 (OpenBSD)
116 iEYEARECAAYFAkrsgw8ACgkQMNO4A6bnBrNrJgCeMdzy4k7D1UjEO007JZJcHxNW
117 RXcAnjvHYa2dekAnAfrDnm15aT7UbnJr
118 =YYlK
119 -----END PGP SIGNATURE-----