/* @(#)Z 1.21 com/src/docshell/idl/ODShell.idl, odshell, od96nt, odnt9712d 97/03/21 17:16:17 (96/10/29 09:24:36) */

#ifndef _OPENDOCSHELL_
#define _OPENDOCSHELL_

#include <somobj.idl>

#ifndef _ODTYPESM_
#include "ODTypesM.idl"
#endif

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

interface   OpenDocShell;

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

interface   ODSession;
interface   ODWindowState;
interface   ODWindow;
interface   ODDispatcher;
interface   DocumentManager;
interface   ODPlatformWindow;
interface   somf_TPrimitiveLinkedList;
interface   somf_TPrimitiveLinkedListIterator;
interface   ODDraft;

//==============================================================================
// Implementation Types
//==============================================================================

typedef somToken WindowSystemData;

//==============================================================================
// OpenDocShell
//==============================================================================

interface OpenDocShell :  SOMObject
{
    void			InitOpenDocShell();
    ODBoolean			DispatchEvent(in ODEventData* event);
    void			Terminate();
    DocumentManager		CreateDocumentManager();
    void			DeleteDocumentManager(
						in DocumentManager docMgr);
    void                        UpdateActiveDocumentManager(
						in ODWindow odWindow);
    DocumentManager             GetActiveDocumentManager();
    void                        SetActiveDocumentManager(
                                      in DocumentManager docMgr);
    DocumentManager             GetDocumentManagerOfDraft(in ODDraft draft);
    somf_TPrimitiveLinkedListIterator  CreateDocumentManagerIterator();
    void                        DeleteDocumentManagerIterator(
			              in somf_TPrimitiveLinkedListIterator 
				             docMgrIter);
    ODSession                   GetSession();
    ODDispatcher                GetDispatcher();
    ODWindowState               GetWindowState();
    void			SubClassResponsibility(in char *methodName);
    WindowSystemData*		GetWindowSystemData();
    void			SetWindowSystemData(
					in WindowSystemData* windowSystemData);
    long			GetArgc();
    void			SetArgc(in long argc);
    char**			GetArgv();
    void			SetArgv(in char** argv);

#ifdef __SOMIDL__
    implementation
    {
        majorversion = 1; minorversion = 0;

        functionprefix = OpenDocShell;

        override:
            somUninit;

        releaseorder:
            InitOpenDocShell,
            DispatchEvent,
            Terminate,
            CreateDocumentManager,
            DeleteDocumentManager,
            UpdateActiveDocumentManager,
            GetActiveDocumentManager,
            SetActiveDocumentManager,
            CreateDocumentManagerIterator,
            DeleteDocumentManagerIterator,
            GetSession,
            GetDispatcher,
            GetWindowState,
            SubClassResponsibility,
            GetWindowSystemData,
            SetWindowSystemData,
            GetArgc,
            SetArgc,
            GetArgv,
            SetArgv,
            GetDocumentManagerOfDraft;

           passthru C_xh =
                "#ifndef _ODTYPES_"
                "#include \"ODTypes.h\""
                "#endif"
                "#ifndef SOM_ODWindowState_xh"
                "#include \"WinStat.xh\""
                "#endif"
	        "";

  };
#endif
};

#endif // _OPENDOCSHELL_
