mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-05 08:35:26 +00:00
124 lines
3.5 KiB
C
124 lines
3.5 KiB
C
|
// ===========================================================================
|
|||
|
// MetroNubUserInterface.h <09>1996-1998 Metrowerks Inc. All rights reserved.
|
|||
|
// ===========================================================================
|
|||
|
|
|||
|
#ifndef __MetroNubUserInterface__
|
|||
|
#define __MetroNubUserInterface__
|
|||
|
#pragma once
|
|||
|
|
|||
|
#include <CodeFragments.h>
|
|||
|
|
|||
|
#if PRAGMA_ALIGN_SUPPORTED
|
|||
|
#pragma options align=mac68k
|
|||
|
#endif
|
|||
|
|
|||
|
#ifdef __cplusplus
|
|||
|
extern "C" {
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
// ---------------------------------------------------------------------------
|
|||
|
// <09> Constants
|
|||
|
// ---------------------------------------------------------------------------
|
|||
|
|
|||
|
const short kMetroNubUserAPIVersion = 1; // current User API version
|
|||
|
const OSType kMetroNubUserSignature = 'MnUI';
|
|||
|
|
|||
|
|
|||
|
// ---------------------------------------------------------------------------
|
|||
|
// <09> IsDebuggerRunning
|
|||
|
// ---------------------------------------------------------------------------
|
|||
|
|
|||
|
// pascal Boolean IsDebuggerRunning ();
|
|||
|
|
|||
|
typedef pascal Boolean (*IsDebuggerRunningProcPtr)();
|
|||
|
|
|||
|
#if GENERATINGCFM
|
|||
|
typedef UniversalProcPtr IsDebuggerRunningUPP;
|
|||
|
#else
|
|||
|
typedef IsDebuggerRunningProcPtr IsDebuggerRunningUPP;
|
|||
|
#endif
|
|||
|
|
|||
|
enum {
|
|||
|
uppIsDebuggerRunningProcInfo = kPascalStackBased
|
|||
|
| RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
|
|||
|
};
|
|||
|
|
|||
|
#if GENERATINGCFM
|
|||
|
#define NewIsDebuggerRunningProc(userRoutine) \
|
|||
|
(IsDebuggerRunningUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppIsDebuggerRunningProcInfo, GetCurrentArchitecture())
|
|||
|
#else
|
|||
|
#define NewIsDebuggerRunningProc(userRoutine) \
|
|||
|
((IsDebuggerRunningUPP) (userRoutine))
|
|||
|
#endif
|
|||
|
|
|||
|
#if GENERATINGCFM
|
|||
|
#define CallIsDebuggerRunningProc(userRoutine) \
|
|||
|
CallUniversalProc((UniversalProcPtr)(userRoutine), uppIsDebuggerRunningProcInfo)
|
|||
|
#else
|
|||
|
#define CallIsDebuggerRunningProc(userRoutine) \
|
|||
|
(*(userRoutine))()
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
// ---------------------------------------------------------------------------
|
|||
|
// <09> AmIBeingDebugged
|
|||
|
// ---------------------------------------------------------------------------
|
|||
|
|
|||
|
// pascal Boolean AmIBeingDebugged ();
|
|||
|
|
|||
|
typedef pascal Boolean (*AmIBeingDebuggedProcPtr)();
|
|||
|
|
|||
|
#if GENERATINGCFM
|
|||
|
typedef UniversalProcPtr AmIBeingDebuggedUPP;
|
|||
|
#else
|
|||
|
typedef AmIBeingDebuggedProcPtr AmIBeingDebuggedUPP;
|
|||
|
#endif
|
|||
|
|
|||
|
enum {
|
|||
|
uppAmIBeingDebuggedProcInfo = kPascalStackBased
|
|||
|
| RESULT_SIZE(SIZE_CODE(sizeof(Boolean)))
|
|||
|
};
|
|||
|
|
|||
|
#if GENERATINGCFM
|
|||
|
#define NewAmIBeingDebuggedProc(userRoutine) \
|
|||
|
(AmIBeingDebuggedUPP) NewRoutineDescriptor((ProcPtr)(userRoutine), uppAmIBeingDebuggedProcInfo, GetCurrentArchitecture())
|
|||
|
#else
|
|||
|
#define NewAmIBeingDebuggedProc(userRoutine) \
|
|||
|
((AmIBeingDebuggedUPP) (userRoutine))
|
|||
|
#endif
|
|||
|
|
|||
|
#if GENERATINGCFM
|
|||
|
#define CallAmIBeingDebuggedProc(userRoutine) \
|
|||
|
CallUniversalProc((UniversalProcPtr)(userRoutine), uppAmIBeingDebuggedProcInfo)
|
|||
|
#else
|
|||
|
#define CallAmIBeingDebuggedProc(userRoutine) \
|
|||
|
(*(userRoutine))()
|
|||
|
#endif
|
|||
|
|
|||
|
|
|||
|
// ---------------------------------------------------------------------------
|
|||
|
// <09> MetroNubUserEntryBlock
|
|||
|
// ---------------------------------------------------------------------------
|
|||
|
|
|||
|
struct MetroNubUserEntryBlock
|
|||
|
{
|
|||
|
long blockLength; // length of this block
|
|||
|
short apiLowVersion; // lowest supported version of the Nub API
|
|||
|
short apiHiVersion; // highest supported version of the Nub API
|
|||
|
Str31 nubVersion; // short version string from 'vers' 1 resource
|
|||
|
|
|||
|
IsDebuggerRunningUPP isDebuggerRunning;
|
|||
|
AmIBeingDebuggedUPP amIBeingDebugged;
|
|||
|
};
|
|||
|
typedef struct MetroNubUserEntryBlock MetroNubUserEntryBlock;
|
|||
|
|
|||
|
#ifdef __cplusplus
|
|||
|
}
|
|||
|
#endif
|
|||
|
|
|||
|
#if PRAGMA_ALIGN_SUPPORTED
|
|||
|
#pragma options align=reset
|
|||
|
#endif
|
|||
|
|
|||
|
#endif
|