-
Notifications
You must be signed in to change notification settings - Fork 0
/
gui.h
72 lines (56 loc) · 1.47 KB
/
gui.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
/*
* gui.h - Tracker style GUI
*
* (C) David Olofson, 2006
*/
#ifndef GUI_H
#define GUI_H
#include "SDL.h"
#define MAXRECTS 1024
#define FONT_CW 16
#define FONT_CH 16
typedef enum
{
GUI_PAGE_MAIN = 0,
GUI_PAGE_LOG,
GUI_PAGE_HELP1,
GUI_PAGE_HELP2,
GUI_PAGE_HELP3,
GUI_PAGE_HELP4
} GUI_pages;
#define GUI_PAGE__FIRST GUI_PAGE_MAIN
#define GUI_PAGE__CYCLE GUI_PAGE_LOG
/*
* Low level GUI stuff
*/
/* Load and convert image */
SDL_Surface *gui_load_image(const char *fn);
/* Add a dirtyrect */
void gui_dirty(SDL_Rect *r);
/* Update all dirty areas */
void gui_refresh(void);
/* Draw a hollow box */
void gui_box(int x, int y, int w, int h, Uint32 c, SDL_Surface *dst);
/* Draw a black box with a colored outline */
void gui_bar(int x, int y, int w, int h, Uint32 c, SDL_Surface *dst);
/* Render text */
void gui_text(int x, int y, const char *txt, SDL_Surface *dst);
/* Render an oscilloscope */
void gui_oscilloscope(Sint32 *buf, int bufsize,
int start, int x, int y, int w, int h,
SDL_Surface *dst);
/*
* High level GUI stuff
*/
int gui_open(SDL_Surface *screen);
void gui_close(void);
void gui_tempo(int v);
void gui_songpos(int v);
void gui_songedit(int pos, int ppos, int track, int editing);
void gui_songselect(int x1, int y1, int x2, int y2);
void gui_status(int playing, int editing, int looping);
void gui_message(const char *message, int curspos);
void gui_draw_activity(int dt);
void gui_activity(int trk);
void gui_draw_screen(GUI_pages page);
#endif /* GUI_H */