Commit: 2c6c1b6cc046558519bb8dcfb8ee60401862d7e0 Author: Yuki Hashimoto Date: Mon Jul 5 12:58:33 2021 +0200 Branches: master https://developer.blender.org/rB2c6c1b6cc046558519bb8dcfb8ee60401862d7e0
Cleanup: replace NSTextInput with NSTextInputClient This revision replaces the deprecated protocol NSTextInput with NSTextInputClient in Cocoa Text View. No functional changes. For more information of the methods, please see: https://developer.apple.com/documentation/appkit/nstextinputclient Differential Revision: https://developer.blender.org/D11407 =================================================================== M intern/ghost/intern/GHOST_WindowViewCocoa.h =================================================================== diff --git a/intern/ghost/intern/GHOST_WindowViewCocoa.h b/intern/ghost/intern/GHOST_WindowViewCocoa.h index b94f46b6e63..af84297626b 100644 --- a/intern/ghost/intern/GHOST_WindowViewCocoa.h +++ b/intern/ghost/intern/GHOST_WindowViewCocoa.h @@ -25,7 +25,7 @@ * Objective-C does not have multiple inheritance. */ // We need to subclass it in order to give Cocoa the feeling key events are trapped -@interface COCOA_VIEW_CLASS : COCOA_VIEW_BASE_CLASS <NSTextInput> +@interface COCOA_VIEW_CLASS : COCOA_VIEW_BASE_CLASS <NSTextInputClient> { GHOST_SystemCocoa *systemCocoa; GHOST_WindowCocoa *associatedWindow; @@ -202,12 +202,14 @@ } } -- (void)insertText:(id)chars +- (void)insertText:(id)chars replacementRange:(NSRange)replacementRange { [self composing_free]; } -- (void)setMarkedText:(id)chars selectedRange:(NSRange)range +- (void)setMarkedText:(id)chars + selectedRange:(NSRange)range + replacementRange:(NSRange)replacementRange { [self composing_free]; if ([chars length] == 0) @@ -241,12 +243,8 @@ return composing; } -- (NSInteger)conversationIdentifier -{ - return (NSInteger)self; -} - -- (NSAttributedString *)attributedSubstringFromRange:(NSRange)range +- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)range + actualRange:(NSRangePointer)actualRange { return [[[NSAttributedString alloc] init] autorelease]; } @@ -267,7 +265,7 @@ return NSMakeRange(0, length); } -- (NSRect)firstRectForCharacterRange:(NSRange)range +- (NSRect)firstRectForCharacterRange:(NSRange)range actualRange:(NSRangePointer)actualRange { return NSZeroRect; } _______________________________________________ Bf-blender-cvs mailing list [email protected] List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs
