diff options
author | Tor Lillqvist <tml@collabora.com> | 2014-06-03 09:04:45 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@collabora.com> | 2014-06-03 21:29:04 +0300 |
commit | e4dc93f5d8d0df50f1a8b4594220d0c57703e03d (patch) | |
tree | 21cb03cb3ded8ff0b6105a9823fc682b7d1e6cf3 /vcl/osx/salframeview.mm | |
parent | 1b89f986f0e7e6303c4e44cb1ca5d42a5c78c8d4 (diff) |
Initial attempt at implementing NSTextInputClient instead of NSTextInput
NSTextInput was deprecated in 10.6.
Change-Id: I6bce9e91a68014a6ca28bff6a820c27817f9baaf
Diffstat (limited to 'vcl/osx/salframeview.mm')
-rw-r--r-- | vcl/osx/salframeview.mm | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/vcl/osx/salframeview.mm b/vcl/osx/salframeview.mm index 34cd70acdf41..fadd508b20ca 100644 --- a/vcl/osx/salframeview.mm +++ b/vcl/osx/salframeview.mm @@ -1026,8 +1026,10 @@ private: } } --(void)insertText:(id)aString +-(void)insertText:(id)aString replacementRange:(NSRange)replacementRange { + (void) replacementRange; // FIXME: surely it must be used + YIELD_GUARD; if( AquaSalFrame::isAlive( mpFrame ) ) @@ -1545,7 +1547,7 @@ private: } -// NSTextInput protocol +// NSTextInputClient protocol - (NSArray *)validAttributesForMarkedText { return [NSArray arrayWithObjects:NSUnderlineStyleAttributeName, nil]; @@ -1596,8 +1598,10 @@ private: return mSelectedRange; } -- (void)setMarkedText:(id)aString selectedRange:(NSRange)selRange +- (void)setMarkedText:(id)aString selectedRange:(NSRange)selRange replacementRange:(NSRange)replacementRange { + (void) replacementRange; // FIXME - use it! + if( ![aString isKindOfClass:[NSAttributedString class]] ) aString = [[[NSAttributedString alloc] initWithString:aString] autorelease]; NSRange rangeToReplace = [self hasMarkedText] ? [self markedRange] : [self selectedRange]; @@ -1664,10 +1668,12 @@ private: mSelectedRange = mMarkedRange = NSMakeRange(NSNotFound, 0); } -- (NSAttributedString *)attributedSubstringFromRange:(NSRange)theRange +- (NSAttributedString *)attributedSubstringForProposedRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange { - (void)theRange; - // FIXME + (void) aRange; + (void) actualRange; + + // FIXME - Implement return nil; } @@ -1709,9 +1715,12 @@ private: mpLastEvent = nil; } -- (NSRect)firstRectForCharacterRange:(NSRange)theRange +- (NSRect)firstRectForCharacterRange:(NSRange)aRange actualRange:(NSRangePointer)actualRange { - (void)theRange; + // FIXME - These should probably be used? + (void) aRange; + (void) actualRange; + SalExtTextInputPosEvent aPosEvent; mpFrame->CallCallback( SALEVENT_EXTTEXTINPUTPOS, (void *)&aPosEvent ); |