| 1 |
#ifndef _TABLE_H_ |
| 2 |
#define _TABLE_H_ |
| 3 |
|
| 4 |
#define TABLE_MONO 0 |
| 5 |
#define TABLE_GRAY 1 |
| 6 |
#define TABLE_COLOR 2 |
| 7 |
extern int table_type; |
| 8 |
|
| 9 |
extern int display_width, display_height; |
| 10 |
extern int table_width, table_height; |
| 11 |
|
| 12 |
#define OPTION_BOOLEAN 1 |
| 13 |
#define OPTION_STRING 2 |
| 14 |
#define OPTION_INTEGER 3 |
| 15 |
typedef struct { |
| 16 |
char *option; |
| 17 |
int type; |
| 18 |
void *ptr; |
| 19 |
} OptionDesc; |
| 20 |
|
| 21 |
|
| 22 |
typedef struct { |
| 23 |
char *name; |
| 24 |
void *function; |
| 25 |
} FunctionMapping; |
| 26 |
|
| 27 |
|
| 28 |
void init_ace(int argc, char **argv, FunctionMapping *funcs); |
| 29 |
|
| 30 |
void init_table(int table_width, int table_height); |
| 31 |
|
| 32 |
extern int get_picture_default_width, get_picture_default_height; |
| 33 |
|
| 34 |
|
| 35 |
typedef struct Picture { |
| 36 |
int w, h; |
| 37 |
} Picture; |
| 38 |
|
| 39 |
Picture *get_picture(char *name); |
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
void put_picture(Picture *picture, int dx, int dy, |
| 44 |
int x, int y, int w, int h); |
| 45 |
void put_picture_inverted(Picture *picture, int dx, int dy, |
| 46 |
int x, int y, int w, int h); |
| 47 |
|
| 48 |
|
| 49 |
void set_centered_pic(Picture *picture); |
| 50 |
Picture *get_centered_pic(); |
| 51 |
|
| 52 |
extern int help_is_showing; |
| 53 |
|
| 54 |
extern void (*help_redraw)(void); |
| 55 |
extern void (*help_click)(int x, int y, int b); |
| 56 |
extern void (*help_key)(int c, int x, int y); |
| 57 |
|
| 58 |
void table_no_resize(); |
| 59 |
|
| 60 |
|
| 61 |
void table_loop(); |
| 62 |
|
| 63 |
void clip(int x, int y, int w, int h); |
| 64 |
void clip_more(int x, int y, int w, int h); |
| 65 |
void unclip(); |
| 66 |
void invalidate(int x, int y, int w, int h); |
| 67 |
void invalidate_nc(int x, int y, int w, int h); |
| 68 |
void invalidate_exposure(int ox, int oy, int ow, int oh, |
| 69 |
int nx, int ny, int nw, int nh); |
| 70 |
|
| 71 |
void snap_to_grid(int *x, int *y, |
| 72 |
int step_x, int step_y, |
| 73 |
int origin_x, int origin_y, |
| 74 |
int max_distance); |
| 75 |
|
| 76 |
#endif |