231:
803:
884:
systems (used to inform applications when conditions they are watching for have occurred), modern operating systems (used to inform applications when they should take some action, such as refreshing a window), and modern distributed systems, where the producer of an event might be on a different
122:
Events are typically used in user interfaces, where actions in the outside world (such as mouse clicks, window-resizing, keyboard presses, and messages from other programs) are handled by the program as a series of events. Programs written for many windowing environments consist predominantly of
788:
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.
764:
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
134:. Compared to interrupts, events are normally implemented synchronously: the program explicitly waits for an event to be generated and handled (typically by calling an instruction that dispatches the next event), whereas an interrupt can demand immediate service.
885:
machine than the consumer, or consumers. Event notification platforms are normally designed so that the application producing events do not need to know which applications will consume them, or even how many applications will monitor the event stream.
114:
for a particular 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
98:
Event driven systems are typically used when there is some asynchronous external activity that needs to be handled by a program, such as a user pressing a mouse button. An event driven system typically runs an
178:
Pressing a key on a keyboard or a combination of keys generates a keyboard event, enabling the program currently running to respond to the introduced data such as which key/s the user pressed.
82:. Software can also trigger its own set of events into the event loop, such as by communicating the completion of a task. Software that changes its behavior in response to events is said to be
103:
that keeps waiting for such activities, such as input from devices or internal alarms. When one of these occurs, it collects data about the event and dispatches the event to the
1059:
1099:
757:
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
896:
model is sometimes used to endow event notification systems, and publish-subscribe systems, with stronger fault-tolerance and consistency guarantees.
158:. A mouse can generate a number of mouse events, such as mouse move (including direction of move and distance), mouse left/right button up/down and
142:
There are many situations or events that a program or system may generate or to which it may respond. Some common user generated events include:
1089:
1081:
110:
A program can choose to ignore events, and there may be libraries to dispatch an event to multiple handlers that may be programmed to
296:
every time the source generates the event, it communicates it to the registered listeners, following the protocol of the interface.
1049:
275:
1070:
824:
850:
832:
713:
905:
1020:
877:(the "events") to applications that monitor the associated conditions and may take actions triggered by events.
303:
uses events as special delegates that can only be fired by the class that declares them. This allows for better
828:
304:
300:
63:
1114:
271:
1119:
730:
719:
243:
892:, a term that relates to one class of products supporting event notification in networked settings. The
770:
1054:
55:. That is, the software may have one or more dedicated places where events are handled, frequently an
1002:. Institut für Systemsoftware, Johannes Kepler Universität Linz, Fachbereich Informatik. p. 26
920:
813:
758:
287:
247:
83:
817:
155:
996:
982:
238:
is the event source –a button in this example–, and it contains a list of listeners.
251:
738:
1124:
190:
generates an X-Y analogue signal. They often have multiple buttons to trigger events. Some
71:
20:
222:
Device events include action by or to a device, such as a shake, tilt, rotation, or move.
8:
293:
every listener must register with the source to declare its desire to listen to the event
211:
955:
925:
960:
930:
893:
889:
867:
774:
746:
75:
43:
by the software. Computer events can be generated or triggered by the system, by the
769:
generated by hardware devices, software interrupt instructions, or state changes in
950:
940:
910:
261:
44:
36:
1064:
1043:
946:
151:
127:
48:
24:
778:
750:
737:). Each event is a piece of application-level information from the underlying
1108:
265:
230:
87:
79:
40:
1093:
167:
163:
159:
52:
742:
207:
203:
915:
766:
734:
722:
100:
67:
56:
935:
718:
In computer programming, an event handler may be implemented using a
131:
802:
881:
874:
870:
187:
32:
1074:
191:
754:
166:
commonly select words and characters within boundary, and
162:
motion, or a combination of these gestures. For example,
274:(in the broader meaning of the term) which describe the
119:
to the handler about how the event should be processed.
1021:"EventTarget.addEventListener() - Web APIs | MDN"
888:
Event notification is sometimes used as a synonym for
268:, which receive the event notification from the source
880:
Event notification is an important feature in modern
62:
The user can be the source of an event. The user may
725:
that handles inputs received in a program (called a
286:
every listener must implement the interface for the
47:, or in other ways. Typically, events are handled
1050:A High Level Design of the Sub-Farm Event Handler
1106:
492:$ "{sender} was changed during update"
154:can generate a number of software recognisable
714:Event-driven programming § Event handlers
74:or clicking with a mouse. Another source is a
873:for linking applications that generate small
997:"Advanced C#: Variable Number of Parameters"
985:. Microsoft. Retrieved on February 12, 2008.
831:. Unsourced material may be challenged and
39:from the external environment, that may be
16:Action or occurrence recognized by software
994:
983:Mouse and Keyboard Events in Windows Forms
851:Learn how and when to remove this message
784:Created events are first processed by an
278:by which the event is to be communicated.
254:. This model is based on three entities:
66:with the software through the computer's
31:is an action or occurrence recognized by
229:
137:
978:
976:
225:
194:for popular game boxes use joysticks.
1107:
1085:Java package Javadoc API documentation
282:Furthermore, the model requires that:
1044:Event Handlers and Callback Functions
792:
197:
1060:Distributed Events and Notifications
995:Mössenböck, Hanspeter (2002-03-25).
973:
829:adding citations to reliable sources
796:
258:a control, which is the event source
866:is a term used in conjunction with
13:
603:$ "{sender} was changed"
181:
173:
14:
1136:
1035:
753:movement, action selections, and
107:software that will deal with it.
801:
707:
217:
906:Callback (computer programming)
145:
126:Events can also be used at the
86:, often with the goal of being
1013:
988:
781:correspond to event handlers.
93:
70:- for example, by typing on a
1:
966:
202:The events generated using a
130:level, where they complement
250:, which is provided by some
206:are commonly referred to as
7:
899:
290:to which it wants to listen
244:object-oriented programming
10:
1141:
711:
170:select entire paragraphs.
1096:Javadoc API documentation
1071:Java DOM Interface Event
1055:An Events Syntax for XML
921:Event-driven programming
759:event-driven programming
309:
156:pointing device gestures
252:graphic user interfaces
1100:Write an Event Handler
943:(e.g., Event listener)
239:
234:Delegate event model.
1025:developer.mozilla.org
745:. GUI events include
712:Further information:
233:
138:User-generated events
1115:Computer programming
825:improve this section
248:delegate event model
242:A common variant in
226:Delegate event model
35:, often originating
1120:Events (computing)
956:Signal programming
926:Exception handling
864:Event notification
793:Event notification
775:interrupt handlers
240:
198:Touchscreen events
1090:javax.swing.event
961:Virtual synchrony
931:Interrupt handler
894:virtual synchrony
890:publish-subscribe
861:
860:
853:
773:. On this level,
381:"Model"
78:device such as a
1132:
1092:
1084:
1073:
1029:
1028:
1027:. 11 March 2024.
1017:
1011:
1010:
1008:
1007:
1001:
992:
986:
980:
951:Proactor pattern
941:Observer pattern
911:Database trigger
856:
849:
845:
842:
836:
805:
797:
786:event dispatcher
741:, typically the
703:
700:
697:
694:
691:
688:
685:
682:
679:
676:
673:
670:
667:
664:
661:
658:
655:
652:
649:
646:
643:
640:
637:
634:
631:
628:
625:
622:
619:
616:
613:
610:
607:
604:
601:
598:
595:
592:
589:
586:
583:
580:
577:
574:
571:
568:
565:
562:
559:
556:
553:
550:
547:
544:
541:
538:
535:
532:
529:
526:
523:
520:
517:
514:
511:
508:
505:
502:
499:
496:
493:
490:
487:
484:
481:
478:
475:
472:
469:
466:
463:
460:
457:
454:
451:
448:
445:
442:
439:
436:
433:
430:
427:
424:
421:
418:
415:
412:
409:
406:
403:
400:
397:
394:
391:
388:
385:
382:
379:
376:
373:
370:
367:
364:
361:
358:
355:
352:
349:
346:
343:
340:
337:
334:
331:
328:
325:
322:
319:
316:
313:
237:
123:event handlers.
1140:
1139:
1135:
1134:
1133:
1131:
1130:
1129:
1105:
1104:
1088:
1080:
1069:
1038:
1033:
1032:
1019:
1018:
1014:
1005:
1003:
999:
993:
989:
981:
974:
969:
947:Reactor pattern
902:
857:
846:
840:
837:
822:
806:
795:
779:signal handlers
716:
710:
705:
704:
701:
698:
695:
692:
689:
686:
683:
680:
677:
674:
671:
668:
665:
662:
659:
656:
653:
650:
647:
644:
641:
638:
635:
632:
629:
626:
623:
620:
617:
614:
611:
608:
605:
602:
599:
596:
593:
590:
587:
584:
581:
578:
575:
572:
569:
566:
563:
560:
557:
554:
551:
548:
545:
542:
539:
536:
533:
530:
527:
524:
521:
518:
515:
512:
509:
506:
503:
500:
497:
494:
491:
488:
485:
482:
479:
476:
473:
470:
467:
464:
461:
458:
455:
452:
449:
446:
443:
440:
437:
434:
431:
428:
425:
422:
419:
416:
413:
410:
407:
404:
401:
398:
395:
392:
389:
386:
383:
380:
377:
374:
371:
368:
365:
362:
359:
356:
353:
350:
347:
344:
341:
338:
335:
332:
329:
326:
323:
320:
317:
314:
311:
307:, for example:
235:
228:
220:
200:
184:
182:Joystick events
176:
174:Keyboard events
152:pointing device
148:
140:
128:instruction set
96:
25:software design
17:
12:
11:
5:
1138:
1128:
1127:
1122:
1117:
1103:
1102:
1097:
1086:
1082:java.awt.event
1078:
1067:
1062:
1057:
1052:
1047:
1037:
1036:External links
1034:
1031:
1030:
1012:
987:
971:
970:
968:
965:
964:
963:
958:
953:
944:
938:
933:
928:
923:
918:
913:
908:
901:
898:
868:communications
859:
858:
809:
807:
800:
794:
791:
709:
706:
310:
298:
297:
294:
291:
280:
279:
269:
266:event handlers
264:, also called
259:
227:
224:
219:
216:
199:
196:
183:
180:
175:
172:
147:
144:
139:
136:
95:
92:
37:asynchronously
15:
9:
6:
4:
3:
2:
1137:
1126:
1123:
1121:
1118:
1116:
1113:
1112:
1110:
1101:
1098:
1095:
1091:
1087:
1083:
1079:
1077:documentation
1076:
1072:
1068:
1066:
1063:
1061:
1058:
1056:
1053:
1051:
1048:
1046:
1045:
1040:
1039:
1026:
1022:
1016:
998:
991:
984:
979:
977:
972:
962:
959:
957:
954:
952:
948:
945:
942:
939:
937:
934:
932:
929:
927:
924:
922:
919:
917:
914:
912:
909:
907:
904:
903:
897:
895:
891:
886:
883:
878:
876:
872:
869:
865:
855:
852:
844:
834:
830:
826:
820:
819:
815:
810:This section
808:
804:
799:
798:
790:
787:
782:
780:
776:
772:
768:
762:
760:
756:
752:
748:
744:
740:
736:
732:
728:
724:
721:
715:
708:Event handler
308:
306:
302:
295:
292:
289:
285:
284:
283:
277:
273:
270:
267:
263:
260:
257:
256:
255:
253:
249:
245:
232:
223:
218:Device events
215:
213:
209:
205:
195:
193:
189:
179:
171:
169:
168:triple-clicks
165:
164:double-clicks
161:
157:
153:
143:
135:
133:
129:
124:
120:
118:
113:
108:
106:
105:event handler
102:
91:
89:
85:
81:
77:
73:
69:
65:
60:
58:
54:
50:
49:synchronously
46:
42:
38:
34:
30:
26:
22:
1094:Java package
1042:
1024:
1015:
1004:. Retrieved
990:
887:
879:
863:
862:
847:
838:
823:Please help
811:
785:
783:
763:
726:
717:
299:
281:
241:
221:
208:touch events
201:
185:
177:
149:
146:Mouse events
141:
125:
121:
116:
111:
109:
104:
97:
84:event-driven
61:
53:program flow
28:
18:
1125:Subroutines
1065:Event order
743:GUI toolkit
540:notifyViews
429:notifyViews
375:notifyViews
351:notifyViews
305:abstraction
204:touchscreen
160:mouse wheel
94:Description
88:interactive
68:peripherals
21:programming
1109:Categories
1006:2011-08-05
967:References
936:Interrupts
916:DOM events
767:interrupts
735:JavaScript
723:subroutine
272:interfaces
132:interrupts
101:event loop
57:event loop
841:June 2007
812:does not
749:presses,
739:framework
597:WriteLine
486:WriteLine
262:listeners
186:Moving a
51:with the
1041:Article
900:See also
882:database
875:messages
871:software
727:listener
720:callback
549:Notifier
438:Notifier
348:Notifier
318:Notifier
312:delegate
276:protocol
212:gestures
192:gamepads
188:joystick
76:hardware
72:keyboard
64:interact
33:software
1075:Javadoc
833:removed
818:sources
771:polling
591:Console
573:Update2
561:Update2
480:Console
462:Update1
450:Update1
246:is the
236:clickme
41:handled
755:timers
693:Change
624:static
582:sender
579:string
513:public
471:sender
468:string
402:public
363:Change
357:public
342:public
327:sender
324:string
117:source
112:listen
1000:(PDF)
751:mouse
687:model
681:model
675:View2
666:model
660:View1
651:Model
642:model
639:Model
615:class
534:model
525:model
522:Model
516:View2
507:View2
504:class
423:model
414:model
411:Model
405:View1
396:View1
393:class
345:event
336:Model
333:class
288:event
80:timer
29:event
27:, an
949:vs.
816:any
814:cite
777:and
733:and
731:Java
630:Main
627:void
618:Test
570:void
555:this
459:void
444:this
360:void
315:void
45:user
23:and
827:by
747:key
729:in
696:();
672:new
657:new
654:();
648:new
546:new
435:new
372:...
210:or
59:.
19:In
1111::
1023:.
975:^
761:.
684:);
669:);
633:()
606:);
564:);
543:+=
495:);
453:);
432:+=
384:);
366:()
330:);
301:C#
214:.
150:A
90:.
1009:.
854:)
848:(
843:)
839:(
835:.
821:.
702:}
699:}
690:.
678:(
663:(
645:=
636:{
621:{
612:}
609:}
600:(
594:.
588:{
585:)
576:(
567:}
558:.
552:(
537:.
531:{
528:)
519:(
510:{
501:}
498:}
489:(
483:.
477:{
474:)
465:(
456:}
447:.
441:(
426:.
420:{
417:)
408:(
399:{
390:}
387:}
378:(
369:{
354:;
339:{
321:(
Text is available under the Creative Commons Attribution-ShareAlike License. Additional terms may apply.