Event (computing):
In computer programming, an event is an action which can be initiated either by the user, a device such as a timer or keyboard, or even by the operating system. When an event occurs (or fires), data about the event is typically collected by a piece of hardware or software which may dispatch it to an event handler for further processing. Alternatively, an event might be ignored or it might be dispatched to multiple handlers that are simultaneously listening for the event. The data associated with an event at a minimum specifies what type of event it is, but may include other information such as when it occurred, who or what caused it to occur, and extra data provided by the event source to the handler about how the event should be processed. A computer program that changes its behavior in response to events is said to be event-driven, often with the goal of being interactive.
[edit] Examples
[edit] Mouse events
For example, with a pointing device such as a mouse, clicking a button triggers a "mouse click" event. The programmer would then program the software to respond to this "mouse click" event. Typical mouse events include mouse move and mouse button up/down. [1]
[edit] Keyboard events
When a user presses a key on a keyboard, the program currently running would receive a keyboard "KeyDown" event along with relevant data such as which key the user pressed.[1]
[edit] References
[edit] See also
|