TextSrcP.h

Go to the documentation of this file.
00001 /*
00002 * $XConsortium: TextSrcP.h,v 1.20 94/04/17 20:13:15 kaleb Exp $
00003 */
00004 
00005 
00006 /***********************************************************
00007 
00008 Copyright (c) 1987, 1988, 1994  X Consortium
00009 
00010 Permission is hereby granted, free of charge, to any person obtaining a copy
00011 of this software and associated documentation files (the "Software"), to deal
00012 in the Software without restriction, including without limitation the rights
00013 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
00014 copies of the Software, and to permit persons to whom the Software is
00015 furnished to do so, subject to the following conditions:
00016 
00017 The above copyright notice and this permission notice shall be included in
00018 all copies or substantial portions of the Software.
00019 
00020 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
00021 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
00022 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
00023 X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
00024 AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00025 CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
00026 
00027 Except as contained in this notice, the name of the X Consortium shall not be
00028 used in advertising or otherwise to promote the sale, use or other dealings
00029 in this Software without prior written authorization from the X Consortium.
00030 
00031 
00032 Copyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
00033 
00034                         All Rights Reserved
00035 
00036 Permission to use, copy, modify, and distribute this software and its 
00037 documentation for any purpose and without fee is hereby granted, 
00038 provided that the above copyright notice appear in all copies and that
00039 both that copyright notice and this permission notice appear in 
00040 supporting documentation, and that the name of Digital not be
00041 used in advertising or publicity pertaining to distribution of the
00042 software without specific, written prior permission.  
00043 
00044 DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
00045 ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
00046 DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
00047 ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
00048 WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
00049 ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
00050 SOFTWARE.
00051 
00052 ******************************************************************/
00053 
00054 /* 
00055  * TextSrcP.h - Private definitions for TextSrc object
00056  * 
00057  */
00058 
00059 #ifndef _XawTextSrcP_h
00060 #define _XawTextSrcP_h
00061 
00062 /***********************************************************************
00063  *
00064  * TextSrc Object Private Data
00065  *
00066  ***********************************************************************/
00067 
00068 #include <X11/Xaw3d/TextSrc.h>
00069 #include <X11/Xaw3d/TextP.h>    /* This source works with the Text widget. */
00070 
00071 /************************************************************
00072  *
00073  * New fields for the TextSrc object class record.
00074  *
00075  ************************************************************/
00076 
00077 typedef struct {
00078   XtPointer             next_extension;
00079   XrmQuark              record_type;
00080   long                  version;
00081   Cardinal              record_size;
00082   int                   (*Input)();
00083 } TextSrcExtRec, *TextSrcExt;
00084 
00085 typedef struct _TextSrcClassPart {
00086   XawTextPosition       (*Read)();
00087   int                   (*Replace)();
00088   XawTextPosition       (*Scan)();
00089   XawTextPosition       (*Search)();
00090   void                  (*SetSelection)();
00091   Boolean               (*ConvertSelection)();
00092 } TextSrcClassPart;
00093 
00094 /* Full class record declaration */
00095 typedef struct _TextSrcClassRec {
00096     ObjectClassPart     object_class;
00097     TextSrcClassPart    textSrc_class;
00098 } TextSrcClassRec;
00099 
00100 extern TextSrcClassRec textSrcClassRec;
00101 
00102 /* New fields for the TextSrc object record */
00103 typedef struct {
00104     /* resources */
00105   XawTextEditType       edit_mode;
00106   XrmQuark              text_format;    /* 2 formats: FMT8BIT for Ascii */
00107                                         /*            FMTWIDE for ISO 10646 */
00108 } TextSrcPart;
00109 
00110 /****************************************************************
00111  *
00112  * Full instance record declaration
00113  *
00114  ****************************************************************/
00115 
00116 typedef struct _TextSrcRec {
00117   ObjectPart    object;
00118   TextSrcPart   textSrc;
00119 } TextSrcRec;
00120 
00121 /******************************************************************
00122  *
00123  * Semiprivate declarations of functions used in other modules
00124  *
00125  ******************************************************************/
00126 
00127 char* _XawTextWCToMB(
00128 #if NeedFunctionPrototypes
00129     Display* /* d */,
00130     wchar_t* /* wstr */,
00131     int*     /* len_in_out */
00132 #endif
00133 );
00134 
00135 wchar_t* _XawTextMBToWC(
00136 #if NeedFunctionPrototypes
00137     Display*  /* d */,
00138     char*     /* str */,
00139     int*      /* len_in_out */
00140 #endif
00141 );
00142 
00143 /************************************************************
00144  *
00145  * Private declarations.
00146  *
00147  ************************************************************/
00148 
00149 typedef Boolean (*_XawBooleanFunc)();
00150 typedef int (*_XawIntFunc)();
00151 typedef XawTextPosition (*_XawTextPositionFunc)();
00152 typedef void (*_XawTextVoidFunc)();
00153 
00154 #define XtInheritInput                ((_XawTextPositionFunc) _XtInherit)
00155 #define XtInheritRead                 ((_XawTextPositionFunc) _XtInherit)
00156 #define XtInheritReplace              ((_XawIntFunc) _XtInherit)
00157 #define XtInheritScan                 ((_XawTextPositionFunc) _XtInherit)
00158 #define XtInheritSearch               ((_XawTextPositionFunc) _XtInherit)
00159 #define XtInheritSetSelection         ((_XawTextVoidFunc) _XtInherit)
00160 #define XtInheritConvertSelection     ((_XawBooleanFunc) _XtInherit)
00161 #define XtTextSrcExtVersion           1
00162 #define XtTextSrcExtTypeString        "XT_TEXTSRC_EXT"
00163 
00164 #endif /* _XawTextSrcP_h */

Generated on Sun Mar 4 15:03:55 2007 for Scilab [trunk] by  doxygen 1.5.1