ftp.nice.ch/pub/next/developer/languages/smalltalk/squeak-2.0-0.3d109.s.tar.gz#/squeak-2.0/nextstep/SqApplication.h

This is SqApplication.h in view mode; [Download] [Up]

/******************************************************************************
FILE
    SqApplication.h
DESCRIPTION
	NeXTstep user Interface for Squeak.
AUTHOR
	<PJB> Pascal J. Bourguignon
MODIFICATIONS
	1998/06/12 <PJB> Creation.
LEGAL
	Copyright Pascal J. Bourguignon 1998 - 1998

	This program is free software; you can redistribute it and/or
	modify it under the terms of the version 2 of the GNU General Public 
	License as published by the Free Software Foundation.
	
	This program is distributed in the hope that it will be useful, but 
	WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
	or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License 
	hereafter for more details.
******************************************************************************/
#import <appkit/appkit.h>
#import "BoTypes.h"
#import "sq.h"
#import "SqPreference.h"
#import "SqButton.h"
#import "SqView.h"


//---------------------------------------------------------------------------//

@interface SqApplication:Application
{
@public //  We allow the sq module to send directly to our view.
	SqView*             view;
@protected
	Window*             plainWindow;
	Window*             titledWindow;
	int                 originalLevel; // of plainWindow.
	SqPreference*       preferences;
	
	struct timeval      startUpTime;
	
	Pasteboard*         board;
	char*               boardData;
	int                 boardLength;
	int                 boardChangeCount;
	int                 boardReadTypesCount;
	const char*         boardReadTypes[8];
	int                 boardWriteTypesCount;
	const char*         boardWriteTypes[8];

// About Panel:
	id                  versionTextField;

@private
	BOOL                startSqueak;
	BOOL                terminateFromSqueak;
	char                specialAttribute[32];
	char                squeakVersionString[256];
}


// Object methods:

	-(id)init;

// NXNibNotification methods:

	-awakeFromNib;

// Application methods:

	-sendEvent:(NXEvent*)event;

// Application delegate methods:
	
	-appWillInit:sender;
	-appDidInit:sender;
		/*
			NOTE:	If a delegate is added to implement this method, then it 
					must send these messages back to the application before 
					doing its own processing.
		*/
		
	-appWillTerminate:sender;
		/*
			DO:		When invoked because squeakTerminate: was sent, 
					return self. When invoked because terminate: was sent, 
					ask the user before returning either self or 0, 
					depending on the user choice.
		*/

// SqApplication methods:

	-(void)squeakTerminate;
		/*
			DO:		This method will terminate the application without 
					question. See comment of appWillTerminate:. 
		*/

	-(const char*)versionString;
	-(const char*)squeakVersionString;
	
	-openPreferences:sender;
	-(SqPreference*)preferences;
	

	-(void)prepareFullScreen:(BOOL)fullScreen noTitle:(BOOL)noTitle;
		/*
			DO:		set up the window according to the fullScreen 
					and noTitle	parameters.
		*/

	-(void)setSqueakScreen;
		/*
			DO:		take the noTitle and the fullScreen preferences into 
					account (changing the window). 
					(using prepareFullScreen:noTitle:)
					The button settings are automatically enforced by the
					preferences object, and the other settings are saved
					in the defaults for the following invocations of the 
					application.
		*/

// Internal methods:
	-(void)removeCommandKeysEquivalentsFromTheMenu:(Menu*)menu;
	-(void)removeCommandKeysEquivalentsFromMenus;
@end // SqApplication.

//---------------------------------------------------------------------------//

@interface SqApplication(APIforSqueak)

/* display,mouse,keyboard,time i/o */
	
	-(int)ioBeep;
	-(int)ioExit;
	-(int)ioMicroMSecs;
	-(int)ioMSecs;
	-(int)ioProcessEvents;
	-(int)ioRelinquishProcessorForMicroseconds:(int)microSeconds;
	-(int)ioSeconds;
	
/* image file and VM path names */
	-(int)imageNameSize;
	-(int)imageNameGet:(int)sqImageNameIndex Length:(int)length;
	-(int)imageNamePut:(int)sqImageNameIndex Length:(int)length;
	-(int)vmPathSize;
	-(int)vmPathGet:(int)sqVMPathIndex Length:(int)length;
	
/* clipboard (cut/copy/paste) */
	-(int)clipboardSize;
	-(int)clipboardRead:(int)count 
			Into:(int)byteArrayIndex At:(int)startIndex;
	-(int)clipboardWrite:(int)count 
			From:(int)byteArrayIndex At:(int)startIndex;
	
/* profiling */
	-(int)clearProfile;
	-(int)dumpProfile;
	-(int)startProfiling;
	-(int)stopProfiling;
	
/* system attributes */
	-(int)attributeSize:(int)ident;
	-(int)getAttribute:(int)ident Into:(int)byteArrayIndex Length:(int)length;

@end // SqApplication(APIforSqueak).

//---------------------------------------------------------------------------//
/*** SqApplication.h / Thu Aug 27 23:19:55 MET 1998 / PJB ***/


These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.