Retired Document
Important: This sample code may not represent best practices for current development. The project may use deprecated symbols and illustrate technologies and techniques that are no longer recommended.
Source/EventHandler.h
/* |
File: EventHandler.h |
Contains: xxx put contents here xxx |
Version: xxx put version here xxx |
Copyright: © 1999 by Apple Computer, Inc., all rights reserved. |
File Ownership: |
DRI: xxx put dri here xxx |
Other Contact: xxx put other contact here xxx |
Technology: xxx put technology here xxx |
Writers: |
(BWS) Brent Schorsch |
Change History (most recent first): |
<SP1> 7/1/99 BWS first checked in |
*/ |
#ifndef __EVENT_HANDLER__ |
#define __EVENT_HANDLER__ |
//¥ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ Includes |
#ifndef __EVENTS__ |
#include <Events.h> |
#endif |
//¥ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ Public Definitions |
//¥ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ Public Types |
typedef Boolean (*EventHandlerProc)(const EventRecord *inEvent); |
typedef struct EventHandlerSet |
{ |
EventHandlerProc keyHandler; |
EventHandlerProc autoKeyHandler; |
EventHandlerProc clickHandler; |
EventHandlerProc updateHandler; |
EventHandlerProc diskHandler; |
EventHandlerProc idleHandler; |
} EventHandlerSet; |
//¥ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ Public Variables |
extern Boolean gDone; |
extern EventHandlerSet gEventHandlers; |
//¥ ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ Public Functions |
#ifdef __cplusplus |
extern "C" { |
#endif |
extern short EventInit(void); |
extern void EventLoop(void); |
extern void RegisterEventHandlers(EventHandlerProc inKeyDown, EventHandlerProc inAutoKey, EventHandlerProc inMouseDown, |
EventHandlerProc inUpdate, EventHandlerProc inIdle); |
extern void ModifyEventHandlers(EventHandlerProc inKeyDown, EventHandlerProc inAutoKey, EventHandlerProc inMouseDown, |
EventHandlerProc inUpdate, EventHandlerProc inIdle); |
#ifdef __cplusplus |
} |
#endif |
#endif |
Copyright © 2003 Apple Computer, Inc. All Rights Reserved. Terms of Use | Privacy Policy | Updated: 2003-10-14