Back to index

radiance  4R0+20100331
x11twind.h
Go to the documentation of this file.
00001 /* RCSid $Id: x11twind.h,v 2.6 2003/06/27 06:53:23 greg Exp $ */
00002 /*
00003  *  xtwind.h - header for X text window routines.
00004  *
00005  *  Written by G. Ward
00006  *     10/30/87
00007  *
00008  *  Modified for X11 B. V. Smith
00009  *     9/26/88
00010  */
00011 #ifndef _RAD_X11TWIND_H_
00012 #define _RAD_X11TWIND_H_
00013 #ifdef __cplusplus
00014 extern "C" {
00015 #endif
00016 
00017 #define LEFTMAR      2                    /* left margin width */
00018 
00019 typedef struct {
00020        Display  *dpy;                     /* the display */
00021        Window  w;                  /* window */
00022        XFontStruct  *f;            /* font information */
00023        GC     gc;                  /* graphics context */
00024        short  nc, nr;                     /* text number of columns and rows */
00025        char  **lp;                 /* null-terminated lines */
00026        short  c, r;                /* current position */
00027        short  cursor;                     /* cursor type */
00028 }  TEXTWIND;                /* a text window */
00029 
00030 #define TNOCURS             0
00031 #define TBLKCURS     1
00032 
00033 extern TEXTWIND      *xt_open(Display *dpy, Window parent,
00034                      int x, int y, int width, int height,
00035                      int bw, unsigned long fore, unsigned long back,
00036                      char *fontname);
00037 extern void   xt_puts(char *s, TEXTWIND *t);
00038 extern void   xt_putc(int c, TEXTWIND *t);
00039 extern void   xt_delete(TEXTWIND *t, int r);
00040 extern void   xt_insert(TEXTWIND *t, int r);
00041 extern void   xt_redraw(TEXTWIND *t);
00042 extern void   xt_clear(TEXTWIND *t);
00043 extern void   xt_move(TEXTWIND *t, int r, int c);
00044 extern int    xt_cursor(TEXTWIND *t, int curs);
00045 extern void   xt_close(TEXTWIND *t);
00046 
00047 
00048 #ifdef __cplusplus
00049 }
00050 #endif
00051 #endif /* _RAD_X11TWIND_H_ */
00052