source: releases/ICeCoffEE/1.3b3/ICeCoffEE/ICeCoffEEConfig.h@ 124

Last change on this file since 124 was 79, checked in by Nicholas Riley, 21 years ago

ICeCoffEE 1.3b3

File size: 1.9 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// if the text surrounding the range *selStart to *selEnd in urlData likely represents
46// an email address or "slack" (e.g. web.sabi.net/bm) URL
47// needsSlashes is set to true if the URL needs a '//' after the colon to be valid
48ConstStringPtr ICCF_GetHint(ICInstance inst, const char *urlData, Size length, long *selStart, long *selEnd, Boolean *needsSlashes);
49
50// adds two slashes to the beginning of the string in the handle (e.g. web.sabi.net or http:web.sabi.net)
51void ICCF_AddSlashes(Handle h, ConstStringPtr hint);
52
53// returns an explanation for the provided OSStatus in the supplied context
54// (Cocoa clients should use ICCF_ErrString instead - it's simpler to use)
55// if NULL is returned, the error is harmless (e.g., user cancelled)
56CFStringRef ICCF_CopyErrString(OSStatus err, CFStringRef context);
57
58#endif /* _H_ICeCoffEEConfig */
Note: See TracBrowser for help on using the repository browser.