< Previous PageNext Page > Hide TOC

Legacy Documentclose button

Important: The Event Manager is a legacy System 7 technology. You should use the Mac OS X Carbon Event Manager instead. See Carbon Event Manager Programming Guide.

Legacy Functions

This appendix describes functions that are not recommended or are not available in Carbon and Mac OS X. The API documentation for these functions has been moved to Event Manager Legacy Reference.

Not Recommended

Table B-1 lists Event Manager functions that are not recommended in Carbon and Mac OS X. You should avoid using any calls that poll the state of the mouse button, as they use excessive processor time and slow down the system. In most cases you are more interested in the transitions of the mouse button rather than its instantaneous state, so you should adopt Carbon events and take action on mouse-up and mouse-down events. If you need to track the mouse while down, consider using the Carbon Event Manager functions TrackMouseLocation or TrackMouseRegion. If you need to know the button state, you should call the GetCurrentEventButtonState function.

Table B-1  Functions that are not recommended

Name

Porting Notes

Button

You should avoid using any calls that poll the state of the mouse button.

GetMouse

You should avoid using any calls that poll the state of the mouse button.

StillDown

You should avoid using any calls that poll the state of the mouse button.

WaitMouseUp

You should avoid using any calls that poll the state of the mouse button.

Not Available

Table B-2 lists Event Manager functions that are not available in Carbon and Mac OS X.

Table B-2  Functions that are not available

Name

Porting Notes

AcceptHighLevelEvent

The High Level Event APIs (EPPC.h) are not supported in Carbon. Instead, use Apple events.

DisposeFKEYUPP

FKEYs are not supported in Carbon because they involve loading code from resources, which isn't supported under Carbon, and because very few applications use them.

DisposeGetNextEventFilterUPP

GetNextEvent (GNE) filters patch the GetNextEvent function and therefore are not supported in Carbon.

DisposeGetSpecificFilterUPP

The High Level Event APIs (EPPC.h) are not supported in Carbon. Instead, use Apple events.

GetPortNameFromProcessSerialNumber

The GetPortNameFromProcessSerialNumber function does not move or purge memory but for other reasons should not be called from within an interrupt, such as in a completion function or VBL task.

GetProcessSerialNumberFromPortName

The GetProcessSerialNumberFromPortName function does not move or purge memory but for other reasons should not be called from within an interrupt, such as in a completion function or VBL task.

GetEvQHdr

Returns a global system data structure, so it will not be supported in the future.

GetOSEvent

GetOSEvent is not supported in Carbon. Use the GetNextEvent function instead

OSEventAvail

OSEventAvail is not supported in Carbon. Use the EventAvail function instead.

GetSpecificHighLevelEvent

The GetSpecificHighLevelEvent function may move or purge memory. You should not call this function from within an interrupt, such as in a completion function or VBL task.

InvokeFKEYUPP

FKEYs are not supported in Carbon because they involve loading code from resources, which isn't supported under Carbon, and because very few applications use them.

InvokeGetNextEventFilterUPP

GetNextEvent (GNE) filters patch the GetNextEvent function and therefore are not supported in Carbon.

InvokeGetSpecificFilterUPP

The High Level Event APIs (EPPC.h) are not supported in Carbon. Instead, use Apple events.

NewFKEYUPP

FKEYs are not supported in Carbon because they involve loading code from resources, which isn't supported under Carbon, and because very few applications use them.

NewGetNextEventFilterUPP

GetNextEvent (GNE) filters patch the GetNextEvent function and therefore are not supported in Carbon.

NewGetSpecificFilterUPP

The High Level Event APIs (EPPC.h) are not supported in Carbon. Instead, use Apple events.

PostHighLevelEvent

The High Level Event APIs (EPPC.h) are not supported in Carbon. Instead, use Apple events.

PPostEvent

Posting events in the Operating System event queue is not supported in Carbon.

SystemClick

Desk accessories are not supported in Carbon.

SystemEvent

Desk accessories are not supported in Carbon.

SystemTask

In Carbon, the Event Manager automatically handles all task scheduling.



< Previous PageNext Page > Hide TOC


© 2003, 2007 Apple Inc. All Rights Reserved. (Last updated: 2007-10-31)


Did this document help you?
Yes: Tell us what works for you.
It’s good, but: Report typos, inaccuracies, and so forth.
It wasn’t helpful: Tell us what would have helped.