O'Reilly logo

Cocoa in a Nutshell by James Duncan Davidson, Michael Beam

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Name

NSInputServer — Mac OS X 10.0

Synopsis

This class is a key component of the subsystem used to receive and process keystrokes, and direct the associated characters to the active text view to be added to the displayed text. The other two key classes of Cocoa’s text input system are NSInputManager and NSTextView. This class implements the interfaces declared in the NSInputServiceProvider and NSInputServerMouseTracker protocols. These two protocols declare the bulk of the functionality of NSInputServer. See the descriptions for these two protocols in Chapter 3 for more information.

image with no caption

@interface NSInputServer : NSObject <NSInputServerMouseTracker, NSInputServiceProvider>
                                  // Instance Methods
   - (id) initWithDelegate:(id)aDelegate 
                                 name:(NSString *)name;
                                  // Methods Implementing NSInputServerMouseTracker
   - (BOOL)mouseDownOnCharacterIndex:(unsigned)theIndex 
                                 atCoordinate:(NSPoint)thePoint
                                 withModifier:(unsigned int)theFlags 
                                 client:(id)sender;
   - (BOOL)mouseDraggedOnCharacterIndex:(unsigned)theIndex 
                                 atCoordinate:(NSPoint)thePoint
                                 withModifier:(unsigned int)theFlags 
                                 client:(id)sender;
   - (void)mouseUpOnCharacterIndex:(unsigned)theIndex 
                                 atCoordinate:(NSPoint)thePoint
                                 withModifier:(unsigned int)theFlags 
                                 client:(id)sender;
                                  // Methods Implementing NSInputServiceProvider
   - (void)insertText:(id)aString 
                                 client:(id)sender;
   - (void)doCommandBySelector:(SEL)aSelector 
                                 client:(id)

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required