ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/rt/x11twind.h
Revision: 2.2
Committed: Sat Feb 22 02:07:29 2003 UTC (21 years, 8 months ago) by greg
Content type: text/plain
Branch: MAIN
Changes since 2.1: +87 -4 lines
Log Message:
Changes and check-in for 3.5 release
Includes new source files and modifications not recorded for many years
See ray/doc/notes/ReleaseNotes for notes between 3.1 and 3.5 release

File Contents

# User Rev Content
1 greg 2.2 /* RCSid: $Id$ */
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    
12 greg 2.2 /* ====================================================================
13     * The Radiance Software License, Version 1.0
14     *
15     * Copyright (c) 1990 - 2002 The Regents of the University of California,
16     * through Lawrence Berkeley National Laboratory. All rights reserved.
17     *
18     * Redistribution and use in source and binary forms, with or without
19     * modification, are permitted provided that the following conditions
20     * are met:
21     *
22     * 1. Redistributions of source code must retain the above copyright
23     * notice, this list of conditions and the following disclaimer.
24     *
25     * 2. Redistributions in binary form must reproduce the above copyright
26     * notice, this list of conditions and the following disclaimer in
27     * the documentation and/or other materials provided with the
28     * distribution.
29     *
30     * 3. The end-user documentation included with the redistribution,
31     * if any, must include the following acknowledgment:
32     * "This product includes Radiance software
33     * (http://radsite.lbl.gov/)
34     * developed by the Lawrence Berkeley National Laboratory
35     * (http://www.lbl.gov/)."
36     * Alternately, this acknowledgment may appear in the software itself,
37     * if and wherever such third-party acknowledgments normally appear.
38     *
39     * 4. The names "Radiance," "Lawrence Berkeley National Laboratory"
40     * and "The Regents of the University of California" must
41     * not be used to endorse or promote products derived from this
42     * software without prior written permission. For written
43     * permission, please contact [email protected].
44     *
45     * 5. Products derived from this software may not be called "Radiance",
46     * nor may "Radiance" appear in their name, without prior written
47     * permission of Lawrence Berkeley National Laboratory.
48     *
49     * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
50     * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
51     * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
52     * DISCLAIMED. IN NO EVENT SHALL Lawrence Berkeley National Laboratory OR
53     * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
54     * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
55     * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
56     * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
57     * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
58     * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
59     * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
60     * SUCH DAMAGE.
61     * ====================================================================
62     *
63     * This software consists of voluntary contributions made by many
64     * individuals on behalf of Lawrence Berkeley National Laboratory. For more
65     * information on Lawrence Berkeley National Laboratory, please see
66     * <http://www.lbl.gov/>.
67     */
68    
69 greg 1.1 #define LEFTMAR 2 /* left margin width */
70    
71     typedef struct {
72     Display *dpy; /* the display */
73     Window w; /* window */
74     XFontStruct *f; /* font information */
75     GC gc; /* graphics context */
76     short nc, nr; /* text number of columns and rows */
77     char **lp; /* null-terminated lines */
78     short c, r; /* current position */
79     short cursor; /* cursor type */
80     } TEXTWIND; /* a text window */
81    
82     #define TNOCURS 0
83     #define TBLKCURS 1
84    
85 greg 2.2 #ifdef NOPROTO
86    
87 greg 1.1 extern TEXTWIND *xt_open();
88 greg 2.2 extern void xt_puts();
89     extern void xt_putc();
90     extern void xt_delete();
91     extern void xt_insert();
92     extern void xt_redraw();
93     extern void xt_clear();
94     extern void xt_move();
95     extern int xt_cursor();
96     extern void xt_close();
97    
98     #else
99    
100     extern TEXTWIND *xt_open(Display *dpy, Window parent,
101     int x, int y, int width, int height,
102     int bw, unsigned long fore, unsigned long back,
103     char *fontname);
104     extern void xt_puts(char *s, TEXTWIND *t);
105     extern void xt_putc(char c, TEXTWIND *t);
106     extern void xt_delete(TEXTWIND *t, int r);
107     extern void xt_insert(TEXTWIND *t, int r);
108     extern void xt_redraw(TEXTWIND *t);
109     extern void xt_clear(TEXTWIND *t);
110     extern void xt_move(TEXTWIND *t, int r, int c);
111     extern int xt_cursor(TEXTWIND *t, int curs);
112     extern void xt_close(TEXTWIND *t);
113    
114     #endif