gtk+3: fix dependencies for new gnome/accessibility/at-spi2-core
[oi-userland.git] / components / x11 / libXaw5 / src / X11 / Text.h
blobb9395efcc6052bf11931e601c863306def66fdb6
1 /* $XConsortium: Text.h,v 1.45 94/04/17 20:13:05 kaleb Exp $ */
3 /***********************************************************
5 Copyright (c) 1987, 1988, 1994 X Consortium
7 Permission is hereby granted, free of charge, to any person obtaining a copy
8 of this software and associated documentation files (the "Software"), to deal
9 in the Software without restriction, including without limitation the rights
10 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11 copies of the Software, and to permit persons to whom the Software is
12 furnished to do so, subject to the following conditions:
14 The above copyright notice and this permission notice shall be included in
15 all copies or substantial portions of the Software.
17 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
21 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
22 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24 Except as contained in this notice, the name of the X Consortium shall not be
25 used in advertising or otherwise to promote the sale, use or other dealings
26 in this Software without prior written authorization from the X Consortium.
29 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
31 All Rights Reserved
33 Permission to use, copy, modify, and distribute this software and its
34 documentation for any purpose and without fee is hereby granted,
35 provided that the above copyright notice appear in all copies and that
36 both that copyright notice and this permission notice appear in
37 supporting documentation, and that the name of Digital not be
38 used in advertising or publicity pertaining to distribution of the
39 software without specific, written prior permission.
41 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
42 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
43 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
44 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
45 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
46 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
47 SOFTWARE.
49 ******************************************************************/
51 #ifndef _XawText_h
52 #define _XawText_h
54 #include <X11/Xaw/Simple.h>
57 Text widget
59 Class: textWidgetClass
60 Class Name: Text
61 Superclass: Simple
63 Resources added by the Text widget:
65 Name Class RepType Default Value
66 ---- ----- ------- -------------
67 autoFill AutoFill Boolean False
68 bottomMargin Margin Position 2
69 displayPosition TextPosition XawTextPosition 0
70 insertPosition TextPosition XawTextPosition 0
71 leftMargin Margin Position 2
72 resize Resize XawTextResizeMode XawTextResizeNever
73 rightMargin Margin Position 4
74 scrollHorizontal Scroll XawTextScrollMode XawtextScrollNever
75 scrollVertical Scroll XawTextScrollMode XawtextScrollNever
76 selectTypes SelectTypes Pointer see documentation
77 textSink TextSink Widget NULL
78 textSource TextSource Widget NULL
79 topMargin Margin Position 2
80 unrealizeCallback Callback Callback NULL
81 wrap Wrap XawTextWrapMode XawTextWrapNever
85 typedef long XawTextPosition;
87 typedef enum { XawtextScrollNever,
88 XawtextScrollWhenNeeded, XawtextScrollAlways} XawTextScrollMode;
90 typedef enum { XawtextWrapNever,
91 XawtextWrapLine, XawtextWrapWord} XawTextWrapMode;
93 typedef enum { XawtextResizeNever, XawtextResizeWidth,
94 XawtextResizeHeight, XawtextResizeBoth} XawTextResizeMode;
96 typedef enum {XawsdLeft, XawsdRight} XawTextScanDirection;
97 typedef enum {XawtextRead, XawtextAppend, XawtextEdit} XawTextEditType;
98 typedef enum {XawselectNull, XawselectPosition, XawselectChar, XawselectWord,
99 XawselectLine, XawselectParagraph, XawselectAll} XawTextSelectType;
101 typedef struct {
102 int firstPos;
103 int length;
104 char *ptr;
105 unsigned long format;
106 } XawTextBlock, *XawTextBlockPtr;
108 #include <X11/Xaw/TextSink.h>
109 #include <X11/Xaw/TextSrc.h>
111 #define XtEtextScrollNever "never"
112 #define XtEtextScrollWhenNeeded "whenneeded"
113 #define XtEtextScrollAlways "always"
115 #define XtEtextWrapNever "never"
116 #define XtEtextWrapLine "line"
117 #define XtEtextWrapWord "word"
119 #define XtEtextResizeNever "never"
120 #define XtEtextResizeWidth "width"
121 #define XtEtextResizeHeight "height"
122 #define XtEtextResizeBoth "both"
124 #define XtNautoFill "autoFill"
125 #define XtNbottomMargin "bottomMargin"
126 #define XtNdialogHOffset "dialogHOffset"
127 #define XtNdialogVOffset "dialogVOffset"
128 #define XtNdisplayCaret "displayCaret"
129 #define XtNdisplayPosition "displayPosition"
130 #define XtNleftMargin "leftMargin"
131 #define XtNrightMargin "rightMargin"
132 #define XtNscrollVertical "scrollVertical"
133 #define XtNscrollHorizontal "scrollHorizontal"
134 #define XtNselectTypes "selectTypes"
135 #define XtNtopMargin "topMargin"
136 #define XtNwrap "wrap"
138 #define XtCAutoFill "AutoFill"
139 #define XtCScroll "Scroll"
140 #define XtCSelectTypes "SelectTypes"
141 #define XtCWrap "Wrap"
143 #ifndef _XtStringDefs_h_
144 #define XtNinsertPosition "insertPosition"
145 #define XtNresize "resize"
146 #define XtNselection "selection"
147 #define XtCResize "Resize"
148 #endif
150 /* Return Error code for XawTextSearch */
152 #define XawTextSearchError (-12345L)
154 /* Return codes from XawTextReplace */
156 #define XawReplaceError -1
157 #define XawEditDone 0
158 #define XawEditError 1
159 #define XawPositionError 2
161 extern unsigned long FMT8BIT;
162 extern unsigned long XawFmt8Bit;
163 extern unsigned long XawFmtWide;
165 /* Class record constants */
167 extern WidgetClass textWidgetClass;
169 typedef struct _TextClassRec *TextWidgetClass;
170 typedef struct _TextRec *TextWidget;
172 _XFUNCPROTOBEGIN
174 extern XrmQuark _XawTextFormat(
175 #if NeedFunctionPrototypes
176 TextWidget /* tw */
177 #endif
180 extern void XawTextDisplay(
181 #if NeedFunctionPrototypes
182 Widget /* w */
183 #endif
186 extern void XawTextEnableRedisplay(
187 #if NeedFunctionPrototypes
188 Widget /* w */
189 #endif
192 extern void XawTextDisableRedisplay(
193 #if NeedFunctionPrototypes
194 Widget /* w */
195 #endif
198 extern void XawTextSetSelectionArray(
199 #if NeedFunctionPrototypes
200 Widget /* w */,
201 XawTextSelectType* /* sarray */
202 #endif
205 extern void XawTextGetSelectionPos(
206 #if NeedFunctionPrototypes
207 Widget /* w */,
208 XawTextPosition* /* begin_return */,
209 XawTextPosition* /* end_return */
210 #endif
213 extern void XawTextSetSource(
214 #if NeedFunctionPrototypes
215 Widget /* w */,
216 Widget /* source */,
217 XawTextPosition /* position */
218 #endif
221 extern int XawTextReplace(
222 #if NeedFunctionPrototypes
223 Widget /* w */,
224 XawTextPosition /* start */,
225 XawTextPosition /* end */,
226 XawTextBlock* /* text */
227 #endif
230 extern XawTextPosition XawTextTopPosition(
231 #if NeedFunctionPrototypes
232 Widget /* w */
233 #endif
236 extern void XawTextSetInsertionPoint(
237 #if NeedFunctionPrototypes
238 Widget /* w */,
239 XawTextPosition /* position */
240 #endif
243 extern XawTextPosition XawTextGetInsertionPoint(
244 #if NeedFunctionPrototypes
245 Widget /* w */
246 #endif
249 extern void XawTextUnsetSelection(
250 #if NeedFunctionPrototypes
251 Widget /* w */
252 #endif
255 extern void XawTextSetSelection(
256 #if NeedFunctionPrototypes
257 Widget /* w */,
258 XawTextPosition /* left */,
259 XawTextPosition /* right */
260 #endif
263 extern void XawTextInvalidate(
264 #if NeedFunctionPrototypes
265 Widget /* w */,
266 XawTextPosition /* from */,
267 XawTextPosition /* to */
268 #endif
271 extern Widget XawTextGetSource(
272 #if NeedFunctionPrototypes
273 Widget /* w */
274 #endif
277 extern XawTextPosition XawTextSearch(
278 #if NeedFunctionPrototypes
279 Widget /* w */,
280 #if NeedWidePrototypes
281 /* XawTextScanDirection */ int /* dir */,
282 #else
283 XawTextScanDirection /* dir */,
284 #endif
285 XawTextBlock* /* text */
286 #endif
289 extern void XawTextDisplayCaret(
290 #if NeedFunctionPrototypes
291 Widget /* w */,
292 #if NeedWidePrototypes
293 /* Boolean */ int /* visible */
294 #else
295 Boolean /* visible */
296 #endif
297 #endif
300 _XFUNCPROTOEND
303 * For R3 compatability only.
306 #include <X11/Xaw/AsciiSrc.h>
307 #include <X11/Xaw/AsciiSink.h>
309 #endif /* _XawText_h */
310 /* DON'T ADD STUFF AFTER THIS #endif */