mirror of
https://github.com/nickshanks/ResKnife.git
synced 2024-08-31 19:29:11 +00:00
1 line
2.3 KiB
C
1 line
2.3 KiB
C
#if !TARGET_API_MAC_OS8
|
|
#if defined(__APPLE_CC__) // compiling with gcc
|
|
#include <Carbon/Carbon.h>
|
|
#else // compiling with CodeWarrior, __MWERKS__
|
|
#include <Carbon.h>
|
|
#endif
|
|
#endif
|
|
|
|
#ifndef _ResKnife_Plug_
|
|
#define _ResKnife_Plug_ 1
|
|
#include "HostCallbacks.h"
|
|
#endif
|
|
|
|
#ifndef _ResKnife_TemplateEditor_
|
|
#define _ResKnife_TemplateEditor_
|
|
|
|
#include "Generic.h"
|
|
|
|
// abbreviations
|
|
#define Use_Nibs 0
|
|
#define Use_GWorlds 1
|
|
|
|
/* Global Variables */
|
|
struct globals
|
|
{
|
|
// application
|
|
Str255 fragName;
|
|
Str255 prefsName;
|
|
|
|
// system info
|
|
SInt32 systemVersion;
|
|
Boolean dragAvailable;
|
|
Boolean translucentDrag;
|
|
Boolean navAvailable;
|
|
Boolean useAppearance;
|
|
|
|
// colours
|
|
RGBColor white; // 0xFFFF, 65535
|
|
RGBColor bgColour; // 0xEEEE, 61166
|
|
RGBColor black; // 0x0000, 0
|
|
};
|
|
|
|
/* Preferences */
|
|
struct prefs
|
|
{
|
|
UInt32 version; // == kTemplateEditorCurrentVersion, when saved to disk allows older prefs to be read in
|
|
|
|
UInt8 GWorldDepth;
|
|
};
|
|
|
|
/*** CONSTANTS ***/
|
|
const UInt32 kTemplateEditorCurrentVersion = 0x00030003;
|
|
const UInt16 kHeaderHeight = 20;
|
|
const UInt16 kScrollBarWidth = 16;
|
|
const UInt16 kMinimumWindowWidth = 384;
|
|
const UInt16 kDefaultWindowWidth = kMinimumWindowWidth;
|
|
const UInt16 kMinimumWindowHeight = 256 + kHeaderHeight;
|
|
const UInt16 kDefaultWindowHeight = kMinimumWindowHeight;
|
|
|
|
// MacOS versions
|
|
const SInt32 kMacOSSevenPointOne = 0x00000710;
|
|
const SInt32 kMacOSSevenPointFivePointFive = 0x00000755;
|
|
const SInt32 kMacOSEight = 0x00000800;
|
|
const SInt32 kMacOSEightPointFive = 0x00000850;
|
|
const SInt32 kMacOSEightPointSix = 0x00000860;
|
|
const SInt32 kMacOSNine = 0x00000900;
|
|
const SInt32 kMacOSNinePointOne = 0x00000910;
|
|
const SInt32 kMacOSTen = 0x00001000;
|
|
|
|
const SInt32 kMacOS71 = kMacOSSevenPointOne;
|
|
const SInt32 kMacOS755 = kMacOSSevenPointFivePointFive;
|
|
const SInt32 kMacOS8 = kMacOSEight;
|
|
const SInt32 kMacOS85 = kMacOSEightPointFive;
|
|
const SInt32 kMacOS86 = kMacOSEightPointSix;
|
|
const SInt32 kMacOS9 = kMacOSNine;
|
|
const SInt32 kMacOS91 = kMacOSNinePointOne;
|
|
const SInt32 kMacOSX = kMacOSTen;
|
|
|
|
/* RESOURCES */
|
|
|
|
enum // menus
|
|
{
|
|
kEditorMenu = 128
|
|
};
|
|
|
|
enum // windows
|
|
{
|
|
kFileWindow7 = 128,
|
|
kFileWindow8 = 129
|
|
};
|
|
|
|
enum // controls
|
|
{
|
|
kSystem7ScrollBarControl = 128,
|
|
kAppearanceScrollBarControl = 129,
|
|
kNormalHeaderControl = 130
|
|
};
|
|
|
|
#endif |