[66] | 1 | /* ICeCoffEE */
|
---|
| 2 |
|
---|
| 3 | #import "ICeCoffEESuper.h"
|
---|
| 4 | #import "ICeCoffEEShared.h"
|
---|
[74] | 5 | #import "ICeCoffEEConfig.h"
|
---|
[66] | 6 |
|
---|
[183] | 7 | #define ICCF_OSErrAssert(err, context) NSAssert(err == noErr || err == userCanceledErr, ICCF_ErrString(err, context));
|
---|
| 8 | #define ICCF_OSErrCAssert(err, context) NSCAssert(err == noErr || err == userCanceledErr, ICCF_ErrString(err, context));
|
---|
[66] | 9 |
|
---|
[74] | 10 | // search for: (?<!ICCF_LocalizedString\()(?<!ICLog\()(?<!ICapeprintf("\()(?<!%)(@"(?!Internal error: )[^"]+") replace with: ICCF_LocalizedString(\1)
|
---|
| 11 | #define ICCF_LocalizedString(key) \
|
---|
| 12 | [(NSString *)CFBundleCopyLocalizedString(ICCF_bundle, (CFStringRef)(key), CFSTR(""), NULL) autorelease]
|
---|
[66] | 13 |
|
---|
[380] | 14 | // XXX temporary for 1.5 development; gone when we remove Internet Config dependency
|
---|
| 15 | ICInstance ICCF_GetInst();
|
---|
| 16 | void ICCF_StartIC();
|
---|
| 17 | void ICCF_StopIC();
|
---|
| 18 |
|
---|
[74] | 19 | // returns an explanation for the provided OSStatus in the supplied
|
---|
| 20 | // if nil is returned, the error is harmless (e.g., user cancelled)
|
---|
[66] | 21 | NSString *ICCF_ErrString(OSStatus err, NSString *context);
|
---|
[74] | 22 |
|
---|
| 23 | // handles an exception as specified by ICError* preferences
|
---|
| 24 | // if NO is returned, the exception is harmless (e.g., user cancelled)
|
---|
| 25 | BOOL ICCF_HandleException(NSException *e);
|
---|
| 26 |
|
---|
| 27 | // returns YES if the event is a command-mouse down
|
---|
[66] | 28 | BOOL ICCF_EventIsCommandMouseDown(NSEvent *e);
|
---|
[74] | 29 |
|
---|
[183] | 30 | // returns the action determined by the event's keyboard modifiers
|
---|
| 31 | iccfURLAction ICCF_KeyboardAction(NSEvent *e);
|
---|
[74] | 32 |
|
---|
[375] | 33 | // throws an exception if the URL range is nonexistent or too big
|
---|
| 34 | void ICCF_CheckRange(NSRange range);
|
---|
| 35 |
|
---|
[106] | 36 | // calls ICCF_DoURLAction
|
---|
[183] | 37 | // returns YES unless the user cancelled
|
---|
| 38 | BOOL ICCF_LaunchURL(NSString *string, iccfURLAction action);
|
---|
[74] | 39 |
|
---|
| 40 | // launch URL from on selected text view cursor position or selection
|
---|
[183] | 41 | void ICCF_LaunchURLFromTextView(NSTextView *self, NSEvent *triggeringEvent);
|
---|
[74] | 42 |
|
---|
| 43 | // returns contextual menu with Services item added, if selected
|
---|
[167] | 44 | NSMenu *ICCF_MenuForEvent(NSView *self, NSMenu *contextMenu, NSEvent *e);
|
---|
[66] | 45 |
|
---|
[74] | 46 | // adds or removes services menu in menu bar
|
---|
| 47 | void ICCF_AddRemoveServicesMenu();
|
---|
| 48 |
|
---|
[66] | 49 | @interface ICeCoffEE : ICeCoffEESuper
|
---|
| 50 |
|
---|
| 51 | @end
|
---|