#ifdef __PRIVATE__
//#
//#	File:		MenuBar.idl
//#
//#	Contains:	Class definition for ODWindow
//#
//#	Written by:	Richard Rodseth
//#
//#	Copyright:	c 1994 by Apple Computer, Inc., all rights reserved.
//#
//#	Change History (most recent first):
//#
//#		 <9>	 9/30/94	RR		#1183610 Added fIsDirty
//#		 <8>	 8/15/94	JBS		1181138: add frameType to CreateFrame();
//#									1181156: UI API Cleanup
//#		 <7>	 7/26/94	eeh		ODQDPoint->Point; no lying to SOM
//#		 <6>	 6/28/94	RR		Added override of Release
//#		 <5>	 9/26/94	RR		Added Externalize. Changed SetWindowTitle
//#		 <4>	 6/20/94	jpa		Fixed syntax err in passthru.
//#		 <3>	 6/16/94	RR		Remove function prefix for now
//#		 <2>	 6/16/94	RR		Added function prefix
//#		 <1>	  6/8/94	RR		first checked in
//#		 <1>	  6/8/94	RR		first checked in
//#		 <5>	  6/7/94	RR		Privatise change log
//#		 <1>	  5/9/94	VL		first checked in
//#
//#	To Do:
//#
#else
//#	Copyright:	c 1993-1994 by Apple Computer, Inc., all rights reserved.
#endif

#ifndef _WINDOW_
#define _WINDOW_

#ifndef _WINDOWB_
#include "WindowB.idl"
#endif

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

interface  ODWindow;

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

interface  ODFacet;
interface  ODFrame;
interface  ODPart;
interface  ODStorageUnit;
interface  ODSession;
interface  ODArbitrator;
interface  ODDraft;

#ifdef __PRIVATE__
//=====================================================================================
// Implementation Types
//=====================================================================================

typedef somToken AOCEObj;
typedef somToken POINTL;
#endif

//=====================================================================================
// ODWindow
//=====================================================================================

#ifdef _PLATFORM_MACINTOSH_

interface ODWindow :  ODBaseWindow
{
   	void Select();

	void Update();

#ifdef __PRIVATE__

	void InitWindow(in ODPlatformWindow platformWindow,
					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);
	
	void InitWindowFromStorage(in ODStorageUnit su);
  
  //# Private to implementation
  
   void HandleActivateEvent(inout ODEventData theEvent);
  
   void HandleUpdateEvent(inout ODEventData theEvent);

#ifdef PLATFORM_MACINTOSH
   ODBoolean IsAOCEMailerAware();
   
   void SetAOCEMailerAware(in ODBoolean newState);
   
   AOCEObj*  GetAOCEObj();
   
   void SetAOCEObj(in AOCEObj* theHelper);
#endif

   void  Activate();

   void  Deactivate();

   void  Drag(in POINT startPoint, in RECT draggingBounds);

   void SuspendResume(in ODEventData event);

   void SetWindowTitle(in char* title);

   ODPoint GetWindowPoint(in POINT  globalPoint);

   void SetWasVisible(in ODBoolean wasVisible);

   ODBoolean GetWasVisible();

   void Externalize();

   void SetID(in ODID windowID);

   ODStorageUnit  GetStorageUnit();

   void SetStorageUnit(in ODStorageUnit su);

   ODDraft  GetDraft();

   void CommonInitWindow();
   void CreateRootFrame(in ODType frameType,
   						in ODTypeToken viewType,
						in ODTypeToken presentation);
   void CreateRootFacet();
   void PrepareCanvas();
   void DrawActiveBorder(in ODFrame frame);
#ifdef PLATFORM_MACINTOSH
   ODBoolean HasCloseBox();
   ODBoolean HasZoomBox();
   ODBoolean HasGrowBox();
#endif
   ODSShort GetProcID();
   void GetWindowBounds(out RECT bounds);
   ODSLong GetRefCon();
	void LinkDocShell();

	ODPart  GetRootPart();

	void  SetRootPart(in ODPart aPart);

	void  SetRootFrame(in ODFrame aFrame);

	void  SetRootFacet(in ODFacet aFacet);

	ODSession  GetSession();

	void  SetSession(in ODSession aSession);

	void  SetDraft(in ODDraft aDraft);

	void  SetPlatformWindow(in ODPlatformWindow aWnd);

	ODArbitrator  GetArbitrator();

	void  SetArbitrator(in ODArbitrator anArbitrator);

	void SetIsRootWindow(in ODBoolean isRootWindow);

	void SetIsResizable(in ODBoolean isResizable);

	void SetIsFloating(in ODBoolean isFloating);

#endif

#ifdef __SOMIDL__
	implementation
	{
  		functionprefix = ODWindow;

		override:
			somInit,
			somUninit,
			Release,
			Purge,

			GetPlatformWindow,
			GetSourceFrame,
			GetRootFrame,
			GetFacetUnderPoint,
			IsActive,
			Open,
			Close,
			CloseAndRemove,
			Show,
			Hide,
			IsShown,
			IsResizable,
			IsRootWindow,
			ShouldSave,
			SetShouldSave,
			ShouldShowLinks,
			SetShouldShowLinks,
			AdjustWindowShape,
			GetID,
			IsFloating,
			GetRootFacet;
		
		releaseorder:
			Select,
    		Update,
	#ifdef __PRIVATE__
        InitWindow,
        InitWindowFromStorage,
        HandleActivateEvent,
        HandleUpdateEvent,
        IsAOCEMailerAware,
        SetAOCEMailerAware,
        GetAOCEObj,
        SetAOCEObj,
        Activate,
        Deactivate,
        Drag,
        SuspendResume,
        SetWindowTitle,
        GetWindowPoint,
        SetWasVisible,
        GetWasVisible,
		Externalize,
        SetID,
        GetStorageUnit,
        SetStorageUnit,
        GetDraft,
        CommonInitWindow,
        CreateRootFrame,
        CreateRootFacet,
        PrepareCanvas,
        DrawActiveBorder,
        HasCloseBox,
        HasZoomBox,
        HasGrowBox,
        GetProcID,
        GetWindowBounds,
        GetRefCon,
		LinkDocShell,
			GetRootPart,
			SetRootPart,
			SetRootFrame,
			SetRootFacet,
			GetSession,
			SetSession,
			SetDraft,
			SetPlatformWindow,
	   		GetArbitrator,
			SetArbitrator,
			SetIsRootWindow,
			SetIsResizable,
			SetIsFloating;
	#else
		reserved1, reserved2, reserved3, reserved4, reserved5, reserved6,
		reserved7, reserved8, reserved9, reserved10, reserved11, reserved12,
		reserved13, reserved14, reserved15, reserved16, reserved17, reserved18,
		reserved19, reserved20, reserved21, reserved22, reserved23, reserved24,
		reserved25, reserved26, reserved27, reserved28, reserved29, reserved30, 
		reserved31, reserved32, reserved33, reserved34, reserved35, reserved36,
		reserved37, reserved38, reserved39, reserved40, reserved41, reserved42,
		reserved43, reserved44, reserved45;
	#endif

	majorversion = 1; minorversion = 0;
		
    #ifdef __PRIVATE__

	passthru C_xh = 
		""
		"class AOCEObj;"
		"#include <Windows.h>"
		"";

      ODSession       	fSession;
      ODFrame       	fSourceFrame;
      ODPlatformWindow  fPlatformWindow;
      ODFrame       	fRootFrame;
      ODFacet       	fRootFacet;
      ODBoolean      	fIsRootWindow;
      ODBoolean      	fShouldSave;
      ODBoolean      	fShouldShowLinks;
      ODBoolean      	fIsResizable;
      ODBoolean      	fIsFloating;
      ODBoolean      	fWasVisible;
      ODArbitrator     	fArbitrator;
      ODStorageUnit     fStorageUnit;
	  ODBoolean			fIsDirty;
      ODDraft       	fDraft;
      ODID        		fID;
      ODPart       		fRootPart;
      ODBoolean      	fIsAOCEMailerAware;
      AOCEObj*      	fMailerHelper;
    #endif

  };
#endif
};

#endif //# _PLATFORM_MACINTOSH_

#endif // _WINDOW_
