.TH "tui" 3teegris "Sun Oct 28 2018" "Version 2.0" "Samsung Internal API reference" \" -*- nroff -*-
.ad l
.nh
.SH NAME
tui \- Trusted user interface
.SS "Data Structures"

.in +1c
.ti -1c
.RI "struct \fBTEES_TUIScreenInfo\fP"
.br
.RI "\fIStructure that represents information on the requested screen\&. \fP"
.ti -1c
.RI "struct \fBTEES_TUITouchInfo\fP"
.br
.RI "\fIStructure that represents information of touch event (touch position, touch type)\&. \fP"
.ti -1c
.RI "struct \fBTEES_TUIImage\fP"
.br
.RI "\fIStructure that represents properties of image and buffers\&. \fP"
.ti -1c
.RI "struct \fBTEE_TUIImage\fP"
.br
.RI "\fIStructure that defines a way to handle an image for label area and buttons\&. \fP"
.ti -1c
.RI "union \fBTEE_TUIImage\&.__unnamed__\fP"
.br
.ti -1c
.RI "struct \fBTEE_TUIImage\&.__unnamed__\&.ref\fP"
.br
.ti -1c
.RI "struct \fBTEE_TUIImage\&.__unnamed__\&.object\fP"
.br
.ti -1c
.RI "struct \fBTEE_TUIScreenLabel\fP"
.br
.RI "\fIStructure that defines the contents of the TA defined label area, which is provided to support TA branding and a TA defined message\&. \fP"
.ti -1c
.RI "struct \fBTEE_TUIButton\fP"
.br
.RI "\fIStructure that defines the content of a button\&. \fP"
.ti -1c
.RI "struct \fBTEE_TUIScreenConfiguration\fP"
.br
.RI "\fIStructure that enables configuration of a TUI screen\&. \fP"
.ti -1c
.RI "struct \fBTEE_TUIScreenButtonInfo\fP"
.br
.RI "\fIStructure that represents button information associated with a TUI screen for a given orientation\&. \fP"
.ti -1c
.RI "struct \fBTEE_TUIScreenInfo\fP"
.br
.RI "\fIStructure that represents screen information for a given orientation\&. \fP"
.ti -1c
.RI "struct \fBTEE_TUIEntryField\fP"
.br
.RI "\fIStructure that represents an entry field which acquires user inputs\&. \fP"
.in -1c
.SS "Macros"

.in +1c
.ti -1c
.RI "#define \fBMIN_FONT_SIZE\fP   20"
.br
.ti -1c
.RI "#define \fBMAX_FONT_SIZE\fP   160"
.br
.ti -1c
.RI "#define \fBTEE_TUI_NUMBER_BUTTON_TYPES\fP   6"
.br
.in -1c
.SS "Enumerations"

.in +1c
.ti -1c
.RI "enum \fBTEES_Result\fP { \fBTEES_SUCCESS\fP = 0x00000000, \fBTEES_ERROR_TUI_GENERIC\fP = 0xFFFF0000, \fBTEES_ERROR_TUI_BAD_FORMAT\fP = 0xFFFF0005, \fBTEES_ERROR_TUI_INVAL_PARAM\fP = 0xFFFF0006, \fBTEES_ERROR_TUI_BAD_STATE\fP = 0xFFFF0007, \fBTEES_ERROR_NOT_IMPLEMENTED\fP = 0xFFFF0009, \fBTEES_ERROR_NOT_SUPPORTED\fP = 0xFFFF000A, \fBTEES_ERROR_TUI_OUT_OF_MEMORY\fP = 0xFFFF000C, \fBTEES_ERROR_TUI_BUSY\fP = 0xFFFF000D }
.RI "\fITEES result codes\&. \fP""
.br
.ti -1c
.RI "enum \fBTEES_TUITouchTypes\fP { \fBTEES_TOUCH_PRESSED\fP, \fBTEES_TOUCH_RELEASED\fP }
.RI "\fIInternal, touch event type\&. \fP""
.br
.ti -1c
.RI "enum \fBTEES_bool\fP { \fBTEES_FALSE\fP = 0, \fBTEES_TRUE\fP = 1 }
.RI "\fIInternal, bool type\&. \fP""
.br
.ti -1c
.RI "enum \fBTEE_TUIEntryFieldMode\fP { \fBTEE_TUI_HIDDEN_MODE\fP = 0, \fBTEE_TUI_CLEAR_MODE\fP, \fBTEE_TEMPRARY_CLEAR_MODE\fP }
.RI "\fIEntry fields mode\&. \fP""
.br
.ti -1c
.RI "enum \fBTEE_TUIEntryFieldType\fP { \fBTEE_TUI_NUMERICAL\fP = 0, \fBTEE_TUI_ALPHANUMERICAL\fP }
.RI "\fIEntry fields type\&. \fP""
.br
.ti -1c
.RI "enum \fBTEE_TUIScreenOrientation\fP { \fBTEE_TUI_PORTRAIT\fP = 0, \fBTEE_TUI_LANDSCAPE\fP }
.RI "\fIScreen orientation\&. \fP""
.br
.ti -1c
.RI "enum \fBTEE_TUIButtonType\fP { \fBTEE_TUI_CORRECTION\fP = 0, \fBTEE_TUI_OK\fP, \fBTEE_TUI_CANCEL\fP, \fBTEE_TUI_VALIDATE\fP, \fBTEE_TUI_PREVIOUS\fP, \fBTEE_TUI_NEXT\fP }
.RI "\fIButton type\&. \fP""
.br
.ti -1c
.RI "enum \fBTEE_TUIImageSource\fP { \fBTEE_TUI_NO_SOURCE\fP = 0, \fBTEE_TUI_REF_SOURCE\fP, \fBTEE_TUI_OBJECT_SOURCE\fP }
.RI "\fIImage source\&. \fP""
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "\fBTEES_Result\fP \fBTEES_TUIGetScreenInfo\fP (\fBTEES_TUIScreenInfo\fP *screenInfo)"
.br
.RI "\fIRetrieves information about the screen\&. \fP"
.ti -1c
.RI "\fBTEES_Result\fP \fBTEES_TUIOpenSession\fP (void)"
.br
.RI "\fIClaims an exclusive access to TUI resources\&. \fP"
.ti -1c
.RI "\fBTEES_Result\fP \fBTEES_TUICloseSession\fP (void)"
.br
.RI "\fIReleases TUI resources\&. \fP"
.ti -1c
.RI "\fBTEES_Result\fP \fBTEES_TUIDrawImage\fP (\fBTEES_TUIImage\fP *image, uint32_t posX, uint32_t posY)"
.br
.RI "\fIDisplay an image on screen\&. \fP"
.ti -1c
.RI "\fBTEES_Result\fP \fBTEES_TUIGetTouchEvent\fP (\fBTEES_TUITouchInfo\fP *touchInfo, uint32_t timeout)"
.br
.RI "\fIGet a touch event\&. \fP"
.ti -1c
.RI "\fBTEES_Result\fP \fBTEES_TUICheckTextFormat\fP (char *inputText, uint32_t textSize, uint32_t *width, uint32_t *height, uint32_t *lastIndex)"
.br
.RI "\fIChecks validity of the string and Retrieves its width and height\&. \fP"
.ti -1c
.RI "\fBTEES_Result\fP \fBTEES_TUIPrintString\fP (char *inputText, uint32_t textSize, uint32_t posX, uint32_t posY, uint8_t redColorValue, uint8_t greenColorValue, uint8_t blueColorValue, bool rotation90)"
.br
.RI "\fIPrint string on the screen\&. \fP"
.ti -1c
.RI "\fBTEES_Result\fP \fBTEES_TUIRefreshScreen\fP (void)"
.br
.RI "\fIRefresh display controller\&. \fP"
.ti -1c
.RI "\fBTEES_Result\fP \fBTEES_TUIGetBuffer\fP (uint32_t *buffer, uint32_t posX, uint32_t posY, uint32_t W, uint32_t H)"
.br
.RI "\fICopy a rectangle from screen to buffer\&. \fP"
.ti -1c
.RI "\fBTEES_Result\fP \fBTEES_TUIDrawBuffer\fP (uint32_t *buffer, uint32_t posX, uint32_t posY, uint32_t W, uint32_t H)"
.br
.RI "\fICopy a rectangle from buffer to screen\&. \fP"
.ti -1c
.RI "TEE_Result \fBTEE_TUICheckTextFormat\fP (char *text, uint32_t *width, uint32_t *height, uint32_t *lastIndex)"
.br
.RI "\fICheck whether a given text can be rendered and retrieves information\&. \fP"
.ti -1c
.RI "TEE_Result \fBTEE_TUIGetScreenInfo\fP (\fBTEE_TUIScreenOrientation\fP screenOrientation, uint32_t nbEntryFields, \fBTEE_TUIScreenInfo\fP *screenInfo)"
.br
.RI "\fIRetrieves information about the screen\&. \fP"
.ti -1c
.RI "TEE_Result \fBTEE_TUIInitSession\fP (void)"
.br
.RI "\fIClaims an exclusive access to TUI resources\&. \fP"
.ti -1c
.RI "TEE_Result \fBTEE_TUICloseSession\fP (void)"
.br
.RI "\fIReleases TUI resources\&. \fP"
.ti -1c
.RI "TEE_Result \fBTEE_TUIDisplayScreen\fP (\fBTEE_TUIScreenConfiguration\fP *screenConfiguration, bool closeTUISession, \fBTEE_TUIEntryField\fP *entryFields, uint32_t entryFieldCount, \fBTEE_TUIButtonType\fP *selectedButton)"
.br
.RI "\fIDisplays a TUI screen\&. \fP"
.in -1c
.SH "Detailed Description"
.PP 
Provides a set of functions to manipulate user interface\&. 
.SH "Data Structure Documentation"
.PP 
.SH "struct TEES_TUIScreenInfo"
.PP 
Structure that represents information on the requested screen\&. 
.PP
\fBData Fields:\fP
.RS 4
uint32_t \fIblueBitsDepth\fP Available Blue bit depth\&. 
.br
.PP
uint32_t \fIgrayscaleBitsDepth\fP Available grayscale depth\&. 
.br
.PP
uint32_t \fIgreenBitsDepth\fP Available Green bit depth\&. 
.br
.PP
uint32_t \fIheightInch\fP Height in pixels per inch\&. 
.br
.PP
uint32_t \fIredBitsDepth\fP Available Red bit depth\&. 
.br
.PP
uint32_t \fIresolution_height\fP Height of screen resolution\&. 
.br
.PP
uint32_t \fIresolution_width\fP Width of screen resolution\&. 
.br
.PP
uint32_t \fIwidthInch\fP Width in pixels per inch\&. 
.br
.PP
.RE
.PP
.SH "struct TEES_TUITouchInfo"
.PP 
Structure that represents information of touch event (touch position, touch type)\&. 
.PP
\fBData Fields:\fP
.RS 4
\fBTEES_TUITouchTypes\fP \fItouchType\fP indicates touch type\&. 
.br
.PP
uint32_t \fIxPosition\fP the x-coordinate of touch event\&. 
.br
.PP
uint32_t \fIyPosition\fP the y-coordinate of touch event\&. 
.br
.PP
.RE
.PP
.SH "struct TEES_TUIImage"
.PP 
Structure that represents properties of image and buffers\&. 
.PP
\fBData Fields:\fP
.RS 4
uint32_t \fIheight\fP the number of pixels of the height of the image\&. 
.br
.PP
void * \fIimageBuf\fP buffer containing the image\&. 
.br
.PP
size_t \fIimageLength\fP buffer size\&. 
.br
.PP
uint32_t \fIuse_png_alpha\fP not used\&. 
.br
.PP
uint32_t \fIwidth\fP the number of pixels of the width of the image\&. 
.br
.PP
.RE
.PP
.SH "struct TEE_TUIImage"
.PP 
Structure that defines a way to handle an image for label area and buttons\&. 
.PP
\fBData Fields:\fP
.RS 4
union \fBTEE_TUIImage\fP \fI__unnamed__\fP union of image source 
.br
.PP
uint32_t \fIheight\fP the number of pixels of the height of the image\&. 
.br
.PP
\fBTEE_TUIImageSource\fP \fIsource\fP indicates the source of the image\&. 
.br
.PP
uint32_t \fIwidth\fP the number of pixels of the width of the image\&. 
.br
.PP
.RE
.PP
.SH "union TEE_TUIImage\&.__unnamed__"
.PP 
\fBData Fields:\fP
.RS 4
\fB__unnamed__\fP \fIobject\fP TEE_TUI_OBJECT_SOURCE 
.br
.PP
\fB__unnamed__\fP \fIref\fP TEE_TUI_REF_SOURCE 
.br
.PP
.RE
.PP
.SH "struct TEE_TUIImage\&.__unnamed__\&.ref"
.PP 
\fBData Fields:\fP
.RS 4
void * \fIimage\fP buffer containing the image\&. 
.br
.PP
size_t \fIimageLength\fP buffer size\&. 
.br
.PP
.RE
.PP
.SH "struct TEE_TUIImage\&.__unnamed__\&.object"
.PP 
\fBData Fields:\fP
.RS 4
void * \fIobjectID\fP Object Identifier which refers to a Data Object 
.br
.PP
size_t \fIobjectIDLen\fP Object ID length\&. 
.br
.PP
uint32_t \fIstorageID\fP storage to use\&. 
.br
.PP
.RE
.PP
.SH "struct TEE_TUIScreenLabel"
.PP 
Structure that defines the contents of the TA defined label area, which is provided to support TA branding and a TA defined message\&. 
.PP
\fBData Fields:\fP
.RS 4
\fBTEE_TUIImage\fP \fIimage\fP image to be put in the label area\&. 
.br
.PP
uint32_t \fIimageXOffset\fP the x-coordinate for the top left corner of the image to display\&. 
.br
.PP
uint32_t \fIimageYOffset\fP the y-coordinate for the top left corner of the image to display\&. 
.br
.PP
char * \fItext\fP string to put in the label area\&. 
.br
.PP
uint8_t \fItextColor[3]\fP defines the color of the text in RGB form\&. 
.br
.PP
uint32_t \fItextXOffset\fP the x-coordinate for the top left corner of the text to render\&. 
.br
.PP
uint32_t \fItextYOffset\fP the y-coordinate for the top left corner of the text to render\&. 
.br
.PP
.RE
.PP
.SH "struct TEE_TUIButton"
.PP 
Structure that defines the content of a button\&. 
.PP
\fBData Fields:\fP
.RS 4
\fBTEE_TUIImage\fP \fIimage\fP image to associate with the button\&. 
.br
.PP
char * \fItext\fP string to associate with the button\&. 
.br
.PP
.RE
.PP
.SH "struct TEE_TUIScreenConfiguration"
.PP 
Structure that enables configuration of a TUI screen\&. 
.PP
\fBData Fields:\fP
.RS 4
\fBTEE_TUIButton\fP * \fIbuttons[6]\fP customizes the buttons compared to the default configuration\&. 
.br
.PP
\fBTEE_TUIScreenLabel\fP \fIlabel\fP specifies the label of the screen\&. 
.br
.PP
bool \fIrequestedButtons[6]\fP specifies which buttons to be displayed\&. 
.br
.PP
\fBTEE_TUIScreenOrientation\fP \fIscreenOrientation\fP requested screen orientation\&. 
.br
.PP
.RE
.PP
.SH "struct TEE_TUIScreenButtonInfo"
.PP 
Structure that represents button information associated with a TUI screen for a given orientation\&. 
.PP
\fBData Fields:\fP
.RS 4
uint32_t \fIbuttonHeight\fP The height in pixels of the button\&. 
.br
.PP
bool \fIbuttonImageCustom\fP if the image of the button can be customized\&. false otherwise\&. 
.br
.PP
char * \fIbuttonText\fP The value of the default label\&. 
.br
.PP
bool \fIbuttonTextCustom\fP true if the text of the button can be customized\&. false otherwise\&. 
.br
.PP
uint32_t \fIbuttonWidth\fP The width in pixels of the button\&. 
.br
.PP
.RE
.PP
.SH "struct TEE_TUIScreenInfo"
.PP 
Structure that represents screen information for a given orientation\&. 
.PP
\fBData Fields:\fP
.RS 4
uint32_t \fIblueBitsDepth\fP Available Blue bit depth\&. 
.br
.PP
\fBTEE_TUIScreenButtonInfo\fP \fIbuttonInfo[6]\fP Information defining the buttons of the screens\&. 
.br
.PP
uint32_t \fIentryFieldLabelHeight\fP Height in pixels of the label of an entry field\&. 
.br
.PP
uint32_t \fIentryFieldLabelWidth\fP Width in pixels of the label of an entry field\&. 
.br
.PP
uint32_t \fIgrayscaleBitsDepth\fP Available grayscale depth\&. 
.br
.PP
uint32_t \fIgreenBitsDepth\fP Available Green bit depth\&. 
.br
.PP
uint32_t \fIheightInch\fP Height in pixels per inch\&. 
.br
.PP
uint8_t \fIlabelColor[3]\fP The RGB values of the default label canvas\&. 
.br
.PP
uint32_t \fIlabelHeight\fP Height in pixels of the label canvas\&. 
.br
.PP
uint32_t \fIlabelWidth\fP Width in pixels of the label canvas\&. 
.br
.PP
uint32_t \fImaxEntryFieldLength\fP The maximum number of characters that can be entered within an entry field\&. 
.br
.PP
uint32_t \fImaxEntryFields\fP Maximum number of entry fields that can be displayed on the screen\&. 
.br
.PP
uint32_t \fIredBitsDepth\fP Available Red bit depth\&. 
.br
.PP
uint32_t \fIwidthInch\fP Width in pixels per inch\&. 
.br
.PP
.RE
.PP
.SH "struct TEE_TUIEntryField"
.PP 
Structure that represents an entry field which acquires user inputs\&. 
.PP
\fBData Fields:\fP
.RS 4
char * \fIbuffer\fP Contains the input entered by the user\&. 
.br
.PP
size_t \fIbufferLength\fP Contains the input entered by the user\&. 
.br
.PP
char * \fIlabel\fP The label associated with the entry field\&. 
.br
.PP
uint32_t \fImaxExpectedLength\fP The maximum number of characters expected for the entry field\&. 
.br
.PP
uint32_t \fIminExpectedLength\fP The minimum number of characters expected for the entry field\&. 
.br
.PP
\fBTEE_TUIEntryFieldMode\fP \fImode\fP The mode to be used when displaying characters\&. 
.br
.PP
\fBTEE_TUIEntryFieldType\fP \fItype\fP The type of inputs accepted by the entry field\&. 
.br
.PP
.RE
.PP
.SH "Macro Definition Documentation"
.PP 
.SS "#define MAX_FONT_SIZE   160"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fPFont size value should be between min~Max\&. If not error should return\&. 
.SS "#define MIN_FONT_SIZE   20"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fPFont size value should be between min~Max\&. If not error should return\&. 
.SS "#define TEE_TUI_NUMBER_BUTTON_TYPES   6"

.PP
\fC#include <\fBtui\&.h\fP>\fPNumber of possible buttons on TUI screen\&. 
.SH "Enumeration Type Documentation"
.PP 
.SS "enum \fBTEE_TUIButtonType\fP"

.PP
\fC#include <\fBtui\&.h\fP>\fP
.PP
Button type\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fITEE_TUI_CORRECTION \fP\fP
Correction 
.TP
\fB\fITEE_TUI_OK \fP\fP
OK 
.TP
\fB\fITEE_TUI_CANCEL \fP\fP
Cancel 
.TP
\fB\fITEE_TUI_VALIDATE \fP\fP
Validate 
.TP
\fB\fITEE_TUI_PREVIOUS \fP\fP
Previous 
.TP
\fB\fITEE_TUI_NEXT \fP\fP
Next 
.SS "enum \fBTEE_TUIEntryFieldMode\fP"

.PP
\fC#include <\fBtui\&.h\fP>\fP
.PP
Entry fields mode\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fITEE_TUI_HIDDEN_MODE \fP\fP
hidden 
.TP
\fB\fITEE_TUI_CLEAR_MODE \fP\fP
clear 
.TP
\fB\fITEE_TEMPRARY_CLEAR_MODE \fP\fP
temporary clear 
.SS "enum \fBTEE_TUIEntryFieldType\fP"

.PP
\fC#include <\fBtui\&.h\fP>\fP
.PP
Entry fields type\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fITEE_TUI_NUMERICAL \fP\fP
numerical 
.TP
\fB\fITEE_TUI_ALPHANUMERICAL \fP\fP
alphanumerical 
.SS "enum \fBTEE_TUIImageSource\fP"

.PP
\fC#include <\fBtui\&.h\fP>\fP
.PP
Image source\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fITEE_TUI_NO_SOURCE \fP\fP
No image is provided as input 
.TP
\fB\fITEE_TUI_REF_SOURCE \fP\fP
The image source is provided as memory reference 
.TP
\fB\fITEE_TUI_OBJECT_SOURCE \fP\fP
The image source is provided as a Data Object in the Trusted Storage 
.SS "enum \fBTEE_TUIScreenOrientation\fP"

.PP
\fC#include <\fBtui\&.h\fP>\fP
.PP
Screen orientation\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fITEE_TUI_PORTRAIT \fP\fP
Portrait 
.TP
\fB\fITEE_TUI_LANDSCAPE \fP\fP
Landscape 
.SS "enum \fBTEES_bool\fP"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
Internal, bool type\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fITEES_FALSE \fP\fP
false 
.TP
\fB\fITEES_TRUE \fP\fP
true 
.SS "enum \fBTEES_Result\fP"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
TEES result codes\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fITEES_SUCCESS \fP\fP
Scess 
.TP
\fB\fITEES_ERROR_TUI_GENERIC \fP\fP
Generic error 
.TP
\fB\fITEES_ERROR_TUI_BAD_FORMAT \fP\fP
Bad format 
.TP
\fB\fITEES_ERROR_TUI_INVAL_PARAM \fP\fP
Invalid parameter 
.TP
\fB\fITEES_ERROR_TUI_BAD_STATE \fP\fP
Bad state 
.TP
\fB\fITEES_ERROR_NOT_IMPLEMENTED \fP\fP
Not implemented 
.TP
\fB\fITEES_ERROR_NOT_SUPPORTED \fP\fP
Not supported 
.TP
\fB\fITEES_ERROR_TUI_OUT_OF_MEMORY \fP\fP
Out of memory 
.TP
\fB\fITEES_ERROR_TUI_BUSY \fP\fP
Busy 
.SS "enum \fBTEES_TUITouchTypes\fP"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
Internal, touch event type\&. 
.PP
\fBEnumerator\fP
.in +1c
.TP
\fB\fITEES_TOUCH_PRESSED \fP\fP
Pressed 
.TP
\fB\fITEES_TOUCH_RELEASED \fP\fP
Released 
.SH "Function Documentation"
.PP 
.SS "TEE_Result TEE_TUICheckTextFormat (char * text, uint32_t * width, uint32_t * height, uint32_t * lastIndex)"

.PP
\fC#include <\fBtui\&.h\fP>\fP
.PP
Check whether a given text can be rendered and retrieves information\&. The TEE_TUICheckTextFormat function allows a TA to check whether a given text can be rendered by the current implementation and retrieves information about the size and width that is needed to render it\&. TEE_TUIInitSession does not have to be called before using this function\&.
.PP
\fBParameters:\fP
.RS 4
\fItext\fP The string to be checked\&. 
.br
\fIwidth\fP Width in pixels needed to render the text\&. 
.br
\fIheight\fP Height in pixels needed to render the text\&. 
.br
\fIlastIndex\fP Indicates the last character that has been checked\&. In case of success, it corresponds to the last character of the text string\&. In case of failure, it indicates the index of the character which causes the failure\&. The index starts at 0\&.
.RE
.PP
\fBReturn values:\fP
.RS 4
\fITEE_SUCCESS\fP In case of success 
.br
\fITEE_ERROR_NOT_SUPPORTED\fP If at least one of the characters present in the text string cannot be rendered\&. 
.RE
.PP

.SS "TEE_Result TEE_TUICloseSession (void)"

.PP
\fC#include <\fBtui\&.h\fP>\fP
.PP
Releases TUI resources\&. The TEE_TUICloseSession function releases TUI resources previously acquired\&. This function SHOULD be called as soon as possible after the last TUI screen of the TUI session has ended in order to avoid a bad user experience\&.
.PP
\fBReturn values:\fP
.RS 4
\fITEE_SUCCESS\fP In case of success 
.br
\fITEE_ERROR_BAD_STATE\fP If the current TA is not within a TUI session initially started by a successful call to TEE_TUIInitSession\&. In particular, it will be returned if a TUI session has been closed automatically because the TUI session timeout has been reached or if a TUI session has been closed due to an OS specific external event such as an incoming call\&. 
.br
\fITEE_ERROR_BUSY\fP If the TUI resources are currently in use, i\&.e\&. a TUI screen is displayed\&. This error code can only be returned by a TEE implementation supporting multi-threading within a TA and will occur when a thread tries to close a TUI session that is displaying a TUI screen in another thread\&. 
.RE
.PP

.SS "TEE_Result TEE_TUIDisplayScreen (\fBTEE_TUIScreenConfiguration\fP * screenConfiguration, bool closeTUISession, \fBTEE_TUIEntryField\fP * entryFields, uint32_t entryFieldCount, \fBTEE_TUIButtonType\fP * selectedButton)"

.PP
\fC#include <\fBtui\&.h\fP>\fP
.PP
Displays a TUI screen\&. The TEE_TUIDisplayScreen function displays a TUI screen\&. The display order of the requested entry fields is from top to bottom\&. This function is cancellable, i\&.e\&., if the current task's cancelled flag is set and the TA has unmasked the effects of cancellation, then this function returns earlier than the requested timeout with the error code TEE_ERROR_CANCEL\&. In a given session, once the first call to TEE_TUIDisplayScreen has been made and if the parameter closeTUISession was set to false, the screen will not be handed back to the REE until TEE_TUICloseSession is called\&. When not displaying a particular TEE_TUIDisplayScreen the TEE MAY continue to display the current TUI screen or MAY display a screen indicating a security TUI session is in progress\&. Input events that occurred before the call to TEE_TUIDisplayScreen SHALL be ignored\&. Note that all in and out parameters, as well as the buffers they refer to, MUST NOT reside in shared memory\&.
.PP
\fBParameters:\fP
.RS 4
\fIscreenConfiguration\fP Configures the label of the screen and optionally the buttons of the screen\&. 
.br
\fIcloseTUISession\fP If true the TUI session is automatically closed when exiting the function\&. 
.br
\fIentryFields,entryFieldCount\fP Array of entry fields\&. It contains the entry fields to display on the screen and enables input from the user by filling the buffer field of the corresponding \fBTEE_TUIEntryField\fP structure\&. It is ignored if entryFieldCount is set to 0\&. 
.br
\fIselectedButton\fP In case of success, it indicates which button has been selected by the user to exit the TUI screen\&.
.RE
.PP
\fBReturn values:\fP
.RS 4
\fITEE_SUCCESS\fP In case of success\&. 
.br
\fITEE_ERROR_OUT_OF_MEMORY\fP If the system ran out of resources\&. 
.br
\fITEE_ERROR_ITEM_NOT_FOUND\fP If at least one image provided by the TA refers to a storage denoted by a storageID which does not exist or if the corresponding Object Identifier cannot be found in the storage\&. 
.br
\fITEE_ERROR_ACCESS_CONFLICT\fP If at least one image provided by the TA refers to a Data Object in the Trusted Storage and an access right conflict was detected while opening the object\&. 
.br
\fITEE_ERROR_BAD_FORMAT\fP If at least one input image is not compliant with PNG format\&. 
.br
\fITEE_ERROR_BAD_STATE\fP If the current TA is not within a TUI session initially started by a successful call to TEE_TUIInitSession\&. In particular, it will be returned if a TUI session has been closed automatically because the TUI session timeout has been reached or if a TUI session has been closed due to an OS specific external event such as an incoming call\&. 
.br
\fITEE_ERROR_BUSY\fP If the TUI resources are currently in use, i\&.e\&. a TUI screen is displayed\&. This error code can only be returned by a TEE implementation supporting multi-threading within a TA and will occur when a thread tries to display a TUI screen while a TUI screen is already displayed\&. 
.br
\fITEE_ERROR_CANCEL\fP If the operation has been cancelled while a TUI screen is currently displayed\&.
.IP "\(bu" 2
The current UI session acquired by TEE_TUIInitSession is automatically closed as if TEE_TUICloseSession had been called\&.
.IP "\(bu" 2
The implementation MAY have started to fill out entry fields\&. In that case, entry fields will be returned with the last values entered by the user and it is up to the TA as to how it makes use of these\&. 
.PP
.br
\fITEE_ERROR_EXTERNAL_CANCEL\fP If the operation has been cancelled by an external event which occurred in the REE while a TUI screen is currently displayed\&.
.IP "\(bu" 2
The current UI session acquired by TEE_TUIInitSession is automatically closed as if TEE_TUICloseSession had been called\&.
.IP "\(bu" 2
The implementation MAY have started to fill out entry fields\&. In that case, entry fields MAY be returned with the last values entered by the user and it is up to the TA as to how it makes use of these\&. 
.PP
.RE
.PP

.SS "TEE_Result TEE_TUIGetScreenInfo (\fBTEE_TUIScreenOrientation\fP screenOrientation, uint32_t nbEntryFields, \fBTEE_TUIScreenInfo\fP * screenInfo)"

.PP
\fC#include <\fBtui\&.h\fP>\fP
.PP
Retrieves information about the screen\&. The TEE_TUIGetScreenInfo function retrieves information about the screen depending on its orientation and the number of required entry fields\&. TEE_TUIInitSession does not have to be called before using this function\&.
.PP
\fBParameters:\fP
.RS 4
\fIscreenOrientation\fP Defines for which orientation screen information is requested\&. 
.br
\fInbEntryFields\fP Defines how many entry fields are requested\&. 
.br
\fIscreenInfo\fP Returns information on the requested screen for a given orientation\&.
.RE
.PP
\fBReturn values:\fP
.RS 4
\fITEE_SUCCESS\fP In case of success 
.br
\fITEE_ERROR_NOT_SUPPORTED\fP if the requested number of entry fields is not supported\&. In that case, the field maxEntryFields of the screenInfo output parameter is set to the maximum number of entry fields supported for the given orientation\&. 
.RE
.PP

.SS "TEE_Result TEE_TUIInitSession (void)"

.PP
\fC#include <\fBtui\&.h\fP>\fP
.PP
Claims an exclusive access to TUI resources\&. The TEE_TUIInitSession function claims an exclusive access to TUI resources for the current TA\&. Control of screen and keyboard MAY be taken over by the TEE at this stage\&. This just reserves the ability to use the TUI for this particular TA and will notify other TAs that this reservation has been made and the resource is busy (i\&.e\&. those other TAs will receive TEE_ERROR_BUSY when attempting this operation)\&. As a limited resource, the TUI session will be closed automatically whenever the TA does not display a TUI screen to interact with the user for a period of time\&. This period of time is equal to the value of the property gpd\&.tee\&.tui\&.session\&.timeout\&. This function MUST be called before a screen can be displayed with TEE_TUIDisplayScreen\&.
.PP
\fBReturn values:\fP
.RS 4
\fITEE_SUCCESS\fP In case of success\&. 
.br
\fITEE_ERROR_BUSY\fP If the TUI resources cannot be reserved\&. 
.br
\fITEE_ERROR_OUT_OF_MEMORY\fP If the system ran out of resources\&. 
.RE
.PP

.SS "\fBTEES_Result\fP TEES_TUICheckTextFormat (char * inputText, uint32_t textSize, uint32_t * width, uint32_t * height, uint32_t * lastIndex)"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
Checks validity of the string and Retrieves its width and height\&. The TEES_TUICheckTextFormat function retrieves information about the string such as width, height needed to be displayed on the screen\&. If the string is not valid or the string with the size as textSize can not be displayed on the screen, this function returns error\&. In the case of that the string exceeds the screen boundary, this function returns error and lastIndex has the index of the character causing the error in the string\&.
.PP
\fBParameters:\fP
.RS 4
\fIinputText\fP pointer to input string to be checked in this function 
.br
\fItextSize\fP size of the text\&. The range is 20 to 160 
.br
\fIwidth\fP width in pixels needed to render the text 
.br
\fIheight\fP height in pixels needed to render the text 
.br
\fIlastIndex\fP indicates the last character that has been checked
.RE
.PP
\fBReturn values:\fP
.RS 4
\fITEES_SUCCESS\fP In case of success 
.br
\fITEES_ERROR_TUI_INVAL_PARAM\fP if parameters are not correct 
.RE
.PP

.SS "\fBTEES_Result\fP TEES_TUICloseSession (void)"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
Releases TUI resources\&. The TEES_TUICloseSession function releases TUI resources previously acquired\&. This function SHOULD be called as soon as possible after the last TUI screen of the TUI session has ended in order to avoid a bad user experience\&.
.PP
\fBReturn values:\fP
.RS 4
\fITEES_SUCCESS\fP In case of success 
.br
\fITEES_ERROR_TUI_BAD_STATE\fP If the current TA is not within a TUI session initially started by a successful call to TEES_TUIOpenSession\&. In particular, it will be returned if a TUI session has been closed automatically because the TUI session timeout has been reached or if a TUI session has been closed due to an OS specific external event such as an incoming call\&. 
.RE
.PP

.SS "\fBTEES_Result\fP TEES_TUIDrawBuffer (uint32_t * buffer, uint32_t posX, uint32_t posY, uint32_t W, uint32_t H)"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
Copy a rectangle from buffer to screen\&. The TEES_TUIDrawBuffer function copies a rectangle from buffer to screen
.PP
\fBParameters:\fP
.RS 4
\fIbuffer\fP is a pointer to buffer 
.br
\fIposX,posY\fP coordinates top left pixels of the rectangle 
.br
\fIW,H\fP width and height of the rectangle
.RE
.PP
\fBReturn values:\fP
.RS 4
\fITEES_SUCCESS\fP In case of success\&. 
.br
\fITEES_ERROR_TUI_BAD_STATE\fP If TUI session is not opened\&. 
.br
\fITEES_ERROR_TUI_BUSY\fP If some TUI function is called at moment\&. 
.br
\fITEES_ERROR_TUI_GENERIC\fP If mutex unlock error has happened\&. 
.br
\fITEES_ERROR_TUI_INVAL_PARAM\fP If wrong values were passed to function\&. 
.RE
.PP

.SS "\fBTEES_Result\fP TEES_TUIDrawImage (\fBTEES_TUIImage\fP * image, uint32_t posX, uint32_t posY)"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
Display an image on screen\&. The TEES_TUIDrawImage function displays an image on screen\&.
.PP
\fBParameters:\fP
.RS 4
\fIimage\fP is a pointer to properties of image and buffers 
.br
\fIposX,posY\fP coordinates top left pixels of the image
.RE
.PP
\fBReturn values:\fP
.RS 4
\fITEES_SUCCESS\fP In case of success\&. 
.br
\fITEES_ERROR_TUI_BAD_FORMAT\fP input image is not compliant with PNG format\&. 
.br
\fITEES_ERROR_TUI_INVAL_PARAM\fP input pointer type parateter is invalid or null or out of area\&. 
.br
\fITEES_ERROR_TUI_OUT_OF_MEMORY\fP : internal memory allocation fail\&. 
.br
\fITEES_ERROR_TUI_BAD_STATE\fP : unable to get a session state 
.RE
.PP

.SS "\fBTEES_Result\fP TEES_TUIGetBuffer (uint32_t * buffer, uint32_t posX, uint32_t posY, uint32_t W, uint32_t H)"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
Copy a rectangle from screen to buffer\&. The TEES_TUIGetBuffer function copies a rectangle from screen to buffer\&.
.PP
\fBParameters:\fP
.RS 4
\fIbuffer\fP is a pointer to buffer 
.br
\fIposX,posY\fP coordinates top left pixels of the rectangle 
.br
\fIW,H\fP width and height of the rectangle
.RE
.PP
\fBReturn values:\fP
.RS 4
\fITEES_SUCCESS\fP In case of success\&. 
.br
\fITEES_ERROR_TUI_BAD_STATE\fP If TUI session is not opened\&. 
.br
\fITEES_ERROR_TUI_BUSY\fP If some TUI function is called at moment\&. 
.br
\fITEES_ERROR_TUI_GENERIC\fP If mutex unlock error has happened\&. 
.br
\fITEES_ERROR_TUI_INVAL_PARAM\fP If wrong values were passed to function\&. 
.RE
.PP

.SS "\fBTEES_Result\fP TEES_TUIGetScreenInfo (\fBTEES_TUIScreenInfo\fP * screenInfo)"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
Retrieves information about the screen\&. The TEES_TUIGetScreenInfo function retrieves information about the screen TEES_TUIOpenSession does not have to be called before using this function\&.
.PP
\fBParameters:\fP
.RS 4
\fIscreenInfo\fP returns information on the requested screen screenInfo->width and screenInfo->height information is based on PORTRAIT MODE only 
.RE
.PP
\fBReturn values:\fP
.RS 4
\fITEES_SUCCESS\fP In case of success 
.br
\fITEES_ERROR_TUI_INVAL_PARAM\fP if out parameter is null, error returned\&. 
.RE
.PP

.SS "\fBTEES_Result\fP TEES_TUIGetTouchEvent (\fBTEES_TUITouchInfo\fP * touchInfo, uint32_t timeout)"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
Get a touch event\&. At a given time, TA wait and get a touch event If there's no input events from device, an error is returned\&. A zero timeout means this function waits for a maximum time\&.
.PP
\fBParameters:\fP
.RS 4
\fItouchInfo\fP is a pointer to information of touch event (touch position, touch type) 
.br
\fItimeout\fP is a specified time to wait for an incoming event
.RE
.PP
\fBReturn values:\fP
.RS 4
\fITEES_SUCCESS\fP : In case of success\&. 
.br
\fITEES_ERROR_TUI_TIMEOUT\fP : there is no event to return within the timeout 
.br
\fITEES_ERROR_TUI_BAD_STATE\fP : session has expired or closed before 
.br
\fITEES_ERROR_TUI_INVAL_PARAM\fP input pointer type parateter is null 
.RE
.PP

.SS "\fBTEES_Result\fP TEES_TUIOpenSession (void)"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
Claims an exclusive access to TUI resources\&. The TEES_TUIOpenSession function claims an exclusive access to TUI resources for the current TA\&. This just reserves the ability to use the TUI for this particular TA and will notify other TAs that this reservation has been made and the resource is busy (i\&.e\&. those other TAs will receive TEES_ERROR_BUSY when attempting this operation)\&. As a limited resource, the TUI session will be closed automatically whenever the TA does not display a TUI screen to interact with the user for a period of time\&. This period of time is equal to the value of the property gpd\&.tee\&.tui\&.session\&.timeout\&. This function MUST be called before a screen can be displayed with TEES_TUIDrawImage\&. This function MUST be called before TEES_TUIGetTouchEvent\&.
.PP
\fBReturn values:\fP
.RS 4
\fITEES_SUCCESS\fP In case of success\&. 
.br
\fITEES_ERROR_TUI_BUSY\fP If the TUI resources cannot be reserved\&. for example session has already opened before, this error type is returned 
.RE
.PP

.SS "\fBTEES_Result\fP TEES_TUIPrintString (char * inputText, uint32_t textSize, uint32_t posX, uint32_t posY, uint8_t redColorValue, uint8_t greenColorValue, uint8_t blueColorValue, bool rotation90)"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
Print string on the screen\&. The TEES_TUIPrintString function prints input string on the screen\&.
.PP
\fBParameters:\fP
.RS 4
\fIinputText\fP pointer to the input text string to be displayed on the screen 
.br
\fItextSize\fP size of the text string\&. The range is 20 to 160 
.br
\fIposX,posY\fP coordinates top left pixels of the image 
.br
\fIredColorValue,greenColorValue,blueColorValue\fP color values for the text string\&. The range for each parameter is 0x00 to 0xFF 
.br
\fIrotation90\fP if this parameter is true, the text string is rotated to 90 degree on the screen 
.RE
.PP
\fBReturn values:\fP
.RS 4
\fITEES_SUCCESS\fP In case of success\&. 
.br
\fITEES_ERROR_TUI_BUSY\fP If the TUI resources cannot be reserved\&. For example session has already opened before, this error type is returned 
.br
\fITEES_ERROR_TUI_BAD_STATE\fP If the current TA is not within a TUI session initially started by a successful call to TEES_TUIOpenSession\&. In particular, it will be returned if a TUI session has been closed automatically because the TUI session timeout has been reached or if a TUI session has been closed due to an OS specific external event such as an incoming call\&. 
.br
\fITEES_ERROR_TUI_INVAL_PARAM\fP if parameters are not correct 
.br
\fITEES_ERROR_TUI_BAD_FORMAT\fP input text string is not valid 
.br
\fITEES_ERROR_TUI_OUT_OF_MEMORY\fP : internal memory allocation fail\&. 
.br
\fITEES_ERROR_NOT_SUPPORTED\fP if there is a problem in font engine in TUI 
.br
\fITEES_ERROR_TUI_GENERIC\fP other exceptional cases that are not defined as error message 
.RE
.PP

.SS "\fBTEES_Result\fP TEES_TUIRefreshScreen (void)"

.PP
\fC#include <\fBtees_tui\&.h\fP>\fP
.PP
Refresh display controller\&. The TEES_TUIRefreshScreen function refreshes display controller after frame buffer changing\&.
.PP
\fBReturn values:\fP
.RS 4
\fITEES_SUCCESS\fP In case of success 
.br
\fITEE_ERROR_GENERIC\fP If ioctl to display driver returned error\&. 
.br
\fITEES_ERROR_TUI_BAD_STATE\fP If TUI session is not opened\&. 
.br
\fITEES_ERROR_TUI_BUSY\fP If some TUI function is called at moment\&. 
.br
\fITEES_ERROR_TUI_GENERIC\fP If mutex unlock error has happened\&. 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for Samsung Internal API reference from the source code\&.
