Event handler

Event handler

In computer programming, an event handler is an asynchronous callback subroutine that handles inputs received in a program. Each "event" is a piece of application-level information from the underlying framework, typically the GUI toolkit. GUI events include key presses, mouse movement, action selections, and timers expiring. On a lower level, events can represent availability of new data for reading a file or network stream. Event handlers are a central concept in event-driven programming.

The events are created by the framework based on interpreting lower-level inputs, which may be lower-level events themselves. For example, mouse movements and clicks are interpreted as menu selections. The events initially originate from actions on the operating system level, such as interrupts generated by hardware devices, software interrupt instructions, or state changes in polling. On this level, interrupt handlers and signal handlers correspond to event handlers.

Created events are first processed by an "event dispatcher" within the framework. It typically manages the associations between events and event handlers, and may queue event handlers or events for later processing. Event dispatchers may call event handlers directly, or wait for events to be dequeued with information about the handler to be executed.

ee also

*Callback (computer science)
*Signal handler
*Interrupt handler
*Event-driven programming
*Observer pattern (e.g. Event listener)
*DOM Events
*Virtual synchrony

External links

* [http://hikwww2.fzk.de/hik/orga/verdi/rs/Dokumentation/Cpp/Cpp/ioc/tasks/t90us014.htm Write an Event Handler]
* [http://atddoc.cern.ch/Atlas/Notes/061/Note061-1.html A High Level Design of the Sub-Farm Event Handler]
* [http://www.w3.org/TR/xml-events/Overview.html#section-eventhandlers An Events Syntax for XML]
*Javadoc:SE-guide|plugin/dom/org/w3c/dom/events/Event.html|Java DOM Interface Event Javadoc documentation
*Javadoc:SE|package=javax.swing.event|javax/swing/event Java package Javadoc API documentation
*Javadoc:SE|package=java.awt.event|java/awt/event Java package Javadoc API documentation
* [http://www.jini.org/wiki/Jini_Distributed_Events_Specification#Distributed_Events_and_Notifications Distributed Events and Notifications]
* [http://www.quirksmode.org/js/events_order.html Event order]
* [http://developer.apple.com/internet/webcontent/eventmodels.html Supporting Three Event Models at Once]
*Article " [http://doc.trolltech.com/qq/qq11-events.html Another Look at Events] " by Jasmin Blanchette
*Article " [http://w3future.com/html/stories/callbacks.xml Event Handlers and Callback Functions] " by Sjoerd Visscher


Wikimedia Foundation. 2010.

Игры ⚽ Нужен реферат?

Look at other dictionaries:

  • Event-Handler —   [zu engl. event »Ereignis«], Handler …   Universal-Lexikon

  • Event-Handler — Ein Ereignis (engl. event) dient in der Softwaretechnik zur Steuerung des Programmflusses. Das Programm wird nicht linear durchlaufen, sondern es werden spezielle Ereignisbehandlungsroutinen (engl. listener, observer, event handler) immer dann… …   Deutsch Wikipedia

  • event handler — segment of a program which responds to the occurrence of events …   English contemporary dictionary

  • Handler — may refer to:a person who handles something: ** animal handler, person who conducts animal training or is a wrangler (profession). ** a sports handler, a coach (sport) or sports agent of a sports player, or a promoter (entertainment) ** agent… …   Wikipedia

  • Event (computing) — In computing an event is an action that is usually initiated outside the scope of a program and that is handled by a piece of code inside the program. Typically events are handled synchronous with the program flow, that is, the program has one or …   Wikipedia

  • Event-driven programming — Programming paradigms Agent oriented Automata based Component based Flow based Pipelined Concatenative Concurrent computin …   Wikipedia

  • Event loop — In computer science, the event loop, message dispatcher, message loop, message pump, or run loop is a programming construct that waits for and dispatches events or messages in a program. It works by polling some internal or external event… …   Wikipedia

  • Händler — Händ|ler [ hɛndlɐ], der; s, , Händ|le|rin [ hɛndlərɪn], die; , nen: Person, die Handel treibt: die Händlerin verdiente bei dem Verkauf des Gebrauchtwagens eine Menge Geld. Syn.: ↑ Geschäftsfrau, ↑ Geschäftsmann, ↑ Kauffrau, ↑ Kaufmann. Zus.:… …   Universal-Lexikon

  • Event cascade — In event driven computer programs, an event cascade occurs when an event handler causes another event to occur which also triggers an event handler. This can be a tricky source of program errors (see computer bug) …   Wikipedia

  • Event-Handel — Handelsveranstaltung, bei der Events (Sport, Musik , Kultur , Wissenschafts , Gesundheits bzw. karitative Veranstaltungen) erzeugt werden, und auf denen ausgewählte Händler spezielle, auf die Zielgruppe der Besucher ausgesuchte Waren anbieten.… …   Lexikon der Economics

Share the article and excerpts

Direct link
Do a right-click on the link above
and select “Copy Link”