A context defines the relationship with the underlying windowing system.
Once connected to the windowing system, you can use the context to:
- create and control windows
- get and send events
- query and set state variables (properties)
The connection you have to the windowing system through the context remains active until you call screen_destroy_context(). Each context has its own event queue, even when several contexts are created in the same process. Permissions are also per context, not per process.
A context can be associated with one or more windows, or with one or more displays.