forked from torifat/iAvro
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathCandidates.m
33 lines (25 loc) · 867 Bytes
/
Candidates.m
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
//
// AvroKeyboard
//
// Created by Rifat Nabi on 6/21/12.
// Copyright (c) 2012 OmicronLab. All rights reserved.
//
#import "Candidates.h"
static Candidates *_sharedInstance = nil;
@implementation Candidates
+ (void)allocateSharedInstanceWithServer:(IMKServer *)server {
if (_sharedInstance == nil) {
_sharedInstance = [[self alloc] initWithServer:server panelType:kIMKSingleColumnScrollingCandidatePanel];
[_sharedInstance setAttributes:[NSDictionary
dictionaryWithObject:[NSNumber numberWithBool:YES]
forKey:IMKCandidatesSendServerKeyEventFirst]];
[_sharedInstance setDismissesAutomatically:NO];
}
}
+ (void)deallocateSharedInstance {
[_sharedInstance release];
}
+ (Candidates *)sharedInstance; {
return _sharedInstance;
}
@end