Clapkit
Loading...
Searching...
No Matches
Utilities

Helper types, macros, and utility functions. More...

Classes

class  CKProperty< T >
 Defines an observable value. More...
 

Macros

#define CKOBSERVEVALUE(name)   [this]() { this->RaisePropertyChange(name); };
 Simple wrapper for tying an CKProperty::onChange of CKProperty to an object.
 
#define kCKButtonHeight   20
 Suggested button height for platform.
 
#define kCKCheckboxHeight   16
 Suggested checkbox height for platform.
 
#define kCKRadioboxHeight   kCKCheckboxHeight
 Suggested radio button height for platform.
 
#define kCKTextFieldHeight   20
 Suggested textfield height for platform.
 
#define kCKDropdownHeight   20
 Suggested dropdown control height for platform.
 
#define CKMSToTicks(milliseconds)   ((int)((milliseconds) / 16.66))
 Convert milliseconds to ticks.
 
#define CKC2P(s)   __CKC2P(s, __func__, __LINE__, __FILENAME__)
 Convert a C-string to a Pascal-string.
 
#define CKP2C(s)   __CKP2C(s, __func__, __LINE__, __FILENAME__)
 Convert a Pascal-string to a C-String.
 

Functions

bool CKHasAppearanceManager ()
 Checks if Appearance Manager is present (8.x+)
 
bool CKHasColorQuickDraw ()
 Checks if Color QuickDraw is available.
 
bool CKHasIconUtilities ()
 Checks if Icon Utilities are available (PlotIcon/GetCIcon, etc.)
 
bool CKHasDebugger ()
 Checks if a low-level debugger (like MacsBug) is installed and callable.
 
UInt32 CKMillis ()
 Return the number of milliseconds since computer booted up.
 

Detailed Description

Helper types, macros, and utility functions.

Macro Definition Documentation

◆ CKC2P

#define CKC2P (   s)    __CKC2P(s, __func__, __LINE__, __FILENAME__)

Convert a C-string to a Pascal-string.

Returns
unsigned char* or null on failure.

◆ CKMSToTicks

#define CKMSToTicks (   milliseconds)    ((int)((milliseconds) / 16.66))

Convert milliseconds to ticks.

◆ CKOBSERVEVALUE

#define CKOBSERVEVALUE (   name)    [this]() { this->RaisePropertyChange(name); };

Simple wrapper for tying an CKProperty::onChange of CKProperty to an object.

◆ CKP2C

#define CKP2C (   s)    __CKP2C(s, __func__, __LINE__, __FILENAME__)

Convert a Pascal-string to a C-String.

Returns
char* or null on failure.

◆ kCKButtonHeight

#define kCKButtonHeight   20

Suggested button height for platform.

◆ kCKCheckboxHeight

#define kCKCheckboxHeight   16

Suggested checkbox height for platform.

◆ kCKDropdownHeight

#define kCKDropdownHeight   20

Suggested dropdown control height for platform.

◆ kCKRadioboxHeight

#define kCKRadioboxHeight   kCKCheckboxHeight

Suggested radio button height for platform.

◆ kCKTextFieldHeight

#define kCKTextFieldHeight   20

Suggested textfield height for platform.

Function Documentation

◆ CKHasAppearanceManager()

bool CKHasAppearanceManager ( )

Checks if Appearance Manager is present (8.x+)

Returns
True if Appearance Manager is available

◆ CKHasColorQuickDraw()

bool CKHasColorQuickDraw ( )

Checks if Color QuickDraw is available.

Returns
True if Color QuickDraw is available

◆ CKHasDebugger()

bool CKHasDebugger ( )

Checks if a low-level debugger (like MacsBug) is installed and callable.

Returns
True if a low-level debugger is installed and callable.

◆ CKHasIconUtilities()

bool CKHasIconUtilities ( )

Checks if Icon Utilities are available (PlotIcon/GetCIcon, etc.)

Returns
True if Icon Utilities are available.

◆ CKMillis()

UInt32 CKMillis ( )

Return the number of milliseconds since computer booted up.

Returns
Milliseconds since computer booted up.