| 1 | /* sys/video.h (emx+gcc) */
|
|---|
| 2 |
|
|---|
| 3 | #ifndef _SYS_VIDEO_H
|
|---|
| 4 | #define _SYS_VIDEO_H
|
|---|
| 5 |
|
|---|
| 6 | #if defined (__cplusplus)
|
|---|
| 7 | extern "C" {
|
|---|
| 8 | #endif
|
|---|
| 9 |
|
|---|
| 10 | #if !defined (__GNUC__)
|
|---|
| 11 | #if !defined (__const__)
|
|---|
| 12 | #define __const__ const
|
|---|
| 13 | #endif
|
|---|
| 14 | #endif
|
|---|
| 15 |
|
|---|
| 16 | #if !defined (B_BLACK)
|
|---|
| 17 |
|
|---|
| 18 | /* Background colors */
|
|---|
| 19 |
|
|---|
| 20 | #define B_BLACK 0x00
|
|---|
| 21 | #define B_BLUE 0x10
|
|---|
| 22 | #define B_GREEN 0x20
|
|---|
| 23 | #define B_CYAN 0x30
|
|---|
| 24 | #define B_RED 0x40
|
|---|
| 25 | #define B_MAGENTA 0x50
|
|---|
| 26 | #define B_YELLOW 0x60
|
|---|
| 27 | #define B_BROWN 0x60
|
|---|
| 28 | #define B_WHITE 0x70
|
|---|
| 29 |
|
|---|
| 30 | /* Foreground colors */
|
|---|
| 31 |
|
|---|
| 32 | #define F_BLACK 0x00
|
|---|
| 33 | #define F_BLUE 0x01
|
|---|
| 34 | #define F_GREEN 0x02
|
|---|
| 35 | #define F_CYAN 0x03
|
|---|
| 36 | #define F_RED 0x04
|
|---|
| 37 | #define F_MAGENTA 0x05
|
|---|
| 38 | #define F_YELLOW 0x06
|
|---|
| 39 | #define F_BROWN 0x06
|
|---|
| 40 | #define F_WHITE 0x07
|
|---|
| 41 |
|
|---|
| 42 | /* Other attributes */
|
|---|
| 43 |
|
|---|
| 44 | #define INTENSITY 0x08
|
|---|
| 45 | #define BLINK 0x80
|
|---|
| 46 |
|
|---|
| 47 | /* black and white attributes */
|
|---|
| 48 |
|
|---|
| 49 | #define BW_BLANK 0x00
|
|---|
| 50 | #define BW_UNDERLINE 0x01
|
|---|
| 51 | #define BW_NORMAL 0x07
|
|---|
| 52 | #define BW_REVERSE 0x70
|
|---|
| 53 |
|
|---|
| 54 | #endif
|
|---|
| 55 |
|
|---|
| 56 | /* v_hardware() return values */
|
|---|
| 57 |
|
|---|
| 58 | #define V_COLOR_8 1
|
|---|
| 59 | #define V_COLOR_12 2
|
|---|
| 60 | #define V_MONOCHROME 3
|
|---|
| 61 |
|
|---|
| 62 | /* v_scroll() */
|
|---|
| 63 |
|
|---|
| 64 | #define V_SCROLL_UP 0
|
|---|
| 65 | #define V_SCROLL_DOWN 1
|
|---|
| 66 | #define V_SCROLL_LEFT 2
|
|---|
| 67 | #define V_SCROLL_RIGHT 3
|
|---|
| 68 | #define V_SCROLL_CLEAR 4
|
|---|
| 69 |
|
|---|
| 70 | struct _FILE;
|
|---|
| 71 |
|
|---|
| 72 | void v_attrib (int a);
|
|---|
| 73 | void v_backsp (int count);
|
|---|
| 74 | void v_clear (void);
|
|---|
| 75 | void v_clreol (void);
|
|---|
| 76 | void v_ctype (int start, int end);
|
|---|
| 77 | void v_delline (int count);
|
|---|
| 78 | void v_dimen (int *width, int *height);
|
|---|
| 79 | int v_fclose (struct _FILE *stream);
|
|---|
| 80 | struct _FILE *v_fopen (void);
|
|---|
| 81 | int v_getattr (void);
|
|---|
| 82 | void v_getctype (int *start, int *end);
|
|---|
| 83 | void v_getline (char *dst, int x, int y, int count);
|
|---|
| 84 | void v_getxy (int *x, int *y);
|
|---|
| 85 | void v_gotoxy (int x, int y);
|
|---|
| 86 | int v_hardware (void);
|
|---|
| 87 | void v_hidecursor (void);
|
|---|
| 88 | int v_init (void);
|
|---|
| 89 | void v_insline (int count);
|
|---|
| 90 | void v_putc (char c);
|
|---|
| 91 | void v_putline (__const__ char *src, int x, int y, int count);
|
|---|
| 92 | void v_putm (__const__ char *str, int len);
|
|---|
| 93 | void v_putmask (__const__ char *src, __const__ char *mask, int x, int y,
|
|---|
| 94 | int count);
|
|---|
| 95 | void v_putn (char c, int count);
|
|---|
| 96 | void v_puts (__const__ char *str);
|
|---|
| 97 | void v_scroll (int tl_x, int tl_y, int br_x, int br_y, int count, int flag);
|
|---|
| 98 | void v_scrollup (void);
|
|---|
| 99 |
|
|---|
| 100 | #if defined (__EMX__)
|
|---|
| 101 |
|
|---|
| 102 | #if !defined (_VA_LIST)
|
|---|
| 103 | #define _VA_LIST
|
|---|
| 104 | typedef char *va_list;
|
|---|
| 105 | #endif
|
|---|
| 106 |
|
|---|
| 107 | #if defined (__GNUC__)
|
|---|
| 108 | int v_printf (__const__ char *fmt, ...)
|
|---|
| 109 | __attribute__ ((__format__ (__printf__, 1, 2)));
|
|---|
| 110 | int v_vprintf (__const__ char *fmt, va_list arg_ptr)
|
|---|
| 111 | __attribute__ ((__format__ (__printf__, 1, 0)));
|
|---|
| 112 | #else
|
|---|
| 113 | int v_printf (__const__ char *fmt, ...);
|
|---|
| 114 | int v_vprintf (__const__ char *fmt, va_list arg_ptr);
|
|---|
| 115 | #endif
|
|---|
| 116 | #endif
|
|---|
| 117 |
|
|---|
| 118 | #if defined (__cplusplus)
|
|---|
| 119 | }
|
|---|
| 120 | #endif
|
|---|
| 121 |
|
|---|
| 122 | #endif /* not _SYS_VIDEO_H */
|
|---|