Annotation of researchv9/X11/src/X.V11R1/clients/xedit/xedit.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  *     rcs_id[] = "$Header: xedit.h,v 1.8 87/09/11 08:22:22 toddb Exp $";
                      3:  */
                      4: 
                      5: /*
                      6:  *                       COPYRIGHT 1987
                      7:  *                DIGITAL EQUIPMENT CORPORATION
                      8:  *                    MAYNARD, MASSACHUSETTS
                      9:  *                     ALL RIGHTS RESERVED.
                     10:  *
                     11:  * THE INFORMATION IN THIS SOFTWARE IS SUBJECT TO CHANGE WITHOUT NOTICE AND
                     12:  * SHOULD NOT BE CONSTRUED AS A COMMITMENT BY DIGITAL EQUIPMENT CORPORATION.
                     13:  * DIGITAL MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THIS SOFTWARE FOR
                     14:  * ANY PURPOSE.  IT IS SUPPLIED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.
                     15:  *
                     16:  * IF THE SOFTWARE IS MODIFIED IN A MANNER CREATING DERIVATIVE COPYRIGHT RIGHTS,
                     17:  * APPROPRIATE LEGENDS MAY BE PLACED ON THE DERIVATIVE WORK IN ADDITION TO THAT
                     18:  * SET FORTH ABOVE.
                     19:  *
                     20:  *
                     21:  * Permission to use, copy, modify, and distribute this software and its
                     22:  * documentation for any purpose and without fee is hereby granted, provided
                     23:  * that the above copyright notice appear in all copies and that both that
                     24:  * copyright notice and this permission notice appear in supporting documentation,
                     25:  * and that the name of Digital Equipment Corporation not be used in advertising
                     26:  * or publicity pertaining to distribution of the software without specific, 
                     27:  * written prior permission.
                     28:  */
                     29: 
                     30: 
                     31: #include <stdio.h>
                     32: #include <strings.h>
                     33: #include <sys/file.h>
                     34: 
                     35: #ifdef X11
                     36: #include <X11/Xlib.h>
                     37: #include <X11/cursorfont.h>
                     38: #include <X11/Xtlib.h>
                     39: #include <X11/TextDisp.h>
                     40: #endif X11
                     41: 
                     42: #ifdef X10
                     43: #include <Xlib.h>
                     44: #include <Xtlib.h>
                     45: #include <TextDisp.h>
                     46: #endif X10
                     47: 
                     48: #define max(a,b) (((a) > (b)) ? (a) : (b))
                     49: #define min(a,b) (((a) < (b)) ? (a) : (b))
                     50: /* Handle enums that are in process of being changed ... */
                     51: 
                     52: #ifdef X11
                     53: #define QRootWindow            RootWindow
                     54: #define Feep()                 XBell(CurDpy, 50)
                     55: #define QXFetchBuffer          XFetchBuffer
                     56: #define QXDefineCursor         XDefineCursor
                     57: #define QXStoreName            XStoreName
                     58: #define QXtButtonBoxCreate     XtButtonBoxCreate
                     59: #define QXtButtonBoxAddButton  XtButtonBoxAddButton
                     60: #define QXtButtonBoxGetValues  XtButtonBoxGetValues
                     61: #define QXtLabelCreate         XtLabelCreate
                     62: #define QXtLabelSetValues      XtLabelSetValues
                     63: #define QXtTextSourceCreate    XtTextSourceCreate
                     64: #define QXtVPanedRefigureMode  XtVPanedRefigureMode
                     65: #define QXtVPanedWindowAddPane XtVPanedWindowAddPane
                     66: #define QXtVPanedWindowCreate  XtVPanedWindowCreate
                     67: #define QXtTextGetInsertionPoint XtTextGetInsertionPoint
                     68: #define QXtTextReplace         XtTextReplace   
                     69: #define QXtTextUnsetSelection  XtTextUnsetSelection
                     70: #define QXtTextSetNewSelection XtTextSetNewSelection
                     71: #define QXtTextSetInsertionPoint XtTextSetInsertionPoint
                     72: #define QXtTextNewSource       XtTextNewSource
                     73: #define QXtButtonBoxDeleteButton XtButtonBoxDeleteButton
                     74: #define QXtCommandCreate       XtCommandCreate
                     75: #define QXtTextStringCreate    XtTextStringCreate
                     76: #define QXtTextInvalidate      XtTextInvalidate
                     77: #define QXMapWindow            XMapWindow
                     78: #define QXUnmapWindow          XUnmapWindow
                     79: #define QXNextEvent            XNextEvent
                     80: #define QXtGetResources                XtGetResources
                     81: #endif X11
                     82: 
                     83: #ifdef X10
                     84: #define XtsdRight                      sdRIGHT
                     85: #define XtsdLeft                       sdLEFT
                     86: #define XtstPositions                  stPOSITIONS
                     87: #define XtstEOL                                stEOL
                     88: #define XtstParagraph                  stPARAGRAPH
                     89: #define XtstWhiteSpace                 stWHITESPACE
                     90: #define XtstFile                       stFILE
                     91: #define Feep()                         XFeep(0)
                     92: #define QRootWindow(dpy, scrn)         RootWindow
                     93: #define QXFetchBuffer(disp, buf, num)  XFetchBuffer(buf, num)
                     94: #define QXMapWindow(dpy, win)          XMapWindow(win)
                     95: #define QXUnmapWindow(dpy, win)                XUnmapWindow(win)
                     96: #define QXNextEvent(dpy, event)                XNextEvent(event)
                     97: #define QXDefineCursor(dpy, win, cur)  XDefineCursor(win, cur)
                     98: #define QXStoreName(dpy, win, name)    XStoreName(win, name)
                     99: #define QXtButtonBoxCreate(dpy,win,arg,num) XtButtonBoxCreate(win, arg, num)
                    100: #define QXtButtonBoxAddButton(d,w,a,n) XtButtonBoxAddButton(w,a,n)
                    101: #define QXtButtonBoxGetValues(d,w,a,n) XtButtonBoxGetValues(w,a,n)
                    102: #define QXtLabelCreate(d,w,a,n)                XtLabelCreate(w,a,n)
                    103: #define QXtLabelSetValues(d,w,a,n)     XtLabelSetValues(w,a,n)
                    104: #define QXtTextSourceCreate(d,w,a,n,s) XtTextSourceCreate(w,a,n,s)
                    105: #define QXtVPanedRefigureMode(d,w,r)   XtVPanedRefigureMode(w,r)
                    106: #define QXtVPanedWindowAddPane(d,p,w,i,x,y,r) XtVPanedWindowAddPane(p,w,i,x,y,r)
                    107: #define QXtVPanedWindowCreate(d,w,a,n) XtVPanedWindowCreate(w,a,n)
                    108: #define QXtTextGetInsertionPoint(d,w)  XtTextGetInsertionPoint(w)
                    109: #define QXtTextSetInsertionPoint(d,w,i)        XtTextSetInsertionPoint(w,i)
                    110: #define QXtTextReplace(d,w,b,e,t)      XtTextReplace(w,b,e,t)
                    111: #define QXtTextUnsetSelection(d,w)     XtTextUnsetSelection(w)
                    112: #define        QXtTextSetNewSelection(d,w,b,e) XtTextSetNewSelection(w,b,e)    
                    113: #define QXtTextNewSource(d,w,s,i)      XtTextNewSource(w,s,i)
                    114: #define QXtButtonBoxDeleteButton(d,w,a,n) XtButtonBoxDeleteButton(w,a,n) 
                    115: #define QXtCommandCreate(d,w,a,n)      XtCommandCreate(w,a,n)
                    116: #define QXtTextStringCreate(d,w,a,n)   XtTextStringCreate(w,a,n)
                    117: #define QXtTextInvalidate(d,w,f,t)     XtTextInvalidate(w,f,t)
                    118: #define QXtGetResources(dpy,a,b,c,d,e,f,g,h,i) XtGetResources(a,b,c,d,e,f,g,h,i)
                    119: #define XrmResourceDataBase            ResourceDataBase
                    120: #define XrmRInt                                XtRInt  
                    121: #define XrmRBoolean                    XtRBoolean
                    122: #define XrmRString                     XtRString
                    123: #define  XrmNameList                   XtNameList
                    124: #define  XrmClassList                  XtClassList
                    125: #define XrmOptionDescRec               OptionDescRec
                    126: #define XrmoptionStickyArg             XtoptionStickyArg
                    127: #define XrmGetDataBase                 XtGetDataBase
                    128: #define XrmSetCurrentDataBase          XtSetCurrentDataBase
                    129: #define XrmParseCommand                        XtParseCommand
                    130: #endif X10
                    131: 
                    132: 
                    133: #define MakeArg(n, v){         args[numargs].name = n;         \
                    134:                                args[numargs].value = v;        \
                    135:                                numargs++;                      \
                    136:                      }
                    137: 
                    138: /*     misc externs    */
                    139: extern XtTextSource *TCreateISSource();
                    140: extern XtTextSource *CreatePSource();
                    141: extern XtTextSource *TCreateApAsSource();
                    142: extern DestroyPSource();
                    143: extern PSchanges();
                    144: extern TDestroyApAsSource();
                    145: extern char *malloc();
                    146: extern char *realloc();
                    147: extern char *calloc();
                    148: 
                    149: 
                    150: /*     externs in xedit.c      */
                    151: extern Window  searchstringwindow;
                    152: extern Window editbutton;
                    153: extern char *filename;
                    154: extern char *savedfile;
                    155: extern char *loadedfile;
                    156: extern Editable;
                    157: extern backedup;
                    158: extern saved;
                    159: extern lastChangeNumber;
                    160: extern Window Row1;
                    161: extern char *searchstring;
                    162: extern char *replacestring;
                    163: extern Window master;
                    164: extern Window textwindow;
                    165: extern Window messwindow;
                    166: extern Window labelwindow;
                    167: extern XtTextSource *source, *asource, *dsource, *psource, *messsource;
                    168: extern editInPlace;
                    169: extern enableBackups;
                    170: extern char *backupNamePrefix;
                    171: extern char *backupNameSuffix;
                    172: 
                    173: extern Display *CurDpy;
                    174: 
                    175: 
                    176: /*     externals in util.c     */
                    177: extern DoLine();
                    178: extern DoJump();
                    179: extern XeditPrintf();
                    180: extern setWidgetValue();
                    181: extern getWidgetValue();
                    182: extern Window makeCommandButton();
                    183: extern Window makeBooleanButton();
                    184: extern Window makeStringBox();
                    185: extern FixScreen();
                    186: 
                    187: /*     externs in commands.c   */
                    188: extern DoQuit();
                    189: extern DoReplaceOne();
                    190: extern DoReplaceAll();
                    191: extern DoSearchRight();
                    192: extern DoSearchLeft();
                    193: extern DoUndo();
                    194: extern DoUndoMore();
                    195: extern DoSave();
                    196: extern DoLoad();
                    197: extern DoEdit();

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.