Add externs

This commit is contained in:
Gregory John Casamento 2020-08-02 11:39:51 -04:00
parent 5bca05faef
commit 281da47d7f
3 changed files with 40 additions and 1 deletions

View file

@ -26,6 +26,7 @@
#define _NSTextInputContext_h_GNUSTEP_GUI_INCLUDE
#import <Foundation/NSObject.h>
#import <AppKit/NSTextInputClient.h>
#if OS_API_VERSION(MAC_OS_X_VERSION_10_6, GS_API_LATEST)
@ -33,10 +34,41 @@
extern "C" {
#endif
typedef NSString* NSTextInputSourceIdentifier;
@interface NSTextInputContext : NSObject
+ (NSTextInputContext *) currentInputContext;
- (instancetype) initWithClient: (id<NSTextInputClient>)client;
- (id<NSTextInputClient>) client;
- (BOOL) acceptsGlyphInfo;
- (void) setAccessGlyphInfo: (BOOL)flag;
- (NSArray *) allowedInputSourceLocales;
- (void) setAllowedInputSourceLocales: (NSArray *)locales; // copy;
- (void) activate;
- (void) deactivate;
- (BOOL) handleEvent: (NSEvent *)event;
- (void) discardMarkedText;
- (void) invalidateCharacterCoordinates;
- (NSArray *) keyboardInputSources;
- (NSTextInputSourceIdentifier) selectedKeyboardInputSource;
+ (NSString *) localizedNameForInputSource:(NSTextInputSourceIdentifier)inputSourceIdentifier;
@end
APPKIT_EXPORT NSNotificationName NSTextInputContextKeyboardSelectionDidChangeNotification;
#if defined(__cplusplus)
}
#endif

View file

@ -111,4 +111,3 @@
}
@end

View file

@ -35,6 +35,7 @@
#import "AppKit/NSEvent.h"
#import "AppKit/NSAppearance.h"
#import "AppKit/NSFontCollection.h"
#import "AppKit/NSTextFinder.h"
// Global strings
NSString *NSModalPanelRunLoopMode = @"NSModalPanelRunLoopMode";
@ -834,6 +835,13 @@ NSFontCollectionMatchingOptionKey const NSFontCollectionDisallowAutoActivationOp
// Speech recognition...
const NSString *GSSpeechRecognizerDidRecognizeWordNotification = @"GSSpeechRecognizerDidRecognizeWordNotification";
// NSTextInputContext notifications
NSString *NSTextInputContextKeyboardSelectionDidChangeNotification =
@"NSTextInputContextKeyboardSelectionDidChangeNotification";
NSPasteboardTypeTextFinderOptionKey const NSTextFinderCaseInsensitiveKey = @"NSTextFinderCaseInsensitiveKey";
NSPasteboardTypeTextFinderOptionKey const NSTextFinderMatchingTypeKey = @"NSTextFinderMatchingTypeKey";
extern void __objc_gui_force_linking (void);
void