mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 02:10:48 +00:00
Implement methods on NSTextInputContext
This commit is contained in:
parent
61f4621c5d
commit
30f1483ded
2 changed files with 89 additions and 0 deletions
|
@ -34,9 +34,18 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
@class NSArray, NSString;
|
||||
|
||||
typedef NSString* NSTextInputSourceIdentifier;
|
||||
|
||||
@interface NSTextInputContext : NSObject
|
||||
{
|
||||
id<NSTextInputClient> _client;
|
||||
BOOL _acceptsGlyphInfo;
|
||||
NSArray *_allowedInputSourceLocales;
|
||||
NSArray *_keyboardInputSources;
|
||||
NSTextInputSourceIdentifier _selectedKeyboardInputSource;
|
||||
}
|
||||
|
||||
+ (NSTextInputContext *) currentInputContext;
|
||||
|
||||
|
|
|
@ -22,9 +22,89 @@
|
|||
Boston, MA 02110 USA.
|
||||
*/
|
||||
|
||||
#import <Foundation/NSArray.h>
|
||||
#import <Foundation/NSString.h>
|
||||
#import "AppKit/NSTextInputContext.h"
|
||||
|
||||
NSTextInputContext *__currentInputContext;
|
||||
|
||||
@implementation NSTextInputContext
|
||||
|
||||
+ (NSTextInputContext *) currentInputContext
|
||||
{
|
||||
return __currentInputContext;
|
||||
}
|
||||
|
||||
- (instancetype) initWithClient: (id<NSTextInputClient>)client
|
||||
{
|
||||
self = [super init];
|
||||
if (self != nil)
|
||||
{
|
||||
_client = client;
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
- (id<NSTextInputClient>) client
|
||||
{
|
||||
return _client;
|
||||
}
|
||||
|
||||
- (BOOL) acceptsGlyphInfo
|
||||
{
|
||||
return _acceptsGlyphInfo;
|
||||
}
|
||||
|
||||
- (void) setAccessGlyphInfo: (BOOL)flag
|
||||
{
|
||||
_acceptsGlyphInfo = flag;
|
||||
}
|
||||
|
||||
- (NSArray *) allowedInputSourceLocales
|
||||
{
|
||||
return _allowedInputSourceLocales;
|
||||
}
|
||||
|
||||
- (void) setAllowedInputSourceLocales: (NSArray *)locales
|
||||
{
|
||||
ASSIGNCOPY(_allowedInputSourceLocales, locales);
|
||||
}
|
||||
|
||||
- (void) activate
|
||||
{
|
||||
}
|
||||
|
||||
- (void) deactivate
|
||||
{
|
||||
}
|
||||
|
||||
- (BOOL) handleEvent: (NSEvent *)event
|
||||
{
|
||||
return YES;
|
||||
}
|
||||
|
||||
- (void) discardMarkedText
|
||||
{
|
||||
}
|
||||
|
||||
- (void) invalidateCharacterCoordinates
|
||||
{
|
||||
}
|
||||
|
||||
- (NSArray *) keyboardInputSources
|
||||
{
|
||||
return _keyboardInputSources;
|
||||
}
|
||||
|
||||
- (NSTextInputSourceIdentifier) selectedKeyboardInputSource
|
||||
{
|
||||
return _selectedKeyboardInputSource;
|
||||
}
|
||||
|
||||
+ (NSString *) localizedNameForInputSource:(NSTextInputSourceIdentifier)inputSourceIdentifier
|
||||
{
|
||||
return nil;
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
|
|
Loading…
Reference in a new issue