Display - JakeTurner616/pygame-lua-bindings GitHub Wiki
Pygame Display Functions
init_display()
Initialize the Pygame display module.
Maps to:
pygame.display.init(): This function initializes the Pygame display module.
quit_display()
Quit the Pygame display module.
Maps to:
pygame.display.quit(): This function quits the Pygame display module.
get_display_init()
Check if the display module is initialized.
Returns:
bool: True if the display module is initialized, False otherwise.
Maps to:
pygame.display.get_init(): This function checks if the Pygame display module is initialized.
set_display_mode(width, height, flags=0, depth=0)
Set the display mode for the Pygame window.
Parameters:
width: The width of the window in pixels.height: The height of the window in pixels.flags: Optional flags for the display mode.depth: Optional color depth for the display mode.
Returns:
Surface: The Pygame surface representing the display.
Maps to:
pygame.display.set_mode((width, height), flags, depth): This function sets the display mode for the Pygame window.
get_display_surface()
Get the Pygame surface associated with the display.
Returns:
Surface: The Pygame surface associated with the display.
Maps to:
pygame.display.get_surface(): This function returns the Pygame surface associated with the display.
flip_display()
Update the full display surface to the screen.
Maps to:
pygame.display.flip(): This function updates the full display surface to the screen.
update_display(rects=None)
Update portions of the screen for the display surface.
Parameters:
rects: Optional list of rectangles to update.
Maps to:
pygame.display.update(rects): This function updates portions of the screen for the display surface.
get_display_driver()
Get the name of the video driver used for the display.
Returns:
str: The name of the video driver used for the display.
Maps to:
pygame.display.get_driver(): This function returns the name of the video driver used for the display.
get_display_info()
Get information about the display hardware.
Returns:
DisplayInfo: An object containing information about the display hardware.
*** Parameters:***
pygame.display.Info(): This function returns information about the display hardware.
get_wm_info()
Get window manager information for the display.
Returns:
dict: A dictionary containing window manager information for the display.
*** Parameters:***
pygame.display.get_wm_info(): This function returns window manager information for the display.
get_desktop_sizes()
Get the sizes of all the desktop displays.
Returns:
list: A list containing the sizes of all the desktop displays.
*** Parameters:***
pygame.display.get_desktop_sizes(): This function returns the sizes of all the desktop displays.
list_modes(depth=0, flags=pygame.FULLSCREEN)
Get a list of available display modes.
*** Parameters:***
depth: Optional color depth for the display modes.flags: Optional flags for the display modes.
Returns:
list: A list of available display modes.
*** Parameters:***
pygame.display.list_modes(depth, flags): This function returns a list of available display modes.
mode_ok(width, height, flags=0, depth=0)
Check if a specific display mode is supported.
*** Parameters:***
width: The width of the display mode in pixels.height: The height of the display mode in pixels.flags: Optional flags for the display mode.depth: Optional color depth for the display mode.
Returns:
bool: True if the display mode is supported, False otherwise.
*** Parameters:***
pygame.display.mode_ok((width, height), flags, depth): This function checks if a specific display mode is supported.
gl_get_attribute(attr)
Get the value of an OpenGL display attribute.
*** Parameters:***
attr: The attribute to get.
Returns:
int: The value of the OpenGL display attribute.
*** Parameters:***
pygame.display.gl_get_attribute(attr): This function gets the value of an OpenGL display attribute.
gl_set_attribute(attr, value)
Set the value of an OpenGL display attribute.
*** Parameters:***
attr: The attribute to set.value: The value to set.
*** Parameters:***
pygame.display.gl_set_attribute(attr, value): This function sets the value of an OpenGL display attribute.
get_display_active()
Check if the display is active.
Returns:
bool: True if the display is active, False otherwise.
*** Parameters:***
pygame.display.get_active(): This function checks if the display is active.
iconify_display()
Iconify (minimize) the display window.
*** Parameters:***
pygame.display.iconify(): This function iconifies (minimizes) the display window.
toggle_fullscreen_display()
Toggle the display between fullscreen and windowed mode.
*** Parameters:***
pygame.display.toggle_fullscreen(): This function toggles the display between fullscreen and windowed mode.
set_gamma_display(value)
Set the gamma value for the display.
*** Parameters:***
value: The gamma value to set.
*** Parameters:***
pygame.display.set_gamma(value): This function sets the gamma value for the display.
set_gamma_ramp_display(r, g, b)
Set the gamma ramp for the display.
*** Parameters:***
r: The red gamma ramp.g: The green gamma ramp.b: The blue gamma ramp.
*** Parameters:***
pygame.display.set_gamma_ramp(r, g, b): This function sets the gamma ramp for the display.
set_display_icon(surface)
Set the icon for the display window.
*** Parameters:***
surface: The Pygame surface to use as the icon.
*** Parameters:***
pygame.display.set_icon(surface): This function sets the icon for the display window.
set_display_caption(title, icontitle="")
Set the title and icon title for the display window.
*** Parameters:***
title: The title of the display window.icontitle: The title of the icon (optional).
*** Parameters:***
pygame.display.set_caption(title, icontitle): This function sets the title and icon title for the display window.
get_display_caption()
Get the title and icon title for the display window.
Returns:
tuple: A tuple containing the title and icon title for the display window.
*** Parameters:***
pygame.display.get_caption(): This function gets the title and icon title for the display window.
set_display_palette(palette)
Set the palette for the display.
*** Parameters:***
palette: The palette to set.
*** Parameters:***
pygame.display.set_palette(palette): This function sets the palette for the display.
get_num_displays()
Get the number of attached displays.
Returns:
int: The number of attached displays.
*** Parameters:***
pygame.display.get_num_displays(): This function gets the number of attached displays.
get_window_size()
Get the size of the display window.
Returns:
tuple: A tuple containing the width and height of the display window.
*** Parameters:***
pygame.display.get_window_size(): This function gets the size of the display window.
get_allow_screensaver()
Check if the screensaver is allowed.
Returns:
bool: True if the screensaver is allowed, False otherwise.
*** Parameters:***
pygame.display.get_allow_screensaver(): This function checks if the screensaver is allowed.
set_allow_screensaver(allow)
Set whether the screensaver is allowed.
*** Parameters:***
allow: True to allow the screensaver, False to prevent it.
*** Parameters:***
pygame.display.set_allow_screensaver(allow): This function sets whether the screensaver is allowed.