Module utils

Source
Expand description

General utility functions

Functions§

blit_rgb
Draw a framebuffer (rgba) into a widget
blit_rgb_nocopy
Draw a framebuffer (rgba) into a widget
blit_rgba
Draw a framebuffer (rgba) into a widget
blit_rgba_nocopy
Draw a framebuffer (rgba) into a widget
char_len
Get the length of a char in terms of C strings
decode_uri
Decode a uri
filename_expand
Expand a filename
hex2rgb
Convenience function to convert hex to rgb. Example:
hex2rgba
Convenience function to convert hex to rgba. Example:
is
Check whether a widget is of a certain type
is_ptr_of
Check whether a widget is of a certain type
open_uri
Open a uri using the system’s browser
rgb2hex
Convenience function to convert rgb to hex. Example:
rgba2hex
Convenience function to convert rgba to hex. Example:
type_name
Get the dynamic typeinfo of a widget, useful for debugging. This prints the mangled name, which can be unmangled using a crate like cpp_demangle