MultiSrc.h revision 421c997b
1/*
2 * Copyright 1991 by OMRON Corporation
3 *
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 makes no representations
11 * about the suitability of this software for any purpose.  It is provided
12 * "as is" without express or implied warranty.
13 *
14 * OMRON DISCLAIMS 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.
21 *
22 *      Author: Li Yuhong	 OMRON Corporation
23 */
24
25/*
26
27Copyright 1989, 1991, 1994, 1998  The Open Group
28
29Permission to use, copy, modify, distribute, and sell this software and its
30documentation for any purpose is hereby granted without fee, provided that
31the above copyright notice appear in all copies and that both that
32copyright notice and this permission notice appear in supporting
33documentation.
34
35The above copyright notice and this permission notice shall be included in
36all copies or substantial portions of the Software.
37
38THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
39IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
40FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
41OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
42AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
43CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
44
45Except as contained in this notice, the name of The Open Group shall not be
46used in advertising or otherwise to promote the sale, use or other dealings
47in this Software without prior written authorization from The Open Group.
48
49*/
50
51/*
52 * This file was modified from AsciiSrc.h.
53 *
54 * By Li Yuhong, Sept. 18, 1990
55 */
56
57#ifndef _XawMultiSrc_h
58#define _XawMultiSrc_h
59
60#include <X11/Xaw/TextSrc.h>
61
62/* Resources:
63
64 Name		     Class		RepType		Default Value
65 ----		     -----		-------		-------------
66 dataCompression     DataCompression	Boolean		True
67 length		     Length		int		(internal)
68 pieceSize	     PieceSize		int		BUFSIZ
69 string		     String		String		NULL
70 type		     Type		XawAsciiType	XawAsciiString
71 useStringInPlace    UseStringInPlace	Boolean		False
72
73*/
74
75extern WidgetClass multiSrcObjectClass;
76
77typedef struct _MultiSrcClassRec *MultiSrcObjectClass;
78typedef struct _MultiSrcRec      *MultiSrcObject;
79
80#define MultiSourceObjectClass MultiSrcObjectClass
81#define MultiSourceObject      MultiSrcObject
82
83#define XtCDataCompression "DataCompression"
84#define XtCPieceSize "PieceSize"
85#define XtCType "Type"
86#define XtCUseStringInPlace "UseStringInPlace"
87
88#define XtNdataCompression "dataCompression"
89#define XtNpieceSize "pieceSize"
90#define XtNtype "type"
91#define XtNuseStringInPlace "useStringInPlace"
92
93#define XtRMultiType "MultiType"
94
95#define XtEstring "string"
96#define XtEfile "file"
97
98/************************************************************
99 *
100 * THESE ROUTINES ARE NOT PUBLIC: Source should call
101 *
102 * the AsciiSrc API which currently forwards requests here.
103 *
104 * future versions (like theres going to be an R7 Xaw!) may
105 *
106 * eliminate this file or at least these functions entirely.
107 *
108 ************************************************************/
109
110_XFUNCPROTOBEGIN
111
112void XawMultiSourceFreeString
113(
114 Widget			w
115 );
116
117Bool _XawMultiSave
118(
119 Widget			w
120);
121
122Bool _XawMultiSaveAsFile
123(
124 Widget			w,
125 _Xconst char		*name
126 );
127
128_XFUNCPROTOEND
129
130#endif /* _XawMultiSrc_h  */
131