spiegel-keyman/mac/Keyman4MacIM/Keyman4MacIM/KMInputMethodLifecycle.h
Shawn Schantz a99ca4f120 change(mac): overhauled logic for determining input method state
uses Carbon APIs to determine current input source
This, combined with text input client is used to determine
whether Keyman is truly active or not.
Removed all code executing on delays and immediately
checks state and shows/hides OSK and
enables/disables eventTap.
2024-09-12 19:57:10 +07:00

27 lines
664 B
Objective-C

/*
* Keyman is copyright (C) SIL International. MIT License.
*
* Created by Shawn Schantz on 2024-09-09.
*
*/
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
extern NSString *const kInputMethodActivatedNotification;
extern NSString *const kInputMethodDeactivatedNotification;
extern NSString *const kInputMethodClientChangeNotification;
@interface KMInputMethodLifecycle : NSObject
+ (KMInputMethodLifecycle *)shared;
+ (NSString*)getClientApplicationId;
- (void)startLifecycle;
- (void)activateClient:(id)client;
- (void)deactivateClient:(id)client;
- (BOOL)shouldEnableEventTap;
- (BOOL)shouldShowOskOnActivate;
@end
NS_ASSUME_NONNULL_END