import EventPhase from "./EventPhase"; declare namespace openfl.events { /** * The Event class is used as the base class for the creation of Event * objects, which are passed as parameters to event listeners when an event * occurs. * * The properties of the Event class carry basic information about an * event, such as the event's type or whether the event's default behavior can * be canceled. For many events, such as the events represented by the Event * class constants, this basic information is sufficient. Other events, * however, may require more detailed information. Events associated with a * mouse click, for example, need to include additional information about the * location of the click event and whether any keys were pressed during the * click event. You can pass such additional information to event listeners by * extending the Event class, which is what the MouseEvent class does. * The OpenFL API defines several Event subclasses for common events * that require additional information. Events associated with each of the * Event subclasses are described in the documentation for each class. * * The methods of the Event class can be used in event listener functions * to affect the behavior of the event object. Some events have an associated * default behavior. For example, the `doubleClick` event has an * associated default behavior that highlights the word under the mouse * pointer at the time of the event. Your event listener can cancel this * behavior by calling the `preventDefault()` method. You can also * make the current event listener the last one to process an event by calling * the `stopPropagation()` or * `stopImmediatePropagation()` method. * * Other sources of information include: * * * A useful description about the timing of events, code execution, and * rendering at runtime in Ted Patrick's blog entry: