home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2 / Openstep-4.2-Intel-Developer.iso / NextLibrary / Frameworks / AppKit.framework / Versions / B / Headers / NSInputServer.h < prev    next >
Text File  |  1996-11-26  |  3KB  |  64 lines

  1. /*
  2.     NSInputServer.h
  3.     Application Kit
  4.     Copyright (c) 1994-1996, NeXT Software, Inc.
  5.     All rights reserved.
  6. */
  7.  
  8. #ifndef STRICT_OPENSTEP
  9.  
  10. #import <Foundation/NSString.h>
  11. #import <AppKit/NSEvent.h>
  12.  
  13. @interface NSInputServer : NSObject {
  14. @protected
  15.     NSString *_name;
  16.     id _connection;
  17.     NSMutableDictionary *_connDict;
  18.     id _delegate;
  19.     int _reservedInputServer1;
  20.     int _reservedInputServer2;
  21. }
  22.  
  23. - initWithDelegate:(id)aDelegate name:(NSString *)name;
  24.  
  25. @end
  26.  
  27. /* These methods must be implemented by the delegate.
  28. */
  29. @interface NSInputServer(NSInputServerDelegateMethods)
  30.  
  31. /* the "flag" indicates the "active/inactive" state of the sender.  This message is sent on both activation and de-activation, with different "flag".
  32. */
  33. - (void) setActivated:(BOOL)flag sender:(id)sender;
  34.  
  35. - (void) insertText:(NSString *)aString sender:(id)sender conversation:(long)conv;
  36. - (void) doCommandBySelector:(SEL)aSelector sender:(id)sender conversation:(long)conv;
  37. - (void) markedTextWillBeAbandoned:(id)sender conversation:(long)conv;
  38. - (void) markedTextSelectionChanged:(NSRange)newSel sender:(id)sender conversation:(long)conv;
  39. - (void) cancelInput:(id)sender conversation:(long)conv;
  40. - (void) terminate:(id)sender;
  41.  
  42. /* Normally canBeDisabled returns YES and is implemented that way in the abstract NSInputServer class.
  43. */
  44. - (BOOL) canBeDisabled;
  45.  
  46. /* Many existing input servers have built-in key bindings that affect what happens within the marked region.  If such an input server wants to handle ALL key events through insertText:sender:conversation: and never receive doCommandBySelector:sender:conversation:, then it should respond (consistently) YES to this method.  The default is NO.  The processing of incoming events looks at this flag as reflected in the corresponding NSInputManager, before deciding how to deal with events.  A module which responds YES to this method must be prepared to deal with arbitrary strings of Unicode characters under all circumstances whenever it is active.
  47. */
  48. - (BOOL)wantsToInterpretAllKeystrokes;
  49.  
  50. #ifndef STRICT_40
  51. /* These methods are sent by current input manager when the application changes state so that the server can update its concept of who's current.  The actually "active" sender is the last one to have sent a senderDidBecomeActive: message.  They may not arrive in the expected order.
  52. */
  53. - (void) senderDidBecomeActive:(id)sender;
  54. - (void) senderDidResignActive:(id)sender;
  55.  
  56. /* This method is sent by input manager when the conversation within a particular sender changes.
  57. */
  58. - (void) activeConversationWillChange:(id)sender oldConversation:(long)oldConversation newConversation:(long)newConversation;
  59. #endif
  60.  
  61. @end
  62.  
  63. #endif
  64.