Xaw3_1TextSrc.h revision 749
749N/A/*
749N/A * $XConsortium: TextSrc.h,v 1.4 89/10/31 17:12:42 kit Exp $
749N/A */
749N/A
749N/A/***********************************************************
749N/ACopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts,
749N/Aand the Massachusetts Institute of Technology, Cambridge, Massachusetts.
749N/A
749N/A All Rights Reserved
749N/A
749N/APermission to use, copy, modify, and distribute this software and its
749N/Adocumentation for any purpose and without fee is hereby granted,
749N/Aprovided that the above copyright notice appear in all copies and that
749N/Aboth that copyright notice and this permission notice appear in
749N/Asupporting documentation, and that the names of Digital or MIT not be
749N/Aused in advertising or publicity pertaining to distribution of the
749N/Asoftware without specific, written prior permission.
749N/A
749N/ADIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
749N/AALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
749N/ADIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
749N/AANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
749N/AWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
749N/AARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
749N/ASOFTWARE.
749N/A
749N/A******************************************************************/
749N/A
749N/A#ifndef _XawTextSrc_h
749N/A#define _XawTextSrc_h
749N/A
749N/A/***********************************************************************
749N/A *
749N/A * TextSrc Object
749N/A *
749N/A ***********************************************************************/
749N/A
749N/A#include <X11/Object.h>
749N/A
749N/A/* Resources:
749N/A
749N/A Name Class RepType Default Value
749N/A ---- ----- ------- -------------
749N/A editType EditType XawTextEditType XawtextRead
749N/A
749N/A*/
749N/A
749N/A/* Class record constants */
749N/A
749N/Aextern WidgetClass textSrcObjectClass;
749N/A
749N/Atypedef struct _TextSrcClassRec *TextSrcObjectClass;
749N/Atypedef struct _TextSrcRec *TextSrcObject;
749N/A
749N/Atypedef enum {XawstPositions, XawstWhiteSpace, XawstEOL, XawstParagraph,
749N/A XawstAll} XawTextScanType;
749N/Atypedef enum {Normal, Selected }highlightType;
749N/Atypedef enum {XawsmTextSelect, XawsmTextExtend} XawTextSelectionMode;
749N/Atypedef enum {XawactionStart, XawactionAdjust, XawactionEnd}
749N/A XawTextSelectionAction;
749N/A
749N/Atypedef long XawTextPosition;
749N/A
749N/A/*
749N/A * Error Conditions:
749N/A */
749N/A
749N/A#define XawTextReadError -1
749N/A#define XawTextScanError -1
749N/A
749N/A/************************************************************
749N/A *
749N/A * Public Functions.
749N/A *
749N/A ************************************************************/
749N/A
749N/A/* Function Name: XawTextSourceRead
749N/A * Description: This function reads the source.
749N/A * Arguments: w - the TextSrc Object.
749N/A * pos - position of the text to retreive.
749N/A * RETURNED text - text block that will contain returned text.
749N/A * length - maximum number of characters to read.
749N/A * Returns: The number of characters read into the buffer.
749N/A */
749N/A
749N/AXawTextPosition XawTextSourceRead(/* w, pos, text, length */);
749N/A/*
749N/AWidget w;
749N/AXawTextPosition pos;
749N/AXawTextBlock *text;
749N/Aint length;
749N/A*/
749N/A
749N/A/* Function Name: XawTextSourceReplace.
749N/A * Description: Replaces a block of text with new text.
749N/A * Arguments: src - the Text Source Object.
749N/A * startPos, endPos - ends of text that will be removed.
749N/A * text - new text to be inserted into buffer at startPos.
749N/A * Returns: XawEditError or XawEditDone.
749N/A */
749N/A
749N/Aint XawTextSourceReplace (/* w, startPos, endPos, text */);
749N/A/*
749N/AWidget w;
749N/AXawTextPosition startPos, endPos;
749N/AXawTextBlock *text;
749N/A*/
749N/A
749N/A/* Function Name: XawTextSourceScan
749N/A * Description: Scans the text source for the number and type
749N/A * of item specified.
749N/A * Arguments: w - the TextSrc Object.
749N/A * position - the position to start scanning.
749N/A * type - type of thing to scan for.
749N/A * dir - direction to scan.
749N/A * count - which occurance if this thing to search for.
749N/A * include - whether or not to include the character found in
749N/A * the position that is returned.
749N/A * Returns: The position of the text.
749N/A *
749N/A */
749N/A
749N/AXawTextPosition XawTextSourceScan(/* w, position, type, dir, count, include*/);
749N/A/*
749N/AWidget w;
749N/AXawTextPosition position;
749N/AXawTextScanType type;
749N/AXawTextScanDirection dir;
749N/Aint count;
749N/ABoolean include;
749N/A*/
749N/A
749N/A/* Function Name: XawTextSourceSearch
749N/A * Description: Searchs the text source for the text block passed
749N/A * Arguments: w - the TextSource Object.
749N/A * position - the position to start scanning.
749N/A * dir - direction to scan.
749N/A * text - the text block to search for.
749N/A * Returns: The position of the text we are searching for or
749N/A * XawTextSearchError.
749N/A */
749N/A
749N/AXawTextPosition XawTextSourceSearch(/* w, position, dir, text */);
749N/A/*
749N/AWidget w;
749N/AXawTextPosition position;
749N/AXawTextScanDirection dir;
749N/AXawTextBlock * text;
749N/A*/
749N/A
749N/A/* Function Name: XawTextSourceConvertSelection
749N/A * Description: Dummy selection converter.
749N/A * Arguments: w - the TextSrc object.
749N/A * selection - the current selection atom.
749N/A * target - the current target atom.
749N/A * type - the type to conver the selection to.
749N/A * RETURNED value, length - the return value that has been converted.
749N/A * RETURNED format - the format of the returned value.
749N/A * Returns: TRUE if the selection has been converted.
749N/A *
749N/A */
749N/A
749N/ABoolean XawTextSourceConvertSelection(/* w, selection, target,
749N/A type, value, length, format */);
749N/A/*
749N/AWidget w;
749N/AAtom * selection, * target, * type;
749N/Acaddr_t * value;
749N/Aunsigned long * length;
749N/Aint * format;
749N/A*/
749N/A
749N/A/* Function Name: XawTextSourceSetSelection
749N/A * Description: allows special setting of the selection.
749N/A * Arguments: w - the TextSrc object.
749N/A * left, right - bounds of the selection.
749N/A * selection - the selection atom.
749N/A * Returns: none
749N/A */
749N/A
749N/Avoid XawTextSourceSetSelection(/* w, left, right, selection */);
749N/A/*
749N/AWidget w;
749N/AXawTextPosition left, right;
749N/AAtom selection;
749N/A*/
749N/A
749N/A#ifdef XAW_BC
749N/A/*************************************************************
749N/A * For Compatibility only. */
749N/A
749N/A#define _XtTextSink _XawTextSink
749N/A#define _XtTextSource _XawTextSource
749N/A
749N/A#define XtisOn XawisOn
749N/A#define XtisOff XawisOff
749N/A
749N/A#define XtsmTextSelect XawsmTextSelect
749N/A#define XtsmTextExtend XawsmTextExtend
749N/A
749N/A#define XtactionStart XawactionStart
749N/A#define XtactionAdjust XawactionAdjust
749N/A#define XtactionEnd XawactionEnd
749N/A
749N/A#define XtsdLeft XawsdLeft
749N/A#define XtsdRight XawsdRight
749N/A
749N/A#define XtstPositions XawstPositions
749N/A#define XtstWhiteSpace XawstWhiteSpace
749N/A#define XtstEOL XawstEOL
749N/A#define XtstParagraph XawstParagraph
749N/A#define XtstAll XawstAll
749N/A
749N/A#define XtTextSelectionAction XawTextSelectionAction
749N/A#define XtTextSelection XawTextSelection
749N/A#define XtTextScanDirection XawTextScanDirection
749N/A#define XtTextScanType XawTextScanType
749N/A
749N/A
749N/A/*************************************************************/
749N/A#endif /* XAW_BC */
749N/A
749N/A#endif /* _XawTextSrc_h */
749N/A/* DON'T ADD STUFF AFTER THIS #endif */