HexFiend: HFFunctions.h File Reference

HexFiend

Classes | Macros | Functions
HFFunctions.h File Reference

Go to the source code of this file.

## Classes
class | HFRangeWrapper
| An object wrapper for the HFRange type. More...
class | HFRangeSet
| A set of HFRanges. HFRangeSet takes the interpetation that all zero-length ranges are identical. More...

## Macros
#define | HFDEFAULT_FONT (@"Monaco")
#define | HFDEFAULT_FONTSIZE ((CGFloat)10.)
#define | HFZeroRange (HFRange){0, 0}

## Functions
BOOL | HFStringEncodingIsSupersetOfASCII (NSStringEncoding encoding)
uint8_t | HFStringEncodingCharacterLength (NSStringEncoding encoding)
void | HFDrawShadow (CGContextRef context, NSRect rect, CGFloat size, NSRectEdge rectEdge, BOOL active, NSRect clip)
void | HFRegisterViewForWindowAppearanceChanges (NSView *view, SEL notificationSEL, BOOL appToo)
void | HFUnregisterViewForWindowAppearanceChanges (NSView *view, BOOL appToo)
NSString * | HFDescribeByteCount (unsigned long long count)
void | HFStartTiming (const char *name)
void | HFStopTiming (void)

## Macro Definition Documentation

## § HFDEFAULT_FONT

#define HFDEFAULT_FONT (@"Monaco")

## § HFDEFAULT_FONTSIZE

#define HFDEFAULT_FONTSIZE ((CGFloat)10.)

## § HFZeroRange

#define HFZeroRange (HFRange){0, 0}

## Function Documentation

## § HFStringEncodingIsSupersetOfASCII()

BOOL HFStringEncodingIsSupersetOfASCII | ( | NSStringEncoding | encoding | ) |

Returns YES if the given string encoding is a superset of ASCII.

## § HFStringEncodingCharacterLength()

uint8_t HFStringEncodingCharacterLength | ( | NSStringEncoding | encoding | ) |

Returns the "granularity" of an encoding, in bytes. ASCII is 1, UTF-16 is 2, etc. Variable width encodings return the smallest (e.g. Shift-JIS returns 1).

## § HFDrawShadow()

void HFDrawShadow | ( | CGContextRef | context,
|  | NSRect | rect,
|  | CGFloat | size,
|  | NSRectEdge | rectEdge,
|  | BOOL | active,
|  | NSRect | clip
| ) |  |

Draws a shadow.

## § HFRegisterViewForWindowAppearanceChanges()

void HFRegisterViewForWindowAppearanceChanges | ( | NSView * | view,
|  | SEL | notificationSEL,
|  | BOOL | appToo
| ) |  |

Registers a view to have the given notificationSEL invoked (taking the NSNotification object) when the window becomes or loses key. If appToo is YES, this also registers with NSApplication for Activate and Deactivate methods.

## § HFUnregisterViewForWindowAppearanceChanges()

void HFUnregisterViewForWindowAppearanceChanges | ( | NSView * | view,
|  | BOOL | appToo
| ) |  |

Unregisters a view to have the given notificationSEL invoked when the window becomes or loses key. If appToo is YES, this also unregisters with NSApplication.

## § HFDescribeByteCount()

NSString* HFDescribeByteCount | ( | unsigned long long | count | ) |

Returns a description of the given byte count (e.g. "24 kilobytes")

## § HFStartTiming()

void HFStartTiming | ( | const char * | name | ) |

## § HFStopTiming()

void HFStopTiming | ( | void |  | ) |