rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / x11 / libXaw4 / src / Xaw3_1AsciiSrc.h
blobf6349b1e50b6cbf2170265cefa749fd46563bff6
1 /*
2 * $XConsortium: AsciiSrc.h,v 1.5 89/10/05 13:17:30 kit Exp $
4 * Copyright 1989 Massachusetts Institute of Technology
6 * Permission to use, copy, modify, and distribute this software and its
7 * documentation for any purpose and without fee is hereby granted, provided
8 * that the above copyright notice appear in all copies and that both that
9 * copyright notice and this permission notice appear in supporting
10 * documentation, and that the name of M.I.T. not be used in advertising or
11 * publicity pertaining to distribution of the software without specific,
12 * written prior permission. M.I.T. makes no representations about the
13 * suitability of this software for any purpose. It is provided "as is"
14 * without express or implied warranty.
20 * AsciiSrc.h - Public Header file for Ascii Text Source.
22 * This is the public header file for the Ascii Text Source.
23 * It is intended to be used with the Text widget, the simplest way to use
24 * this text source is to use the AsciiText Object.
26 * Date: June 29, 1989
28 * By: Chris D. Peterson
29 * MIT X Consortium
30 * kit@expo.lcs.mit.edu
34 #ifndef _XawAsciiSrc_h
35 #define _XawAsciiSrc_h
37 #include <./Xaw3_1TextSrc.h>
39 /* Resources:
41 Name Class RepType Default Value
42 ---- ----- ------- -------------
47 /* Class record constants */
49 extern WidgetClass asciiSrcObjectClass;
51 typedef struct _AsciiSrcClassRec *AsciiSrcObjectClass;
52 typedef struct _AsciiSrcRec *AsciiSrcObject;
55 * Just to make people's lives a bit easier.
58 #define AsciiSourceObjectClass AsciiSrcObjectClass
59 #define AsciiSourceObject AsciiSrcObject
62 * Resource Definitions.
65 #define XtCDataCompression "DataCompression"
66 #define XtCPieceSize "PieceSize"
67 #define XtCType "Type"
68 #define XtCUseStringInPlace "UseStringInPlace"
70 #define XtNdataCompression "dataCompression"
71 #define XtNpieceSize "pieceSize"
72 #define XtNtype "type"
73 #define XtNuseStringInPlace "useStringInPlace"
75 #define XtRAsciiType "AsciiType"
77 #define XtEstring "string"
78 #define XtEfile "file"
80 typedef enum {XawAsciiFile, XawAsciiString} XawAsciiType;
82 /************************************************************
84 * Public routines
86 ************************************************************/
88 /* Function Name: XawAsciiSourceFreeString
89 * Description: Frees the string returned by a get values call
90 * on the string when the source is of type string.
91 * Arguments: w - the AsciiSrc object.
92 * Returns: none.
95 void XawAsciiSourceFreeString(/* w */);
97 Widget w;
100 /* Function Name: XawAsciiSave
101 * Description: Saves all the pieces into a file or string as required.
102 * Arguments: w - the asciiSrc Object.
103 * Returns: TRUE if the save was successful.
106 Boolean XawAsciiSave(/* w */);
108 Widget w;
111 /* Function Name: XawAsciiSaveAsFile
112 * Description: Save the current buffer as a file.
113 * Arguments: w - the asciiSrc object.
114 * name - name of the file to save this file into.
115 * Returns: True if the save was sucessful.
118 Boolean XawAsciiSaveAsFile(/* w, name */);
120 Widget w;
121 String name;
124 /* Function Name: XawAsciiSourceChanged
125 * Description: Returns true if the source has changed since last saved.
126 * Arguments: w - the asciiSource object.
127 * Returns: a Boolean (see description).
130 Boolean XawAsciiSourceChanged(/* w */);
132 Widget w;
135 #ifdef XAW_BC
136 /*************************************************************
138 * These functions are only preserved for compatability.
141 #define ASCII_STRING /* Turn on R3 AsciiDisk and AsciiString */
142 #define ASCII_DISK /* Emulation modes. */
144 #ifdef ASCII_STRING
145 #define XawStringSourceDestroy XtDestroyWidget
146 #endif
148 #ifdef ASCII_DISK
149 #define XawDiskSourceDestroy XtDestroyWidget
150 #endif
152 #ifdef ASCII_STRING
153 /* Function Name: AsciiStringSourceCreate
154 * Description: Creates a string source.
155 * Arguments: parent - the widget that will own this source.
156 * args, num_args - the argument list.
157 * Returns: a pointer to the new text source.
160 Widget XawStringSourceCreate(/* parent, args, num_args */);
162 Widget parent;
163 ArgList args;
164 Cardinal num_args;
166 #endif /* ASCII_STRING */
168 #ifdef ASCII_DISK
169 /* Function Name: AsciiDiskSourceCreate
170 * Description: Creates a disk source.
171 * Arguments: parent - the widget that will own this source.
172 * args, num_args - the argument list.
173 * Returns: a pointer to the new text source.
176 Widget XawDiskSourceCreate(/* parent, args, num_args */);
178 Widget parent;
179 ArgList args;
180 Cardinal num_args;
182 #endif /* ASCII_DISK */
183 #endif /* XAW_BC */
185 * End of Compatability stuff.
187 ***************************************************/
189 #endif /* _XawAsciiSrc_h - Don't add anything after this line. */