1 |
/* RCSid $Id: x11twind.h,v 2.5 2003/06/07 00:54:58 schorsch Exp $ */ |
2 |
/* |
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 |
#ifndef _RAD_X11TWIND_H_ |
12 |
#define _RAD_X11TWIND_H_ |
13 |
#ifdef __cplusplus |
14 |
extern "C" { |
15 |
#endif |
16 |
|
17 |
#define LEFTMAR 2 /* left margin width */ |
18 |
|
19 |
typedef struct { |
20 |
Display *dpy; /* the display */ |
21 |
Window w; /* window */ |
22 |
XFontStruct *f; /* font information */ |
23 |
GC gc; /* graphics context */ |
24 |
short nc, nr; /* text number of columns and rows */ |
25 |
char **lp; /* null-terminated lines */ |
26 |
short c, r; /* current position */ |
27 |
short cursor; /* cursor type */ |
28 |
} TEXTWIND; /* a text window */ |
29 |
|
30 |
#define TNOCURS 0 |
31 |
#define TBLKCURS 1 |
32 |
|
33 |
extern TEXTWIND *xt_open(Display *dpy, Window parent, |
34 |
int x, int y, int width, int height, |
35 |
int bw, unsigned long fore, unsigned long back, |
36 |
char *fontname); |
37 |
extern void xt_puts(char *s, TEXTWIND *t); |
38 |
extern void xt_putc(int c, TEXTWIND *t); |
39 |
extern void xt_delete(TEXTWIND *t, int r); |
40 |
extern void xt_insert(TEXTWIND *t, int r); |
41 |
extern void xt_redraw(TEXTWIND *t); |
42 |
extern void xt_clear(TEXTWIND *t); |
43 |
extern void xt_move(TEXTWIND *t, int r, int c); |
44 |
extern int xt_cursor(TEXTWIND *t, int curs); |
45 |
extern void xt_close(TEXTWIND *t); |
46 |
|
47 |
|
48 |
#ifdef __cplusplus |
49 |
} |
50 |
#endif |
51 |
#endif /* _RAD_X11TWIND_H_ */ |
52 |
|