home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
odtlktv4.zip
/
ODTLKT
/
TOOLKIT
/
IDL
/
ODTYPESB.IDL
< prev
next >
Wrap
Text File
|
1995-12-13
|
11KB
|
323 lines
/********************************************************************/
/* Licensed Materials - Property of IBM */
/* */
/* */
/* Copyright (C) International Business Machines Corp., 1994. */
/* Copyright (C) Apple Computer, Inc., 1994 */
/* */
/* US Government Users Restricted Rights - */
/* Use, duplication, or disclosure restricted */
/* by GSA ADP Schedule Contract with IBM Corp. */
/* */
/* */
/********************************************************************/
#ifndef _ODTYPESB_
#define _ODTYPESB_
#if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPESB)
#pragma somemittypes on
#endif
const long kODNULL = 0;
//==============================================================================
// 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;
const ODObjectType kODPartObject = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ObjectType:Part";
const ODObjectType kODFrameObject = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ObjectType:Frame";
const ODObjectType kODNonPersistentFrameObject = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ObjectType:NonPersistentFrame";
typedef ODType ODFocusType; // This is a string, which can be tokenized
typedef ODByteArray ODActionData; // Action data for undo/redo
const ODID kODNULLID = 0;
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
const ODGraphicsSystem kODNoGraphicsSystem = 0;
/* Graphics systems are of course platform dependent, but their numeric IDs
should be globally registered to avoid overlaps; otherwise confusion may
occur when documents are moved between platforms, or objects on different
platforms attempt to communicate via DSOM. */
typedef ODSShort ODTransformType;
const ODTransformType kODIdentityXform = 0; // Identity (no-op) transform
const ODTransformType kODTranslateXform = 1; // Pure translation/offset
const ODTransformType kODScaleXform = 2; // Pure scale, no offset
const ODTransformType kODScaleTranslateXform = 3; // Scale and offset
const ODTransformType kODLinearXform = 4; // Scale/rotate/skew, but no offset
const ODTransformType kODLinearTranslateXform= 5; // Linear as above, but with offset
const ODTransformType kODPerspectiveXform = 6; // Perspective: m[0][2]!=0 or m[1][2]!=0
const ODTransformType kODUnknownXform =-1; // Type not known yet [internal use only]
const ODTransformType kODInvalidXform = 7; // Bad matrix [internal use only]
// tokens, viewTypes and presentations
const ODTypeToken kODNullTypeToken = 0;
const ODType kODViewAsSmallIcon = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ViewType:SmallIcon";
const ODType kODViewAsLargeIcon = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ViewType:LargeIcon";
const ODType kODViewAsThumbnail = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ViewType:Thumbnail";
const ODType kODViewAsFrame = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ViewType:Frame";
const ODType kODPresDefault = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:Presentation:Default";
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,
kODDropUnfinished, // Used only when DragAndDrop::StartDrag returns immediately.
kODDropLink
};
const ODULong kODDragIsInSourceFrame = 0x00000001;
const ODULong kODDragIsInSourcePart = 0x00000002;
const ODULong kODDropIsInSourceFrame = kODDragIsInSourceFrame;
const ODULong kODDropIsInSourcePart = kODDragIsInSourcePart;
const ODULong kODDropIsMove = 0x00000004;
const ODULong kODDropIsCopy = 0x00000008;
const ODULong kODDropIsPasteAs = 0x00000010;
const ODULong kODDropIsLink = 0x00000020;
typedef ODULong ODLinkKey;
const ODULong kODNoWait = 0; // For the wait parameter to Lock()
enum ODTranslateResult {
kODCannotTranslate,
kODCanTranslate
};
typedef ODULong ODPlatformTypeSpace; // [120604]
const ODULong kODPosUndefined = 0xFFFFFFFF;
const ODULong kODPosSame = 0x00;
const ODULong kODPosAll = 1;
const ODULong kODPosFirstSib = 2;
const ODULong kODPosLastSib = 3;
const ODULong kODPosNextSib = 4;
const ODULong kODPosPrevSib = 5;
const ODULong kODPosFirstBelow = 6;
const ODULong kODPosLastBelow = 7;
const ODULong kODPosFirstAbove = 8;
const ODULong kODPosLastAbove = 9;
const ODULong kODPosReserved11 = 10;
const ODULong kODPosReserved12 = 11;
const ODULong kODPosReserved13 = 12;
const ODULong kODPosReserved14 = 13;
const ODULong kODPosReserved15 = 14;
const ODULong kODPosMWrap = 0x10;
const ODULong kODPosTop = 0x20;
const ODID kODIDAll = 0;
const ODID kODIndexAll = 0;
const ODID kODIDWild = 0;
const ODValueType kODTypeAll = kODNULL;
typedef void* ODValue;
typedef ODID ODValueIndex;
typedef ODID ODStorageUnitID;
const ODULong kODStorageUnitRefSize = 4;
typedef ODUByte ODStorageUnitRef[kODStorageUnitRefSize];
typedef ODULong ODStorageUnitKey;
const ODStorageUnitKey kODNULLKey = 0;
typedef ODISOStr ODPropertyName;
typedef ODISOStr ODStorageUnitName;
typedef ODULong ODPositionCode;
typedef ODID ODDocumentID;
const ODDocumentID kODDefaultDocument = 1;
enum ODPurgePriority {
kODInvisibleBlocks,
kODAllBlocks,
kODVisibleBlocks
};
enum ODCloneKind {
kODCloneCopy,
kODCloneCut,
kODClonePaste,
kODCloneDropCopy,
kODCloneDropMove,
kODCloneToLink,
#ifndef _PLATFORM_OS2_
kODCloneFromLink
#else // _PLATFORM_OS2_
kODCloneFromLink,
kODCloneAll
#endif
};
enum ODDraftPermissions {
kODDPNone,
kODDPTransient,
kODDPReadOnly,
kODDPSharedWrite,
kODDPExclusiveWrite
};
typedef ODID ODDraftID;
#ifdef _PLATFORM_OS2_
typedef ODID ODLinkID;
#endif
typedef ODISOStr ODDraftName;
const ODContainerType kODDefaultFileContainer = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ContainerType:File";
const ODContainerType kODDefaultMemoryContainer = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:ContainerType:Memory";
const ODContainerType kODBentoFileContainer = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:Bento Container Suite:ContainerType:File";
const ODContainerType kODBentoMemoryContainer = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc:Bento Container Suite:ContainerType:Memory";
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 // _ODTYPESB_