-
Notifications
You must be signed in to change notification settings - Fork 3
/
TRUserDefaults.h
40 lines (30 loc) · 1.41 KB
/
TRUserDefaults.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
//
// NSUserDefaultsWithColour.h
// Jabber
//
// Created by David Chisnall on 02/11/2004.
// Copyright 2004 __MyCompanyName__. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <AppKit/AppKit.h>
@interface NSUserDefaults(TRJabberAdditions)
//Sound should be set to a filename or a named system sound using setString: forKey:
- (NSSound*) soundForKey:(NSString*)_key;
- (unsigned char) presenceForKey:(NSString*)_key;
- (void) setPresence:(unsigned char)_presence forKey:(NSString *)_key;
- (void) setColour:(NSColor *)_color forKey:(NSString *)_key;
- (NSColor*) colourForKey:(NSString *)_key;
- (void) setColour:(NSColor *)_colour forPresence:(unsigned char)_presence;
- (NSColor*) colourForPresence:(unsigned char)_presence;
- (void) setExpanded:(NSString*)_group to:(BOOL)_expanded;
- (BOOL) expandedGroup:(NSString*)_group;
- (NSString*) customMessageNamed:(NSString*)_name;
- (unsigned char) customPresenceNamed:(NSString*)_name;
- (void) setCustomPresence:(unsigned char)_presence withMessage:(NSString*)_message named:(NSString*)_name;
//- (NSRect) locationOfWindowNamed:(NSString*)_name;
@end
/**
* Set the foreground colour of text to the presence state
*/
#define PRESENCE_COLOUR(presence) [[NSUserDefaults standardUserDefaults] colourForPresence:presence]
#define PRESENCE_COLOUR_DICTIONARY(presence) [NSDictionary dictionaryWithObject:PRESENCE_COLOUR(presence) forKey:NSForegroundColorAttributeName]