home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
odtlktv4.zip
/
ODTLKT
/
TOOLKIT
/
IDL
/
ODTYPESM.IDL
< prev
next >
Wrap
Text File
|
1995-12-13
|
15KB
|
536 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 _ODTYPESM_
#define _ODTYPESM_
#ifndef _PLATFORM_OS2_
#define _PLATFORM_MACINTOSH_
#endif
// Platform-specific types. Four byte types are defined as unsigned long,
// rather than
// foreign, so that they can be marshalled. They are not emitted however,
// so that the actual type definitions in ODTypesF.h are used, so that type
// casting is not necessary where these types are used.
typedef unsigned long ODPlatformShape; // Graphics-system-dependent shape data
typedef unsigned long ODPlatformTransform; // Graphics-system-dependent transform data
typedef unsigned long ODRgnHandle;
typedef unsigned long ODgxShape;
typedef unsigned long ODPlatformWindow;
typedef unsigned long ODPlatformMenu;
typedef unsigned long ODPlatformMenuBar;
typedef unsigned long ODOSType;
typedef unsigned long ODPlatformType; // Host platform file & data type
typedef unsigned long ODHandle;
typedef unsigned long ODPlatformDragReference;
#ifdef _PLATFORM_OS2_
typedef unsigned long ODPlatformPrintJob; // ced [119447]
#endif
#ifndef _PLATFORM_OS2_
struct Point { // This is a QuickDraw "Point" structure.
short v; // It's 32 bits, but still a struct, and for things to work
short h; // at runtime, SOM has to _know_ that it's really a struct.
}; // ("Don't fool SOM!" --Erik Eidt) --jpa
struct Rect { // This is a QuickDraw "Rect" structure.
short top;
short left;
short bottom;
short right;
};
#else
typedef unsigned long HPS;
typedef unsigned long HWND;
typedef unsigned long HACCEL;
typedef unsigned long MRESULT;
typedef unsigned long MPARAM;
typedef unsigned long ULONG;
struct OS2POINTL {
long x;
long y;
};
typedef OS2POINTL POINTL;
struct OS2RECTL {
long xLeft;
long yBottom;
long xRight;
long yTop;
};
typedef OS2RECTL RECTL;
struct ACCEL{
unsigned short fs;
unsigned short key;
unsigned short cmd;
};
#define ACCELMAX 20
struct ODACCEL{
ACCEL aAccel[ACCELMAX];
};
#endif
typedef unsigned long DescType;
typedef unsigned long AEEventClass;
typedef unsigned long AEEventID;
typedef long AESendMode;
typedef short AESendPriority;
#ifndef _PLATFORM_OS2_
struct EventRecord {
short what;
long message;
long when;
Point where;
short modifiers;
};
#endif
// End of platform types
#ifndef _ODTYPESB_
#include "ODTypesB.idl"
#endif
#ifndef _GEOTYPES_
#include "GeoTypes.idl"
#endif
#if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPES)
#pragma somemittypes on
#endif
#if defined(_PLATFORM_MACINTOSH_) || defined(_PLATFORM_OS2_)
#ifndef _PLATFORM_OS2_ // should be deleted after clean build - REH ----------------------------------------------
#ifdef __SOMIDL__
typedef void* ODForeign;
#else
typedef unsigned long ODForeign;
#endif /* __SOMIDL__ */
interface ODObjectSpec; // CED 03/17/95
typedef ODForeign ODOSLToken;
#pragma modifier ODOSLToken: impctx = OPENDOC;
#endif //--------------------------------------------------------------------------------------------------------
typedef DescType ODDescType;
#ifndef _PLATFORM_OS2_ // should be deleted after clean build - REH --------------------------------------------
struct ODDesc
{
ODDescType descriptorType;
ODHandle dataHandle;
};
//typedef ODDesc ODObjectSpec;
typedef ODDesc ODAddressDesc;
typedef ODDesc ODDescList;
typedef ODDescList ODRecord;
typedef ODRecord ODOSAEvent;
#endif //--------------------------------------------------------------------------------------------------------
typedef AESendMode ODSendMode;
typedef AESendPriority ODSendPriority;
typedef AEEventClass ODEventClass;
typedef AEEventID ODEventID;
// Types added for OSAObject support
typedef ODULong ODScriptingSubType;
typedef ODULong ODScriptingConnection;
typedef ODULong ODOSAID;
// OS specific types
//
// The following typedefs are OS specific. They are put together in this file for the
// time being. However, they can be put into separate files if desired. For example,
// all the primitive types will be put in ODPlatformMisc.h;
// all graphics system types will be put in ODPlatformGraphics.h;
// all File system types will be put in ODPlatformFiles.h; and so on.
// The advantage of splitting them in separate files is the changing one type will not
// require recompiling all the files which includea ODTypes.h. Also, there may be a lot
// of OS-specific types. If that's the case, we don't want them all in one file.
//
// Text
typedef long ODITextFormat;
struct ODIText {
ODITextFormat format;
ODByteArray text;
};
typedef ODIText ODName;
typedef ODName ODContainerName;
typedef ODName ODDocumentName;
// Imaging
typedef ODHandle ODIconFamily;
// Events
typedef ODUShort ODEventType;
#ifndef _PLATFORM_OS2_
typedef EventRecord ODEventData;
#else
struct ODEventData {
HWND hwnd;
ULONG msg;
MPARAM mp1;
MPARAM mp2;
MRESULT result;
};
#endif
interface ODFrame;
interface ODFacet;
#ifdef _PLATFORM_OS2_
interface ODPlatformCanvas;
#endif
struct ODEventInfo
{
ODFrame embeddedFrame;
ODFacet embeddedFacet;
ODPoint where;
#ifdef _PLATFORM_OS2_
ODULong flags;
#else
ODBoolean propagated;
#endif
};
#ifdef _PLATFORM_OS2_
// opendoc messages
const ODULong OD_PRINT = 0x00000491;
const ODULong OD_HELP = 0x00000492;
// opendoc document shell menu.
const ODSLong HLPM_ODMENU = -4;
// Event info flags
const ODULong kODPropagated = 1;
const ODULong kODInBorder = 2;
const ODULong kODInEmbedded = 3;
#endif
typedef ODULong ODIdleFrequency;
//typedef ODULong ODTimerFrequency;
typedef ODULong ODTime;
// Menus
typedef ODSShort ODMenuID;
typedef ODSShort ODMenuItemID;
typedef ODSLong ODCommandID;
#ifdef _PLATFORM_OS2_
struct ODPlatformMenuItem {
short iPosition;
unsigned short afStyle;
unsigned short afAttribute;
unsigned short id;
unsigned long hwndSubMenu;
unsigned long hItem;
};
//typedef struct ODPlatformMenuItem ODPlatformMenuItem ;
#endif
// @SESH [142206]
//==============================================================================
// Structures defined for OLE menu manipulation
//==============================================================================
struct NewSubMenu{
ODUShort Position;
ODUShort MenuId;
char SubMenuString[40];
char hasSubMenu; // A flag used to find if this sub menu has a cascade menu
};
struct NewMenu{
ODUShort Position;
ODUShort MenuId;
char MenuString[40];
short nSubMenuCount; // no. of items for this menu item on the menu bar
NewSubMenu newsubmenu[20]; // structure contains position and sub menu string
};
// Name Binding
typedef ODISOStr ODEditor; // An opaque type identifying a specific part editor
typedef ODISOStr ODContainerSuite; // An opaque type identifying a specific container suite
typedef ODULong ODUpdateID; // Content change IDs
typedef ODULong ODDraftKey;
// Drag and Drop
#ifndef _PLATFORM_OS2_
typedef ODBoolean ODDragResult;
#else
typedef MRESULT ODDragResult;
#endif
const ODType kODDragImageRegionHandle = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc::DragImage:RegionHandle";
const ODValueType kODHFSPromise = "+//ISO 9070/ANSI::113722::US::CI LABS::OpenDoc::Type:HFSPromise";
// Link Protocol
#ifdef _PLATFORM_OS2_
typedef ODIText ODLinkDescription;
struct ODLinkConnectionData {
ODLinkDescription LinkDesc;
ODIText DocumentName;
ODIText HostName;
};
#endif
typedef ODULong ODPasteAsMergeSetting;
const ODPasteAsMergeSetting kODPasteAsMerge = 1;
const ODPasteAsMergeSetting kODPasteAsEmbed = 3;
const ODPasteAsMergeSetting kODPasteAsMergeOnly = 0;
const ODPasteAsMergeSetting kODPasteAsEmbedOnly = 2;
struct ODLinkInfo
{
ODType kind;
ODTime creationTime;
ODTime changeTime;
ODUpdateID change;
ODBoolean autoUpdate;
};
// Link Dialogs
#ifdef _PLATFORM_MACINTOSH_
struct ODPasteAsResult
{
ODBoolean pasteLinkSetting;
ODBoolean autoUpdateSetting;
ODBoolean mergeSetting;
ODTypeToken selectedView;
ODType selectedKind;
ODType translateKind;
ODEditor editor;
};
#endif
#ifdef _PLATFORM_OS2_
struct ODPasteAsResult
{
ODBoolean pasteLinkSetting;
ODLinkDescription linkdescription;
ODBoolean autoUpdateSetting;
ODBoolean mergeSetting;
ODTypeToken selectedView;
ODType selectedKind;
ODType translateKind;
ODEditor editor;
};
#endif
enum ODLinkInfoAction
{
kODLinkInfoCancel,
kODLinkInfoOk,
kODLinkInfoBreakLink,
kODLinkInfoUpdateNow,
kODLinkInfoFindSource
};
struct ODLinkInfoResult
{
ODLinkInfoAction action;
ODBoolean autoUpdate;
};
#ifdef _PLATFORM_OS2_
// Link Service Dialogs
struct ODMoveCopyResult
{
char* fOldDocPathName;
char* fNewDocPathName;
ODBoolean FileMoved;
ODBoolean FileCopied;
};
#endif
//==============================================================================
// Constants
//==============================================================================
const ODBoolean kODFalse = 0;
const ODBoolean kODTrue = 1;
const ODMenuID kODAppleMenuID = 128;
const ODMenuID kODDocumentMenuID = 129;
const ODMenuID kODEditMenuID = 130;
const ODMenuID kODOCEFileMenuID = 193;
const ODMenuID kODOCEMailerMenuID = 194;
const ODOSType kODDASMenuRsrc = 0x44525652; // 'DRVR';
const ODGraphicsSystem kODQuickDraw = 1; // Macintosh QuickDraw graphics system
const ODGraphicsSystem kODQuickDrawGX = 2; // Macintosh QuickDraw GX graphics system
#ifdef _PLATFORM_OS2_
const ODGraphicsSystem kODGPI = 3; // OS/2 GPI graphics @F1
#endif
const ODEditor kODNoEditor = kODNULL;
const ODUpdateID kODUnknownUpdate = 0;
#ifndef _PLATFORM_OS2_
const ODSShort kODEvtNull = 0; // Té: 0-15 copied from Macintosh: <Events.h>
const ODSShort kODEvtMouseDown = 1;
const ODSShort kODEvtMouseUp = 2;
const ODSShort kODEvtKeyDown = 3;
const ODSShort kODEvtKeyUp = 4;
const ODSShort kODEvtAutoKey = 5;
const ODSShort kODEvtUpdate = 6;
const ODSShort kODEvtDisk = 7;
const ODSShort kODEvtActivate = 8;
const ODSShort kODEvtOS = 15;
const ODSShort kODEvtMenu = 98;
const ODSShort kODEvtMouseDownEmbedded = 99;
// A mouse-down in an embedded frame, or the active border
// Sent to the container
const ODSShort kODEvtMouseUpEmbedded = 100;
// A mouse-up in an embedded frame, or the active border
// Sent to the container
const ODSShort kODEvtMouseDownBorder = 101;
// A mouse-down in an embedded frame, or the active border
// Sent to the container
const ODSShort kODEvtMouseUpBorder = 102;
// A mouse-up in an embedded frame, or the active border
// Sent to the container
const ODSShort kODEvtWindow = 103;
// Used to offer events in title bar to root part
const ODSShort kODEvtMouseEnter = 104;
const ODSShort kODEvtMouseWithin = 105;
const ODSShort kODEvtMouseLeave = 106;
#endif
const ODSShort kODMDInDesk = 0; // Té: 0-8 copied from Macintosh: <Windows.h>
const ODSShort kODMDInMenuBar = 1;
const ODSShort kODMDInSysWindow = 2;
const ODSShort kODMDInContent = 3;
const ODSShort kODMDInDrag = 4;
const ODSShort kODMDInGrow = 5;
const ODSShort kODMDInGoAway = 6;
const ODSShort kODMDInZoomIn = 7;
const ODSShort kODMDInZoomOut = 8;
#ifdef _PLATFORM_OS2_
//==============================================================================
// Registration types KLS: 8/11/94
//==============================================================================
enum OperatingSystem
{
OS2,
AIX,
MAC,
WINDOWS
};
typedef string ISOString;
struct PartKindInfo
{
ISOString partKindName;
string partKindDisplayName;
string filenameFilters;
string filenameTypes;
string categories;
string categoryDisplayName;
string objectID;
};
//==============================================================================
// Registration types - END KLS: 8/11/94
//==============================================================================
#endif
#ifdef _PLATFORM_OS2_
//==============================================================================
// Component Manager types and constants AHT: 4/24/95
//==============================================================================
typedef unsigned long OSType;
const ODULong CMGR_MAX_STRING = 256;
typedef char CMGRString[CMGR_MAX_STRING];
struct ComponentDescription {
OSType componentType;
OSType componentSubType;
OSType componentManufacturer;
ODULong componentFlags;
ODULong componentFlagsMask;
};
struct ComponentRegistryData {
OSType componentType;
OSType componentSubType;
OSType componentManufacturer;
ODULong componentFlags;
ODULong componentVersion;
CMGRString componentDLL; // dll name string
CMGRString componentClassName; // som class name
CMGRString componentName; // name string
CMGRString componentInfo; // info string
};
//==============================================================================
// Component Manager types - END AHT: 4/24/95
//==============================================================================
#endif
#if defined(__SOMIDL__) && defined(EMIT_GLOBAL_TYPES)
#pragma somemittypes off
#endif
#endif // _PLATFORM_MACINTOSH_
module OpenDoc_Global_Types
{
const string OpenDoc_Types_Version = "1.0.";
};
#endif // _ODTYPESM