home *** CD-ROM | disk | FTP | other *** search
- /*
- File: Dialogs.h
-
- Copyright: © 1984-1993 by Apple Computer, Inc., all rights reserved.
-
- WARNING
- This file was auto generated by the interfacer tool. Modifications
- must be made to the master file.
-
- */
-
- #ifndef __DIALOGS__
- #define __DIALOGS__
-
- #ifndef __WINDOWS__
- #include <Windows.h>
- /* #include <Quickdraw.h> */
- /* #include <Types.h> */
- /* #include <ConditionalMacros.h> */
- /* #include <MixedMode.h> */
- /* #include <Traps.h> */
- /* #include <QuickdrawText.h> */
- /* #include <IntlResources.h> */
- /* #include <Events.h> */
- /* #include <OSUtils.h> */
- /* #include <Controls.h> */
- /* #include <Menus.h> */
- #endif
-
- #ifndef __TEXTEDIT__
- #include <TextEdit.h>
- #endif
-
- enum {
- ctrlItem = 4,
- btnCtrl = 0,
- chkCtrl = 1,
- radCtrl = 2,
- resCtrl = 3,
- statText = 8,
- editText = 16,
- iconItem = 32,
- picItem = 64,
- userItem = 0,
- itemDisable = 128,
- ok = 1,
- cancel = 2,
- stopIcon = 0,
- noteIcon = 1,
- cautionIcon = 2
- };
-
-
- /* Dialog Item List Manipulation Constants */
-
- typedef short DITLMethod;
-
- enum {
- overlayDITL = 0,
- appendDITLRight = 1,
- appendDITLBottom = 2
- };
-
- typedef short StageList;
-
- typedef WindowPtr DialogPtr;
-
- typedef pascal void (*SoundProcPtr)(short soundNumber);
-
- enum {
- uppSoundProcInfo = kPascalStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(short)))
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef UniversalProcPtr SoundUPP;
-
- #define CallSoundProc(userRoutine, soundNumber) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppSoundProcInfo, (soundNumber))
- #define NewSoundProc(userRoutine) \
- (SoundUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppSoundProcInfo, GetCurrentISA())
- #else
- typedef SoundProcPtr SoundUPP;
-
- #define CallSoundProc(userRoutine, soundNumber) \
- (*(userRoutine))((soundNumber))
- #define NewSoundProc(userRoutine) \
- (SoundUPP)(userRoutine)
- #endif
-
- typedef pascal Boolean (*ModalFilterProcPtr)(DialogPtr theDialog, EventRecord *theEvent, short *itemHit);
-
- enum {
- uppModalFilterProcInfo = kPascalStackBased
- | RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(DialogPtr)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(EventRecord*)))
- | STACK_ROUTINE_PARAMETER(3, SIZE_CODE(sizeof(short*)))
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef UniversalProcPtr ModalFilterUPP;
-
- #define CallModalFilterProc(userRoutine, theDialog, theEvent, itemHit) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppModalFilterProcInfo, (theDialog), (theEvent), (itemHit))
- #define NewModalFilterProc(userRoutine) \
- (ModalFilterUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppModalFilterProcInfo, GetCurrentISA())
- #else
- typedef ModalFilterProcPtr ModalFilterUPP;
-
- #define CallModalFilterProc(userRoutine, theDialog, theEvent, itemHit) \
- (*(userRoutine))((theDialog), (theEvent), (itemHit))
- #define NewModalFilterProc(userRoutine) \
- (ModalFilterUPP)(userRoutine)
- #endif
-
- typedef pascal void (*UserItemProcPtr)(WindowPtr theWindow, short itemNo);
-
- enum {
- uppUserItemProcInfo = kPascalStackBased
- | STACK_ROUTINE_PARAMETER(1, SIZE_CODE(sizeof(WindowPtr)))
- | STACK_ROUTINE_PARAMETER(2, SIZE_CODE(sizeof(short)))
- };
-
- #if USESROUTINEDESCRIPTORS
- typedef UniversalProcPtr UserItemUPP;
-
- #define CallUserItemProc(userRoutine, theWindow, itemNo) \
- CallUniversalProc((UniversalProcPtr)(userRoutine), uppUserItemProcInfo, (theWindow), (itemNo))
- #define NewUserItemProc(userRoutine) \
- (UserItemUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppUserItemProcInfo, GetCurrentISA())
- #else
- typedef UserItemProcPtr UserItemUPP;
-
- #define CallUserItemProc(userRoutine, theWindow, itemNo) \
- (*(userRoutine))((theWindow), (itemNo))
- #define NewUserItemProc(userRoutine) \
- (UserItemUPP)(userRoutine)
- #endif
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct DialogRecord {
- WindowRecord window;
- Handle items;
- TEHandle textH;
- short editField;
- short editOpen;
- short aDefItem;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct DialogRecord DialogRecord;
-
- typedef DialogRecord *DialogPeek;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct DialogTemplate {
- Rect boundsRect;
- short procID;
- Boolean visible;
- Boolean filler1;
- Boolean goAwayFlag;
- Boolean filler2;
- long refCon;
- short itemsID;
- Str255 title;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct DialogTemplate DialogTemplate;
-
- typedef DialogTemplate *DialogTPtr, **DialogTHndl;
-
- #if defined(powerc) || defined (__powerc)
- #pragma options align=mac68k
- #endif
- struct AlertTemplate {
- Rect boundsRect;
- short itemsID;
- StageList stages;
- };
- #if defined(powerc) || defined(__powerc)
- #pragma options align=reset
- #endif
-
- typedef struct AlertTemplate AlertTemplate;
-
- typedef AlertTemplate *AlertTPtr, **AlertTHndl;
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
-
- /*
- NOTE: Code running under MultiFinder or System 7.0 or newer
- should always pass NULL to InitDialogs.
- */
-
- extern pascal void InitDialogs(long ignored)
- ONEWORDINLINE(0xA97B);
- extern pascal void ErrorSound(SoundUPP soundProc)
- ONEWORDINLINE(0xA98C);
- extern pascal DialogPtr NewDialog(void *wStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon, Handle itmLstHndl)
- ONEWORDINLINE(0xA97D);
- extern DialogPtr newdialog(void *wStorage, const Rect *boundsRect, char *title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon, Handle itmLstHndl);
- extern pascal DialogPtr GetNewDialog(short dialogID, void *dStorage, WindowPtr behind)
- ONEWORDINLINE(0xA97C);
- extern pascal void CloseDialog(DialogPtr theDialog)
- ONEWORDINLINE(0xA982);
- extern pascal void DisposeDialog(DialogPtr theDialog)
- ONEWORDINLINE(0xA983);
- extern pascal void ParamText(ConstStr255Param param0, ConstStr255Param param1, ConstStr255Param param2, ConstStr255Param param3)
- ONEWORDINLINE(0xA98B);
- extern pascal void ModalDialog(ModalFilterUPP modalFilter, short *itemHit)
- ONEWORDINLINE(0xA991);
- extern pascal Boolean IsDialogEvent(const EventRecord *theEvent)
- ONEWORDINLINE(0xA97F);
- extern pascal Boolean DialogSelect(const EventRecord *theEvent, DialogPtr *theDialog, short *itemHit)
- ONEWORDINLINE(0xA980);
- extern pascal void DrawDialog(DialogPtr theDialog)
- ONEWORDINLINE(0xA981);
- extern pascal void UpdateDialog(DialogPtr theDialog, RgnHandle updateRgn)
- ONEWORDINLINE(0xA978);
- extern pascal short Alert(short alertID, ModalFilterUPP modalFilter)
- ONEWORDINLINE(0xA985);
- extern pascal short StopAlert(short alertID, ModalFilterUPP modalFilter)
- ONEWORDINLINE(0xA986);
- extern pascal short NoteAlert(short alertID, ModalFilterUPP modalFilter)
- ONEWORDINLINE(0xA987);
- extern pascal short CautionAlert(short alertID, ModalFilterUPP modalFilter)
- ONEWORDINLINE(0xA988);
- extern pascal void GetDialogItem(DialogPtr theDialog, short itemNo, short *itemType, Handle *item, Rect *box)
- ONEWORDINLINE(0xA98D);
- extern pascal void SetDialogItem(DialogPtr theDialog, short itemNo, short itemType, Handle item, const Rect *box)
- ONEWORDINLINE(0xA98E);
- extern pascal void HideDialogItem(DialogPtr theDialog, short itemNo)
- ONEWORDINLINE(0xA827);
- extern pascal void ShowDialogItem(DialogPtr theDialog, short itemNo)
- ONEWORDINLINE(0xA828);
- extern pascal void SelectDialogItemText(DialogPtr theDialog, short itemNo, short strtSel, short endSel)
- ONEWORDINLINE(0xA97E);
- extern pascal void GetDialogItemText(Handle item, Str255 text)
- ONEWORDINLINE(0xA990);
- extern pascal void SetDialogItemText(Handle item, ConstStr255Param text)
- ONEWORDINLINE(0xA98F);
- extern pascal short FindDialogItem(DialogPtr theDialog, Point thePt)
- ONEWORDINLINE(0xA984);
- extern pascal DialogPtr NewColorDialog(void *dStorage, const Rect *boundsRect, ConstStr255Param title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon, Handle items)
- ONEWORDINLINE(0xAA4B);
- extern DialogPtr newcolordialog(void *dStorage, const Rect *boundsRect, char *title, Boolean visible, short procID, WindowPtr behind, Boolean goAwayFlag, long refCon, Handle items);
- #if USESCODEFRAGMENTS
- extern pascal short GetAlertStage(void);
- #else
- #define GetAlertStage() (* (short*) 0x0A9A)
-
- #endif
-
- extern pascal void ResetAlertStage(void)
- TWOWORDINLINE(0x4278, 0x0A9A);
- extern pascal void DialogCut(DialogPtr theDialog);
- extern pascal void DialogPaste(DialogPtr theDialog);
- extern pascal void DialogCopy(DialogPtr theDialog);
- extern pascal void DialogDelete(DialogPtr theDialog);
- extern pascal void SetDialogFont(short fontNum)
- TWOWORDINLINE(0x31DF, 0x0AFA);
- extern void paramtext(char *param0, char *param1, char *param2, char *param3);
- extern void getdialogitemtext(Handle item, char *text);
- extern void setdialogitemtext(Handle item, char *text);
- extern short finddialogitem(DialogPtr theDialog, Point *thePt);
- extern pascal void AppendDITL(DialogPtr theDialog, Handle theHandle, DITLMethod method);
- extern pascal short CountDITL(DialogPtr theDialog);
- extern pascal void ShortenDITL(DialogPtr theDialog, short numberItems);
- extern pascal Boolean StdFilterProc(DialogPtr theDialog, EventRecord *event, short *itemHit);
- extern pascal OSErr GetStdFilterProc(ModalFilterUPP *theProc)
- THREEWORDINLINE(0x303C, 0x0203, 0xAA68);
- extern pascal OSErr SetDialogDefaultItem(DialogPtr theDialog, short newItem)
- THREEWORDINLINE(0x303C, 0x0304, 0xAA68);
- extern pascal OSErr SetDialogCancelItem(DialogPtr theDialog, short newItem)
- THREEWORDINLINE(0x303C, 0x0305, 0xAA68);
- extern pascal OSErr SetDialogTracksCursor(DialogPtr theDialog, Boolean tracks)
- THREEWORDINLINE(0x303C, 0x0306, 0xAA68);
- #if OLDROUTINENAMES
- #define DisposDialog(theDialog) DisposeDialog(theDialog)
-
- #define UpdtDialog(theDialog, updateRgn) UpdateDialog(theDialog, updateRgn)
-
- #define GetDItem(theDialog, itemNo, itemType, item, box) \
- GetDialogItem(theDialog, itemNo, itemType, item, box)
-
- #define SetDItem(theDialog, itemNo, itemType, item, box) \
- SetDialogItem(theDialog, itemNo, itemType, item, box)
-
- #define HideDItem(theDialog, itemNo) HideDialogItem(theDialog, itemNo)
-
- #define ShowDItem(theDialog, itemNo) ShowDialogItem(theDialog, itemNo)
-
- #define SelIText(theDialog, itemNo, strtSel, endSel) \
- SelectDialogItemText(theDialog, itemNo, strtSel, endSel)
-
- #define GetIText(item, text) GetDialogItemText(item, text)
-
- #define SetIText(item, text) SetDialogItemText(item, text)
-
- #define FindDItem(theDialog, thePt) FindDialogItem(theDialog, thePt)
-
- #define NewCDialog(dStorage, boundsRect, title, visible, procID, behind, goAwayFlag, refCon, items) \
- NewColorDialog(dStorage, boundsRect, title, visible, procID, behind, \
- goAwayFlag, refCon, items)
-
- #define GetAlrtStage() GetAlertStage()
-
- #define ResetAlrtStage() ResetAlertStage()
-
- #define DlgCut(theDialog) DialogCut(theDialog)
-
- #define DlgPaste(theDialog) DialogPaste(theDialog)
-
- #define DlgCopy(theDialog) DialogCopy(theDialog)
-
- #define DlgDelete(theDialog) DialogDelete(theDialog)
-
- #define SetDAFont(fontNum) SetDialogFont(fontNum)
-
- #define newcdialog(dStorage, boundsRect, title, visible, procID, behind, goAwayFlag, refCon, items) \
- newcolordialog(dStorage, boundsRect, title, visible, procID, behind, \
- goAwayFlag, refCon, items)
-
- #define getitext(item, text) getdialogitemtext(item, text)
-
- #define setitext(item, text) setdialogitemtext(item, text)
-
- #define findditem(theDialog, thePt) finddialogitem(theDialog, thePt)
-
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #endif
-
-