Module wonderful.display
Display manager and GPU pool.
Classes and inheritance
DisplayManager | A class that manages GPU pool and stores displays. |
Display | A display class. |
Class DisplayManager
DisplayManager:__new__() | Construct a new display manager instance. |
DisplayManager:restore() | Restores the previous state of GPUs. |
DisplayManager:setPreferredScreenResolution(address, w, h) | Set a preferred resolution for a screen. |
DisplayManager:forceScreenGPU(screen, gpu) | Forcefully bind a GPU to a screen. |
DisplayManager:getScreenResolution(screen) | Choose a resolution of a screen. |
DisplayManager:getScreenDepth(screen) | Get a depth of a screen. |
DisplayManager:newDisplay(spec) | Create a new display by its specification. |
DisplayManager:getGPU(display) | Get a GPU for a display |
Class Display
Display:__new__(manager, screen, box, depth, debug) | Construct a new display. |
Display:flush() | Flush a display's framebuffer onto the display's screen. |
Classes and inheritance
- DisplayManager
- A class that manages GPU pool and stores displays.
- Display
-
A display class.
A display is a reference to an area on a screen.
Class DisplayManager
- DisplayManager:__new__()
- Construct a new display manager instance.
- DisplayManager:restore()
- Restores the previous state of GPUs.
- DisplayManager:setPreferredScreenResolution(address, w, h)
-
Set a preferred resolution for a screen.
Parameters:
- address string the address of the screen
- w int the width
- h int the height
- DisplayManager:forceScreenGPU(screen, gpu)
-
Forcefully bind a GPU to a screen.
Parameters:
- DisplayManager:getScreenResolution(screen)
-
Choose a resolution of a screen.
Parameters:
- screen string the screen address
Returns:
- int the width
- int the height
- DisplayManager:getScreenDepth(screen)
-
Get a depth of a screen.
Parameters:
- screen string the screen address
Returns:
-
int
the depth
- DisplayManager:newDisplay(spec)
-
Create a new display by its specification.
The debug mode introduces a few checks that catch errors and bugs where it
makes sense. It may slow down the program significantly, though.
Parameters:
- spec the specification
- x int a top-left cell's column number (optional)
- y int a top-left cell's row number (optional)
- w int a width of the display (optional)
- h int a height of the display (optional)
- screen string a screen address (optional)
- debug boolean whether the debug mode should be set (optional)
Returns:
-
wonderful.display.Display
the display
- spec the specification
- DisplayManager:getGPU(display)
-
Get a GPU for a display
Parameters:
- display wonderful.display.Display the display
Returns:
-
string
a GPU address