mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-18 20:07:39 +00:00
Moved special logic for dealing with pending character buffer in Google Chrome into the BrowserClientEventHandler.
42 lines
2 KiB
Objective-C
42 lines
2 KiB
Objective-C
//
|
|
// KMInputMethodEventHandlerProtected.h
|
|
// Keyman4MacIM
|
|
//
|
|
// Created by tom on 1/5/18.
|
|
// Copyright © 2018 SIL International. All rights reserved.
|
|
//
|
|
|
|
#ifndef KMInputMethodEventHandlerProtected_h
|
|
#define KMInputMethodEventHandlerProtected_h
|
|
|
|
@interface KMInputMethodEventHandler ()
|
|
//@property (nonatomic) NSMutableDictionary *kbData;
|
|
//@property (nonatomic) NSDictionary *kmModes;
|
|
@property (assign) BOOL willDeleteNullChar;
|
|
@property (assign) BOOL contextOutOfDate;
|
|
// This flag indicates which mode is being used for replacing already typed text when composing characters
|
|
// (i.e., when not using deadkeys). Some apps (and some javascript-based websites, such as Google Docs) do
|
|
// not properly deal with calls to insertText calls that replace a range of characters. So for these "legacy"
|
|
// apps, we post one or more deletes (i.e., backspace), followed by a special code that tells us we're now
|
|
// ready to insert the composed text.
|
|
@property (assign) BOOL legacyMode;
|
|
// Some clients (e.g. Chrome) handle the mouse down events before we get a crack at them. For such apps that
|
|
// are able to report their current selection location (LibreOffice can't even do that!), we can do some
|
|
// checking at the start of the event processing to see if we're probably still in the same place where we
|
|
// left off previously.
|
|
@property (assign) BOOL clientSelectionCanChangeUnexpectedly; // REVIEW: Maybe we can get notification from these clients by handling mouseDownOnCharacterIndex.
|
|
@property (assign) BOOL insertCharactersIndividually;
|
|
@property (assign) BOOL cannnotTrustSelectionLength;
|
|
|
|
- (void)checkContextIn:(id)client;
|
|
- (void)replaceExistingSelectionIn:(id)client with:(NSString *) text;
|
|
- (void)insertPendingBufferTextIn:(id)client;
|
|
- (KMInputMethodAppDelegate *)AppDelegate;
|
|
- (NSMutableString *)contextBuffer;
|
|
// Return the pending buffer. If it is NIL create it.
|
|
-(NSMutableString*)pendingBuffer;
|
|
-(void)setPendingBuffer:(NSString*)string;
|
|
- (void)initiatePendingBufferProcessing:(id)sender;
|
|
@end
|
|
|
|
#endif /* KMInputMethodEventHandlerProtected_h */
|