Display Class

Inheritance diagram of Display

class Display

A display device supporting one or more screens.

Use Platform.get_display or Platform.get_default_display to obtain an instance of this class. Use a display to obtain Screen instances.

Warning

Deprecated. Use pyglet.canvas.Display.

Constructor:

__init__()

Methods:

get_default_screen() Get the default screen as specified by the user’s operating system preferences.
get_screens() Get the available screens.
get_windows() Get the windows currently attached to this display.

Methods

Display.get_default_screen()

Get the default screen as specified by the user’s operating system preferences.

Return type:Screen
Display.get_screens()

Get the available screens.

A typical multi-monitor workstation comprises one Display with multiple Screen s. This method returns a list of screens which can be enumerated to select one for full-screen display.

For the purposes of creating an OpenGL config, the default screen will suffice.

Return type:list of Screen
Display.get_windows()

Get the windows currently attached to this display.

Return type:sequence of Window

Table Of Contents

Previous topic

DefaultMouseCursor Class

Next topic

FPSDisplay Class