MyApplication Shell (2.01).h

/*
    File:       MyApplication Shell (2.0).h
    
    Contains:   My Application Shell.
 
    Written by: John Wang
 
    Copyright:  © 1994 by Apple Computer, Inc., all rights reserved.
 
    Change History (most recent first):
 
        <1>     03/14/94    JW      Re-Created for Universal Headers.
 
    To Do:
    
*/
 
#ifdef THINK_C
#define     applec
#endif
 
#define     topLeft(r)      (((Point *) &(r))[0])
#define     botRight(r)     (((Point *) &(r))[1])
 
#define     kMENUBAR            128
#define     kMENU_APPLEID       128
#define     kMENU_FILEID        129
#define     kMENU_FILENEW       1
#define     kMENU_FILEOPEN      2
#define     kMENU_FILECLOSE     4
#define     kMENU_FILESAVE      5
#define     kMENU_FILESAVEAS    6
#define     kMENU_FILEPAGESETUP 8
#define     kMENU_FILEPRINT     9
#define     kMENU_FILEQUIT      11
#define     kMENU_EDITID        130
#define     kMENU_EDITUNDO      1
#define     kMENU_EDITCUT       3
#define     kMENU_EDITCOPY      4
#define     kMENU_EDITPASTE     5
#define     kMENU_EDITCLEAR     6
#define     kMENU_EDITSELECTALL 8
#define     kMENU_EDITSHOWCLIP  10
 
#define     kALERT_ABOUT        128
#define     kALERT_ERROR        129
 
//  You shouldn't have to change this
#define     kWINDOWDOC      1000
#define     kWINDOWCLIP     1002
 
extern      Str255  gMyAboutTitle;
extern      Str255  gMyAboutDesc;
 
/* ------------------------------------------------------------------------- */
 
void            main(void);
 
void            Initialize(void);
void            DoCommand(long mResult);
void            AdjustMenus(void);
void            Finishup(void);
 
void            ShowClip(void);
void            DrawClip(WindowPtr clipWindow);
void            HideClip(WindowPtr clipWindow);
void            ZoomClip(WindowPtr clipWindow, short windowPart);
 
Boolean         ReportError(Str255 procStr, OSErr err);
void            GetGlobalWindow(WindowPtr theWindow, Rect *windowRect);
 
pascal OSErr    AEOpenHandler(AppleEvent *messagein, AppleEvent *reply, long refIn);
pascal OSErr    AEOpenDocHandler(AppleEvent *messagein, AppleEvent *reply, long refIn);
pascal OSErr    AEPrintHandler(AppleEvent *messagein, AppleEvent *reply, long refIn);
pascal OSErr    AEQuitHandler(AppleEvent *messagein, AppleEvent *reply, long refIn);
 
Boolean         IsMyWindow(WindowPtr theWindow);
void            SetMyWindow(WindowPtr theWindow);
Boolean         IsMyClipWindow(WindowPtr theWindow);
void            SetMyClipWindow(WindowPtr theWindow);