rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / x11 / libXaw4 / src / Xaw3_1Text.h
blobee93ba3e995d2ddda7a64ba02a21a05ba4a1eff2
1 /*
2 * $XConsortium: Text.h,v 1.32 89/10/19 15:01:11 kit Exp $
3 */
6 /***********************************************************
7 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
8 and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
10 All Rights Reserved
12 Permission to use, copy, modify, and distribute this software and its
13 documentation for any purpose and without fee is hereby granted,
14 provided that the above copyright notice appear in all copies and that
15 both that copyright notice and this permission notice appear in
16 supporting documentation, and that the names of Digital or MIT not be
17 used in advertising or publicity pertaining to distribution of the
18 software without specific, written prior permission.
20 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
21 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
22 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
23 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
24 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
25 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
26 SOFTWARE.
28 ******************************************************************/
30 #ifndef _XawText_h
31 #define _XawText_h
33 #include <./Xaw3_1TextSink.h>
34 #include <./Xaw3_1TextSrc.h>
36 /****************************************************************
38 * Text widget
40 ****************************************************************/
42 /* Parameters:
44 Name Class RepType Default Value
45 ---- ----- ------- -------------
46 background Background Pixel XtDefaultBackground
47 border BorderColor Pixel XtDefaultForeground
48 borderWidth BorderWidth Dimension 1
49 destroyCallback Callback Pointer NULL
50 dialogHOffset Margin int 10
51 dialogVOffset Margin int 10
52 displayCaret Output Boolean True
53 displayPosition TextPosition int 0
54 editType EditType XtTextEditType XttextRead
55 height Height Dimension font height
56 insertPosition TextPosition int 0
57 leftMargin Margin Dimension 2
58 mappedWhenManaged MappedWhenManaged Boolean True
59 selectTypes SelectTypes Pointer (internal)
60 selection Selection Pointer empty selection
61 sensitive Sensitive Boolean True
62 textSink TextSink Pointer (none)
63 textSource TextSource Pointer (none)
64 width Width Dimension 100
65 x Position int 0
66 y Position int 0
70 #define XtEtextScrollNever "never"
71 #define XtEtextScrollWhenNeeded "whenneeded"
72 #define XtEtextScrollAlways "always"
74 #define XtEtextWrapNever "never"
75 #define XtEtextWrapLine "line"
76 #define XtEtextWrapWord "word"
78 #define XtEtextResizeNever "never"
79 #define XtEtextResizeWidth "width"
80 #define XtEtextResizeHeight "height"
81 #define XtEtextResizeBoth "both"
83 #define XtNautoFill "autoFill"
84 #define XtNbottomMargin "bottomMargin"
85 #define XtNdialogHOffset "dialogHOffset"
86 #define XtNdialogVOffset "dialogVOffset"
87 #define XtNdisplayCaret "displayCaret"
88 #define XtNdisplayPosition "displayPosition"
89 #define XtNinsertPosition "insertPosition"
90 #define XtNleftMargin "leftMargin"
91 #define XtNresize "resize"
92 #define XtNrightMargin "rightMargin"
93 #define XtNscrollVertical "scrollVertical"
94 #define XtNscrollHorizontal "scrollHorizontal"
95 #define XtNselectTypes "selectTypes"
96 #define XtNselection "selection"
97 #define XtNtopMargin "topMargin"
98 #define XtNwrap "wrap"
100 #define XtCAutoFill "AutoFill"
101 #define XtCResize "Resize"
102 #define XtCScroll "Scroll"
103 #define XtCSelectTypes "SelectTypes"
104 #define XtCWrap "Wrap"
106 /* Return Error code for XawTextSearch */
108 #define XawTextSearchError (-12345L)
110 /* Return codes from XawTextReplace */
112 #define XawEditDone 0
113 #define XawEditError 1
114 #define XawPositionError 2
116 extern Atom FMT8BIT;
118 /* Class record constants */
120 extern WidgetClass textWidgetClass;
122 typedef struct _TextClassRec *TextWidgetClass;
123 typedef struct _TextRec *TextWidget;
125 /* other stuff */
127 typedef enum { XawtextScrollNever,
128 XawtextScrollWhenNeeded, XawtextScrollAlways} XawTextScrollMode;
130 typedef enum { XawtextWrapNever,
131 XawtextWrapLine, XawtextWrapWord} XawTextWrapMode;
133 typedef enum { XawtextResizeNever, XawtextResizeWidth,
134 XawtextResizeHeight, XawtextResizeBoth} XawTextResizeMode;
136 typedef enum {XawsdLeft, XawsdRight} XawTextScanDirection;
137 typedef enum {XawtextRead, XawtextAppend, XawtextEdit} XawTextEditType;
138 typedef enum {XawselectNull, XawselectPosition, XawselectChar, XawselectWord,
139 XawselectLine, XawselectParagraph, XawselectAll} XawTextSelectType;
141 typedef struct {
142 int firstPos;
143 int length;
144 char *ptr;
145 Atom format;
146 } XawTextBlock, *XawTextBlockPtr;
147 #ifdef XAW_BC
148 /************************************************************
150 * This Stuff is only for compatibility, and will go away in
151 * future releases. */
153 /* preserved for Back Compatability only. */
155 #define XawTextSource Widget
156 #define XtTextSource Widget
158 #define wordBreak 0x01
159 #define scrollVertical 0x02
160 #define scrollHorizontal 0x04
161 #define scrollOnOverflow 0x08
162 #define resizeWidth 0x10
163 #define resizeHeight 0x20
164 #define editable 0x40
166 typedef long XtTextPosition;
168 #define XtTextBlock XawTextBlock
169 #define XtTextBlockPtr XawTextBlockPtr
171 #define EditDone XawEditDone
172 #define EditError XawEditError
173 #define PositionError XawPositionError
175 #define XtEditDone XawEditDone
176 #define XtEditError XawEditError
177 #define XtPositionError XawPositionError
179 #define XttextRead XawtextRead
180 #define XttextAppend XawtextAppend
181 #define XttextEdit XawtextEdit
182 #define XtTextEditType XawTextEditType
183 #define XtselectNull XawselectNull
185 #define XtselectPosition XawselectPosition
186 #define XtselectChar XawselectChar
187 #define XtselectWord XawselectWord
188 #define XtselectLine XawselectLine
189 #define XtselectParagraph XawselectParagraph
190 #define XtselectAll XawselectAll
191 #define XtTextSelectType XawTextSelectType
193 #define XtTextDisableRedisplay XawTextDisableRedisplay
194 #define XtTextEnableRedisplay XawTextEnableRedisplay
195 #define XtTextGetSource XawTextGetSource
197 #define XtTextDisplay XawTextDisplay
198 #define XtTextDisplayCaret XawTextDisplayCaret
199 #define XtTextSetSelectionArray XawTextSetSelectionArray
200 #define XtTextSetLastPos XawTextSetLastPos
201 #define XtTextGetSelectionPos XawTextGetSelectionPos
202 #define XtTextSetSource XawTextSetSource
203 #define XtTextReplace XawTextReplace
204 #define XtTextTopPosition XawTextTopPosition
205 #define XtTextSetInsertionPoint XawTextSetInsertionPoint
206 #define XtTextGetInsertionPoint XawTextGetInsertionPoint
207 #define XtTextUnsetSelection XawTextUnsetSelection
208 #define XtTextChangeOptions XawTextChangeOptions
209 #define XtTextGetOptions XawTextGetOptions
210 #define XtTextSetSelection XawTextSetSelection
211 #define XtTextInvalidate XawTextInvalidate
213 #define XtDiskSourceCreate XawDiskSourceCreate
214 #define XtDiskSourceDestroy XawDiskSourceDestroy
215 #define XtStringSourceCreate XawStringSourceCreate
216 #define XtStringSourceDestroy XawStringSourceDestroy
218 extern void XawTextChangeOptions(); /* w, options */
219 /* Widget w; */
220 /* int options; */
222 extern int XawTextGetOptions(); /* w */
223 /* Widget w; */
225 extern void XawTextSetLastPos(); /* w, lastPos */
226 /* Widget w; */
227 /* XawTextPosition lastPos; */
229 /*************************************************************/
230 #endif /* XAW_BC */
232 extern void XawTextDisplay(); /* w */
233 /* Widget w; */
235 extern void XawTextEnableRedisplay(); /* w */
236 /* Widget w; */
238 extern void XawTextDisableRedisplay(); /* w */
239 /* Widget w; */
241 extern void XawTextSetSelectionArray(); /* w, sarray */
242 /* Widget w; */
243 /* SelectionType *sarray; */
245 extern void XawTextGetSelectionPos(); /* dpy, w, left, right */
246 /* Widget w; */
247 /* XawTextPosition *left, *right; */
249 extern void XawTextSetSource(); /* dpy, w, source, startPos */
250 /* Widget w; */
251 /* XawTextSource source; */
252 /* XawTextPosition startPos; */
254 extern int XawTextReplace(); /* w, startPos, endPos, text */
255 /* Widget w; */
256 /* XawTextPosition startPos, endPos; */
257 /* XawTextBlock *text; */
259 extern XawTextPosition XawTextTopPosition(); /* w */
260 /* Widget w; */
262 extern void XawTextSetInsertionPoint(); /* w, position */
263 /* Widget w; */
264 /* XawTextPosition position; */
266 extern XawTextPosition XawTextGetInsertionPoint(); /* w */
267 /* Widget w; */
269 extern void XawTextUnsetSelection(); /* w */
270 /* Widget w; */
272 extern void XawTextSetSelection(); /* w, left, right */
273 /* Widget w; */
274 /* XawTextPosition left, right; */
276 extern void XawTextInvalidate(); /* w, from, to */
277 /* Widget w; */
278 /* XawTextPosition from, to; */
280 extern Widget XawTextGetSource() ; /* w */
281 /* Widget w; */
283 extern XawTextPosition XawTextSearch() ; /* w, dir, text */
284 /* Widget w; */
285 /* XawTextScanDirection dir; */
286 /* XawTextBlock *text; */
289 * For R3 compatability only.
292 #include <./Xaw3_1AsciiSrc.h>
293 #include <./Xaw3_1AsciiSink.h>
295 #endif /* _XawText_h */
296 /* DON'T ADD STUFF AFTER THIS #endif */