Samsung Internal API reference  2.0
tees_tui.h
Go to the documentation of this file.
1 
17 #ifndef __TEES_TUI_H__
18 #define __TEES_TUI_H__
19 
20 #include <tee_internal_api.h>
21 
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 /**************************************************
27 * below for new api
28 ***************************************************/
29 
31 typedef enum {
32  TEES_SUCCESS = 0x00000000,
33  TEES_ERROR_TUI_GENERIC = 0xFFFF0000,
34  TEES_ERROR_TUI_CANCEL = 0xFFFF0002,
37  TEES_ERROR_TUI_BAD_STATE = 0xFFFF0007,
39  TEES_ERROR_NOT_SUPPORTED = 0xFFFF000A,
41  TEES_ERROR_TUI_BUSY = 0xFFFF000D,
42  TEES_ERROR_SHORT_BUFFER = 0xFFFF0010,
43  TEES_ERROR_TUI_TIMEOUT = 0xFFFF3001,
44 } TEES_Result;
45 
49 typedef struct {
50  uint32_t grayscaleBitsDepth;
51  uint32_t redBitsDepth;
52  uint32_t greenBitsDepth;
53  uint32_t blueBitsDepth;
54  uint32_t widthInch;
55  uint32_t heightInch;
56  uint32_t resolution_width;
57  uint32_t resolution_height;
59 
61 typedef enum {
65 
69 typedef struct {
70  uint32_t xPosition;
71  uint32_t yPosition;
72  TEES_TUITouchTypes touchType;
74 
78 #define MT_INFO_MAX_EVENT 10
79 
83 typedef struct {
84  uint8_t finger;
85  uint32_t xPosition;
86  uint32_t yPosition;
87  TEES_TUITouchTypes touchType;
89 
93 typedef struct {
94  uint8_t num;
96 } __attribute__ ((packed)) TEES_TUI_MT_Info;
97 
101 typedef struct {
102  void *imageBuf;
103  size_t imageLength;
104  uint32_t width;
105  uint32_t height;
106  uint32_t use_png_alpha;
107 } TEES_TUIImage;
108 
110 enum TEES_bool {
112  TEES_TRUE = 1,
113 };
114 
127 
149 
165 
181  uint32_t posX,
182  uint32_t posY);
183 
201  uint32_t timeout);
202 
221  uint32_t timeout);
222 
226 #define MIN_FONT_SIZE 20
227 
230 #define MAX_FONT_SIZE 160
231 
252 TEES_Result TEES_TUICheckTextFormat(char *inputText,
253  uint32_t textSize,
254  uint32_t *width,
255  uint32_t *height,
256  uint32_t *lastIndex);
257 
285 TEES_Result TEES_TUIPrintString(char *inputText,
286  uint32_t textSize,
287  uint32_t posX,
288  uint32_t posY,
289  uint8_t redColorValue,
290  uint8_t greenColorValue,
291  uint8_t blueColorValue,
292  bool rotation90);
293 
294 
308 
324 TEES_Result TEES_TUIGetBuffer(uint32_t *buffer,
325  uint32_t posX,
326  uint32_t posY,
327  uint32_t W,
328  uint32_t H);
329 
345 TEES_Result TEES_TUIDrawBuffer(uint32_t *buffer,
346  uint32_t posX,
347  uint32_t posY,
348  uint32_t W,
349  uint32_t H);
350 
369  void *buff,
370  uint32_t *buf_size);
371 
390  uint32_t posY,
391  uint32_t W,
392  uint32_t H,
393  void *buff,
394  uint32_t buf_size);
395 
396 #ifdef __cplusplus
397 }
398 #endif
399 
400 #endif /* ! __TEES_TUI_H__ */
401 
uint32_t width
Definition: tees_tui.h:104
uint32_t height
Definition: tees_tui.h:105
uint32_t heightInch
Definition: tees_tui.h:55
uint32_t yPosition
Definition: tees_tui.h:71
uint32_t redBitsDepth
Definition: tees_tui.h:51
uint32_t grayscaleBitsDepth
Definition: tees_tui.h:50
TEES_Result TEES_TUICloseSession(void)
Releases TUI resources.
uint32_t resolution_width
Definition: tees_tui.h:56
TEES_Result TEES_TUIRefreshScreen(void)
Refresh display controller.
uint8_t num
Definition: tees_tui.h:94
TEES_Result TEES_TUIGetScreenInfo(TEES_TUIScreenInfo *screenInfo)
Retrieves information about the screen.
uint32_t widthInch
Definition: tees_tui.h:54
uint32_t xPosition
Definition: tees_tui.h:70
Definition: tees_tui.h:39
TEES_Result
TEES result codes.
Definition: tees_tui.h:31
TEES_Result TEES_TUIPrintString(char *inputText, uint32_t textSize, uint32_t posX, uint32_t posY, uint8_t redColorValue, uint8_t greenColorValue, uint8_t blueColorValue, bool rotation90)
Print string on the screen.
Definition: tees_tui.h:112
TEES_Result TEES_TUIDrawImageFromBuff(uint32_t posX, uint32_t posY, uint32_t W, uint32_t H, void *buff, uint32_t buf_size)
Draw unpacked bitmap from buffer on display.
Definition: tees_tui.h:35
Definition: tees_tui.h:43
TEES_TUITouchTypes
Internal, touch event type.
Definition: tees_tui.h:61
void * imageBuf
Definition: tees_tui.h:102
TEES_TUITouchTypes touchType
Definition: tees_tui.h:72
TEES_Result TEES_TUICheckTextFormat(char *inputText, uint32_t textSize, uint32_t *width, uint32_t *height, uint32_t *lastIndex)
Checks validity of the string and Retrieves its width and height.
Definition: tees_tui.h:34
Definition: tees_tui.h:33
Definition: tees_tui.h:32
Definition: tees_tui.h:42
#define MT_INFO_MAX_EVENT
Definition: tees_tui.h:78
uint32_t use_png_alpha
Definition: tees_tui.h:106
TEES_Result TEES_TUIDrawImage(TEES_TUIImage *image, uint32_t posX, uint32_t posY)
Display an image on screen.
TEES_Result TEES_TUIGetTouchEvent(TEES_TUITouchInfo *touchInfo, uint32_t timeout)
Get a touch event.
TEES_Result TEES_TUIOpenSession(void)
Claims an exclusive access to TUI resources.
Structure that represents information of touch event (touch position, touch type).
Definition: tees_tui.h:69
TEES_Result TEES_TUIGetBuffer(uint32_t *buffer, uint32_t posX, uint32_t posY, uint32_t W, uint32_t H)
Copy a rectangle from screen to buffer.
Definition: tees_tui.h:37
Structure that represents information on the requested screen.
Definition: tees_tui.h:49
Definition: tees_tui.h:111
TEES_Result TEES_TUIDrawImageToBuff(TEES_TUIImage *image, void *buff, uint32_t *buf_size)
Unpack png picture to bitmap in buffer.
uint32_t xPosition
Definition: tees_tui.h:85
Definition: tees_tui.h:41
Structure that represents all the information of touch events.
Definition: tees_tui.h:93
uint32_t blueBitsDepth
Definition: tees_tui.h:53
Definition: tees_tui.h:38
Definition: tees_tui.h:36
Structure that represents information of touch event (touch position, touch type).
Definition: tees_tui.h:83
Definition: tees_tui.h:62
TEES_bool
Internal, bool type.
Definition: tees_tui.h:110
uint8_t finger
Definition: tees_tui.h:84
Definition: tees_tui.h:40
uint32_t resolution_height
Definition: tees_tui.h:57
TEES_TUITouchTypes touchType
Definition: tees_tui.h:87
TEES_Result TEES_TUIGetMTEvent(TEES_TUI_MT_Info *touchInfo, uint32_t timeout)
Get Multi touch event events.
Definition: tees_tui.h:63
uint32_t greenBitsDepth
Definition: tees_tui.h:52
TEES_Result TEES_TUIDrawBuffer(uint32_t *buffer, uint32_t posX, uint32_t posY, uint32_t W, uint32_t H)
Copy a rectangle from buffer to screen.
Structure that represents properties of image and buffers.
Definition: tees_tui.h:101
size_t imageLength
Definition: tees_tui.h:103
uint32_t yPosition
Definition: tees_tui.h:86