2 * Copyright 1991 by OMRON Corporation
4 * Permission to use, copy, modify, distribute, and sell this software and its
5 * documentation for any purpose is hereby granted without fee, provided that
6 * the above copyright notice appear in all copies and that both that
7 * copyright notice and this permission notice appear in supporting
8 * documentation, and that the name OMRON not be used in
9 * advertising or publicity pertaining to distribution of the software without
10 * specific, written prior permission. OMRON make no representations
11 * about the suitability of this software for any purpose. It is provided
12 * "as is" without express or implied warranty.
14 * OMRON DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
15 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
16 * EVENT SHALL OMRON BE LIABLE FOR ANY SPECIAL, INDIRECT OR
17 * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
18 * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
19 * TORTUOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
20 * PERFORMANCE OF THIS SOFTWARE.
22 * Author: Li Yuhong OMRON Corporation
26 /***********************************************************
28 Copyright 1987, 1988, 1991, 1994, 1998 The Open Group
30 Permission to use, copy, modify, distribute, and sell this software and its
31 documentation for any purpose is hereby granted without fee, provided that
32 the above copyright notice appear in all copies and that both that
33 copyright notice and this permission notice appear in supporting
36 The above copyright notice and this permission notice shall be included in
37 all copies or substantial portions of the Software.
39 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
40 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
41 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
42 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
43 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
44 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
46 Except as contained in this notice, the name of The Open Group shall not be
47 used in advertising or otherwise to promote the sale, use or other dealings
48 in this Software without prior written authorization from The Open Group.
51 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
55 Permission to use, copy, modify, and distribute this software and its
56 documentation for any purpose and without fee is hereby granted,
57 provided that the above copyright notice appear in all copies and that
58 both that copyright notice and this permission notice appear in
59 supporting documentation, and that the name of Digital not be
60 used in advertising or publicity pertaining to distribution of the
61 software without specific, written prior permission.
63 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
64 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
65 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
66 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
67 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
68 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
71 ******************************************************************/
74 * MultiSrcP.h - Private Header for Multi Text Source.
76 * This is the private header file for the Multi Text Source.
77 * It is intended to be used with the Text widget, the simplest way to use
78 * this text source is to use the MultiText Object.
82 * By: Chris D. Peterson
84 * kit@expo.lcs.mit.edu
88 * This file was changed from AsciiSrcP.h.
90 * By Li Yuhong, Sept. 18, 1990
93 #ifndef _XawMultiSrcP_h
94 #define _XawMultiSrcP_h
96 #include <X11/Xfuncproto.h>
97 #include <X11/Xaw/TextSrcP.h>
98 #include <X11/Xaw/MultiSrc.h>
101 #define TMPSIZ L_tmpnam
104 #define TMPSIZ PATH_MAX
106 #define TMPSIZ 1024 /* bytes to allocate for tmpnam */
110 typedef struct _MultiPiece { /* Piece of the text file of BUFSIZ allocated
112 wchar_t* text; /* The text in this buffer */
113 XawTextPosition used; /* The number of characters of this buffer
114 that have been used */
115 struct _MultiPiece *prev, *next; /* linked list pointers */
118 /* New fields for the MultiSrc object class */
119 typedef struct _MultiSrcClassPart {
123 /* Full class record */
124 typedef struct _MultiSrcClassRec {
125 ObjectClassPart object_class;
126 TextSrcClassPart text_src_class;
127 MultiSrcClassPart multi_src_class;
130 extern MultiSrcClassRec multiSrcClassRec;
132 /* New fields for the MultiSrc object */
133 typedef struct _MultiSrcPart {
135 XIC ic; /* for X Input Method */
136 XtPointer string; /* either the string, or the file name, depend-
137 ing upon the `type'. ALWAYS IN MB FORMAT */
138 XawAsciiType type; /* either string or disk */
139 XawTextPosition piece_size; /* Size of text buffer for each piece */
140 Boolean data_compression; /* compress to minimum memory automatically
143 XtCallbackList callback;
145 Boolean use_string_in_place;/* Use the string passed in place */
146 int multi_length; /* length field for multi string emulation */
150 Boolean is_tempfile; /* Is this a temporary file? */
154 Boolean allocated_string; /* Have I allocated the
155 string in multi_src->string? */
156 XawTextPosition length; /* length of file - IN CHARACTERS, NOT BYTES */
157 MultiPiece *first_piece; /* first piece of the text */
159 XtPointer pad[4]; /* for future use and keep binary compatability */
163 /* Full instance record */
164 typedef struct _MultiSrcRec {
166 TextSrcPart text_src;
167 MultiSrcPart multi_src;
172 void _XawMultiSourceFreeString
179 #endif /* _XawMultiSrcP_h */