1
/* Editor Settings: expandtabs and use 4 spaces for indentation
2
* ex: set softtabstop=4 tabstop=8 expandtab shiftwidth=4: *
3
* -*- mode: c, c-basic-offset: 4 -*- */
6
* Copyright (C) Centeris Corporation 2004-2007
7
* Copyright (C) Likewise Software 2007-2008
10
* This program is free software; you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation; either version 2 of the License, or
13
* (at your option) any later version.
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
20
* You should have received a copy of the GNU General Public License
21
* along with this program. If not, see <http://www.gnu.org/licenses/>.
29
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
30
("Apple") in consideration of your agreement to the following terms, and your
31
use, installation, modification or redistribution of this Apple software
32
constitutes acceptance of these terms. If you do not agree with these terms,
33
please do not use, install, modify or redistribute this Apple software.
35
In consideration of your agreement to abide by the following terms, and subject
36
to these terms, Apple grants you a personal, non-exclusive license, under Apple�s
37
copyrights in this original Apple software (the "Apple Software"), to use,
38
reproduce, modify and redistribute the Apple Software, with or without
39
modifications, in source and/or binary forms; provided that if you redistribute
40
the Apple Software in its entirety and without modifications, you must retain
41
this notice and the following text and disclaimers in all such redistributions of
42
the Apple Software. Neither the name, trademarks, service marks or logos of
43
Apple Computer, Inc. may be used to endorse or promote products derived from the
44
Apple Software without specific prior written permission from Apple. Except as
45
expressly stated in this notice, no other rights or licenses, express or implied,
46
are granted by Apple herein, including but not limited to any patent rights that
47
may be infringed by your derivative works or by other works in which the Apple
48
Software may be incorporated.
50
The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
51
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
52
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
53
PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
54
COMBINATION WITH YOUR PRODUCTS.
56
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
57
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
58
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
59
ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
60
OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
61
(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
62
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
64
Copyright � 2000-2005 Apple Computer, Inc., All Rights Reserved
67
#ifndef TEventHandler_H_
68
#define TEventHandler_H_
70
#include "HIFramework.h"
71
#include "TCarbonEvent.h"
77
virtual ~TEventHandler();
80
OSStatus RegisterForEvents(
82
const EventTypeSpec* inEventList );
83
OSStatus UnregisterForEvents(
85
const EventTypeSpec* inEventList );
87
virtual OSStatus HandleEvent(
88
EventHandlerCallRef inCallRef,
89
TCarbonEvent& inEvent ) = PURE_VIRTUAL;
92
EventTargetRef GetEventTarget() = PURE_VIRTUAL;
94
EventHandlerRef GetEventHandler();
97
static OSStatus EventHandler(
98
EventHandlerCallRef inHandler,
103
EventHandlerUPP GetEventHandlerProc();
105
EventHandlerRef fHandler;
108
#endif TEventHandler_H_