BOLOS TEE
bolos_ui.h
Go to the documentation of this file.
1 /*
2 *******************************************************************************
3 * BOLOS TEE
4 * (c) 2016 Ledger
5 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 ********************************************************************************/
18 
31 #ifndef __BOLOS_UI_H__
32 #define __BOLOS_UI_H__
33 
35 #define BLS_UI_CAPS_AVAILABLE (1 << 0)
36 
37 #define BLS_UI_CAPS_MULTILINE (1 << 1)
38 
39 #define BLS_UI_CAPS_TOUCH (1 << 2)
40 
41 #define BLS_UI_CAPS_COLOR (1 << 3)
42 
43 #define BLS_UI_CAPS_USER_ENTRY (1 << 4)
44 
45 #define BLS_UI_CAPS_INAPP (1 << 5)
46 
47 #define BLS_UI_CAPS_QR (1 << 6)
48 
54 int bls_ui_get_capabilities(void);
55 
65 int bls_ui_display_message(const char WIDE *text);
66 
76 int bls_ui_display_warning(const char WIDE *text);
77 
87 int bls_ui_display_error(const char WIDE *text);
88 
98 int bls_ui_display_choice(const char WIDE *message);
99 
115 int bls_ui_display_qr(const char WIDE *message, const char WIDE *data, size_t dataSize);
116 
132 int bls_ui_get_user_entry(const char WIDE *message,
133  char WIDE *out, size_t outLength);
134 
135 #endif // __BOLOS_UI_H__
int bls_ui_display_qr(const char WIDE *message, const char WIDE *data, size_t dataSize)
Display a QR code.
int bls_ui_get_capabilities(void)
Return the UI capabilities as a bitmask.
int bls_ui_display_message(const char WIDE *text)
Display a simple information message.
int bls_ui_display_warning(const char WIDE *text)
Display a simple warning message.
int bls_ui_get_user_entry(const char WIDE *message, char WIDE *out, size_t outLength)
Retrieve user input.
int bls_ui_display_error(const char WIDE *text)
Display a simple error.
int bls_ui_display_choice(const char WIDE *message)
Display a OK/CANCEL choice message.