| 1 |
schorsch |
2.5 |
/* RCSid $Id: x11twind.h,v 2.4 2003/04/11 16:01:27 greg Exp $ */ |
| 2 |
greg |
1.1 |
/* |
| 3 |
|
|
* xtwind.h - header for X text window routines. |
| 4 |
|
|
* |
| 5 |
|
|
* Written by G. Ward |
| 6 |
|
|
* 10/30/87 |
| 7 |
|
|
* |
| 8 |
|
|
* Modified for X11 B. V. Smith |
| 9 |
|
|
* 9/26/88 |
| 10 |
|
|
*/ |
| 11 |
schorsch |
2.5 |
#ifndef _RAD_X11TWIND_H_ |
| 12 |
|
|
#define _RAD_X11TWIND_H_ |
| 13 |
|
|
#ifdef __cplusplus |
| 14 |
|
|
extern "C" { |
| 15 |
|
|
#endif |
| 16 |
|
|
|
| 17 |
greg |
1.1 |
|
| 18 |
greg |
2.3 |
#include "copyright.h" |
| 19 |
greg |
2.2 |
|
| 20 |
greg |
1.1 |
#define LEFTMAR 2 /* left margin width */ |
| 21 |
|
|
|
| 22 |
|
|
typedef struct { |
| 23 |
|
|
Display *dpy; /* the display */ |
| 24 |
|
|
Window w; /* window */ |
| 25 |
|
|
XFontStruct *f; /* font information */ |
| 26 |
|
|
GC gc; /* graphics context */ |
| 27 |
|
|
short nc, nr; /* text number of columns and rows */ |
| 28 |
|
|
char **lp; /* null-terminated lines */ |
| 29 |
|
|
short c, r; /* current position */ |
| 30 |
|
|
short cursor; /* cursor type */ |
| 31 |
|
|
} TEXTWIND; /* a text window */ |
| 32 |
|
|
|
| 33 |
|
|
#define TNOCURS 0 |
| 34 |
|
|
#define TBLKCURS 1 |
| 35 |
|
|
|
| 36 |
greg |
2.2 |
extern TEXTWIND *xt_open(Display *dpy, Window parent, |
| 37 |
|
|
int x, int y, int width, int height, |
| 38 |
|
|
int bw, unsigned long fore, unsigned long back, |
| 39 |
|
|
char *fontname); |
| 40 |
|
|
extern void xt_puts(char *s, TEXTWIND *t); |
| 41 |
greg |
2.4 |
extern void xt_putc(int c, TEXTWIND *t); |
| 42 |
greg |
2.2 |
extern void xt_delete(TEXTWIND *t, int r); |
| 43 |
|
|
extern void xt_insert(TEXTWIND *t, int r); |
| 44 |
|
|
extern void xt_redraw(TEXTWIND *t); |
| 45 |
|
|
extern void xt_clear(TEXTWIND *t); |
| 46 |
|
|
extern void xt_move(TEXTWIND *t, int r, int c); |
| 47 |
|
|
extern int xt_cursor(TEXTWIND *t, int curs); |
| 48 |
|
|
extern void xt_close(TEXTWIND *t); |
| 49 |
|
|
|
| 50 |
schorsch |
2.5 |
|
| 51 |
|
|
#ifdef __cplusplus |
| 52 |
|
|
} |
| 53 |
greg |
2.2 |
#endif |
| 54 |
schorsch |
2.5 |
#endif /* _RAD_X11TWIND_H_ */ |
| 55 |
|
|
|