|
| std::unique_ptr< TeeUiFrameWrapper > & | RenderRawFrame () |
| |
| bool | IsFrameReady () const |
| |
| bool | IsInConfirm (uint32_t x, uint32_t y) |
| |
| bool | IsInCancel (uint32_t x, uint32_t y) |
| |
| bool | IsSetUpSuccessful () const |
| |
| | ConfUiRendererImpl (uint32_t display, const std::string &confirmation_msg, const std::string &locale, bool inverted, bool magnified) |
| |
| template<typename LayoutElement > |
| Boundary | GetBoundary (LayoutElement &&e) const |
| |
| template<typename Element > |
| bool | IsInside (uint32_t x, uint32_t y) const |
| |
| std::unique_ptr< TeeUiFrameWrapper > | RepaintRawFrame (int w, int h) |
| |
| bool | InitLayout (const std::string &lang_id) |
| |
| teeui::Error | UpdateTranslations () |
| |
| teeui::Error | UpdateLocale () |
| |
| void | SetDeviceContext (unsigned long long w, unsigned long long h, bool is_inverted, bool is_magnified) |
| |
| teeui::Error | UpdatePixels (TeeUiFrameWrapper &raw_frame, uint32_t x, uint32_t y, teeui::Color color) |
| |
| void | UpdateColorScheme (bool is_inverted) |
| |
| template<typename Label > |
| auto | SetText (const std::string &text) |
| |
| template<typename Label > |
| teeui::Error | UpdateString () |
| |
create a raw frame for confirmation UI dialog
Many rendering code borrowed from the following source https://android.googlesource.com/trusty/app/confirmationui/+/0429cc7/src
◆ LabelConfMsg
◆ ConfUiRendererImpl()
| cuttlefish::confui::ConfUiRendererImpl::ConfUiRendererImpl |
( |
uint32_t |
display, |
|
|
const std::string & |
confirmation_msg, |
|
|
const std::string & |
locale, |
|
|
bool |
inverted, |
|
|
bool |
magnified |
|
) |
| |
|
private |
device configuration
ctx_{# of pixels in 1 mm, # of pixels per 1 density independent pixels}
The numbers are, however, to fit for the host webRTC local/remote clients in general, not necessarily the supposedly guest device (e.g. Auto, phone, etc)
In general, for a normal PC, roughly ctx_(6.45211, 400.0/412.0) is a good combination for the default DPI, 320. If we want to see the impact of the change in the guest DPI, we could adjust the combination above proportionally
◆ drawElements()
template<typename... Elements>
◆ GenerateRenderer()
| Result< std::unique_ptr< ConfUiRendererImpl > > cuttlefish::confui::ConfUiRendererImpl::GenerateRenderer |
( |
uint32_t |
display, |
|
|
const std::string & |
confirmation_msg, |
|
|
const std::string & |
locale, |
|
|
bool |
inverted, |
|
|
bool |
magnified |
|
) |
| |
|
staticprivate |
◆ GetBoundary()
template<typename LayoutElement >
| Boundary cuttlefish::confui::ConfUiRendererImpl::GetBoundary |
( |
LayoutElement && |
e | ) |
const |
|
inlineprivate |
◆ InitLayout()
| bool cuttlefish::confui::ConfUiRendererImpl::InitLayout |
( |
const std::string & |
lang_id | ) |
|
|
private |
◆ IsFrameReady()
| bool cuttlefish::confui::ConfUiRendererImpl::IsFrameReady |
( |
| ) |
const |
|
inlineprivate |
◆ IsInCancel()
| bool cuttlefish::confui::ConfUiRendererImpl::IsInCancel |
( |
uint32_t |
x, |
|
|
uint32_t |
y |
|
) |
| |
|
inlineprivate |
◆ IsInConfirm()
| bool cuttlefish::confui::ConfUiRendererImpl::IsInConfirm |
( |
uint32_t |
x, |
|
|
uint32_t |
y |
|
) |
| |
|
inlineprivate |
◆ IsInside()
template<typename Element >
| bool cuttlefish::confui::ConfUiRendererImpl::IsInside |
( |
uint32_t |
x, |
|
|
uint32_t |
y |
|
) |
| const |
|
inlineprivate |
◆ IsSetUpSuccessful()
| bool cuttlefish::confui::ConfUiRendererImpl::IsSetUpSuccessful |
( |
| ) |
const |
|
inlineprivate |
◆ RenderRawFrame()
| std::unique_ptr< TeeUiFrameWrapper > & cuttlefish::confui::ConfUiRendererImpl::RenderRawFrame |
( |
| ) |
|
|
private |
this does not repaint from the scratch all the time
It does repaint its frame buffer only when w/h of current display has changed
◆ RepaintRawFrame()
| std::unique_ptr< TeeUiFrameWrapper > cuttlefish::confui::ConfUiRendererImpl::RepaintRawFrame |
( |
int |
w, |
|
|
int |
h |
|
) |
| |
|
private |
should be uint32_t for teeui APIs. It assumes that each raw frame buffer element is 4 bytes
◆ SetDeviceContext()
| void cuttlefish::confui::ConfUiRendererImpl::SetDeviceContext |
( |
unsigned long long |
w, |
|
|
unsigned long long |
h, |
|
|
bool |
is_inverted, |
|
|
bool |
is_magnified |
|
) |
| |
|
private |
◆ SetText()
template<typename Label >
| auto cuttlefish::confui::ConfUiRendererImpl::SetText |
( |
const std::string & |
text | ) |
|
|
inlineprivate |
◆ UpdateColorScheme()
| void cuttlefish::confui::ConfUiRendererImpl::UpdateColorScheme |
( |
bool |
is_inverted | ) |
|
|
private |
◆ UpdateLocale()
| teeui::Error cuttlefish::confui::ConfUiRendererImpl::UpdateLocale |
( |
| ) |
|
|
private |
◆ UpdatePixels()
◆ UpdateString()
template<typename Label >
| teeui::Error cuttlefish::confui::ConfUiRendererImpl::UpdateString |
|
private |
◆ UpdateTranslations()
| teeui::Error cuttlefish::confui::ConfUiRendererImpl::UpdateTranslations |
( |
| ) |
|
|
private |
◆ ConfUiRenderer
◆ color_bg_
| teeui::Color cuttlefish::confui::ConfUiRendererImpl::color_bg_ |
|
private |
◆ color_text_
| teeui::Color cuttlefish::confui::ConfUiRendererImpl::color_text_ |
|
private |
◆ ctx_
| teeui::context<teeui::ConfUIParameters> cuttlefish::confui::ConfUiRendererImpl::ctx_ |
|
private |
◆ current_height_
| uint32_t cuttlefish::confui::ConfUiRendererImpl::current_height_ |
|
private |
◆ current_width_
| uint32_t cuttlefish::confui::ConfUiRendererImpl::current_width_ |
|
private |
◆ display_num_
| uint32_t cuttlefish::confui::ConfUiRendererImpl::display_num_ |
|
private |
◆ is_inverted_
| bool cuttlefish::confui::ConfUiRendererImpl::is_inverted_ |
|
private |
◆ is_magnified_
| bool cuttlefish::confui::ConfUiRendererImpl::is_magnified_ |
|
private |
◆ is_setup_well_
| bool cuttlefish::confui::ConfUiRendererImpl::is_setup_well_ |
|
private |
◆ kColorBackground
| constexpr const teeui::Color cuttlefish::confui::ConfUiRendererImpl::kColorBackground = 0xffffffff |
|
staticconstexprprivate |
◆ kColorBackgroundInv
| constexpr const teeui::Color cuttlefish::confui::ConfUiRendererImpl::kColorBackgroundInv = 0xff212121 |
|
staticconstexprprivate |
◆ kColorDisabled
| constexpr const teeui::Color cuttlefish::confui::ConfUiRendererImpl::kColorDisabled = 0xffbdbdbd |
|
staticconstexprprivate |
◆ kColorDisabledInv
| constexpr const teeui::Color cuttlefish::confui::ConfUiRendererImpl::kColorDisabledInv = 0xff424242 |
|
staticconstexprprivate |
◆ kColorEnabled
| constexpr const teeui::Color cuttlefish::confui::ConfUiRendererImpl::kColorEnabled = 0xff212121 |
|
staticconstexprprivate |
◆ kColorEnabledInv
| constexpr const teeui::Color cuttlefish::confui::ConfUiRendererImpl::kColorEnabledInv = 0xffdedede |
|
staticconstexprprivate |
◆ kColorShield
| constexpr const teeui::Color cuttlefish::confui::ConfUiRendererImpl::kColorShield = 0xff778500 |
|
staticconstexprprivate |
◆ kColorShieldInv
| constexpr const teeui::Color cuttlefish::confui::ConfUiRendererImpl::kColorShieldInv = 0xffc4cb80 |
|
staticconstexprprivate |
◆ kColorText
| constexpr const teeui::Color cuttlefish::confui::ConfUiRendererImpl::kColorText = 0xff212121 |
|
staticconstexprprivate |
◆ kColorTextInv
| constexpr const teeui::Color cuttlefish::confui::ConfUiRendererImpl::kColorTextInv = 0xffdedede |
|
staticconstexprprivate |
◆ lang_id_
| std::string cuttlefish::confui::ConfUiRendererImpl::lang_id_ |
|
private |
◆ layout_
| teeui::layout_t<teeui::ConfUILayout> cuttlefish::confui::ConfUiRendererImpl::layout_ |
|
private |
◆ prompt_text_
| std::string cuttlefish::confui::ConfUiRendererImpl::prompt_text_ |
|
private |
◆ raw_frame_
| std::unique_ptr<TeeUiFrameWrapper> cuttlefish::confui::ConfUiRendererImpl::raw_frame_ |
|
private |
Potentially, the same frame could be requested multiple times.
While another thread/caller is using this frame, the frame should be kept here, too, to be returned upon future requests.
◆ shield_color_
| teeui::Color cuttlefish::confui::ConfUiRendererImpl::shield_color_ |
|
private |
The documentation for this class was generated from the following file: