// Copyright 1998-2000 Omni Development, Inc.  All rights reserved.
//
// This software may only be used and reproduced according to the
// terms in the file OmniSourceLicense.html, which should be
// distributed with this project and can also be found at
// http://www.omnigroup.com/DeveloperResources/OmniSourceLicense.html.
//
// $Header: /Network/Source/CVS/OmniGroup/Frameworks/OmniHTML/Scripting.subproj/OWScriptResponderProtocol.h,v 1.4 2000/01/20 00:27:57 kc Exp $

/* old-fashioned single-include thing to work around cc bug */
#ifndef OWSCRIPTRESPONDERPROTOCOL_H
#define OWSCRIPTRESPONDERPROTOCOL_H

#import <Foundation/Foundation.h>

@class OWScriptEvent;

@protocol OWScriptResponder <NSObject>

/* Invoke a script event handler. Returns TRUE to indicate that the browser action should happen, FALSE to calcel it (if possible) */
- (BOOL)handleHTMLEvent:(OWScriptEvent *)event;

/* Returns YES if the responder wants to be invoked in the main thread; NO otherwise. TODO: Should the event itself be passed in to help it decide? */
- (BOOL)handleHTMLEventsInMainThread;

@end

#if 0
@protocol OWScriptEventRegistry

- (void)setHandler:(id <OWScriptResponder>)handler forEventType:(OWScriptEventType)type;

@end
#endif

#endif /* OWSCRIPTRESPONDERPROTOCOL_H */

