1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-24 23:38:09 +00:00
trezor-firmware/core/mocks/generated/trezorui.pyi

60 lines
1.6 KiB
Python
Raw Normal View History

2017-06-14 17:27:02 +00:00
from typing import *
2017-06-14 15:41:45 +00:00
2017-06-14 15:41:45 +00:00
# extmod/modtrezorui/modtrezorui-display.h
class Display:
"""
2017-06-14 15:41:45 +00:00
Provide access to device display.
"""
2019-06-09 09:24:06 +00:00
WIDTH: int # display width in pixels
HEIGHT: int # display height in pixels
FONT_MONO: int # id of monospace font
FONT_NORMAL: int # id of normal-width font
FONT_BOLD: int # id of bold-width font
FONT_DEMIBOLD: int # id of demibold font
2017-06-14 15:41:45 +00:00
def __init__(self) -> None:
"""
2017-06-14 15:41:45 +00:00
Initialize the display.
"""
2017-06-14 15:41:45 +00:00
def clear(self) -> None:
"""
2017-06-14 15:41:45 +00:00
Clear display with black color.
"""
2017-06-14 15:41:45 +00:00
def refresh(self) -> None:
"""
2017-06-14 15:41:45 +00:00
Refresh display (update screen).
"""
2017-06-14 15:41:45 +00:00
def bar(self, x: int, y: int, w: int, h: int, color: int) -> None:
"""
Renders a bar at position (x,y = upper left corner) with width w and
height h of color color.
"""
def orientation(self, degrees: int | None = None) -> int:
"""
2017-06-14 15:41:45 +00:00
Sets display orientation to 0, 90, 180 or 270 degrees.
Everything needs to be redrawn again when this function is used.
Call without the degrees parameter to just perform the read of the
value.
"""
2017-06-14 15:41:45 +00:00
def backlight(self, val: int | None = None) -> int:
"""
2017-06-14 15:41:45 +00:00
Sets backlight intensity to the value specified in val.
Call without the val parameter to just perform the read of the value.
"""
2017-06-14 15:41:45 +00:00
2018-03-09 10:37:06 +00:00
def save(self, prefix: str) -> None:
"""
2018-03-09 10:37:06 +00:00
Saves current display contents to PNG file with given prefix.
"""
2019-12-09 16:01:04 +00:00
def clear_save(self) -> None:
"""
Clears buffers in display saving.
"""