/* 
Copyright (c) 1991-2000 UserLand Software, Inc. 

Permission is hereby granted, free of charge, to any person obtaining a 
copy of this software and associated documentation files (the 
"Software"), to deal in the Software without restriction, including 
without limitation the rights to use, copy, modify, merge, publish, 
distribute, sublicense, and/or sell copies of the Software, and to 
permit persons to whom the Software is furnished to do so, subject to the 
following conditions: 

The above copyright notice and this permission notice shall be 
included in all copies or substantial portions of the Software. 

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE 
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION 
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 
*/ 


#ifndef __appletmain__
#define __appletmain__

void installmenu (short, MenuHandle *);

void initmenus (void);

void getappdata (WindowPtr, Handle *);

boolean getappwindow (WindowPtr, hdlappwindow *);

boolean findappwindow (Point, hdlappwindow *);

void getappwindowtitle (hdlappwindow, bigstring);

void setappwindowtitle (hdlappwindow, bigstring);

void hideappwindow (hdlappwindow);

void getappwindowfilespec (hdlappwindow, ptrfilespec);

void showappwindow (hdlappwindow);

void selectappwindow (hdlappwindow);

boolean frontappwindow (hdlappwindow);

void updateappwindow (hdlappwindow);
 
void zoomappwindow (hdlappwindow);

void computewindowinfo (WindowPtr, hdlappwindow);

void disposeappwindow (hdlappwindow);

boolean visitappwindows (boolean  (*) ());

boolean selectvisit (hdlappwindow);

boolean selectwindowbytitle (bigstring);

boolean findbytitlevisit (hdlappwindow);

boolean findnthvisit (hdlappwindow);

boolean countwindowsvisit (hdlappwindow);

boolean resetdirtyscrollbarsvisit (hdlappwindow);

boolean resetdirtyscrollbars (void);

boolean getuntitledtitle (bigstring);

boolean setfrontglobalsvisit (hdlappwindow);

boolean setfrontglobals (void);

boolean newuntitledappwindow (boolean);
 
boolean openappwindow (ptrfilespec);

boolean editappwindow (Handle, OSType, AEDesc *, bigstring);

boolean saveappwindow (ptrfilespec);

boolean closeappwindow (hdlappwindow, boolean);

boolean closewindowvisit (hdlappwindow);

boolean closeallwindows (void);

boolean saveaswindow (ptrfilespec);

boolean saveasfrontwindow (void);

boolean savefrontwindow (void);

boolean openfrontwindow (void);

boolean revertfrontwindow (void);

boolean exitmainloop (void);

void adjustmenus (void);

void maineventloop (void);

boolean appserviceeventqueue (void);

boolean mousedoubleclick (Point);

void setselectionstyleinfo (tyselectioninfo *, boolean);

boolean selectallcommand (void);

void appsetfont (bigstring);

void appsetfontsize (short);

void adjustaftergrow (WindowPtr, Rect);

boolean findbyfile (ptrfilespec, hdlappwindow *);

void appleteventhandler (EventRecord *);

void appleteventdispatcher (EventRecord *);

boolean appuseractive (void);

#endif	// __appletmain__