Android-cuttlefish cvd tool
|
Namespaces | |
namespace | bits |
namespace | localization |
namespace | msg |
Typedefs | |
using | MsgString = static_vec< char > |
template<typename T > | |
using | MsgVector = static_vec< T > |
using | GlyphIndex = unsigned int |
using | AuthTokenKey = Array< uint8_t, kAuthTokenKeySize > |
using | Hmac = AuthTokenKey |
using | px = UnitT< Unit::PX > |
using | dp = UnitT< Unit::DP > |
using | mm = UnitT< Unit::MM > |
using | DefaultNumericType = float |
template<typename T1 , typename T2 , typename Numeric > | |
using | add = BinOp< T1, T2, Numeric, Add > |
template<typename T1 , typename T2 , typename Numeric > | |
using | sub = BinOp< T1, T2, Numeric, Sub > |
template<typename T1 , typename T2 , typename Numeric > | |
using | mul = BinOp< T1, T2, Numeric, Mul > |
template<typename T1 , typename T2 , typename Numeric > | |
using | div = BinOp< T1, T2, Numeric, Div > |
using | dps = Coordinate< dp > |
using | mms = Coordinate< mm > |
using | pxs = Coordinate< px > |
using | Color = uint32_t |
template<typename Coord > | |
using | Point = Vec2d< Coord > |
using | PxPoint = Point< pxs > |
using | PxVec = Vec2d< pxs > |
using | CallbackEvent = Callback< Error(Event)> |
using | PixelDrawer = Callback< Error(uint32_t, uint32_t, Color)> |
template<typename Fn > | |
using | PixelDrawerHelper = CallbackHelper< Fn, Error, uint32_t, uint32_t, Color > |
template<typename T > | |
using | layout_t = typename MetaList2Layout< T >::type |
Enumerations | |
enum class | UIOption : uint32_t { AccessibilityInverted = 0u , AccessibilityMagnified = 1u } |
enum class | ResponseCode : uint32_t { OK = 0u , Canceled = 1u , Aborted = 2u , OperationPending = 3u , Ignored = 4u , SystemError = 5u , Unimplemented = 6u , Unexpected = 7u , UIError = 0x10000 , UIErrorMissingGlyph , UIErrorMessageTooLong , UIErrorMalformedUTF8Encoding } |
enum class | MessageSize : uint32_t { MAX = 6144u } |
enum class | TestKeyBits : uint8_t { BYTE = 165 } |
enum class | TestModeCommands : uint64_t { OK_EVENT = 0ull , CANCEL_EVENT = 1ull } |
enum class | Alignment : int8_t { LEFT , CENTER , RIGHT , TOP , BOTTOM } |
enum class | Unit : uint8_t { PX , DP , MM } |
enum class | EventType : uint8_t { KeyDown , KeyUp , KeyMoved } |
Functions | |
DECLARE_PARAMETER (RightEdgeOfScreen) | |
DECLARE_PARAMETER (BottomOfScreen) | |
DECLARE_PARAMETER (DefaultFontSize) | |
DECLARE_PARAMETER (BodyFontSize) | |
DECLARE_TYPED_PARAMETER (ShieldColor, ::teeui::Color) | |
DECLARE_TYPED_PARAMETER (ColorText, ::teeui::Color) | |
DECLARE_TYPED_PARAMETER (ColorBG, ::teeui::Color) | |
CONSTANT (BorderWidth, dps(24)) | |
DECLARE_FONT_BUFFER (RobotoMedium, RobotoMedium, RobotoMedium_length) | |
DECLARE_FONT_BUFFER (RobotoRegular, RobotoRegular, RobotoRegular_length) | |
DECLARE_FONT_BUFFER (Shield, Shield, Shield_length) | |
CONSTANT (DefaultFont, FONT(RobotoRegular)) | |
DECLARE_TYPED_PARAMETER (ColorButton, ::teeui::Color) | |
NEW_PARAMETER_SET (ConfUIParameters, RightEdgeOfScreen, BottomOfScreen, DefaultFontSize, BodyFontSize, ShieldColor, ColorText, ColorBG, ColorButton) | |
CONSTANT (IconShieldDistanceFromTop, dps(100)) | |
CONSTANT (LabelBorderZone, dps(4)) | |
CONSTANT (RightLabelEdge, RightEdgeOfScreen() - BorderWidth) | |
CONSTANT (LabelWidth, RightLabelEdge - BorderWidth) | |
CONSTANT (ButtonHeight, dps(72)) | |
CONSTANT (ButtonPositionX, 0) | |
CONSTANT (ButtonPositionY, BottomOfScreen() - ButtonHeight) | |
CONSTANT (ButtonWidth, dps(130)) | |
CONSTANT (ButtonLabelDistance, dps(12)) | |
FontSize (dps(24)) | |
LineHeight (dps(24)) | |
NumberOfLines (1) | |
Dimension (LabelWidth, HeightFromLines) | |
Position (BorderWidth, IconShieldDistanceFromTop) | |
DefaultText ("A") | |
TextColor (ShieldColor()) | |
HorizontalTextAlignment (Alignment::CENTER) | |
Font (FONT(Shield)) | |
END_ELEMENT () | |
FontSize (dps(20)) | |
LineHeight (dps(20)) | |
Position (BorderWidth, BOTTOM_EDGE_OF(IconShield)+dps(16)) | |
DefaultText ("Android Protected Confirmation") | |
Font (FONT(RobotoMedium)) | |
TextColor (ColorText()) | |
TextID (TEXT_ID(TranslationId::TITLE)) | |
Dimension (ButtonWidth, ButtonHeight - BorderWidth) | |
Position (RightEdgeOfScreen() - ButtonWidth - BorderWidth, ButtonPositionY+ButtonLabelDistance) | |
CornerRadius (dps(4)) | |
ButtonColor (ColorButton()) | |
FontSize (BodyFontSize()) | |
LineHeight (BodyFontSize() *pxs(1.4)) | |
Dimension (ButtonWidth -(LabelBorderZone *dps(2)), ButtonHeight - BorderWidth -(LabelBorderZone *dps(2))) | |
Position (RightEdgeOfScreen() - ButtonWidth - BorderWidth+LabelBorderZone, ButtonPositionY+ButtonLabelDistance+LabelBorderZone) | |
DefaultText ("Confirm") | |
VerticalTextAlignment (Alignment::CENTER) | |
TextColor (ColorBG()) | |
TextID (TEXT_ID(TranslationId::CONFIRM)) | |
Position (BorderWidth+LabelBorderZone, ButtonPositionY+ButtonLabelDistance+LabelBorderZone) | |
DefaultText ("Cancel") | |
HorizontalTextAlignment (Alignment::LEFT) | |
TextColor (ColorButton()) | |
TextID (TEXT_ID(TranslationId::CANCEL)) | |
FontSize (DefaultFontSize()) | |
LineHeight (DefaultFontSize() *pxs(1.5)) | |
NumberOfLines (4) | |
Position (BorderWidth, ButtonPositionY - dim_h - dps(48)) | |
DefaultText ("This confirmation provides an extra layer of security for the action " "you're " "about to take.") | |
VerticalTextAlignment (Alignment::BOTTOM) | |
Font (DefaultFont) | |
TextID (TEXT_ID(TranslationId::DESCRIPTION)) | |
NumberOfLines (20) | |
Position (BorderWidth, BOTTOM_EDGE_OF(LabelTitle)+dps(16)) | |
Dimension (LabelWidth, LabelHint::pos_y - pos_y - dps(24)) | |
DefaultText ("12345678901234567890123456789012345678901234567890123456789012345678901234" "567890123456" "78901234567890") | |
Font (FONT(RobotoRegular)) | |
NEW_LAYOUT (ConfUILayout, IconShield, LabelTitle, LabelHint, LabelBody, IconOk, LabelOK, LabelCancel) | |
template<typename T > | |
const uint8_t * | copyField (T &field, const uint8_t *(&pos)) |
template<typename T > | |
uint8_t * | copyField (const T &field, uint8_t *(&pos)) |
template<typename T > | |
std::tuple< ReadStream, MsgVector< T > > | readSimpleVecInPlace (ReadStream in) |
template<typename T > | |
WriteStream | writeSimpleVec (WriteStream out, const MsgVector< T > &vec) |
std::tuple< ReadStream, ResponseCode > | read (Message< ResponseCode >, ReadStream in) |
WriteStream | write (WriteStream out, const ResponseCode &v) |
std::tuple< ReadStream, TestModeCommands > | read (Message< TestModeCommands >, ReadStream in) |
WriteStream | write (WriteStream out, const TestModeCommands &v) |
template<size_t size> | |
std::tuple< teeui::ReadStream, teeui::Array< uint8_t, size > > | read (teeui::Message< teeui::Array< uint8_t, size > >, teeui::ReadStream in) |
template<size_t size> | |
teeui::WriteStream | write (teeui::WriteStream out, const teeui::Array< uint8_t, size > &v) |
template<typename T > | |
Handle (T handle) -> Handle< T, HandleDelete< T > > | |
MAP_HANDLE_DELETER (FT_Face, FT_Done_Face) | |
MAP_HANDLE_DELETER (FT_Library, FT_Done_FreeType) | |
bool | isBreakable (unsigned long codePoint) |
bool | isNewline (unsigned long codePoint) |
std::tuple< Error, Box< pxs >, UTF8Range< const char * > > | findLongestWordSequence (TextFace *face, const UTF8Range< const char * > &text, const Box< pxs > &boundingBox) |
Error | drawText (TextFace *face, const UTF8Range< const char * > &text, const PixelDrawer &drawPixel, PxPoint pen) |
template<typename T > | |
auto | bytesCast (const T &v) -> const uint8_t(&)[sizeof(T)] |
template<typename T > | |
auto | bytesCast (T &v) -> uint8_t(&)[sizeof(T)] |
bool | operator== (const ByteBufferProxy &lhs, const ByteBufferProxy &rhs) |
template<typename IntType > | |
IntType | hton (const IntType &value) |
template<typename IntType > | |
IntType | ntoh (const IntType &value) |
Color | drawLinePoint (Point< pxs > a, Point< pxs > b, Point< pxs > px_origin, Color c, pxs width=pxs(1.0)) |
Color | drawCirclePoint (Point< pxs > center, pxs r, Point< pxs > px_origin, Color c) |
optional< PxPoint > | intersect (const PxVec &a, const PxPoint &b, const PxVec &c, const PxPoint &d) |
template<typename Ret , typename... Args> | |
Callback< Ret(Args...)> | makeCallback (Ret(*fn)(Args..., void *), void *priv_data) |
template<typename Fn > | |
PixelDrawerHelper< Fn > | makePixelDrawer (Fn fn) |
template<typename... Elements, typename Context > | |
std::tuple< Elements... > | instantiateLayout (MetaList< Elements... >, const Context &context) |
template<typename... Coords> | |
constexpr std::tuple< Vec2d< Coords >... > | makeConvexObject (const Vec2d< Coords > &... points) |
template<size_t capacity, typename Tuple , typename Context , size_t... I> | |
constexpr ConvexObject< capacity > | initConvexObject (const Context &context, const Tuple &outline, std::index_sequence< I... >) |
template<size_t capacity, typename... Points, typename Context > | |
constexpr ConvexObject< capacity > | initConvexObject (const Context &context, const std::tuple< Points... > &outline) |
template<size_t capacity, typename Tuple , typename Context , size_t... I, size_t size> | |
constexpr void | initConvexObjectArray (const Context &context, ConvexObject< capacity >(&out)[size], const Tuple &t, std::index_sequence< I... >) |
template<size_t capacity, typename... COs, typename Context , size_t size> | |
constexpr void | initConvexObjectArray (const Context &context, ConvexObject< capacity >(&out)[size], const std::tuple< COs... > &t) |
template<typename Iterator > | |
Range< Iterator > | makeRange (Iterator begin, Iterator end) |
ConvexObject< 4 > | makeSquareAtOffset (const PxPoint &offset, const pxs &sideLength) |
Color | pixelLineIntersect (Point< pxs > line, pxs dist, Color c) |
Variables | |
VerticallyCentered | |
RoundTopLeft | |
RoundBottomLeft | |
RoundTopRight | |
RoundBottomRight | |
constexpr const uint8_t | kAuthTokenKeySize = 32 |
constexpr const uint8_t | kHmacKeySize = kAuthTokenKeySize |
template<typename Unit > | |
constexpr const char * | str = "N/A" |
template<> | |
constexpr const char * | str< px > = "px" |
template<> | |
constexpr const char * | str< dp > = "dp" |
template<> | |
constexpr const char * | str< mm > = "mm" |
constexpr const DefaultNumericType | kEpsilon = 0.000001 |
constexpr const DefaultNumericType | kHalfSqrt2 = 0.70710678118 |
using teeui::add = typedef BinOp<T1, T2, Numeric, Add> |
using teeui::AuthTokenKey = typedef Array<uint8_t, kAuthTokenKeySize> |
using teeui::CallbackEvent = typedef Callback<Error(Event)> |
using teeui::Color = typedef uint32_t |
using teeui::DefaultNumericType = typedef float |
using teeui::div = typedef BinOp<T1, T2, Numeric, Div> |
using teeui::dps = typedef Coordinate<dp> |
using teeui::GlyphIndex = typedef unsigned int |
using teeui::Hmac = typedef AuthTokenKey |
using teeui::layout_t = typedef typename MetaList2Layout<T>::type |
using teeui::mms = typedef Coordinate<mm> |
using teeui::MsgString = typedef static_vec<char> |
using teeui::MsgVector = typedef static_vec<T> |
using teeui::mul = typedef BinOp<T1, T2, Numeric, Mul> |
using teeui::PixelDrawer = typedef Callback<Error(uint32_t, uint32_t, Color)> |
using teeui::PixelDrawerHelper = typedef CallbackHelper<Fn, Error, uint32_t, uint32_t, Color> |
using teeui::Point = typedef Vec2d<Coord> |
using teeui::PxPoint = typedef Point<pxs> |
using teeui::pxs = typedef Coordinate<px> |
using teeui::PxVec = typedef Vec2d<pxs> |
using teeui::sub = typedef BinOp<T1, T2, Numeric, Sub> |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
|
strong |
teeui::ButtonColor | ( | ColorButton() | ) |
auto teeui::bytesCast | ( | const T & | v | ) | -> const uint8_t (&)[sizeof(T)] |
auto teeui::bytesCast | ( | T & | v | ) | -> uint8_t (&)[sizeof(T)] |
teeui::CONSTANT | ( | BorderWidth | , |
dps(24) | |||
) |
teeui::CONSTANT | ( | ButtonHeight | , |
dps(72) | |||
) |
teeui::CONSTANT | ( | ButtonLabelDistance | , |
dps(12) | |||
) |
teeui::CONSTANT | ( | ButtonPositionX | , |
0 | |||
) |
teeui::CONSTANT | ( | ButtonPositionY | , |
BottomOfScreen() - | ButtonHeight | ||
) |
teeui::CONSTANT | ( | ButtonWidth | , |
dps(130) | |||
) |
teeui::CONSTANT | ( | DefaultFont | , |
FONT(RobotoRegular) | |||
) |
teeui::CONSTANT | ( | IconShieldDistanceFromTop | , |
dps(100) | |||
) |
teeui::CONSTANT | ( | LabelBorderZone | , |
dps(4) | |||
) |
teeui::CONSTANT | ( | LabelWidth | , |
RightLabelEdge - | BorderWidth | ||
) |
teeui::CONSTANT | ( | RightLabelEdge | , |
RightEdgeOfScreen() - | BorderWidth | ||
) |
|
inline |
|
inline |
teeui::CornerRadius | ( | dps(4) | ) |
teeui::DECLARE_FONT_BUFFER | ( | RobotoMedium | , |
RobotoMedium | , | ||
RobotoMedium_length | |||
) |
teeui::DECLARE_FONT_BUFFER | ( | RobotoRegular | , |
RobotoRegular | , | ||
RobotoRegular_length | |||
) |
teeui::DECLARE_FONT_BUFFER | ( | Shield | , |
Shield | , | ||
Shield_length | |||
) |
teeui::DECLARE_PARAMETER | ( | BodyFontSize | ) |
teeui::DECLARE_PARAMETER | ( | BottomOfScreen | ) |
teeui::DECLARE_PARAMETER | ( | DefaultFontSize | ) |
teeui::DECLARE_PARAMETER | ( | RightEdgeOfScreen | ) |
teeui::DECLARE_TYPED_PARAMETER | ( | ColorBG | , |
::teeui::Color | |||
) |
teeui::DECLARE_TYPED_PARAMETER | ( | ColorButton | , |
::teeui::Color | |||
) |
teeui::DECLARE_TYPED_PARAMETER | ( | ColorText | , |
::teeui::Color | |||
) |
teeui::DECLARE_TYPED_PARAMETER | ( | ShieldColor | , |
::teeui::Color | |||
) |
teeui::DefaultText | ( | "12345678901234567890123456789012345678901234567890123456789012345678901234" "567890123456" "78901234567890" | ) |
teeui::DefaultText | ( | "A" | ) |
teeui::DefaultText | ( | "Android Protected Confirmation" | ) |
teeui::DefaultText | ( | "Cancel" | ) |
teeui::DefaultText | ( | "Confirm" | ) |
teeui::DefaultText | ( | "This confirmation provides an extra layer of security for the action " "you're " "about to take." | ) |
teeui::Dimension | ( | ButtonWidth - | LabelBorderZone *dps(2), |
ButtonHeight - BorderWidth - | LabelBorderZone *dps(2) | ||
) |
teeui::Dimension | ( | ButtonWidth | , |
ButtonHeight - | BorderWidth | ||
) |
teeui::Dimension | ( | LabelWidth | , |
HeightFromLines | |||
) |
teeui::Dimension | ( | LabelWidth | , |
LabelHint::pos_y - pos_y - | dps24 | ||
) |
Color teeui::drawLinePoint | ( | Point< pxs > | a, |
Point< pxs > | b, | ||
Point< pxs > | px_origin, | ||
Color | c, | ||
pxs | width = pxs(1.0) |
||
) |
Error teeui::drawText | ( | TextFace * | face, |
const UTF8Range< const char * > & | text, | ||
const PixelDrawer & | drawPixel, | ||
PxPoint | pen | ||
) |
teeui::END_ELEMENT | ( | ) |
std::tuple< Error, Box< pxs >, UTF8Range< const char * > > teeui::findLongestWordSequence | ( | TextFace * | face, |
const UTF8Range< const char * > & | text, | ||
const Box< pxs > & | boundingBox | ||
) |
teeui::Font | ( | DefaultFont | ) |
teeui::Font | ( | FONT(RobotoMedium) | ) |
teeui::Font | ( | FONT(RobotoRegular) | ) |
teeui::FontSize | ( | BodyFontSize() | ) |
teeui::FontSize | ( | DefaultFontSize() | ) |
teeui::FontSize | ( | dps(20) | ) |
teeui::FontSize | ( | dps(24) | ) |
teeui::Handle | ( | T | handle | ) | -> Handle< T, HandleDelete< T > > |
teeui::HorizontalTextAlignment | ( | Alignment::CENTER | ) |
teeui::HorizontalTextAlignment | ( | Alignment::LEFT | ) |
|
inline |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
std::tuple< Elements... > teeui::instantiateLayout | ( | MetaList< Elements... > | , |
const Context & | context | ||
) |
optional< PxPoint > teeui::intersect | ( | const PxVec & | a, |
const PxPoint & | b, | ||
const PxVec & | c, | ||
const PxPoint & | d | ||
) |
bool teeui::isBreakable | ( | unsigned long | codePoint | ) |
bool teeui::isNewline | ( | unsigned long | codePoint | ) |
teeui::LineHeight | ( | BodyFontSize() *pxs(1.4) | ) |
teeui::LineHeight | ( | DefaultFontSize() *pxs(1.5) | ) |
teeui::LineHeight | ( | dps(20) | ) |
teeui::LineHeight | ( | dps(24) | ) |
Callback< Ret(Args...)> teeui::makeCallback | ( | Ret(*)(Args..., void *) | fn, |
void * | priv_data | ||
) |
|
inlineconstexpr |
PixelDrawerHelper< Fn > teeui::makePixelDrawer | ( | Fn | fn | ) |
Range< Iterator > teeui::makeRange | ( | Iterator | begin, |
Iterator | end | ||
) |
ConvexObject< 4 > teeui::makeSquareAtOffset | ( | const PxPoint & | offset, |
const pxs & | sideLength | ||
) |
teeui::MAP_HANDLE_DELETER | ( | FT_Face | , |
FT_Done_Face | |||
) |
teeui::MAP_HANDLE_DELETER | ( | FT_Library | , |
FT_Done_FreeType | |||
) |
teeui::NEW_LAYOUT | ( | ConfUILayout | , |
IconShield | , | ||
LabelTitle | , | ||
LabelHint | , | ||
LabelBody | , | ||
IconOk | , | ||
LabelOK | , | ||
LabelCancel | |||
) |
teeui::NEW_PARAMETER_SET | ( | ConfUIParameters | , |
RightEdgeOfScreen | , | ||
BottomOfScreen | , | ||
DefaultFontSize | , | ||
BodyFontSize | , | ||
ShieldColor | , | ||
ColorText | , | ||
ColorBG | , | ||
ColorButton | |||
) |
|
inline |
teeui::NumberOfLines | ( | 1 | ) |
teeui::NumberOfLines | ( | 20 | ) |
teeui::NumberOfLines | ( | 4 | ) |
bool teeui::operator== | ( | const ByteBufferProxy & | lhs, |
const ByteBufferProxy & | rhs | ||
) |
teeui::Position | ( | BorderWidth+ | LabelBorderZone, |
ButtonPositionY+ButtonLabelDistance+ | LabelBorderZone | ||
) |
teeui::Position | ( | BorderWidth | , |
BOTTOM_EDGE_OF(IconShield)+dps(16) | |||
) |
teeui::Position | ( | BorderWidth | , |
BOTTOM_EDGE_OF(LabelTitle)+dps(16) | |||
) |
teeui::Position | ( | BorderWidth | , |
ButtonPositionY - dim_h - | dps48 | ||
) |
teeui::Position | ( | BorderWidth | , |
IconShieldDistanceFromTop | |||
) |
teeui::Position | ( | RightEdgeOfScreen() - ButtonWidth - BorderWidth+ | LabelBorderZone, |
ButtonPositionY+ButtonLabelDistance+ | LabelBorderZone | ||
) |
teeui::Position | ( | RightEdgeOfScreen() - ButtonWidth - | BorderWidth, |
ButtonPositionY+ | ButtonLabelDistance | ||
) |
|
inline |
|
inline |
|
inline |
std::tuple< ReadStream, MsgVector< T > > teeui::readSimpleVecInPlace | ( | ReadStream | in | ) |
This actually only reads in place if compiled without TEEUI_USE_STD_VECTOR. See static_vec.h If compiled with TEEUI_USE_STD_VECTOR MsgVector becomes std::vector and the data is actually copied.
teeui::TextColor | ( | ColorBG() | ) |
teeui::TextColor | ( | ColorButton() | ) |
teeui::TextColor | ( | ColorText() | ) |
teeui::TextColor | ( | ShieldColor() | ) |
teeui::TextID | ( | TEXT_ID(TranslationId::CANCEL) | ) |
teeui::TextID | ( | TEXT_ID(TranslationId::CONFIRM) | ) |
teeui::TextID | ( | TEXT_ID(TranslationId::DESCRIPTION) | ) |
teeui::TextID | ( | TEXT_ID(TranslationId::TITLE) | ) |
teeui::VerticalTextAlignment | ( | Alignment::BOTTOM | ) |
teeui::VerticalTextAlignment | ( | Alignment::CENTER | ) |
|
inline |
|
inline |
|
inline |
WriteStream teeui::writeSimpleVec | ( | WriteStream | out, |
const MsgVector< T > & | vec | ||
) |
|
constexpr |
|
constexpr |
|
constexpr |
|
constexpr |
teeui::RoundBottomLeft |
teeui::RoundBottomRight |
teeui::RoundTopLeft |
teeui::RoundTopRight |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
teeui::VerticallyCentered |