summaryrefslogtreecommitdiff
path: root/bindings/objc/src/SwordKey.h
blob: caa4f35fe140231ce747dae062444e72849c6ded (plain)
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
40
41
42
43
44
45
46
47
//
//  SwordKey.h
//  MacSword2
//
//  Created by Manfred Bergmann on 17.12.09.
//  Copyright 2009 Software by MABE. All rights reserved.
//

#import <Foundation/Foundation.h>

#ifdef __cplusplus
#include <swkey.h>
#endif

@interface SwordKey : NSObject {
#ifdef __cplusplus
    sword::SWKey *sk;
#endif
    BOOL created;
}

+ (SwordKey *)swordKey;
+ (SwordKey *)swordKeyWithRef:(NSString *)aRef;

#ifdef __cplusplus
+ (SwordKey *)swordKeyWithSWKey:(sword::SWKey *)aSk;
+ (SwordKey *)swordKeyWithSWKey:(sword::SWKey *)aSk makeCopy:(BOOL)copy;
- (SwordKey *)initWithSWKey:(sword::SWKey *)aSk;
- (SwordKey *)initWithSWKey:(sword::SWKey *)aSk makeCopy:(BOOL)copy;
- (sword::SWKey *)swKey;
#endif

- (SwordKey *)initWithRef:(NSString *)aRef;

- (SwordKey *)clone;
- (void)setPersist:(BOOL)flag;
- (BOOL)persist;

- (int)error;

- (void)setPosition:(int)aPosition;
- (void)decrement;
- (void)increment;
- (NSString *)keyText;
- (void)setKeyText:(NSString *)aKey;

@end