mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
Implement NSTextInputClient protocol
This commit is contained in:
parent
191fb4c3fe
commit
836e2e8b1e
1 changed files with 38 additions and 0 deletions
|
@ -26,6 +26,9 @@
|
|||
#define _NSTextInputClient_h_GNUSTEP_GUI_INCLUDE
|
||||
|
||||
#import <Foundation/NSObject.h>
|
||||
#import <Foundation/NSGeometry.h>
|
||||
|
||||
#import <AppKit/NSAttributedString.h>
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_5, GS_API_LATEST)
|
||||
|
||||
|
@ -33,8 +36,43 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
@class NSArray;
|
||||
|
||||
@protocol NSTextInputClient
|
||||
|
||||
@required
|
||||
// Marked text
|
||||
- (BOOL) hasMarkedText;
|
||||
- (NSRange) markedRange;
|
||||
- (NSRange) selectedRange;
|
||||
- (void) setMarkedText: (id)string
|
||||
selectedRange: (NSRange)selectedRange
|
||||
replacementRange: (NSRange)replacementRange;
|
||||
- (void)unmarkText;
|
||||
- (NSArray *)validAttributesForMarkedText;
|
||||
|
||||
// Storing text
|
||||
- (NSAttributedString *) attributedSubstringForProposedRange: (NSRange)range
|
||||
actualRange: (NSRangePointer)actualRange;
|
||||
- (void) insertText: (id)string
|
||||
replacementRange: (NSRange)replacementRange;
|
||||
|
||||
// Getting Character coordinates
|
||||
- (NSUInteger) characterIndexForPoint: (NSPoint)point;
|
||||
- (NSRect) firstRectForCharacterRange: (NSRange)range
|
||||
actualRange: (NSRangePointer)actualRange;
|
||||
|
||||
// Binding keystrokes
|
||||
- (void) doCommandBySelector: (SEL)selector;
|
||||
|
||||
@optional
|
||||
// Optional methods
|
||||
- (NSAttributedString *) attributedString;
|
||||
- (CGFloat) fractionOfDistanceThroughGlyphForPoint: (NSPoint)point;
|
||||
- (CGFloat) baselineDeltaForCharacterAtIndex: (NSUInteger)anIndex;
|
||||
- (NSInteger) windowLevel;
|
||||
- (BOOL) drawsVerticallyForCharacterAtIndex: (NSUInteger)charIndex;
|
||||
|
||||
@end
|
||||
|
||||
#if defined(__cplusplus)
|
||||
|
|
Loading…
Reference in a new issue