Contexts A context encapsulates the connection to the windowing system. You can use the context to set and return global properties and to get events.