Category : C Source Code
Archive   : WINDOW_C.ZIP
Filename : WINDOWS.H

 
Output of file : WINDOWS.H contained in archive : WINDOW_C.ZIP
/* windows.h */
#define ROWS 25
#define NORMAL 0x0700
#define REVERSE 0x7000
#define MONO_BASE 0xB000
#define COLOR_BASE 0xB800
#define PAGE_SIZE (0x10 * cols / 80)
#define YES 1
#define NO 0
#define ON 1
#define OFF 0
#define LEFT 75
#define CTRL_W 23
#define UP 72
#define DOWN 80
#define PGDOWN 81
#define PGUP 73
#define INS 0x52
#define DEL 0x53
#define RIGHT 77
#define HOME 71
#define END 79
#define ESC 27
#define ALT_B 48
#define F1 59
#define F2 60
#define F3 61
#define F4 62
#define F5 63
#define F6 64
#define F7 65
#define F8 66
#define F9 67
#define F10 68
#define CTRL_END 0x75
#define FUNC_KEYS F1:case F2:case F3:case F4:case F5:case F6:case F7:\
case F8:case F9:case F10

typedef unsigned int VideoLocation;

typedef struct {
int top, left, bottom, right;
} Rectangle;

typedef struct {
int row, col;
} Cursor;

typedef enum {single, doubl, none} Border;

typedef struct window {
Rectangle rect;
Cursor cursor;
Border bord;
int open;
int attribute;
int rows, cols;
int data_size;
int *data;
char *title;
struct window *prev, *next;
} Window;

typedef struct {
char *str, *prompt;
int size;
char *specials;
int alpha;
int num;
int promptAtt, dataAtt;
Cursor promptLoc, dataLoc;
int position;
int length;
} Field;

/* declarations for window functions */
void addChar(int, Field *, Window *);
void backspace(Field *, Window *);
void beep(void);
void clearToEnd(Field *, Window *);
void crs_off(void);
void crs_on(void);
void delChar(Field *, Window *);
void fatCursor(void);
void fieldEnd(Field *, Window *);
void fieldLeft(Field *, Window *);
void fieldRight(Field *, Window *);
void fieldStart(Field *, Window *);
int getField(Field *, Window *);
void showField(Field *, Window *);
void thinCursor(void);
void toggleInsert(void);
void w__scroll(Window *, unsigned int);
void w_border(Window *);
void w_center(char *, Window *, int);
void w_clear(Window *);
void w_close(Window *);
Window *w_create(unsigned int, unsigned int, unsigned int, unsigned int,
Border, char *);
void w_dispose(Window *);
void w_draw(Window *);
void w_error(void);
int w_getch(void);
void w_init(void);
void w_link(Window *);
void w_memcpy(VideoLocation, void *, int);
void w_open(Window *);
void w_putc(int, Window *);
void w_putcrs(Window *);
void w_puts(char *, Window *);
void w_putw(int, VideoLocation);
void w_refresh(void);
void w_scroll(Window *, int);
void w_select(Window *);
void w_setmem(int, void *, int);
void w_show(Window *);
void w_title(Window *);
void w_unlink(Window *);

/* declarations for global variables defined in windows.c */
extern Window *main_w, *top_w;
extern int layers_w, *vidMem, insertFlag, snowFlag, beepFlag;
extern unsigned char cols;



  3 Responses to “Category : C Source Code
Archive   : WINDOW_C.ZIP
Filename : WINDOWS.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/