Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
nbgl_content.h File Reference

common content for Graphical Library More...

#include <stdint.h>
#include <stdbool.h>
#include "os_io_seph_cmd.h"
#include "nbgl_types.h"
#include "ux_loc.h"
#include "nbgl_obj.h"
Include dependency graph for nbgl_content.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  nbgl_contentCenteredInfo_t
 This structure contains info to build a centered (vertically and horizontally) area, with a possible Icon, a possible text under it, and a possible sub-text gray under it. More...
struct  nbgl_contentCenter_t
 This structure contains info to build a centered (vertically and horizontally) area, with many fields (if NULL, not used): More...
struct  nbgl_contentInfoLongPress_t
 This structure contains data to build a centered info + long press button content. More...
struct  nbgl_contentInfoButton_t
 This structure contains data to build a centered info + simple black button content. More...
struct  nbgl_contentValueExt_t
 This structure contains additions to a tag/value pair, to be able to build a screen to display these additions (for alias). More...
struct  nbgl_contentTagValue_t
 This structure contains a [tag,value] pair and possible extensions. More...
struct  nbgl_contentTagValueList_s
 This structure contains a list of [tag,value] pairs. More...
struct  nbgl_contentTagValueDetails_t
 This structure contains a [item,value] pair and info about "details" button. More...
struct  nbgl_contentTagValueConfirm_t
 This structure contains [item,value] pair(s) and info about a potential "details" button, but also a black button + footer to confirm/cancel. More...
struct  nbgl_contentSwitch_t
 This structure contains info to build a switch (on the right) with a description (on the left), with a potential sub-description (in gray). More...
struct  nbgl_pageSwitchesList_s
 This structure contains data to build a SWITCHES_LIST content. More...
struct  nbgl_contentInfoList_s
 This structure contains data to build a INFOS_LIST content. More...
struct  nbgl_contentRadioChoice_t
 This structure contains a list of names to build a list of radio buttons (on the right part of screen), with for each a description (names array) The chosen item index is provided is the "index" argument of the callback. More...
struct  nbgl_contentBarsList_t
 This structure contains data to build a BARS_LIST content. More...
struct  nbgl_contentTipBox_t
 This structure contains data to build a tip-box, on top of a footer, on bottom of a content center. More...
struct  nbgl_contentExtendedCenter_t
 This structure contains data to build a EXTENDED_CENTER content. More...
union  nbgl_content_u
 Union of the different type of contents. More...
struct  nbgl_content_t
 This structure contains data to build a content. More...

Typedefs

typedef nbgl_contentTagValue_t *(* nbgl_contentTagValueCallback_t) (uint8_t pairIndex)
 prototype of tag/value pair retrieval callback
typedef void(* nbgl_contentActionCallback_t) (int token, uint8_t index, int page)
 prototype of function to be called when an action on a content object occurs
typedef struct nbgl_contentTagValueList_s nbgl_contentTagValueList_t
 This structure contains a list of [tag,value] pairs.
typedef struct nbgl_pageSwitchesList_s nbgl_contentSwitchesList_t
 This structure contains data to build a SWITCHES_LIST content.
typedef struct nbgl_contentInfoList_s nbgl_contentInfoList_t
 This structure contains data to build a INFOS_LIST content.

Enumerations

enum  nbgl_contentCenteredInfoStyle_t { REGULAR_INFO = 0 , BOLD_TEXT1_INFO , BUTTON_INFO }
 possible styles for Centered Info Area More...
enum  nbgl_contentIllustrationType_t { ICON_ILLUSTRATION , ANIM_ILLUSTRATION }
 possible types of illustration, for example in nbgl_contentCenter_t More...
enum  nbgl_contentValueAliasType_t {
  NO_ALIAS_TYPE = 0 , ENS_ALIAS , ADDRESS_BOOK_ALIAS , QR_CODE_ALIAS ,
  INFO_LIST_ALIAS , TAG_VALUE_LIST_ALIAS
}
 possible types of value alias More...
enum  nbgl_contentType_t {
  CENTERED_INFO = 0 , EXTENDED_CENTER , INFO_LONG_PRESS , INFO_BUTTON ,
  TAG_VALUE_LIST , TAG_VALUE_DETAILS , TAG_VALUE_CONFIRM , SWITCHES_LIST ,
  INFOS_LIST , CHOICES_LIST , BARS_LIST
}
 The different types of predefined contents. More...

Detailed Description

common content for Graphical Library

Definition in file nbgl_content.h.

Typedef Documentation

◆ nbgl_contentActionCallback_t

typedef void(* nbgl_contentActionCallback_t) (int token, uint8_t index, int page)

prototype of function to be called when an action on a content object occurs

Parameters
tokeninteger passed at content object initialization
indexwhen the object touched is a list of radio buttons, gives the index of the activated button. On touchscreen devices, this index is relative to the current page when the list is automatically split in several pages (see nbgl_contentRadioChoice_t)
pageindex of the current page, can be used to restart the use_case directly at the right page

Definition at line 232 of file nbgl_content.h.

◆ nbgl_contentInfoList_t

This structure contains data to build a INFOS_LIST content.

◆ nbgl_contentSwitchesList_t

This structure contains data to build a SWITCHES_LIST content.

◆ nbgl_contentTagValueCallback_t

typedef nbgl_contentTagValue_t *(* nbgl_contentTagValueCallback_t) (uint8_t pairIndex)

prototype of tag/value pair retrieval callback

Parameters
pairIndexindex of the tag/value pair to retrieve (from 0 (to nbPairs-1))
Returns
a pointer on a static tag/value pair

Definition at line 221 of file nbgl_content.h.

◆ nbgl_contentTagValueList_t

This structure contains a list of [tag,value] pairs.

Enumeration Type Documentation

◆ nbgl_contentCenteredInfoStyle_t

possible styles for Centered Info Area

Enumerator
REGULAR_INFO 

both texts regular (but '\b' can switch to bold)

BOLD_TEXT1_INFO 

bold is used for text1 (but '\b' can switch to regular)

BUTTON_INFO 

bold is used for text1 and text2 as a white button

Definition at line 36 of file nbgl_content.h.

◆ nbgl_contentIllustrationType_t

possible types of illustration, for example in nbgl_contentCenter_t

Enumerator
ICON_ILLUSTRATION 

simple icon

ANIM_ILLUSTRATION 

animation

Definition at line 90 of file nbgl_content.h.

◆ nbgl_contentType_t

The different types of predefined contents.

Enumerator
CENTERED_INFO 

a centered info

EXTENDED_CENTER 

a centered content and a possible tip-box

INFO_LONG_PRESS 

a centered info and a long press button

INFO_BUTTON 

a centered info and a simple black button

TAG_VALUE_LIST 

list of tag/value pairs

TAG_VALUE_DETAILS 

a tag/value pair and a small button to get details.

TAG_VALUE_CONFIRM 

tag/value pairs and a black button/footer to confirm/cancel.

SWITCHES_LIST 

list of switches with descriptions

INFOS_LIST 

list of infos with titles

CHOICES_LIST 

list of choices through radio buttons

BARS_LIST 

list of touchable bars (with > on the right to go to sub-pages)

Definition at line 423 of file nbgl_content.h.

◆ nbgl_contentValueAliasType_t

possible types of value alias

Enumerator
NO_ALIAS_TYPE 
ENS_ALIAS 

alias comes from ENS

ADDRESS_BOOK_ALIAS 

alias comes from Address Book

QR_CODE_ALIAS 

alias is an address to be displayed as a QR Code

INFO_LIST_ALIAS 

alias is list of infos

TAG_VALUE_LIST_ALIAS 

Definition at line 157 of file nbgl_content.h.