/* @(#)Z 1.8 com/src/include/idl/ODTypesB.idl, odcore, od96nt, odnt9712d 97/03/21 16:45:34 (96/08/26 14:20:09) */


#ifndef _ODTYPESB_
#define _ODTYPESB_

#if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPESB)
#pragma somemittypes on
#endif

//==============================================================================
// Constants
//==============================================================================

// for Undo protocol
enum ODDoneState
{
  kODDone,
  kODUndone,
  kODRedone
};

//==============================================================================
// Scalar Types
//==============================================================================

// Common OD Types

typedef boolean        ODBoolean;    // boolean value. Do not count on its size.
typedef octet          ODUByte;    // unsigned >= 8-bit value
typedef char           ODSByte;    // signed >= 8-bit value
typedef unsigned short ODUShort;    // unsigned >= 16-bit value
typedef short          ODSShort;    // signed >= 16-bit value
typedef unsigned long  ODULong;    // unsigned >= 32-bit value
typedef long           ODSLong;    // signed >= 32-bit value
typedef float          ODFloat;    // floating-point value

typedef void*          ODPtr;      // OD pointer

typedef string  ODISOStr;      // 7 bit ascii. No embedded NULLs. NULL
                    //  terminated.

typedef ODISOStr  ODType;      // Used for storage types, focus types,
                    //  data types, etc.

typedef ODULong   ODTypeToken;    // Tokenized form of ODType

typedef ODULong  ODID;        // Storage Unit IDs

typedef ODULong	ODPersistentObjectID;	// Persistent Object ID used for scripting

typedef ODType    ODValueType;    // Used to identify the type of the value, e.g., TEXT, PICT and so
                    //  on. Obviously, the type doesn't need to be an OSType.

typedef ODSLong  ODError;      // >= 32-bit exception code

typedef ODULong  ODToken;      // >= 32-bit unsigned value for tokens

typedef ODULong  ODSize;      // >= 32-bit unsigned value for size

typedef ODULong   ODInfoType;    // The type for the part info stored in a frame

typedef ODULong  ODFlags;      // >= 32-bit unsigned value for flags

typedef sequence<octet> ODByteArray;	// ODByteArray should be used for foreign types larger than 4 bytes
										// and for variable length data in general

typedef ODByteArray ODContainerID;
typedef ODISOStr ODContainerType;

typedef ODType   ODObjectType;

typedef ODType   ODFocusType;      // This is a string, which can be tokenized

typedef ODByteArray    ODActionData;      // Action data for undo/redo

enum ODFramePosition
{
  kODFrameBehind,
  kODFrameInFront
};

enum ODTraversalType
{
  kODTopDown,
  kODBottomUp,
  kODChildrenOnly
};

enum ODSiblingOrder
{
  kODFrontToBack,
  kODBackToFront
};

enum ODNSTypeSpec
{
  kODNSDataTypeODObject,
  kODNSDataTypeODValue
};

enum ODRespectMarksChoices
{ 
  kODDontRespectMarks,
  kODRespectMarks 
};

enum ODActionType
{
  kODSingleAction,
  kODBeginAction,
  kODEndAction
};

//==============================================================================
// Imaging Types
//==============================================================================

typedef ODSLong     ODFixed;		// 16.16 fixed-point value
typedef ODSLong		ODFract;		//  2.30 fixed-point value

struct ODMatrix       // Transform matrix for translation, scaling,
{ 						// skewing, rotation or any combination.
  ODFixed m[3][3];    // Same as "mapping" in QuickDraw GX.
};

typedef ODSShort     ODGraphicsSystem;    // Type of graphics system

typedef ODSShort ODTransformType;

enum ODPlatformCanvasType
{
  kODNoPlatformCanvas,
  kODPlatformStandardCanvas,
  kODPlatformWindowCanvas
};

enum ODGeometryMode {
	kODLoseGeometry,			// Toss out geometric info to save time or space.
	kODPreserveGeometry,		// Preserve geometric info as long as possible
	kODNeedsGeometry			// Must keep geometric info.
};

enum ODLinkStatus
{
  kODInLinkDestination,
  kODInLinkSource,
  kODNotInLink
};

enum ODHighlight{
	kODNoHighlight,
	kODFullHighlight,
	kODDimHighlight
};

enum  ODDropResult
{
	kODDropFail,
	kODDropCopy,
	kODDropMove,
#ifdef _PLATFORM_OS2_
	kODDropUnfinished,
	kODDropLink
#else  // _PLATFORM_OS2_
	kODDropUnfinished
#endif // not _PLATFORM_OS2_
};

typedef ODULong	ODLinkKey;

enum ODTranslateResult {
	kODCannotTranslate,
	kODCanTranslate
};

typedef ODULong ODPlatformTypeSpace;

typedef void*	ODValue;
typedef ODID	ODValueIndex;
typedef ODID	ODStorageUnitID;

const	ODULong kODStorageUnitRefSize = 4;
typedef ODUByte ODStorageUnitRef[kODStorageUnitRefSize];

typedef ODULong ODStorageUnitKey;

typedef ODISOStr  ODPropertyName;
typedef ODISOStr  ODStorageUnitName;
typedef ODULong ODPositionCode;

typedef  ODID		ODDocumentID;

enum ODPurgePriority {
	kODInvisibleBlocks,
	kODAllBlocks,
	kODVisibleBlocks
}; 

enum ODCloneKind {
	kODCloneCopy,
	kODCloneCut,
	kODClonePaste,
	kODCloneDropCopy,
	kODCloneDropMove,
	kODCloneToLink,
	kODCloneFromLink
};

enum ODDraftPermissions {
	kODDPNone,
	kODDPTransient,
	kODDPReadOnly,
	kODDPSharedWrite,
	kODDPExclusiveWrite
};

typedef	ODID	ODDraftID;
#ifdef _PLATFORM_OS2_
typedef ODID	ODLinkID;
#endif // _PLATFORM_OS2_
typedef	ODISOStr	ODDraftName;

exception ODException {
	ODError	error;
	char	message[256];		// $$$$$ Do we really need this field???
};

#if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPES)
#pragma somemittypes off
#endif

module OpenDoc_Global_TypesB 
{
	const string OpenDoc_Types_Version = "1.0.";
};

#endif 

