2016-02-01 10:52:57 +00:00
|
|
|
#TREZOR OS API
|
|
|
|
|
2016-02-01 16:48:26 +00:00
|
|
|
Auxiliary classes used to tighten the type checking.
|
2016-02-01 14:16:33 +00:00
|
|
|
|
2016-02-01 16:18:04 +00:00
|
|
|
``` python
|
2016-02-02 17:40:29 +00:00
|
|
|
bytes16 = bytes # bytes variable of exactly 16 bytes
|
|
|
|
bytes20 = bytes # bytes variable of exactly 20 bytes
|
|
|
|
bytes21 = bytes # bytes variable of exactly 21 bytes
|
|
|
|
bytes24 = bytes # bytes variable of exactly 24 bytes
|
|
|
|
bytes32 = bytes # bytes variable of exactly 32 bytes
|
|
|
|
bytes33 = bytes # bytes variable of exactly 33 bytes
|
|
|
|
bytes64 = bytes # bytes variable of exactly 64 bytes
|
|
|
|
bytes65 = bytes # bytes variable of exactly 65 bytes
|
2016-02-01 16:18:04 +00:00
|
|
|
```
|
|
|
|
|
2016-02-02 17:25:27 +00:00
|
|
|
Syntax used below is a valid Python function declaration with type hints defined in [PEP 0484](https://www.python.org/dev/peps/pep-0484/).
|
2016-02-01 16:48:26 +00:00
|
|
|
|
2016-04-03 13:26:49 +00:00
|
|
|
##trezor.ui
|
2016-02-01 10:52:57 +00:00
|
|
|
|
2016-04-03 13:26:49 +00:00
|
|
|
###trezor.ui.display
|
2016-02-01 10:52:57 +00:00
|
|
|
|
2016-02-01 14:16:33 +00:00
|
|
|
``` python
|
2016-04-03 13:26:49 +00:00
|
|
|
trezor.ui.display.bar(self, x: int, y: int, w: int, h: int, color: int) -> None
|
2016-02-01 10:52:57 +00:00
|
|
|
|
2016-04-03 13:26:49 +00:00
|
|
|
trezor.ui.display.blit(self, x: int, y: int, w: int, h: int, data: bytes) -> None
|
2016-02-01 10:52:57 +00:00
|
|
|
|
2016-04-03 13:26:49 +00:00
|
|
|
trezor.ui.display.image(self, x: int, y: int, image: bytes) -> None
|
2016-02-01 16:48:26 +00:00
|
|
|
|
2016-04-03 13:26:49 +00:00
|
|
|
trezor.ui.display.icon(self, x: int, y: int, icon: bytes, fgcolor: int, bgcolor: int) -> None
|
2016-02-01 16:48:26 +00:00
|
|
|
|
2016-04-03 13:26:49 +00:00
|
|
|
trezor.ui.display.text(self, x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
2016-02-01 16:48:26 +00:00
|
|
|
|
2016-04-03 23:46:46 +00:00
|
|
|
trezor.ui.display.qrcode(self, x: int, y: int, data: bytes, scale: int) -> None
|
|
|
|
|
2016-04-03 13:26:49 +00:00
|
|
|
trezor.ui.display.orientation(self, degrees: int) -> None
|
2016-02-01 16:48:26 +00:00
|
|
|
|
2016-04-04 10:02:49 +00:00
|
|
|
trezor.ui.display.raw(self, reg: int, data: bytes) -> None
|
2016-02-01 16:48:26 +00:00
|
|
|
|
2016-04-03 13:26:49 +00:00
|
|
|
trezor.ui.display.backlight(self, val: int) -> None
|
2016-02-01 16:48:26 +00:00
|
|
|
```
|
|
|
|
|
2016-04-03 13:26:49 +00:00
|
|
|
###trezor.ui.touch
|
2016-02-01 16:48:26 +00:00
|
|
|
|
|
|
|
``` python
|
2016-04-03 13:26:49 +00:00
|
|
|
trezor.ui.touch.callback_start(self, callback) -> None
|
2016-02-01 16:48:26 +00:00
|
|
|
|
2016-04-03 13:26:49 +00:00
|
|
|
trezor.ui.touch.callback_move(self, callback) -> None
|
2016-02-01 16:18:04 +00:00
|
|
|
|
2016-04-03 13:26:49 +00:00
|
|
|
trezor.ui.touch.callback_end(self, callback) -> None
|
2016-02-01 10:52:57 +00:00
|
|
|
```
|