From a UI perspective, Events in WoW are messages sent by the WoW client to the UI Frames (via frame script handlers), mostly in reaction to things occurring in the game world. See the Event API Index links below for event reference.
- Indexed Events (API)
- List of all Events (API)
- Communication Events
- Glue Events
- Events that fire during the Loading Process
- Handling events - a tutorial on how to set up event handling in your addon.
- Parsing event messages - extracting information from events with textual parameters.
The World of Warcraft interface is entirely event driven: all interface code is invoked in response to an event (or OnUpdate "events"). All script execution must be completed before a frame is rendered; therefore, event processing code that takes too long or contains an infinite loop will freeze the client.
You can register your Frame-derived widget to receive an event using the frame:RegisterEvent("eventName") function. When the events occur, they will be delivered to the OnEvent script handler, which can be set using frame:SetScript("OnEvent", handlerFunc). To unregister an event, use frame:UnregisterEvent("eventName").