| Samsung Internal API reference 2.0

- Main Page
- Related Pages
- Modules
- Data Structures
- Files

- File List
- Globals

tui.h
Go to the documentation of this file.
1
17 #ifndef TUI_H_
18 #define TUI_H_
19
20 #include <tee_internal_api.h>
21
25 #define TEE_TUI_NUMBER_BUTTON_TYPES 6
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
32 typedef enum {
33 TEE_TUI_HIDDEN_MODE = 0,
34 TEE_TUI_CLEAR_MODE,
35 TEE_TEMPRARY_CLEAR_MODE,
36 } TEE_TUIEntryFieldMode;
37
39 typedef enum {
40 TEE_TUI_NUMERICAL = 0,
41 TEE_TUI_ALPHANUMERICAL,
42 } TEE_TUIEntryFieldType;
43
45 typedef enum {
46 TEE_TUI_PORTRAIT = 0,
47 TEE_TUI_LANDSCAPE,
48 } TEE_TUIScreenOrientation;
49
51 typedef enum {
52 TEE_TUI_CORRECTION = 0,
53 TEE_TUI_OK,
54 TEE_TUI_CANCEL,
55 TEE_TUI_VALIDATE,
56 TEE_TUI_PREVIOUS,
57 TEE_TUI_NEXT
58 } TEE_TUIButtonType;
59
61 typedef enum {
62 TEE_TUI_NO_SOURCE = 0,
63 TEE_TUI_REF_SOURCE,
64 TEE_TUI_OBJECT_SOURCE,
65 } TEE_TUIImageSource;
66
70 typedef struct {
71 TEE_TUIImageSource source;
72 union {
73 struct {
74 void *image;
75 size_t imageLength;
76 } ref;
77 struct {
78 uint32_t storageID;
79 void *objectID;
80 size_t objectIDLen;
81 } object;
82 };
83 uint32_t width;
84 uint32_t height;
85 } TEE_TUIImage;
86
91 typedef struct {
92 char *text;
93 uint32_t textXOffset;
94 uint32_t textYOffset;
95 uint8_t textColor[3];
96 TEE_TUIImage image;
97 uint32_t imageXOffset;
98 uint32_t imageYOffset;
99 } TEE_TUIScreenLabel;
100
104 typedef struct {
105 char *text;
106 TEE_TUIImage image;
107 } TEE_TUIButton;
108
112 typedef struct {
113 TEE_TUIScreenOrientation screenOrientation;
114 TEE_TUIScreenLabel label;
115 TEE_TUIButton *buttons[6];
116 bool requestedButtons[6];
117 } TEE_TUIScreenConfiguration;
118
123 typedef struct {
124 char *buttonText;
125 uint32_t buttonWidth;
126 uint32_t buttonHeight;
127 bool buttonTextCustom;
128 bool buttonImageCustom;
129 } TEE_TUIScreenButtonInfo;
130
134 typedef struct {
135 uint32_t grayscaleBitsDepth;
136 uint32_t redBitsDepth;
137 uint32_t greenBitsDepth;
138 uint32_t blueBitsDepth;
139 uint32_t widthInch;
140 uint32_t heightInch;
141 uint32_t maxEntryFields;
142 uint32_t entryFieldLabelWidth;
143 uint32_t entryFieldLabelHeight;
144 uint32_t maxEntryFieldLength;
145 uint8_t labelColor[3];
146 uint32_t labelWidth;
147 uint32_t labelHeight;
148 TEE_TUIScreenButtonInfo buttonInfo[TEE_TUI_NUMBER_BUTTON_TYPES];
149 } TEE_TUIScreenInfo;
150
154 typedef struct {
155 char *label;
156 TEE_TUIEntryFieldMode mode;
157 TEE_TUIEntryFieldType type;
158 uint32_t minExpectedLength;
159 uint32_t maxExpectedLength;
160 char *buffer;
161 size_t bufferLength;
162 } TEE_TUIEntryField;
163
184 TEE_Result TEE_TUICheckTextFormat(char *text,
185 uint32_t *width,
186 uint32_t *height,
187 uint32_t *lastIndex);
188
208 TEE_Result TEE_TUIGetScreenInfo(TEE_TUIScreenOrientation screenOrientation,
209 uint32_t nbEntryFields,
210 TEE_TUIScreenInfo *screenInfo);
211
232 TEE_Result TEE_TUIInitSession(void);
233
252 TEE_Result TEE_TUICloseSession(void);
253
319 TEE_Result TEE_TUIDisplayScreen(TEE_TUIScreenConfiguration *screenConfiguration,
320 bool closeTUISession,
321 TEE_TUIEntryField *entryFields,
322 uint32_t entryFieldCount,
323 TEE_TUIButtonType *selectedButton);
324
325 #ifdef __cplusplus
326 }
327 #endif
328
329 #endif /* TUI_H_ */
330
TEE_TUICheckTextFormat
TEE_Result TEE_TUICheckTextFormat(char *text, uint32_t *width, uint32_t *height, uint32_t *lastIndex)
Check whether a given text can be rendered and retrieves information.
TEE_TUI_PORTRAIT
Definition: tui.h:46
TEE_TUI_NUMBER_BUTTON_TYPES
#define TEE_TUI_NUMBER_BUTTON_TYPES
Definition: tui.h:25
TEE_TUIScreenButtonInfo::buttonHeight
uint32_t buttonHeight
Definition: tui.h:126
TEE_TUIGetScreenInfo
TEE_Result TEE_TUIGetScreenInfo(TEE_TUIScreenOrientation screenOrientation, uint32_t nbEntryFields, TEE_TUIScreenInfo *screenInfo)
Retrieves information about the screen.
TEE_TUIEntryField::minExpectedLength
uint32_t minExpectedLength
Definition: tui.h:158
TEE_TUIScreenInfo::maxEntryFieldLength
uint32_t maxEntryFieldLength
Definition: tui.h:144
TEE_TUI_VALIDATE
Definition: tui.h:55
TEE_TUIButton::text
char * text
Definition: tui.h:105
TEE_TUIImage::source
TEE_TUIImageSource source
Definition: tui.h:71
TEE_TUIInitSession
TEE_Result TEE_TUIInitSession(void)
Claims an exclusive access to TUI resources.
TEE_TUIScreenButtonInfo::buttonImageCustom
bool buttonImageCustom
Definition: tui.h:128
TEE_TUIScreenInfo::blueBitsDepth
uint32_t blueBitsDepth
Definition: tui.h:138
TEE_TUIScreenButtonInfo::buttonTextCustom
bool buttonTextCustom
Definition: tui.h:127
TEE_TUI_CLEAR_MODE
Definition: tui.h:34
TEE_TUIScreenInfo
Structure that represents screen information for a given orientation.
Definition: tui.h:134
TEE_TUI_OBJECT_SOURCE
Definition: tui.h:64
TEE_TUIScreenLabel::text
char * text
Definition: tui.h:92
TEE_TUIImageSource
TEE_TUIImageSource
Image source.
Definition: tui.h:61
TEE_TUI_LANDSCAPE
Definition: tui.h:47
TEE_TUI_CANCEL
Definition: tui.h:54
TEE_TUIScreenInfo::grayscaleBitsDepth
uint32_t grayscaleBitsDepth
Definition: tui.h:135
TEE_TUI_ALPHANUMERICAL
Definition: tui.h:41
TEE_TUIDisplayScreen
TEE_Result TEE_TUIDisplayScreen(TEE_TUIScreenConfiguration *screenConfiguration, bool closeTUISession, TEE_TUIEntryField *entryFields, uint32_t entryFieldCount, TEE_TUIButtonType *selectedButton)
Displays a TUI screen.
TEE_TUIButton::image
TEE_TUIImage image
Definition: tui.h:106
TEE_TUIImage::height
uint32_t height
Definition: tui.h:84
TEE_TUIEntryField::label
char * label
Definition: tui.h:155
TEE_TUIScreenLabel
Structure that defines the contents of the TA defined label area, which is provided to support TA bra...
Definition: tui.h:91
TEE_TUIScreenConfiguration::label
TEE_TUIScreenLabel label
Definition: tui.h:114
TEE_TUIEntryField::buffer
char * buffer
Definition: tui.h:160
TEE_TUIScreenLabel::textXOffset
uint32_t textXOffset
Definition: tui.h:93
TEE_TUIImage
Structure that defines a way to handle an image for label area and buttons.
Definition: tui.h:70
TEE_TUIEntryField
Structure that represents an entry field which acquires user inputs.
Definition: tui.h:154
TEE_TEMPRARY_CLEAR_MODE
Definition: tui.h:35
TEE_TUIImage::width
uint32_t width
Definition: tui.h:83
TEE_TUIEntryField::type
TEE_TUIEntryFieldType type
Definition: tui.h:157
TEE_TUIScreenInfo::greenBitsDepth
uint32_t greenBitsDepth
Definition: tui.h:137
TEE_TUIEntryField::mode
TEE_TUIEntryFieldMode mode
Definition: tui.h:156
TEE_TUIScreenInfo::heightInch
uint32_t heightInch
Definition: tui.h:140
TEE_TUIScreenLabel::image
TEE_TUIImage image
Definition: tui.h:96
TEE_TUIScreenInfo::labelWidth
uint32_t labelWidth
Definition: tui.h:146
TEE_TUIScreenOrientation
TEE_TUIScreenOrientation
Screen orientation.
Definition: tui.h:45
TEE_TUI_NO_SOURCE
Definition: tui.h:62
TEE_TUIButtonType
TEE_TUIButtonType
Button type.
Definition: tui.h:51
TEE_TUI_CORRECTION
Definition: tui.h:52
TEE_TUIScreenInfo::labelHeight
uint32_t labelHeight
Definition: tui.h:147
TEE_TUIEntryFieldMode
TEE_TUIEntryFieldMode
Entry fields mode.
Definition: tui.h:32
TEE_TUI_REF_SOURCE
Definition: tui.h:63
TEE_TUIScreenInfo::redBitsDepth
uint32_t redBitsDepth
Definition: tui.h:136
TEE_TUI_NUMERICAL
Definition: tui.h:40
TEE_TUIScreenInfo::widthInch
uint32_t widthInch
Definition: tui.h:139
TEE_TUIScreenLabel::imageYOffset
uint32_t imageYOffset
Definition: tui.h:98
TEE_TUIScreenConfiguration::screenOrientation
TEE_TUIScreenOrientation screenOrientation
Definition: tui.h:113
TEE_TUI_OK
Definition: tui.h:53
TEE_TUIScreenButtonInfo::buttonText
char * buttonText
Definition: tui.h:124
TEE_TUIScreenInfo::entryFieldLabelHeight
uint32_t entryFieldLabelHeight
Definition: tui.h:143
TEE_TUIButton
Structure that defines the content of a button.
Definition: tui.h:104
TEE_TUIScreenLabel::textYOffset
uint32_t textYOffset
Definition: tui.h:94
TEE_TUI_HIDDEN_MODE
Definition: tui.h:33
TEE_TUIScreenButtonInfo
Structure that represents button information associated with a TUI screen for a given orientation...
Definition: tui.h:123
TEE_TUIScreenConfiguration
Structure that enables configuration of a TUI screen.
Definition: tui.h:112
TEE_TUIScreenLabel::imageXOffset
uint32_t imageXOffset
Definition: tui.h:97
TEE_TUI_NEXT
Definition: tui.h:57
TEE_TUIEntryField::maxExpectedLength
uint32_t maxExpectedLength
Definition: tui.h:159
TEE_TUIScreenInfo::maxEntryFields
uint32_t maxEntryFields
Definition: tui.h:141
TEE_TUIEntryFieldType
TEE_TUIEntryFieldType
Entry fields type.
Definition: tui.h:39
TEE_TUI_PREVIOUS
Definition: tui.h:56
TEE_TUIEntryField::bufferLength
size_t bufferLength
Definition: tui.h:161
TEE_TUIScreenInfo::entryFieldLabelWidth
uint32_t entryFieldLabelWidth
Definition: tui.h:142
TEE_TUICloseSession
TEE_Result TEE_TUICloseSession(void)
Releases TUI resources.
TEE_TUIScreenButtonInfo::buttonWidth
uint32_t buttonWidth
Definition: tui.h:125