2021-10-14 00:44:08 +00:00
|
|
|
// Copyright (c) Jon Thysell <http://jonthysell.com>
|
|
|
|
// Licensed under the MIT License.
|
|
|
|
|
|
|
|
#ifndef MACCOMMON_H
|
|
|
|
#define MACCOMMON_H
|
|
|
|
|
2021-11-05 02:54:28 +00:00
|
|
|
#include "Common.h"
|
|
|
|
|
2021-10-16 00:29:07 +00:00
|
|
|
#define BaseResID 128
|
|
|
|
#define MoveToFront (WindowPtr)-1L
|
2021-10-15 16:43:09 +00:00
|
|
|
|
2021-10-16 00:29:07 +00:00
|
|
|
#define EmptyString "\p"
|
|
|
|
#define NilFilterProc nil
|
2021-10-15 16:43:09 +00:00
|
|
|
|
2021-10-16 00:29:07 +00:00
|
|
|
#define ErrorAlertResID BaseResID
|
2021-10-15 16:43:09 +00:00
|
|
|
|
2021-11-05 02:54:28 +00:00
|
|
|
typedef enum eBoxAlignment
|
|
|
|
{
|
|
|
|
Top,
|
|
|
|
TopLeft,
|
|
|
|
Left,
|
|
|
|
BottomLeft,
|
|
|
|
Bottom,
|
|
|
|
BottomRight,
|
|
|
|
Right,
|
|
|
|
TopRight,
|
|
|
|
Center
|
|
|
|
} BoxAlignment;
|
|
|
|
|
|
|
|
pascal OSErr SetDialogDefaultItem(DialogPtr theDialog, int16_t newItem) = { 0x303C, 0x0304, 0xAA68 };
|
2021-10-16 22:38:43 +00:00
|
|
|
|
2021-11-05 02:54:28 +00:00
|
|
|
void ShowError(Str255 message, bool isFatal);
|
2021-10-14 00:44:08 +00:00
|
|
|
|
2021-10-31 22:13:51 +00:00
|
|
|
void CenterRect(const Rect *pOuterRect, Rect *pInnerRect);
|
|
|
|
void CenterRectH(const Rect *pOuterRect, Rect *pInnerRect);
|
|
|
|
void CenterRectV(const Rect *pOuterRect, Rect *pInnerRect);
|
|
|
|
|
2021-11-07 23:35:44 +00:00
|
|
|
void ConcatenateRect(const Rect *pLeftRect, const Rect *pRightRect, Rect *pDestRect);
|
|
|
|
|
2021-11-05 02:54:28 +00:00
|
|
|
void GetBoxRect(const Rect *pOuterRect, const BoxAlignment boxAlignment, Rect *pBoxRect);
|
|
|
|
|
2021-11-08 22:47:31 +00:00
|
|
|
void GetPictureRect(const PicHandle picHandle, Rect *pDestRect);
|
|
|
|
|
2021-11-07 23:35:44 +00:00
|
|
|
void GetScaledPicFrame(const PicHandle picHandle, const uint8_t scale, Rect *pDestRect);
|
2021-11-08 22:47:31 +00:00
|
|
|
void DrawScaledPic(const PicHandle pic, const uint8_t scale);
|
2021-11-07 23:35:44 +00:00
|
|
|
|
2021-10-14 00:44:08 +00:00
|
|
|
#endif
|