Platform Class

Inheritance diagram of Platform

class Platform

Operating-system-level functionality.

The platform instance can only be obtained with get_platform. Use the platform to obtain a Display instance.

Warning

Deprecated. Use pyglet.canvas.Display

Methods:

get_default_display() Get the default display device.
get_display(name) Get a display device by name.

Methods

Platform.get_default_display()

Get the default display device.

Warning

Deprecated. Use pyglet.canvas.get_display.

Return type:Display
Platform.get_display(name)

Get a display device by name.

This is meaningful only under X11, where the name is a string including the host name and display number; for example "localhost:1".

On platforms other than X11, name is ignored and the default display is returned. pyglet does not support multiple multiple video devices on Windows or OS X. If more than one device is attached, they will appear as a single virtual device comprising all the attached screens.

Warning

Deprecated. Use pyglet.canvas.get_display.

Parameters:name (str) – The name of the display to connect to.
Return type:Display

Table Of Contents

Previous topic

MouseCursor Class

Next topic

Window Class