//
//  MSInkResponder.h
//  MSInkFramework
//
//  Created by Raleigh Ledet on Wed Sep 24 2003.
//  Copyright (c) 2003-2007 Mage Software. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <Carbon/Carbon.h>

// MSInkResponder categories with default implamentations for various NSObjects.

@interface NSResponder ( MSInkResponder )
// MSInk version of the Carbon kEventInkText event. ie, a group of strokes that comprise a word and the best guesses from Inkwell as to what that word is.
- (OSStatus)MSInkText:(NSEvent *)theEvent;

// MSInk version of an Carbon kEventInkPoint event. These events occur while the user is inking. They are similar to a series of mouse down/drag/up events, only they don't stop on mouse up. Instead they stop when Inkwell decides to recognize the current outstanding ink.
- (OSStatus)MSInkPoint:(NSEvent *)theEvent;

// MSInk version of the Carbon kEventInkGesture event. These events occur when gestures are enabled and the user Ink a single stroke, and inkwell recognizes that stroke as one of it's gesture strokes.
- (OSStatus)MSInkGesture:(NSEvent *)theEvent;
@end

// Default implamentation that contnues to pass the event through the responder chain, returning eventNotHandledErr when the end of the chain is reached.
@interface NSView ( InkViewResponder )
- (OSStatus)MSInkText:(NSEvent *)theEvent;
- (OSStatus)MSInkPoint:(NSEvent *)theEvent;
- (OSStatus)MSInkGesture:(NSEvent *)theEvent;
@end

// Default implamentation that contnues to pass the event through the responder chain to the window controller, returning eventNotHandledErr if the window controller does not implament the method.
@interface NSWindow (InkWindowResponder)
- (OSStatus)MSInkText:(NSEvent *)theEvent;
- (OSStatus)MSInkPoint:(NSEvent *)theEvent;
- (OSStatus)MSInkGesture:(NSEvent *)theEvent;
@end