Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:14:24

0001 /*
0002 
0003 Copyright 1989, 1994, 1998  The Open Group
0004 
0005 Permission to use, copy, modify, distribute, and sell this software and its
0006 documentation for any purpose is hereby granted without fee, provided that
0007 the above copyright notice appear in all copies and that both that
0008 copyright notice and this permission notice appear in supporting
0009 documentation.
0010 
0011 The above copyright notice and this permission notice shall be included in
0012 all copies or substantial portions of the Software.
0013 
0014 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
0017 OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
0018 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
0019 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
0020 
0021 Except as contained in this notice, the name of The Open Group shall not be
0022 used in advertising or otherwise to promote the sale, use or other dealings
0023 in this Software without prior written authorization from The Open Group.
0024 
0025 */
0026 
0027 
0028 /*
0029  * AsciiSrc.h - Public Header file for Ascii Text Source.
0030  *
0031  * This is the public header file for the Ascii Text Source.
0032  * It is intended to be used with the Text widget, the simplest way to use
0033  * this text source is to use the AsciiText Object.
0034  *
0035  * Date:    June 29, 1989
0036  *
0037  * By:      Chris D. Peterson
0038  *          MIT X Consortium
0039  *          kit@expo.lcs.mit.edu
0040  */
0041 
0042 
0043 #ifndef _XawAsciiSrc_h
0044 #define _XawAsciiSrc_h
0045 
0046 #include <X11/Xaw/TextSrc.h>
0047 
0048 /* Resources:
0049 
0050  Name            Class      RepType     Default Value
0051  ----            -----      -------     -------------
0052  dataCompression     DataCompression    Boolean     True
0053  length          Length     int     (internal)
0054  pieceSize       PieceSize      int     BUFSIZ
0055  string          String     String      NULL
0056  type            Type       XawAsciiType    XawAsciiString
0057  useStringInPlace    UseStringInPlace   Boolean     False
0058 
0059 */
0060 
0061 extern WidgetClass asciiSrcObjectClass;
0062 
0063 typedef struct _AsciiSrcClassRec *AsciiSrcObjectClass;
0064 typedef struct _AsciiSrcRec      *AsciiSrcObject;
0065 
0066 #define AsciiSourceObjectClass AsciiSrcObjectClass
0067 #define AsciiSourceObject      AsciiSrcObject
0068 
0069 /*
0070  * Resource Definitions
0071  */
0072 #define XtCDataCompression "DataCompression"
0073 #define XtCPieceSize "PieceSize"
0074 #define XtCType "Type"
0075 #define XtCUseStringInPlace "UseStringInPlace"
0076 
0077 #define XtNdataCompression "dataCompression"
0078 #define XtNpieceSize "pieceSize"
0079 #define XtNtype "type"
0080 #define XtNuseStringInPlace "useStringInPlace"
0081 
0082 #define XtRAsciiType "AsciiType"
0083 
0084 #define XtEstring "string"
0085 #define XtEfile "file"
0086 
0087 typedef enum {
0088   XawAsciiFile,
0089   XawAsciiString
0090 } XawAsciiType;
0091 
0092 /*
0093  * Public routines
0094  */
0095 
0096 _XFUNCPROTOBEGIN
0097 
0098 /*
0099  * Function:
0100  *  XawAsciiSourceFreeString
0101  *
0102  * Parameters:
0103  *  w - AsciiSrc object
0104  *
0105  * Description:
0106  *    Frees the string returned by a get values call
0107  *           on the string when the source is of type string.
0108  */
0109 void XawAsciiSourceFreeString
0110 (
0111  Widget     w
0112  );
0113 
0114 /*
0115  * Function:
0116  *  XawAsciiSave
0117  *
0118  * Arguments:
0119  *  w - asciiSrc Object.
0120  *
0121  * Description:
0122  *  Saves all the pieces into a file or string as required.
0123  *
0124  * Returns:
0125  *  True if the save was successful
0126  */
0127 Bool XawAsciiSave
0128 (
0129  Widget     w
0130  );
0131 
0132 /*
0133  * Function:
0134  *  XawAsciiSaveAsFile
0135  *
0136  * Parameters:
0137  *  w    - asciiSrc object
0138  *  name - name of the file to save this file into
0139  *
0140  * Description:
0141  *  Save the current buffer as a file.
0142  *
0143  * Returns:
0144  *  True if the save was successful
0145  */
0146 Bool XawAsciiSaveAsFile
0147 (
0148  Widget     w,
0149  _Xconst char   *name
0150  );
0151 
0152 /*
0153  * Function:
0154  *  XawAsciiSourceChanged
0155  *
0156  * Parameters:
0157  *  w - asciiSource object
0158  *
0159  * Description:
0160  *  Returns true if the source has changed since last saved.
0161  *
0162  * Returns:
0163  *  a Boolean (see description)
0164  */
0165 Bool XawAsciiSourceChanged
0166 (
0167  Widget     w
0168  );
0169 
0170 _XFUNCPROTOEND
0171 
0172 #endif /* _XawAsciiSrc_h */