20 #include "bolos_target.h"
28 #ifdef SCREEN_SIZE_WALLET
30 #define SCREEN_WIDTH 400
32 #define SCREEN_WIDTH 480
35 #define SCREEN_WIDTH 128
41 #ifdef SCREEN_SIZE_WALLET
43 #define SCREEN_HEIGHT 672
45 #define SCREEN_HEIGHT 600
48 #define SCREEN_HEIGHT 64
55 #define NO_TRANSFORMATION 0
61 #define VERTICAL_MIRROR 0x2
67 #define ROTATE_90_CLOCKWISE 0x4
73 #define INVALID_COLOR_MAP 0x0
79 #define MIN(x, y) ((x) < (y) ? (x) : (y))
82 #define MAX(x, y) ((x) > (y) ? (x) : (y))
88 #define PACKED__ __attribute__((packed))
180 #ifdef SCREEN_SIZE_NANO
266 #define GZLIB_UNCOMPRESSED_CHUNK 2049
327 #ifdef SCREEN_SIZE_WALLET
uint8_t nbgl_transformation_t
Represents the transformation to be applied on the bitmap before rendering This is a bitfield using m...
nbgl_state_t
to represent a boolean state.
nbgl_post_refresh_t
Post refresh modes.
@ POST_REFRESH_KEEP_POWER_STATE
Keep state after refresh.
@ POST_REFRESH_FORCE_POWER_OFF
Force screen power off after refresh.
@ POST_REFRESH_FORCE_POWER_ON
Force screen power on after refresh.
@ POST_REFRESH_FORCE_POWER_ON_WITH_PIPELINE
Force screen power on and enable pipeline.
uint8_t nbgl_color_map_t
Represents the color_map to be used for 2BPP image, or the foreground color for 1BPP image.
nbgl_radius_t
possible radius for objects
@ RADIUS_0_PIXELS
no radius (square angle)
@ RADIUS_32_PIXELS
32 pixels
@ RADIUS_44_PIXELS
44 pixels
nbgl_touchType_t
The different types of Touchscreen events.
@ VALUE_CHANGED
corresponding to a change of state of the object (indirect event)
@ TOUCHING
corresponding to an object that is currently touched
nbgl_qrcode_version_t
possible modes for QR Code
@ QRCODE_V10
QRCode V10, can encode text len up to 1500 chars, display size = 228*228.
@ QRCODE_V4_SMALL
QRCode V4, can encode text len up to 1500 chars, display size = 132*132.
@ QRCODE_V4
QRCode V4, can encode text len up to 62 chars, display size = 264*264.
nbgl_direction_t
Directions for layout or lines.
@ VERTICAL
from top to bottom
@ HORIZONTAL
from left to right
struct PACKED__ nbgl_icon_details_s nbgl_icon_details_t
Represents all information about an icon.
nbgl_aligment_t
All types of alignments.
@ NO_ALIGNMENT
used when parent container layout is used
@ LEFT_TOP
on outside left
@ LEFT_BOTTOM
on outside left
@ RIGHT_TOP
on outside right
@ RIGHT_BOTTOM
on outside right
nbgl_hardwareSwipe_t
Hardware powered detected swipe states.
nbgl_obj_type_t
All types of graphical objects.
@ IMAGE
Bitmap (y and height must be multiple of 4 on Stax)
@ IMAGE_FILE
Image file (with Ledger compression)
@ TEXT_ENTRY
area for entered text, only for Nanos
@ SWITCH
Switch to turn on/off something.
@ RADIO_BUTTON
Indicator to inform whether something is on or off.
@ BUTTON
Rounded rectangle button with icon and/or text.
@ PROGRESS_BAR
horizontal bar to indicate progression of something (between 0% and 100%)
@ PAGE_INDICATOR
horizontal bar to indicate position within pages
@ LINE
Vertical or Horizontal line.
@ MASK_CONTROL
OS-specific object to enable/disable masked area.
@ CONTAINER
Empty container.
@ TEXT_AREA
Area to contain text line(s)
nbgl_touchState_t
the 2 possible states of a finger on the Touchscreen
@ PRESSED
the finger is currently pressing the screen
@ RELEASED
the finger has been released from the screen
nbgl_bpp_t
Enum to represent the number of bits per pixel (BPP)
@ NB_NBGL_BPP
Number of NBGL_BPP enums.
@ NBGL_BPP_1
1 bit per pixel
@ NBGL_BPP_4
4 bits per pixel
@ NBGL_BPP_2
2 bits per pixel
nbgl_style_t
possible styles for text area border
struct PACKED__ nbgl_area_s nbgl_area_t
Represents a rectangle area of the screen.
nbgl_compression_t
Enum to represent the compression.
@ NBGL_GZLIB_COMPRESSION
gzlib compression
@ NBGL_NO_COMPRESSION
no compression, raw data
@ NBGL_RLE_COMPRESSION
RLE compression.
@ NB_NBGL_COMPRESSION
Number of NBGL_COMPRESSION enums.
nbgl_refresh_mode_t
different modes of refresh for nbgl_refreshSpecial()
@ BLACK_AND_WHITE_REFRESH
to be used for pure B&W area, when contrast is important
@ FULL_COLOR_CLEAN_REFRESH
to be used for lock screen display (cleaner but longer refresh)
@ BLACK_AND_WHITE_FAST_REFRESH
to be used for pure B&W area, when contrast is not priority
@ FULL_COLOR_PARTIAL_REFRESH
to be used for small partial refresh (radio buttons, switches)
@ INIT_REFRESH
to be used to fully clear the screen in white
@ FULL_COLOR_REFRESH
to be used for normal refresh
Represents a rectangle area of the screen.
color_t backgroundColor
color (usually background) to be applied
uint16_t width
width of the area, in pixels
nbgl_bpp_t bpp
bits per pixel for this area
uint16_t height
height of the area, in pixels
Represents all information about an icon.
bool isFile
if true, the bitmap buffer contains an image file
uint16_t width
width of the icon, in pixels
const uint8_t * bitmap
buffer containing pixel values
nbgl_bpp_t bpp
bits per pixel for this area
uint16_t height
height of the icon, in pixels