A Closer Look at Event Distribution

GLAM currently supports user input from both mouse and keyboard, but GLAM's extensible nature would easily allow for the developer to create new user events for handling other input devices.

In GLAM, the developer is responsible for determining how and when user input is received from various input devices. When an application receives user input, the developer must create new user events that wrap the target widget's ID and other essential information about the event such as mouse coordinates or the key that was pressed on the keyboard.

After the developer has created the event, the event distributor must be invoked to distribute the event to the appropriate widget (as previously defined by the developer). After the event has been distributed by the event distributor, GLAM takes over and sends the event to the target widget where it will be handled and various actions may be performed by the widget.