source: trunk/ICeCoffEE/ICeCoffEE/ICeCoffEEConfig.h @ 75

Last change on this file since 75 was 75, checked in by Nicholas Riley, 17 years ago

Fixed bugs, added final set of features for 1.3b3.

File size: 1.6 KB
Line 
1/*
2 *  ICeCoffEEConfig.h
3 *  ICeCoffEE APE
4 *
5 *  Created by Nicholas Riley on Sun Jan 26 2003.
6 *  Copyright (c) 2003 Nicholas Riley. All rights reserved.
7 *
8 */
9
10#ifndef _H_ICeCoffEEConfig
11#define _H_ICeCoffEEConfig
12
13#include <CoreFoundation/CoreFoundation.h>
14
15// constants
16extern const long ICCF_MAX_URL_LEN;
17
18// per-app runtime configuration
19extern Boolean ICCF_enabled;
20
21typedef struct {
22    Boolean commandClickEnabled;
23    Boolean textBlinkEnabled;
24    CFIndex textBlinkCount; // ICeTEe used LMGetMenuFlash, no replacement in Carbon
25    Boolean servicesInContextualMenu;
26    Boolean servicesInMenuBar;
27    Boolean errorSoundEnabled;
28    Boolean errorDialogEnabled;
29} iccfPrefRec;
30
31extern iccfPrefRec ICCF_prefs;
32
33extern CFBundleRef ICCF_bundle;
34
35// CF conveniences
36
37#define ICCF_CopyLocalizedString(key) \
38    CFBundleCopyLocalizedString(ICCF_bundle, (key), CFSTR(""), NULL)
39
40#define SAFE_RELEASE(e) { if (e != NULL) CFRelease(e); }
41
42// functions shared between Cocoa and Carbon implementations
43
44// returns a Pascal string containing the corresponding protocol hint (e.g. http, mailto)
45// to be passed to ICLaunchURL if the text between startIndex and endIndex in urlData
46// likely represents an email address or "slack" (e.g. web.sabi.net/bm) URL
47ConstStringPtr ICCF_GetHint(ICInstance inst, const char *urlData, long startIndex, long endIndex);
48
49// returns an explanation for the provided OSStatus in the supplied context
50// (Cocoa clients should use ICCF_ErrString instead - it's simpler to use)
51// if NULL is returned, the error is harmless (e.g., user cancelled)
52CFStringRef ICCF_CopyErrString(OSStatus err, CFStringRef context);
53
54#endif /* _H_ICeCoffEEConfig */
Note: See TracBrowser for help on using the repository browser.