source: trunk/ICeCoffEE/ICeCoffEE/ICeCoffEE.h @ 322

Last change on this file since 322 was 322, checked in by Nicholas Riley, 14 years ago

ICeCoffEE.[hm]: Move parsing functions (ICCF_CheckRange,
ICCF_Delimiters, ICCF_ParseURL) and Internet Config start/stop
routines (ICCF_Stop/StartIC) to ICeCoffEEParser.[hm] so they can be
tested outside the APE. Also move ICCF_MAX_URL_LEN definition, and
extract guts of NSTextView parsing into ICCF_URLEnclosingRange.
Remove comment about TXNClick; if MLTE is deprecated I'm not going to
mess with it.

ICeCoffEEParser.[hm]: Moved everything discussed above to here.

ICeCoffEEServices.m: Some comments, now I realize how irritating the
service localization problem is.

ICeCoffEETerminal.m: Remove long-unused reference to
ICeCoffEEScanner.h (was from 1.2?).

ICeCoffEEScanner.[hm]: Removed, no longer in use.

TestParser?.m: Very simple first pass at testing. There's much more I
want to do here.

urls.plist: First pass at URL test cases.

ICeCoffEE.xcodeproj: Add TestParser? target (yes, it uses ZeroLink?
because my machine is slow and it actually helps).

File size: 1.7 KB
1/* ICeCoffEE */
3#import "ICeCoffEESuper.h"
4#import "ICeCoffEEShared.h"
5#import "ICeCoffEEConfig.h"
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));
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]
14// returns an explanation for the provided OSStatus in the supplied
15// if nil is returned, the error is harmless (e.g., user cancelled)
16NSString *ICCF_ErrString(OSStatus err, NSString *context);
18// handles an exception as specified by ICError* preferences
19// if NO is returned, the exception is harmless (e.g., user cancelled)
20BOOL ICCF_HandleException(NSException *e);
22// returns YES if the event is a command-mouse down
23BOOL ICCF_EventIsCommandMouseDown(NSEvent *e);
25// returns the action determined by the event's keyboard modifiers
26iccfURLAction ICCF_KeyboardAction(NSEvent *e);
28// calls ICCF_DoURLAction
29// returns YES unless the user cancelled
30BOOL ICCF_LaunchURL(NSString *string, iccfURLAction action);
32// launch URL from on selected text view cursor position or selection
33void ICCF_LaunchURLFromTextView(NSTextView *self, NSEvent *triggeringEvent);
35// returns contextual menu with Services item added, if selected
36NSMenu *ICCF_MenuForEvent(NSView *self, NSMenu *contextMenu, NSEvent *e);
38// adds or removes services menu in menu bar
39void ICCF_AddRemoveServicesMenu();
41@interface ICeCoffEE : ICeCoffEESuper
Note: See TracBrowser for help on using the repository browser.