eudora-mac/Editor/Source/Application Headers/pete.h

1 line
32 KiB
C
Raw Normal View History

2018-05-23 09:59:15 +00:00
/* Copyright (c) 2017, Computer History Museum All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. * Neither the name of Computer History Museum nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ #ifndef PETE_H #define PETE_H #if !rez #ifndef PETEINLINE #ifndef __COMPONENTS__ #include <Components.h> #endif #endif #ifndef __CONTROLS__ #include <Controls.h> #endif #ifndef __DRAG__ #include <Drag.h> #endif #ifndef __EVENTS__ #include <Events.h> #endif #ifndef __TEXTEDIT__ #include <TextEdit.h> #endif #ifdef __cplusplus extern "C" { #endif #if PRAGMA_STRUCT_ALIGN #pragma options align=mac68k #endif #if PRAGMA_IMPORT_SUPPORTED #pragma import on #endif #endif // rez #define kPETEComponentManufact 'CSOm' #define kPETEComponentType 'Edit' #define kPETEComponentSubType 'Pete' #define kPETECurrentVersion 0x00140098 /* ResTypes for the clipboard */ #define kPETEParaScrap 'Ppar' #define kPETEStyleScrap 'Psty' #define kPictureScrap 'PICT' #define kStyleScrap 'styl' #define kTextScrap 'TEXT' #define kURLScrap 'url ' /* Flavor types for drags */ #define kPETEA822Flavor 'a822' #define kPETEParaFlavor kPETEParaScrap #define kPETEStyleFlavor kPETEStyleScrap #define flavorTypePict kPictureScrap #define flavorTypeStyle kStyleScrap #define flavorTypeText kTextScrap #define flavorTypeURL kURLScrap #define kPETELastPara LONG_MAX /* Reference to the last paragraph */ #define kPETEInsertionPoint -1L /* Reference to the insertion point */ #define kPETECurrentSelection -1L /* Reference to the current selection */ #define kPETEDefaultMargin -1L /* Reference to the default margin; see editor.h if curious */ #define kPETEOffsetUnknown -2L /* For use with graphics; offset unknown */ #define kPETECurrentStyle -2L /* Reference to the style that the next typed thing will be */ #define kPETEDefaultStyle -3L /* Reference to the document "default style" */ #define kPETEDefaultPara -3L /* Reference to the documents default paragraph info */ #define kPETEDefaultFont -1 #define kPETEDefaultFixed -2 #define kPETEDefaultSize -1 #define kPETERelativeSizeBase -64 #define kPETEFixedTab -1 /* Put into tabCount for a repeated fixed-width tab */ #define kPETELabelShift 20 #define kPETELockShift 16 #define IsPETEDefaultColor(x) (((x).red == 1) && ((x).green == 1) && ((x).blue == 1)) #define SetPETEDefaultColor(x) ((x).red = (x).green = (x).blue = 1) #define RectHeight(x) ((x)->bottom - (x)->top) #define RectWidth(x) ((x)->right - (x)->left) #if !rez /***** The enums *****/ typedef enum { peNoLock = 0x00, /* No lock at all */ peModLock = 0x01