21 #include "bolos_target.h"
27 #if (BAGL_WIDTH == 128 && BAGL_HEIGHT == 64)
33 typedef struct ux_layout_bnnn_params_s {
38 } ux_layout_bnnn_params_t;
44 typedef struct ux_layout_nnnn_params_s {
49 } ux_layout_nnnn_params_t;
55 typedef struct ux_layout_nnn_params_s {
59 } ux_layout_nnn_params_t;
66 typedef struct ux_layout_bnn_params_s {
70 } ux_layout_bnn_params_t;
72 void ux_layout_bnnn_init(
unsigned int stack_slot);
73 void ux_layout_nnnn_init(
unsigned int stack_slot);
74 void ux_layout_nnn_init(
unsigned int stack_slot);
75 void ux_layout_bnn_init(
unsigned int stack_slot);
83 #if (BAGL_WIDTH == 128 && BAGL_HEIGHT == 64)
84 #define UX_LAYOUT_PAGING_LINE_COUNT 3
85 #elif (BAGL_WIDTH == 128 && BAGL_HEIGHT == 32)
86 #define UX_LAYOUT_PAGING_LINE_COUNT 1
88 #error "BAGL_WIDTH/BAGL_HEIGHT not defined"
93 typedef struct ux_layout_paging_params_s {
96 } ux_layout_paging_params_t;
98 void ux_layout_paging_init(
unsigned int stack_slot);
102 void ux_layout_nn_paging_init(
unsigned int stack_slot);
103 void ux_layout_nb_paging_init(
unsigned int stack_slot);
104 void ux_layout_bn_paging_init(
unsigned int stack_slot);
105 void ux_layout_bb_paging_init(
unsigned int stack_slot);
108 #define ux_layout_nn_paging_params_t ux_layout_paging_params_t
109 #define ux_layout_nb_paging_params_t ux_layout_paging_params_t
110 #define ux_layout_bn_paging_params_t ux_layout_paging_params_t
111 #define ux_layout_bb_paging_params_t ux_layout_paging_params_t
114 void ux_layout_paging_reset(
void);
117 #define ux_layout_bnnn_paging_params_t ux_layout_paging_params_t
118 #define ux_layout_bnnn_paging_init ux_layout_bn_paging_init
119 #define ux_layout_bnnn_paging_reset ux_layout_paging_reset
120 #define ux_layout_bn_paging_reset ux_layout_paging_reset
128 typedef struct ux_layout_nnbnn_params_s {
134 } ux_layout_nnbnn_params_t;
141 typedef struct ux_layout_pb_params_s {
142 const bagl_icon_details_t *icon;
144 } ux_layout_pb_params_t;
150 typedef struct ux_layout_bb_params_s {
153 } ux_layout_bb_params_t;
160 typedef struct ux_layout_bn_params_s {
163 } ux_layout_bn_params_t;
170 typedef struct ux_layout_pbb_params_s {
171 const bagl_icon_details_t *icon;
174 } ux_layout_pbb_params_t;
176 void ux_layout_nnbnn_init(
unsigned int stack_slot);
177 void ux_layout_pb_init(
unsigned int stack_slot);
178 void ux_layout_bb_init(
unsigned int stack_slot);
179 void ux_layout_bn_init(
unsigned int stack_slot);
180 void ux_layout_pbb_init(
unsigned int stack_slot);
186 typedef struct ux_layout_pnn_params_s {
187 const bagl_icon_details_t *icon;
190 } ux_layout_pnn_params_t;
198 typedef struct ux_layout_pbn_params_s {
199 const bagl_icon_details_t *icon;
202 } ux_layout_pbn_params_t;
209 typedef struct ux_layout_pn_params_s {
210 const bagl_icon_details_t *icon;
212 } ux_layout_pn_params_t;
218 typedef struct ux_layout_nn_params_s {
221 } ux_layout_nn_params_t;
223 void ux_layout_nnbnn_init(
unsigned int stack_slot);
224 void ux_layout_pb_init(
unsigned int stack_slot);
225 void ux_layout_bb_init(
unsigned int stack_slot);
226 void ux_layout_bn_init(
unsigned int stack_slot);
227 void ux_layout_pbb_init(
unsigned int stack_slot);
228 void ux_layout_pnn_init(
unsigned int stack_slot);
229 void ux_layout_pbn_init(
unsigned int stack_slot);
230 void ux_layout_pn_init(
unsigned int stack_slot);
231 void ux_layout_nn_init(
unsigned int stack_slot);
238 typedef void (*list_item_select_t)(
unsigned int item_idx);
241 typedef const char *(*list_item_value_t)(
unsigned int item_idx);
243 void ux_menulist_init(
unsigned int stack_slot,
244 list_item_value_t getter,
245 list_item_select_t selector);
246 void ux_menulist_init_select(
unsigned int stack_slot,
247 list_item_value_t getter,
248 list_item_select_t selector,
249 unsigned int selected_item_idx);
251 #define UX_STEP_MENULIST(stepname, getter, selector) \
252 void stepname##_init(unsigned int stack_slot) \
254 ux_menulist_init(stack_slot, getter, selector); \
256 const ux_flow_step_t stepname = { \
258 &G_ux.menulist_params, \
263 #define UX_STEP_MENULIST_INIT(stepname, initfunc) \
264 const ux_flow_step_t stepname = { \
266 &G_ux.menulist_params, \
279 void ux_layout_set_timeout(
unsigned int stack_slot,
unsigned int ms);