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

Last change on this file since 183 was 183, checked in by Nicholas Riley, 16 years ago

ICeCoffEE 1.4.2b1

VERSION, ui.plist, Info*.plist, InfoPlist?.strings: Updated for 1.4.2b1.

APEMain.m: Removed PBX support.

ICeCoffEE.[hm]: Don't ICCF_OSErr(C)Assert if we get userCanceledErr:
part of fixing extraneous exception when not selecting anything from
the helper app menu. ICCF_KeyboardAction() and
ICCF_LaunchURLFromTextView() now take an event parameter - since we
have stuff on a timer now, means we get the key modifier state at
mousedown time, rather than some arbitrary time later.
ICCF_LaunchURL() returns NO if the user cancelled, so we don't need to
throw an exception to stop the URL blinking. Moved sanitized mouse
down event generation to ICCF_MouseDownEventWithModifierFlags(). Only
update Services menu at app launch on Panther. Use a timer to delay
URL launching in NSTextView on Tiger, so we accommodate
command-multiple clicking for discontiguous selection. Remove that
ugly goto.

ICeCoffEEShared.h: Turn off debugging in preparation for (beta)
release.

ICeCoffEETerminal.m: Update for new ICCF_LaunchURL() return.

ICeCoffEETrigger.[hm]: Singleton timer wrapper for discontiguous
selection compatibility on Tiger. Singleton global is exported for
efficiency since we have to check it on every mouse down.

ICeCoffEEWebKit.m: Removed incorrect comment (what was I thinking?)
Update for new ICCF_LaunchURL() return. Properly highlight before
ICCF_LaunchURL(), especially noticable with menu.

APEInfo.rtfd: More fixes and updates, final for 1.4.2b1.

File size: 2.2 KB
Line 
1/* ICeCoffEE */
2
3#import "ICeCoffEESuper.h"
4#import "ICeCoffEEShared.h"
5#import "ICeCoffEEConfig.h"
6
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));
9
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]
13
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);
17
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);
21
22// returns YES if the event is a command-mouse down
23BOOL ICCF_EventIsCommandMouseDown(NSEvent *e);
24
25// returns the action determined by the event's keyboard modifiers
26iccfURLAction ICCF_KeyboardAction(NSEvent *e);
27
28// throws an exception if the URL range is nonexistent or too big
29void ICCF_CheckRange(NSRange range);
30
31// returns NSCharacterSets representing valid URL delimiters for left and right sides
32void ICCF_Delimiters(NSCharacterSet **leftPtr, NSCharacterSet **rightPtr);
33
34// start Internet Config (before ICCF_LaunchURL)
35void ICCF_StartIC();
36
37// stop Internet Config (after ICCF_LaunchURL)
38void ICCF_StopIC();
39
40// calls ICParseURL, returns output range
41void ICCF_ParseURL(NSString *string, NSRange *range);
42
43// calls ICCF_DoURLAction
44// returns YES unless the user cancelled
45BOOL ICCF_LaunchURL(NSString *string, iccfURLAction action);
46
47// launch URL from on selected text view cursor position or selection
48void ICCF_LaunchURLFromTextView(NSTextView *self, NSEvent *triggeringEvent);
49
50// returns contextual menu with Services item added, if selected
51NSMenu *ICCF_MenuForEvent(NSView *self, NSMenu *contextMenu, NSEvent *e);
52
53// adds or removes services menu in menu bar
54void ICCF_AddRemoveServicesMenu();
55
56@interface ICeCoffEE : ICeCoffEESuper
57
58@end
Note: See TracBrowser for help on using the repository browser.