Skip to content

Commit c59addb

Browse files
nbgl_useCasePlugInHome removed
nbgl_useCaseForwardOnlyReview removed nbgl_useCaseViewDetails renamed → displayDetails and removed from API nbgl_useCaseKeypad removed
1 parent 33db50a commit c59addb

File tree

4 files changed

+43
-261
lines changed

4 files changed

+43
-261
lines changed

lib_nbgl/doc/nbgl_use_case.dox

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ Some APIs have also been kept for backward compatibility, and for some rare case
6161
- for Home Screen:
6262
- @ref nbgl_useCaseHome() to draw the home screen of an application.
6363
- @ref nbgl_useCaseHomeExt() to draw an extended version of home screen of an application (with action button)
64-
- @ref nbgl_useCasePlugInHome() to draw the home screen of a Plug-In application
6564
- for Settings:
6665
- @ref nbgl_useCaseSettings() to draw a level of settings pages
6766
- for most used reviews:
@@ -71,9 +70,6 @@ Some APIs have also been kept for backward compatibility, and for some rare case
7170
- for address verification:
7271
- @ref nbgl_useCaseAddressConfirmation() to draw an address confirmation page, with a possibility to see it as QR Code
7372
- @ref nbgl_useCaseAddressConfirmationExt() to draw an address confirmation page, with a possibility to see it as QR Code and some extra tag/value pairs
74-
- for rare reviews:
75-
- @ref nbgl_useCaseForwardOnlyReview() to draw the pages of a forward-only review (without back key)
76-
- @ref nbgl_useCaseViewDetails() to draw the pages displaying the full value of a given long data of a review
7773

7874
@subsection use_case_home_settings Home & Settings screen Use Case
7975

lib_nbgl/doc/nbgl_use_case_nanos.dox

Lines changed: 0 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ A few APIs are available to draw typical Use-Cases, such as:
4646
- for most used reviews:
4747
- @ref nbgl_useCaseStaticReview() to draw the pages of a regular review, when all info are available from the beginning (see @subpage use_case_static_review)
4848
- @ref nbgl_useCaseRegularReview() to draw the pages of a regular review (all pages but the cover one) (see @subpage use_case_regular_review)
49-
- for rare reviews:
50-
- @ref nbgl_useCaseForwardOnlyReview() to draw the pages of a forward-only review (without back) (see @subpage use_case_forward_only_review)
5149
- for address verification:
5250
- @ref nbgl_useCaseAddressConfirmation() to draw an address confirmation page (see @subpage use_case_addr_confirm)
5351
- @ref nbgl_useCaseAddressConfirmationExt() to draw an address confirmation page, with some extra tag/value pairs (see @subpage use_case_addr_confirm_ext)
@@ -247,79 +245,6 @@ void startReview(void) {
247245
}
248246
@endcode
249247

250-
@subsection use_case_forward_only_review Forward only Review Use Case
251-
252-
Some message/transaction reviews may be too long to be memorized, so it is only possible to move forward.
253-
254-
In this case, no backward navigation is possible, and the number of pages cannot be defined at start-up.
255-
256-
The API to initiate the display of the series of forward-only review pages is @ref nbgl_useCaseForwardOnlyReview(), providing:
257-
258-
- a navigation callback called when to retrieve the content of the next page. It is also called to fill the initial page.
259-
260-
Here is an example code:
261-
262-
@code
263-
264-
static uint8_t last_transaction_page;
265-
266-
static void onApprove(void) {
267-
// confirm transaction
268-
269-
// and go back to main
270-
appMain();
271-
}
272-
273-
static void onReject(void) {
274-
// reject transaction
275-
276-
// and go back to main
277-
appMain();
278-
}
279-
280-
// called to get the content of the given page
281-
static bool navCallback(uint8_t page, nbgl_pageContent_t *content) {
282-
memset(content, 0, sizeof(nbgl_pageContent_t));
283-
if (page == 0) {
284-
// the first page is used to display the title of the review
285-
content->text = "Review\ntransaction";
286-
content->icon = &C_icon_eye;
287-
}
288-
else if (page == (last_transaction+1)) {
289-
// try to get a new tag/value pair in this transaction
290-
char *tag;
291-
char *value;
292-
if (getNextTagValuePair(&tag, &value)) {
293-
content->text = tag;
294-
content->subText = value;
295-
last_transaction_page = page;
296-
}
297-
else {
298-
// this page is for approval
299-
content->text = "Approve";
300-
content->icon = &C_icon_validate;
301-
content->callback = onApprove;
302-
}
303-
}
304-
else if (page == (last_transaction+2)) {
305-
// this page is for rejection
306-
content->text = "Reject";
307-
content->icon = &C_icon_crossmark;
308-
content->callback = onReject;
309-
}
310-
else {
311-
return false;
312-
}
313-
// valid page so return true
314-
return true;
315-
}
316-
317-
void startForwardOnlyTransaction(void) {
318-
last_transaction_page = 0;
319-
nbgl_useCaseForwardOnlyReview(navCallback);
320-
}
321-
@endcode
322-
323248
@subsection use_case_static_review Static Review Use Case
324249

325250
\image{inline} html UseCase-Nano-Review1.png "caption" width=1000

lib_nbgl/include/nbgl_use_case.h

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -374,14 +374,6 @@ void nbgl_useCaseHomeExt(const char *appName,
374374
nbgl_callback_t actionCallback,
375375
nbgl_callback_t topRightCallback,
376376
nbgl_callback_t quitCallback);
377-
void nbgl_useCasePlugInHome(const char *plugInName,
378-
const char *appName,
379-
const nbgl_icon_details_t *appIcon,
380-
const char *tagline,
381-
const char *subTagline,
382-
bool withSettings,
383-
nbgl_callback_t topRightCallback,
384-
nbgl_callback_t quitCallback);
385377
void nbgl_useCaseSettings(const char *settingsTitle,
386378
uint8_t initPage,
387379
uint8_t nbPages,
@@ -411,10 +403,6 @@ void nbgl_useCaseRegularReview(uint8_t initPage,
411403
nbgl_layoutTouchCallback_t buttonCallback,
412404
nbgl_navCallback_t navCallback,
413405
nbgl_choiceCallback_t choiceCallback);
414-
void nbgl_useCaseForwardOnlyReview(const char *rejectText,
415-
nbgl_layoutTouchCallback_t buttonCallback,
416-
nbgl_navCallback_t navCallback,
417-
nbgl_choiceCallback_t choiceCallback);
418406
void nbgl_useCaseForwardOnlyReviewNoSkip(const char *rejectText,
419407
nbgl_layoutTouchCallback_t buttonCallback,
420408
nbgl_navCallback_t navCallback,
@@ -427,7 +415,6 @@ void nbgl_useCaseStaticReviewLight(const nbgl_contentTagValueList_t *tagValueLis
427415
const nbgl_pageInfoLongPress_t *infoLongPress,
428416
const char *rejectText,
429417
nbgl_choiceCallback_t callback);
430-
void nbgl_useCaseViewDetails(const char *tag, const char *value, bool wrapping);
431418
void nbgl_useCaseAddressConfirmation(const char *address, nbgl_choiceCallback_t callback);
432419
void nbgl_useCaseAddressConfirmationExt(const char *address,
433420
nbgl_choiceCallback_t callback,
@@ -449,28 +436,6 @@ void nbgl_useCaseKeypadPIN(const char *title,
449436
tune_index_e tuneId,
450437
nbgl_pinValidCallback_t validatePinCallback,
451438
nbgl_layoutTouchCallback_t actionCallback);
452-
/**
453-
* @deprecated
454-
* See #nbgl_useCaseKeypadPIN
455-
*/
456-
DEPRECATED static inline void nbgl_useCaseKeypad(const char *title,
457-
uint8_t minDigits,
458-
uint8_t maxDigits,
459-
uint8_t backToken,
460-
bool shuffled,
461-
tune_index_e tuneId,
462-
nbgl_pinValidCallback_t validatePinCallback,
463-
nbgl_layoutTouchCallback_t actionCallback)
464-
{
465-
nbgl_useCaseKeypadPIN(title,
466-
minDigits,
467-
maxDigits,
468-
backToken,
469-
shuffled,
470-
tuneId,
471-
validatePinCallback,
472-
actionCallback);
473-
}
474439
#endif // NBGL_KEYPAD
475440
#endif // HAVE_SE_TOUCH
476441

0 commit comments

Comments
 (0)