2016-02-01 02:52:57 -08:00
|
|
|
#TREZOR OS API
|
|
|
|
|
2016-02-01 08:48:26 -08:00
|
|
|
Auxiliary classes used to tighten the type checking.
|
2016-02-01 06:16:33 -08:00
|
|
|
|
2016-02-01 08:18:04 -08:00
|
|
|
``` python
|
2016-02-02 09:40:29 -08: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 08:18:04 -08:00
|
|
|
```
|
|
|
|
|
2016-02-02 09:25:27 -08: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 08:48:26 -08:00
|
|
|
|
2016-04-03 06:26:49 -07:00
|
|
|
##trezor.ui
|
2016-02-01 02:52:57 -08:00
|
|
|
|
2016-04-03 06:26:49 -07:00
|
|
|
###trezor.ui.display
|
2016-02-01 02:52:57 -08:00
|
|
|
|
2016-02-01 06:16:33 -08:00
|
|
|
``` python
|
2016-04-03 06:26:49 -07:00
|
|
|
trezor.ui.display.bar(self, x: int, y: int, w: int, h: int, color: int) -> None
|
2016-02-01 02:52:57 -08:00
|
|
|
|
2016-04-03 06:26:49 -07:00
|
|
|
trezor.ui.display.blit(self, x: int, y: int, w: int, h: int, data: bytes) -> None
|
2016-02-01 02:52:57 -08:00
|
|
|
|
2016-04-03 06:26:49 -07:00
|
|
|
trezor.ui.display.image(self, x: int, y: int, image: bytes) -> None
|
2016-02-01 08:48:26 -08:00
|
|
|
|
2016-04-03 06:26:49 -07:00
|
|
|
trezor.ui.display.icon(self, x: int, y: int, icon: bytes, fgcolor: int, bgcolor: int) -> None
|
2016-02-01 08:48:26 -08:00
|
|
|
|
2016-04-03 06:26:49 -07:00
|
|
|
trezor.ui.display.text(self, x: int, y: int, text: bytes, font: int, fgcolor: int, bgcolor: int) -> None
|
2016-02-01 08:48:26 -08:00
|
|
|
|
2016-04-03 16:46:46 -07:00
|
|
|
trezor.ui.display.qrcode(self, x: int, y: int, data: bytes, scale: int) -> None
|
|
|
|
|
2016-04-03 06:26:49 -07:00
|
|
|
trezor.ui.display.orientation(self, degrees: int) -> None
|
2016-02-01 08:48:26 -08:00
|
|
|
|
2016-04-04 03:02:49 -07:00
|
|
|
trezor.ui.display.raw(self, reg: int, data: bytes) -> None
|
2016-02-01 08:48:26 -08:00
|
|
|
|
2016-04-03 06:26:49 -07:00
|
|
|
trezor.ui.display.backlight(self, val: int) -> None
|
2016-02-01 08:48:26 -08:00
|
|
|
```
|
|
|
|
|
2016-04-03 06:26:49 -07:00
|
|
|
###trezor.ui.touch
|
2016-02-01 08:48:26 -08:00
|
|
|
|
|
|
|
``` python
|
2016-04-04 06:14:30 -07:00
|
|
|
trezor.ui.touch.start(self, callback) -> None
|
2016-02-01 08:48:26 -08:00
|
|
|
|
2016-04-04 06:14:30 -07:00
|
|
|
trezor.ui.touch.move(self, callback) -> None
|
2016-02-01 08:18:04 -08:00
|
|
|
|
2016-04-04 06:14:30 -07:00
|
|
|
trezor.ui.touch.end(self, callback) -> None
|
2016-02-01 02:52:57 -08:00
|
|
|
```
|