11
void get_coords (Position *x, Position *y);
12
MCursor defaultcursor, downcursor;
15
UI() {playing=0; timer=(XtIntervalId)0;}
18
Drawable window, rootwindow;
30
void initialize(int *argc, char **argv);
33
void popup_dialog (int dialog);
35
void set_cursor (int cursor);
40
void draw (Picture picture, int x, int y);
41
void draw_centered (Picture picture);
42
void draw_line (int x1, int y1, int x2, int y2);
43
void draw_str (char *str, int x, int y);
45
void set_pausebutton (int action);
48
void update_scorebox(int level, int score);
49
void update_hsbox(char *str);
6
#define CURSOR_SEP_MASK 0
7
#define CURSOR_OWN_MASK 1
9
#define DIALOG_NEWGAME 0
10
#define DIALOG_PAUSEGAME 1
11
#define DIALOG_WARPLEVEL 2
12
#define DIALOG_HIGHSCORE 3
13
#define DIALOG_QUITGAME 4
14
#define DIALOG_STORY 5
15
#define DIALOG_RULES 6
16
#define DIALOG_ABOUT 7
17
#define DIALOG_SCORE 8
18
#define DIALOG_ENDGAME 9
19
#define DIALOG_ENTERNAME 10
22
void UI_restart_timer(void);
23
void UI_kill_timer(void);
25
void UI_pause_game(void);
26
void UI_resume_game(void);
28
void UI_initialize(const char *gui, int *argc, char **argv);
29
void UI_make_main_window(int size);
30
void UI_graphics_init(void);
31
void UI_make_dialogs(Picture *logo, Picture *icon, Picture *about);
33
void UI_popup_dialog(int index);
34
void UI_set_cursor(MCursor *cursor);
35
void UI_set_icon(Picture *icon);
37
void UI_refresh(void);
38
void UI_draw(Picture *picture, int x, int y);
39
void UI_draw_line(int x1, int y1, int x2, int y2);
40
void UI_draw_str(const char *str, int x, int y);
42
void UI_set_pausebutton(int action);
43
void UI_main_loop(void);
45
void UI_update_dialog(int index, const char *str);
47
void UI_load_picture(const char *name, int trans, Picture **pictp);
48
void UI_load_picture_indexed(const char *name, int index, int trans,
50
int UI_picture_width(Picture *pict);
51
int UI_picture_height(Picture *pict);
53
void UI_load_cursor(const char *name, int masked, MCursor **cursorp);
56
UI_intersect(int x1, int y1, int w1, int h1, int x2, int y2, int w2, int h2);
58
const char *UI_dialog_string(int index);
59
const char *UI_menu_string(int index);
61
typedef struct UI_methods {
62
void (*set_cursor)(MCursor *cursor);
63
void (*load_cursor)(const char *name, int masked, MCursor **cursorp);
64
void (*load_picture)(const char *name, int trans, Picture **pictp);
65
void (*set_icon)(Picture *pict);
66
int (*picture_width)(Picture *pict);
67
int (*picture_height)(Picture *pict);
68
void (*graphics_init)(void);
69
void (*clear_window)(void);
70
void (*refresh_window)(void);
71
void (*draw_image)(Picture *pict, int x, int y);
72
void (*draw_line)(int x1, int y1, int x2, int y2);
73
void (*draw_string)(const char *str, int x, int y);
74
void (*start_timer)(int ms);
75
void (*stop_timer)(void);
76
int (*timer_active)(void);
77
void (*popup_dialog)(int index);
78
void (*main_loop)(void);
79
void (*initialize)(int *argc, char **argv);
80
void (*make_main_window)(int size);
81
void (*create_dialogs)(Picture *logo, Picture *icon, Picture *about);
82
void (*set_pausebutton)(int active);
83
void (*update_dialog)(int index, const char *str);