| 1 | /* sys/winmgr.h (emx+gcc) */
|
|---|
| 2 |
|
|---|
| 3 | #ifndef _SYS_WINMGR_H
|
|---|
| 4 | #define _SYS_WINMGR_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 | struct _FILE;
|
|---|
| 57 |
|
|---|
| 58 | typedef struct _wm_window *wm_handle;
|
|---|
| 59 |
|
|---|
| 60 | void wm_attrib (wm_handle wh, int a);
|
|---|
| 61 | void wm_attrib_all (wm_handle wh, int a);
|
|---|
| 62 | void wm_backsp (wm_handle wh, int count);
|
|---|
| 63 | void wm_border (wm_handle wh, int bflag, int battr, __const__ char *title,
|
|---|
| 64 | int tflag, int tattr);
|
|---|
| 65 | void wm_bottom (wm_handle wh);
|
|---|
| 66 | void wm_chide (int flag);
|
|---|
| 67 | void wm_clear (wm_handle wh);
|
|---|
| 68 | void wm_close (wm_handle wh);
|
|---|
| 69 | void wm_close_all (void);
|
|---|
| 70 | void wm_clr_eol (wm_handle wh, int x, int y);
|
|---|
| 71 | wm_handle wm_create (int x0, int y0, int x1, int y1, int border, int battr,
|
|---|
| 72 | int wattr);
|
|---|
| 73 | void wm_ctype (wm_handle wh, int start, int end);
|
|---|
| 74 | void wm_cursor (wm_handle wh);
|
|---|
| 75 | void wm_cvis (wm_handle wh, int flag);
|
|---|
| 76 | void wm_del_char (wm_handle wh, int x, int y, int count);
|
|---|
| 77 | void wm_del_line (wm_handle wh, int y, int count);
|
|---|
| 78 | void wm_delete (wm_handle wh);
|
|---|
| 79 | void wm_dimen (wm_handle wh, int *width, int *height);
|
|---|
| 80 | void wm_down (wm_handle wh);
|
|---|
| 81 | void wm_exit (void);
|
|---|
| 82 | wm_handle wm_find (int x, int y);
|
|---|
| 83 | int wm_get_attrib (wm_handle wh);
|
|---|
| 84 | wm_handle wm_get_cursor (void);
|
|---|
| 85 | void wm_get_pos (wm_handle wh, int *x, int *y);
|
|---|
| 86 | int wm_getx (wm_handle wh);
|
|---|
| 87 | void wm_getxy (wm_handle wh, int *x, int *y);
|
|---|
| 88 | int wm_gety (wm_handle wh);
|
|---|
| 89 | void wm_gotoxy (wm_handle wh, int x, int y);
|
|---|
| 90 | void wm_ins_char (wm_handle wh, int x, int y, int count);
|
|---|
| 91 | void wm_ins_line (wm_handle wh, int y, int count);
|
|---|
| 92 | int wm_init (int n);
|
|---|
| 93 | void wm_move (wm_handle wh, int x, int y);
|
|---|
| 94 | void wm_open (wm_handle wh);
|
|---|
| 95 | void wm_puta_at (wm_handle wh, int x, int y, int a, int count);
|
|---|
| 96 | void wm_putc (wm_handle wh, char c);
|
|---|
| 97 | void wm_putc_at (wm_handle wh, int x, int y, char c);
|
|---|
| 98 | void wm_putca (wm_handle wh, char c, int a);
|
|---|
| 99 | void wm_putca_at (wm_handle wh, int x, int y, char c, int a);
|
|---|
| 100 | void wm_puts (wm_handle wh, __const__ char *str);
|
|---|
| 101 | void wm_puts_at (wm_handle wh, int x, int y, __const__ char *str);
|
|---|
| 102 | void wm_putsn (wm_handle wh, __const__ char *str, int len);
|
|---|
| 103 | void wm_putsa (wm_handle wh, __const__ char *str, int len);
|
|---|
| 104 | void wm_putsa_at (wm_handle wh, int x, int y, __const__ char *str, int len);
|
|---|
| 105 | void wm_scroll (wm_handle wh, int count);
|
|---|
| 106 | void wm_top (wm_handle wh);
|
|---|
| 107 | void wm_up (wm_handle wh);
|
|---|
| 108 | void wm_update (wm_handle wh, int flag);
|
|---|
| 109 | void wm_wrap (wm_handle wh, int wrap_flag);
|
|---|
| 110 |
|
|---|
| 111 |
|
|---|
| 112 | #if defined (__EMX__)
|
|---|
| 113 |
|
|---|
| 114 | #if !defined (_VA_LIST)
|
|---|
| 115 | #define _VA_LIST
|
|---|
| 116 | typedef char *va_list;
|
|---|
| 117 | #endif
|
|---|
| 118 |
|
|---|
| 119 | int wm_fclose (struct _FILE *stream);
|
|---|
| 120 | struct _FILE *wm_fopen (wm_handle wh);
|
|---|
| 121 |
|
|---|
| 122 | #if defined (__GNUC__)
|
|---|
| 123 | int wm_printf (wm_handle wh, __const__ char *fmt, ...)
|
|---|
| 124 | __attribute__ ((__format__ (__printf__, 2, 3)));
|
|---|
| 125 | int wm_vprintf (wm_handle wh, __const__ char *fmt, va_list arg_ptr)
|
|---|
| 126 | __attribute__ ((__format__ (__printf__, 2, 0)));
|
|---|
| 127 | #else
|
|---|
| 128 | int wm_printf (wm_handle wh, __const__ char *fmt, ...);
|
|---|
| 129 | int wm_vprintf (wm_handle wh, __const__ char *fmt, va_list arg_ptr);
|
|---|
| 130 | #endif
|
|---|
| 131 | #endif
|
|---|
| 132 |
|
|---|
| 133 | #if defined (__cplusplus)
|
|---|
| 134 | }
|
|---|
| 135 | #endif
|
|---|
| 136 |
|
|---|
| 137 | #endif /* not _SYS_WINMGR_H */
|
|---|