~zulcss/ubuntu/lucid/likewise-open/likewise-open-sru

« back to all changes in this revision

Viewing changes to domainjoin/domainjoin-gui/carbon/DomainJoin/HIFramework/TEventHandler.h

  • Committer: Bazaar Package Importer
  • Author(s): Rick Clark
  • Date: 2008-08-27 08:56:20 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20080827085620-5q0f58b9qtog9myq
Tags: 4.1.0.2956-0ubuntu1
* missing-likewise-logo.diff: removed
* fixed copyright notice
* updated Standards-Version to 3.8.0
* removed path from command in prerm
* removed stop in S runlevel

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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 -*- */
 
4
 
 
5
/*
 
6
 * Copyright (C) Centeris Corporation 2004-2007
 
7
 * Copyright (C) Likewise Software    2007-2008
 
8
 * All rights reserved.
 
9
 * 
 
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.
 
14
 *
 
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.
 
19
 *
 
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/>.
 
22
 */
 
23
 
 
24
/*
 
25
        File:           TEventHandler.h
 
26
 
 
27
    Version:    1.1
 
28
 
 
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.
 
34
 
 
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.
 
49
 
 
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.
 
55
 
 
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.
 
63
 
 
64
        Copyright � 2000-2005 Apple Computer, Inc., All Rights Reserved
 
65
*/
 
66
 
 
67
#ifndef TEventHandler_H_
 
68
#define TEventHandler_H_
 
69
 
 
70
#include "HIFramework.h"
 
71
#include "TCarbonEvent.h"
 
72
 
 
73
class TEventHandler
 
74
{
 
75
public:
 
76
                                                TEventHandler();
 
77
        virtual                         ~TEventHandler();
 
78
        
 
79
protected:
 
80
        OSStatus                        RegisterForEvents(
 
81
                                                        UInt32                                  inNumEvents,
 
82
                                                        const EventTypeSpec*    inEventList );
 
83
        OSStatus                        UnregisterForEvents(
 
84
                                                        UInt32                                  inNumEvents,
 
85
                                                        const EventTypeSpec*    inEventList );
 
86
        
 
87
        virtual OSStatus        HandleEvent(
 
88
                                                        EventHandlerCallRef             inCallRef,
 
89
                                                        TCarbonEvent&                   inEvent ) = PURE_VIRTUAL;
 
90
 
 
91
        virtual
 
92
        EventTargetRef          GetEventTarget() = PURE_VIRTUAL;
 
93
 
 
94
        EventHandlerRef         GetEventHandler();
 
95
 
 
96
private:
 
97
        static OSStatus         EventHandler(
 
98
                                                        EventHandlerCallRef     inHandler,
 
99
                                                        EventRef                                inEvent,
 
100
                                                        void*                                   inUserData );
 
101
 
 
102
        static
 
103
        EventHandlerUPP         GetEventHandlerProc();
 
104
        
 
105
        EventHandlerRef         fHandler;
 
106
};
 
107
 
 
108
#endif TEventHandler_H_
 
109