1 #ifndef UX_LAYOUT_PAGING_COMPUTE_H
2 #define UX_LAYOUT_PAGING_COMPUTE_H
8 #define PIXEL_PER_LINE 114
10 #define PAGING_FORMAT_NN 0x00
11 #define PAGING_FORMAT_BN 0xF0
12 #define PAGING_FORMAT_NB 0x0F
13 #define PAGING_FORMAT_BB (PAGING_FORMAT_BN | PAGING_FORMAT_NB)
15 #if defined(HAVE_INDEXED_STRINGS)
16 #define LINE_BUFFER_SIZE (32 - 1)
18 #define MAX_PAGING_LINE_COUNT (UX_LAYOUT_PAGING_LINE_COUNT + 1)
20 #define MAX_PAGING_LINE_COUNT UX_LAYOUT_PAGING_LINE_COUNT
26 #if defined(HAVE_INDEXED_STRINGS)
27 unsigned int paging_title;
30 #if defined(HAVE_INDEXED_STRINGS)
31 unsigned char string_buffer_id;
33 unsigned short offsets[MAX_PAGING_LINE_COUNT];
34 unsigned short lengths[MAX_PAGING_LINE_COUNT];
35 #if defined(HAVE_INDEXED_STRINGS)
36 unsigned char fond_ids[MAX_PAGING_LINE_COUNT];
37 char line_buffer[LINE_BUFFER_SIZE + 1];
39 } ux_layout_paging_state_t;
41 #if !defined(HAVE_SE_SCREEN)
42 uint8_t se_get_cropped_length(
const char *text,
44 uint32_t width_limit_in_pixels,
47 #if defined(HAVE_INDEXED_STRINGS)
48 unsigned int se_compute_line_width_light(
const char *text,
53 unsigned int ux_layout_paging_compute(
const char *text_to_split,
54 unsigned int page_to_display,
55 ux_layout_paging_state_t *paging_state,