mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-08-20 11:28:59 +00:00
1 line
7.1 KiB
C
1 line
7.1 KiB
C
|
/********************************************
*
* Dialog Manager
*
* Copyright Apple Computer, Inc.1986-90
* All Rights Reserved
*
* Copyright 1992, Byte Works, Inc.
*
********************************************/
#ifndef __TYPES__
#include <TYPES.h>
#endif
#ifndef __DIALOG__
#define __DIALOG__
/* Error Codes */
#define badItemType 0x150A
#define newItemFailed 0x150B
#define itemNotFound 0x150C
#define notModalDialog 0x150D
/* Command Codes */
#define getInitView 0x0001
#define getInitTotal 0x0002
#define getInitValue 0x0003
#define scrollLineUp 0x0004
#define scrollLineDown 0x0005
#define scrollPageUp 0x0006
#define scrollPageDown 0x0007
#define scrollThumb 0x0008
/* Item Type Codes */
#define buttonItem 0x000A
#define checkItem 0x000B
#define radioItem 0x000C
#define scrollBarItem 0x000D
#define userCtlItem 0x000E
#define statText 0x000F
#define longStatText 0x0010
#define editLine 0x0011
#define iconItem 0x0012
#define picItem 0x0013
#define userItem 0x0014
#define userCtlItem2 0x0015
#define longStatText2 0x0016
#define itemDisable 0x8000
/* Item Type Ranges */
#define minItemType 0x000A
#define maxItemType 0x0016
/* ItemID Codes */
#define ok 0x0001
#define cancel 0x0002
/* Part Codes */
#define inButton 0x0002
#define inCheckBox 0x0003
#define inRadioButton 0x0004
#define inUpArrow 0x0005
#define inDownArrow 0x0006
#define inPageUp 0x0007
#define inPageDown 0x0008
#define inStatText 0x0009
#define inGrow 0x000A
#define inEditLine 0x000B
#define inUserItem 0x000C
#define inLongStatText 0x000D
#define inIconItem 0x000E
#define inLongStatText2 0x000F
#define inThumb 0x0081
/* Stage Bit Vectors */
#define okDefault 0x0000
#define cancelDefault 0x0040
#define alertDrawn 0x0080
/* Other Constants */
#ifndef atItemListLength /* AlertTemplate - Default number of Item Templates */
#define atItemListLength 0x0005
#endif
#ifndef dtItemListLength /* DialogTemplate - Default number of Item Templates */
#define dtItemListLength 0x0008
#endif
typedef GrafPortPtr DialogPtr;
struct ItemTemplate {
Word itemID;
Rect itemRect;
Word itemType;
Pointer itemDescr;
Word itemValue;
Word itemFlag;
Pointer itemColor; /* pointer to appropriate type of color table */
};
typedef struct ItemTemplate ItemTemplate, *ItemTempPtr, **ItemTempHndl;
struct AlertTemplate {
Rect atBoundsRect;
Word atAlertID;
Byte atStage1;
Byte atStage2;
Byte atStage3;
Byte atStage4;
ItemTempPtr atItemList[atItemListLength]; /* Null terminated array */
};
typedef struct AlertTemplate AlertTemplate, *AlertTempPtr, **AlertTempHndl;
struct DialogTemplate {
Rect dtBoundsRect;
Boolean dtVisible;
Longint dtRefCon;
ItemTempPtr dtItemList[dtItemListLength]; /* Null terminated array */
};
typedef struct DialogTemplate DialogTemplate, *DlgTempPtr, **DlgTempHndl;
struct UserCtlItemPB {
LongProcPtr defProcParm;
Pointer titleParm;
Word param2;
Word param1;
};
typedef struct UserCtlItemPB UserCtlItemPB, *UserCtlItemPBPtr, **UserCtlItemPBHndl;
extern pascal void DialogBootInit(void) inline(0x0115,dispatcher);
extern pascal void DialogStartUp(Word) inline(0x0215,dispatcher);
extern pascal void DialogShutDown(void) inline(0x0315,dispatcher);
extern pascal Word DialogVersion(void) inline(0x0415,dispatcher);
extern pascal void DialogReset(void) inline(0x0515,dispatcher);
extern pascal Boolean DialogStatus(void) inline(0x0615,dispatcher);
extern pascal Word Alert(AlertTempPtr, WordProcPtr) inline(0x1715,dispatcher);
extern pascal Word CautionAlert(AlertTempPtr, WordProcPtr) inline(0x1A15,dispatcher);
extern pascal void CloseDialog(GrafPortPtr) inline(0x0C15,dispatcher);
extern pascal Boolean DefaultFilter(GrafPortPtr, EventRecordPtr, Word *) inline(0x3615,dispatcher);
extern pascal Boolean DialogSelect(EventRecordPtr, GrafPortPtr *, Word *) inline(0x1115,dispatcher);
extern pascal void DisableDItem(GrafPortPtr, Word) inline(0x3915,dispatcher);
extern pascal void DlgCopy(GrafPortPtr) inline(0x1315,dispatcher);
extern pascal void DlgCut(GrafPortPtr) inl
|