#ifdef __PRIVATE__
//#
//#	File:		WinStatB.idl
//#
//#	Contains:	Class definition for ODBaseWindowState
//#
//#	Owned by:	Richard Rodseth
//#
//#	Copyright:	c 1994 by Apple Computer, Inc., all rights reserved.
//#
//#	Change History (most recent first):
//#
//#		 <6>	  9/1/94	CC		RADAR #1181971 - missing factory methods
//#									(for JBS)
//#		 <5>	 8/25/94	RR		Changed Owned By
//#		 <4>	 8/16/94	JBS		1180387: add CreateCanvas()
//#		 <3>	 8/15/94	JBS		1181138: add frameType to CreateFrame();
//#									1181156: UI API Cleanup
//#		 <2>	 6/16/94	RR		Added function prefix
//#		 <1>	  6/8/94	RR		first checked in
//#		 <1>	  6/8/94	RR		first checked in
//#		 <6>	 5/23/94	RR		Passthru to xh rather than xih
//#
//#	To Do:
//#
#else
//#	Copyright:	c 1993-1994 by Apple Computer, Inc., all rights reserved.
#endif

#ifndef _WINSTATB_
#define _WINSTATB_

#ifndef _ODOBJECT_
#include "ODObject.idl"
#endif

//=====================================================================================
// Classes defined in this interface
//=====================================================================================

interface  ODBaseWindowState;

//=====================================================================================
// Classes used by this interface
//=====================================================================================

interface  ODCanvas;
interface  ODDraft;
interface  ODFacet;
interface  ODFrame;
interface  ODMenuBar;
interface  ODPart;
interface  ODSession;
interface  ODShape;
interface  ODSession;
interface  ODTransform;
interface  ODWindow;
interface  ODWindowIterator;

//=====================================================================================
// ODBaseWindowState
//=====================================================================================


interface ODBaseWindowState :  ODObject
{
	ODWindow RegisterWindow(in ODPlatformWindow newWindow,
							in ODType frameType,
   							in ODBoolean isRootWindow,
							in ODBoolean isResizable,
							in ODBoolean isFloating,
							in ODBoolean shouldSave,
							in ODPart rootPart,
							in ODTypeToken viewType,
							in ODTypeToken presentation,
							in ODFrame sourceFrame);

	ODWindow GetWindow(in ODID id);
    
	void Internalize(in ODDraft draft);
    
	void Externalize(in ODDraft draft);
    
	void SetDefaultWindowTitles(in ODDraft draft);

	void OpenWindows(in ODDraft draft);
    
	void CloseWindows(in ODDraft draft);
    
	ODUShort GetWindowCount();
  
	ODUShort GetRootWindowCount(in ODDraft draft);
  
	ODUShort GetTotalRootWindowCount();

	ODBoolean IsODWindow(in ODPlatformWindow aWindow);
    
	ODWindow  GetODWindow(in ODPlatformWindow aWindow);
  
	ODWindowIterator  CreateWindowIterator();
    
	ODWindow  GetActiveWindow();
  
	void SetBaseMenuBar(in ODMenuBar theMenuBar);
  
	ODMenuBar  CopyBaseMenuBar();

	void AdjustPartMenus();

	ODCanvas CreateCanvas(in ODGraphicsSystem graphicsSystem,
						  in ODPlatformCanvas platformCanvas,
						  in ODBoolean isDynamic,
						  in ODBoolean isOffscreen);

	ODFacet CreateFacet(in ODFrame frame,
					    in ODShape clipShape,
					    in ODTransform externalTransform,
					    in ODCanvas canvas,
					    in ODCanvas biasCanvas);

	ODPlatformWindow CreatePlatformWindow(in ODBoolean isFloating, 
						 in ODULong ulFlags);

#ifdef __PRIVATE__

	void InitBaseWindowState(in ODSession session);
	

#endif

#ifdef __SOMIDL__
	implementation
  	{
  		functionprefix = ODBaseWindowState;

		override:
			somInit,
			somUninit;
			
		releaseorder:
			RegisterWindow,
			GetWindow,
			Internalize,
			Externalize,
			SetDefaultWindowTitles,
			OpenWindows,
			CloseWindows,
			GetWindowCount,
			GetRootWindowCount,
			GetTotalRootWindowCount,
			IsODWindow,
			GetODWindow,
			CreateWindowIterator,
			GetActiveWindow,
			SetBaseMenuBar,
			CopyBaseMenuBar,
			AdjustPartMenus,
			CreateCanvas,
			CreateFacet,
			CreatePlatformWindow,
		#ifdef __PRIVATE__
			InitBaseWindowState;
		#else
			reserved1;
		#endif

		majorversion = 1; minorversion = 0;
		
  };
#endif
};

#endif //# _WINSTATB_
