rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / x11 / libXaw4 / src / Xaw3_1TextSrc.h
blob262a8a00dbb94d212b8120570f5e1f8be320a9d8
1 /*
2 * $XConsortium: TextSrc.h,v 1.4 89/10/31 17:12:42 kit Exp $
3 */
5 /***********************************************************
6 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
7 and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
9 All Rights Reserved
11 Permission to use, copy, modify, and distribute this software and its
12 documentation for any purpose and without fee is hereby granted,
13 provided that the above copyright notice appear in all copies and that
14 both that copyright notice and this permission notice appear in
15 supporting documentation, and that the names of Digital or MIT not be
16 used in advertising or publicity pertaining to distribution of the
17 software without specific, written prior permission.
19 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
20 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
21 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
22 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
23 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
24 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
25 SOFTWARE.
27 ******************************************************************/
29 #ifndef _XawTextSrc_h
30 #define _XawTextSrc_h
32 /***********************************************************************
34 * TextSrc Object
36 ***********************************************************************/
38 #include <X11/Object.h>
40 /* Resources:
42 Name Class RepType Default Value
43 ---- ----- ------- -------------
44 editType EditType XawTextEditType XawtextRead
48 /* Class record constants */
50 extern WidgetClass textSrcObjectClass;
52 typedef struct _TextSrcClassRec *TextSrcObjectClass;
53 typedef struct _TextSrcRec *TextSrcObject;
55 typedef enum {XawstPositions, XawstWhiteSpace, XawstEOL, XawstParagraph,
56 XawstAll} XawTextScanType;
57 typedef enum {Normal, Selected }highlightType;
58 typedef enum {XawsmTextSelect, XawsmTextExtend} XawTextSelectionMode;
59 typedef enum {XawactionStart, XawactionAdjust, XawactionEnd}
60 XawTextSelectionAction;
62 typedef long XawTextPosition;
65 * Error Conditions:
68 #define XawTextReadError -1
69 #define XawTextScanError -1
71 /************************************************************
73 * Public Functions.
75 ************************************************************/
77 /* Function Name: XawTextSourceRead
78 * Description: This function reads the source.
79 * Arguments: w - the TextSrc Object.
80 * pos - position of the text to retreive.
81 * RETURNED text - text block that will contain returned text.
82 * length - maximum number of characters to read.
83 * Returns: The number of characters read into the buffer.
86 XawTextPosition XawTextSourceRead(/* w, pos, text, length */);
88 Widget w;
89 XawTextPosition pos;
90 XawTextBlock *text;
91 int length;
94 /* Function Name: XawTextSourceReplace.
95 * Description: Replaces a block of text with new text.
96 * Arguments: src - the Text Source Object.
97 * startPos, endPos - ends of text that will be removed.
98 * text - new text to be inserted into buffer at startPos.
99 * Returns: XawEditError or XawEditDone.
102 int XawTextSourceReplace (/* w, startPos, endPos, text */);
104 Widget w;
105 XawTextPosition startPos, endPos;
106 XawTextBlock *text;
109 /* Function Name: XawTextSourceScan
110 * Description: Scans the text source for the number and type
111 * of item specified.
112 * Arguments: w - the TextSrc Object.
113 * position - the position to start scanning.
114 * type - type of thing to scan for.
115 * dir - direction to scan.
116 * count - which occurance if this thing to search for.
117 * include - whether or not to include the character found in
118 * the position that is returned.
119 * Returns: The position of the text.
123 XawTextPosition XawTextSourceScan(/* w, position, type, dir, count, include*/);
125 Widget w;
126 XawTextPosition position;
127 XawTextScanType type;
128 XawTextScanDirection dir;
129 int count;
130 Boolean include;
133 /* Function Name: XawTextSourceSearch
134 * Description: Searchs the text source for the text block passed
135 * Arguments: w - the TextSource Object.
136 * position - the position to start scanning.
137 * dir - direction to scan.
138 * text - the text block to search for.
139 * Returns: The position of the text we are searching for or
140 * XawTextSearchError.
143 XawTextPosition XawTextSourceSearch(/* w, position, dir, text */);
145 Widget w;
146 XawTextPosition position;
147 XawTextScanDirection dir;
148 XawTextBlock * text;
151 /* Function Name: XawTextSourceConvertSelection
152 * Description: Dummy selection converter.
153 * Arguments: w - the TextSrc object.
154 * selection - the current selection atom.
155 * target - the current target atom.
156 * type - the type to conver the selection to.
157 * RETURNED value, length - the return value that has been converted.
158 * RETURNED format - the format of the returned value.
159 * Returns: TRUE if the selection has been converted.
163 Boolean XawTextSourceConvertSelection(/* w, selection, target,
164 type, value, length, format */);
166 Widget w;
167 Atom * selection, * target, * type;
168 caddr_t * value;
169 unsigned long * length;
170 int * format;
173 /* Function Name: XawTextSourceSetSelection
174 * Description: allows special setting of the selection.
175 * Arguments: w - the TextSrc object.
176 * left, right - bounds of the selection.
177 * selection - the selection atom.
178 * Returns: none
181 void XawTextSourceSetSelection(/* w, left, right, selection */);
183 Widget w;
184 XawTextPosition left, right;
185 Atom selection;
188 #ifdef XAW_BC
189 /*************************************************************
190 * For Compatibility only. */
192 #define _XtTextSink _XawTextSink
193 #define _XtTextSource _XawTextSource
195 #define XtisOn XawisOn
196 #define XtisOff XawisOff
198 #define XtsmTextSelect XawsmTextSelect
199 #define XtsmTextExtend XawsmTextExtend
201 #define XtactionStart XawactionStart
202 #define XtactionAdjust XawactionAdjust
203 #define XtactionEnd XawactionEnd
205 #define XtsdLeft XawsdLeft
206 #define XtsdRight XawsdRight
208 #define XtstPositions XawstPositions
209 #define XtstWhiteSpace XawstWhiteSpace
210 #define XtstEOL XawstEOL
211 #define XtstParagraph XawstParagraph
212 #define XtstAll XawstAll
214 #define XtTextSelectionAction XawTextSelectionAction
215 #define XtTextSelection XawTextSelection
216 #define XtTextScanDirection XawTextScanDirection
217 #define XtTextScanType XawTextScanType
220 /*************************************************************/
221 #endif /* XAW_BC */
223 #endif /* _XawTextSrc_h */
224 /* DON'T ADD STUFF AFTER THIS #endif */