HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Data Structures | Concepts | Typedefs | Enumerations | Functions | Variables
hi::v1 Namespace Reference

The HikoGUI API version 1. More...

Data Structures

class  aarectangle
 Class which represents an axis-aligned rectangle. More...
 
class  abstract_button_widget
 Base class for implementing button widgets. More...
 
class  alignment
 Horizontal/Vertical alignment combination. More...
 
class  audio_block
 A block of audio data. More...
 
class  audio_channel
 
class  audio_device
 A set of audio channels which can be rendered and/or captures at the same time. More...
 
class  audio_device_asio
 A class representing an audio device on the system. More...
 
class  audio_device_delegate
 
class  audio_device_widget
 Audio device configuration widget. More...
 
class  audio_device_win32
 
class  audio_format_range
 
struct  audio_sample_format
 Audio sample format. More...
 
class  audio_sample_packer
 
class  audio_sample_unpacker
 
struct  audio_stream_config
 
struct  audio_stream_format
 The format of a stream of audio. More...
 
class  audio_system
 
class  audio_system_aggregate
 
class  audio_system_asio
 
class  audio_system_win32
 
struct  audio_system_win32_event
 
struct  bezier_curve
 
struct  bezier_point
 
struct  box_constraints
 2D constraints. More...
 
struct  box_shape
 
class  button_delegate
 A button delegate controls the state of a button widget. More...
 
class  cancel_error
 Cancel error is caused by user pressing cancel. More...
 
struct  char_converter
 A converter between character encodings. More...
 
struct  char_map
 Character encoder/decoder template. More...
 
struct  char_map<"ascii">
 ASCII (7-bit) character map. More...
 
struct  char_map<"cp-1252">
 CP-1252 / Windows-1252 character map. More...
 
struct  char_map<"iso-8859-1">
 ISO-8859-1 / Latin-1 character map. More...
 
struct  char_map<"utf-16">
 Unicode UTF-16 encoding. More...
 
struct  char_map<"utf-32">
 Unicode UTF-32 encoding. More...
 
struct  char_map<"utf-8">
 Unicode UTF-8 encoding. More...
 
class  checkbox_widget
 A GUI widget that permits the user to make a binary choice. More...
 
class  circle
 A type defining a 2D circle. More...
 
class  color
 This is a RGBA floating point color. More...
 
class  const_resource_view
 A read-only view of a resource. More...
 
struct  convertible_to_any
 A type that can be implicitly converted to any type. More...
 
class  corner_radii
 The 4 radii of the corners of a quad or rectangle. More...
 
class  cpu_id
 
class  datum
 A dynamic data type. More...
 
class  default_radio_button_delegate
 A default radio button delegate. More...
 
class  default_selection_delegate
 A delegate that control the state of a selection_widget. More...
 
class  default_tab_delegate
 A delegate that control the state of a tab_widget. More...
 
class  default_text_delegate
 A default text delegate. More...
 
class  default_text_delegate< char const * >
 A default text delegate specialization for std::string. More...
 
class  default_text_delegate< gstring >
 A default text delegate specialization for gstring. More...
 
class  default_text_delegate< std::string >
 A default text delegate specialization for std::string. More...
 
class  default_text_delegate< txt >
 A default text delegate specialization for translate. More...
 
class  default_text_field_delegate
 A default text delegate. More...
 
class  default_text_field_delegate< T >
 A default text delegate specialization for std::integral<T>. More...
 
class  default_toggle_button_delegate
 A default toggle button delegate. More...
 
class  defer
 Defer execution of a lambda to the end of the scope. More...
 
struct  draw_attributes
 The draw attributes used to draw shaped into the draw context. More...
 
class  draw_context
 Draw context for drawing using the HikoGUI shaders. More...
 
struct  em_length_tag
 
struct  endian_buf_t
 
class  enum_metadata
 A object that holds enum-values and strings. More...
 
struct  enum_metadata_name
 
struct  enum_metadata_name< char * >
 
struct  enum_metadata_name< char const * >
 
struct  enum_metadata_name< char const[N]>
 
struct  enum_metadata_name< char[N]>
 
class  extent2
 A high-level geometric extent. More...
 
class  extent3
 A high-level geometric extent. More...
 
class  file
 A File object. More...
 
class  file_view
 Map a file into virtual memory. More...
 
struct  fixed_string
 A string which may be used as a none-type template parameter. More...
 
class  font_char_map
 Character map of a font. More...
 
struct  formula_add_node
 
struct  formula_arguments
 A temporary node used during parsing. More...
 
struct  formula_assign_node
 
struct  formula_binary_operator_node
 
struct  formula_bit_and_node
 
struct  formula_bit_or_node
 
struct  formula_bit_xor_node
 
struct  formula_call_node
 
struct  formula_decrement_node
 
struct  formula_div_node
 
struct  formula_eq_node
 
struct  formula_evaluation_context
 
struct  formula_filter_node
 
struct  formula_ge_node
 
struct  formula_gt_node
 
struct  formula_increment_node
 
struct  formula_index_node
 
struct  formula_inplace_add_node
 
struct  formula_inplace_and_node
 
struct  formula_inplace_div_node
 
struct  formula_inplace_mod_node
 
struct  formula_inplace_mul_node
 
struct  formula_inplace_or_node
 
struct  formula_inplace_shl_node
 
struct  formula_inplace_shr_node
 
struct  formula_inplace_sub_node
 
struct  formula_inplace_xor_node
 
struct  formula_invert_node
 
struct  formula_le_node
 
struct  formula_literal_node
 
struct  formula_logical_and_node
 
struct  formula_logical_not_node
 
struct  formula_logical_or_node
 
struct  formula_lt_node
 
struct  formula_map_literal_node
 
struct  formula_member_node
 
struct  formula_minus_node
 
struct  formula_mod_node
 
struct  formula_mul_node
 
struct  formula_name_node
 
struct  formula_ne_node
 
struct  formula_node
 
struct  formula_plus_node
 
struct  formula_post_process_context
 
struct  formula_pow_node
 
struct  formula_shl_node
 
struct  formula_shr_node
 
struct  formula_sub_node
 
struct  formula_ternary_operator_node
 
struct  formula_unary_operator_node
 
struct  formula_vector_literal_node
 
class  gfx_error
 
class  gfx_pipeline_alpha
 
class  gfx_pipeline_box
 
class  gfx_pipeline_image
 
class  gfx_pipeline_SDF
 
class  gfx_pipeline_tone_mapper
 
class  glob_pattern
 A glob pattern. More...
 
struct  graphic_path
 A path is a vector graphics object. More...
 
class  grid_layout
 Grid layout algorithm. More...
 
class  grid_widget
 A GUI widget that lays out child-widgets in a grid with variable sized cells. More...
 
class  gui_error
 
class  gui_event
 A user interface event. More...
 
class  huffman_tree
 
class  icon_widget
 An simple GUI widget that displays an icon. More...
 
class  indent
 Indentation for writing out text files. More...
 
struct  intrinsic_t
 Tag used in constructors to set the intrinsic value of that object. More...
 
class  io_error
 Exception thrown during I/O on an error. More...
 
class  is_datum_type
 
class  is_datum_type< bool >
 
class  is_datum_type< bstring >
 
class  is_datum_type< decimal >
 
class  is_datum_type< double >
 
class  is_datum_type< long long >
 
class  is_datum_type< std::chrono::year_month_day >
 
class  is_datum_type< std::string >
 
class  iso_15924
 ISO-15924 script code. More...
 
class  jsonpath
 
class  key_error
 
class  keyboard_bindings
 
struct  keyboard_target_data
 
class  label_widget
 The GUI widget displays and lays out text together with an icon. More...
 
class  language_tag
 The IETF BCP 47 language tag. More...
 
class  lean_vector
 Lean-vector with (SVO) short-vector-optimization. More...
 
struct  lexer_config
 
class  line_segment
 Line segment. More...
 
class  log
 
class  lookahead_iterator
 Lookahead iterator. More...
 
class  lookat
 Perspective transform. More...
 
class  margins
 The left, bottom, right and top margins. More...
 
class  matrix2
 A 2D or 3D homogenius matrix for transforming homogenious vectors and points. More...
 
class  matrix3
 A 2D or 3D homogenius matrix for transforming homogenious vectors and points. More...
 
class  menu_button_widget
 A button that is part of a menu. More...
 
class  momentary_button_widget
 A momentary button widget. More...
 
struct  mouse_event_data
 Information for a mouse event. More...
 
struct  native_simd
 A native-SIMD type. More...
 
class  not_found_error
 Exception thrown when an item was not found. More...
 
struct  number_of_data_members
 
class  operation_error
 Exception thrown during execution of a dynamic operation. More...
 
class  os_error
 Exception thrown during an operating system call. More...
 
struct  otype_fbyte_buf_t
 Open-type for 8 signed integer that must be scaled by the EM-scale. More...
 
struct  otype_fixed15_16_buf_t
 Open-type 16.16 signed fixed point, range between -32768.0 and 32767.999. More...
 
struct  otype_fixed1_14_buf_t
 Open-type 16-bit signed fraction, range between -2.0 and 1.999. More...
 
struct  otype_fuword_buf_t
 Open-type for 16 unsigned integer that must be scaled by the EM-scale. More...
 
struct  otype_fword_buf_t
 Open-type for 16 signed integer that must be scaled by the EM-scale. More...
 
struct  otype_glyf_component
 
class  overlay_widget
 A GUI widget which may exist anywhere on a window overlaid above any other widget. More...
 
struct  override_t
 Tag used for special functions or constructions to do a override compared to another function of the same name. More...
 
class  parse_error
 Exception thrown during parsing on an error. More...
 
class  pcm_format
 
class  perspective
 Perspective transform. More...
 
struct  pickle
 Encode and decode a type to and from a UTF-8 string. More...
 
struct  pickle< bool >
 
struct  pickle< speaker_mapping >
 
struct  pickle< std::string >
 
struct  pickle< T >
 
class  pixmap
 A 2D pixel-based image. More...
 
class  pixmap_span
 A non-owning 2D pixel-based image. More...
 
struct  plurality
 Plurality of a number. More...
 
class  png
 
struct  px_length_tag
 
class  quad_color
 A color for each corner of a quad. More...
 
class  radio_button_widget
 A graphical control element that allows the user to choose only one of a predefined set of mutually exclusive options. More...
 
class  rectangle
 A rectangle / parallelogram in 3D space. More...
 
class  recursive_iterator
 An iterator which recursively iterates through nested containers. More...
 
class  rotate2
 
class  rotate3
 
class  row_column_layout
 
class  row_column_widget
 A row/column widget lays out child widgets along a row or column. More...
 
class  scale2
 
class  scale3
 
class  scroll_aperture_widget
 A scroll aperture widget. More...
 
class  scroll_bar_widget
 Scroll bar widget This widget is used in a pair of a vertical and horizontal scrollbar as a child of the scroll_widget. More...
 
class  scroll_widget
 The scroll widget allows a content widget to be shown in less space than is required. More...
 
class  selection_delegate
 A delegate that controls the state of a selection_widget. More...
 
class  selection_widget
 A graphical control element that allows the user to choose only one of a predefined set of mutually exclusive options. More...
 
class  SHA2
 
class  SHA224
 
class  SHA256
 
class  SHA384
 
class  SHA512
 
class  SHA512_224
 
class  SHA512_256
 
struct  si_length_tag
 
class  spacer_widget
 This GUI widget is used as a spacer between other widget for layout purposes. More...
 
class  system_menu_widget
 The system menu widget. More...
 
class  tab_delegate
 A delegate that controls the state of a tab_widget. More...
 
class  tab_widget
 A graphical element that shows only one of a predefined set of mutually exclusive child widgets. More...
 
class  text_delegate
 A delegate that controls the state of a text_widget. More...
 
class  text_field_delegate
 A delegate that controls the state of a text_field_widget. More...
 
class  text_field_widget
 A single line text field. More...
 
class  text_widget
 A text widget. More...
 
struct  three_way_comparison
 A functor to safely compare two arithmetic values. More...
 
struct  three_way_comparison< Lhs, Rhs >
 
class  toggle_widget
 A GUI widget that permits the user to make a binary choice. More...
 
struct  token
 
class  toolbar_button_widget
 A momentary button used as a child in the toolbar. More...
 
class  toolbar_tab_button_widget
 A graphical control element that allows the user to choose only one of a predefined set of mutually exclusive views of a tab_widget. More...
 
class  toolbar_widget
 A toolbar widget is located at the top of a window and lays out its children horizontally. More...
 
struct  transform2
 
struct  transform2< matrix2 >
 
struct  transform2< rotate2 >
 
struct  transform2< scale2 >
 
struct  transform2< translate2 >
 
struct  transform3
 
struct  transform3< matrix3 >
 
struct  transform3< perspective >
 
struct  transform3< rotate3 >
 
struct  transform3< scale3 >
 
struct  transform3< translate3 >
 
class  translate2
 
class  translate3
 
struct  translation_key
 
class  txt
 A localizable message. More...
 
struct  ucd_decomposition_info
 The decomposition info is used to determine how to decompose a code-point. More...
 
class  unfair_mutex_impl
 An unfair mutex This is a fast implementation of a mutex which does not fairly arbitrate between multiple blocking threads. More...
 
class  unfair_recursive_mutex
 An unfair recursive-mutex This is a fast implementation of a recursive-mutex which does not fairly arbitrate between multiple blocking threads. More...
 
class  unit
 
struct  unusable_t
 A type that can not be constructed, copied, moved or destructed. More...
 
class  URI
 A Uniform Resource Identifier. More...
 
class  uri_error
 
class  URL
 Universal Resource Locator. More...
 
class  url_error
 
class  vector2
 A high-level geometric vector Part of the high-level vector, point, mat and color types. More...
 
class  vector3
 A high-level geometric vector Part of the high-level vector, point, mat and color types. More...
 
class  widget
 An interactive graphical object as part of the user-interface. More...
 
class  widget_intf
 
class  widget_layout
 The layout of a widget. More...
 
class  win32_device_interface
 
struct  win32_error_category
 
class  win32_wave_device
 
class  window_controls_macos_widget
 Window control button widget. More...
 
class  window_controls_win32_widget
 Window control button widget. More...
 
class  window_widget
 The top-level window widget. More...
 

Concepts

concept  audio_device_filter
 
concept  dsp_argument
 
concept  transformer2
 
concept  transformer3
 
concept  transformer
 
concept  draw_attribute
 
concept  draw_quad_shape
 
concept  bound_check_range_helper
 
concept  numeric_limited
 
concept  numeric
 
concept  numeric_integral
 
concept  numeric_signed_integral
 
concept  numeric_unsigned_integral
 
concept  arithmetic
 
concept  pointer
 
concept  reference
 
concept  lvalue_reference
 
concept  rvalue_reference
 
concept  trivially_copyable
 
concept  different_from
 
concept  base_of
 
concept  decayed_base_of
 
concept  derived_from
 
concept  decayed_derived_from
 
concept  strict_base_of
 
concept  strict_derived_from
 
concept  pre_incrementable
 
concept  pre_decrementable
 
concept  to_stringable
 
concept  from_stringable
 
concept  static_castableable
 
concept  sizeable
 
concept  scalar
 
concept  scoped_enum
 Concept for std::is_scoped_enum_v<T>.
 
concept  forward_of
 True if T is a forwarded type of Forward.
 
concept  byte_like
 An array of this type will implicitly create objects within that array.
 
concept  button_widget_attribute
 
concept  icon_widget_attribute
 
concept  label_widget_attribute
 
concept  selection_widget_attribute
 
concept  text_field_widget_attribute
 
concept  text_widget_attribute
 

Typedefs

using unfair_mutex = unfair_mutex_impl<true>
 
using widget_id = tagged_id<uint32_t, "widget">
 
template<typename T >
using row_layout = row_column_layout<axis::x, T>
 
template<typename T >
using column_layout = row_column_layout<axis::y, T>
 
using big_uint64_buf_t = endian_buf_t<uint64_t, std::endian::big, 1>
 
using big_uint32_buf_t = endian_buf_t<uint32_t, std::endian::big, 1>
 
using big_uint16_buf_t = endian_buf_t<uint16_t, std::endian::big, 1>
 
using big_int64_buf_t = endian_buf_t<int64_t, std::endian::big, 1>
 
using big_int32_buf_t = endian_buf_t<int32_t, std::endian::big, 1>
 
using big_int16_buf_t = endian_buf_t<int16_t, std::endian::big, 1>
 
using little_uint64_buf_t = endian_buf_t<uint64_t, std::endian::little, 1>
 
using little_uint32_buf_t = endian_buf_t<uint32_t, std::endian::little, 1>
 
using little_uint16_buf_t = endian_buf_t<uint16_t, std::endian::little, 1>
 
using little_int64_buf_t = endian_buf_t<int64_t, std::endian::little, 1>
 
using little_int32_buf_t = endian_buf_t<int32_t, std::endian::little, 1>
 
using little_int16_buf_t = endian_buf_t<int16_t, std::endian::little, 1>
 
using native_uint64_buf_t = endian_buf_t<uint64_t, std::endian::native, 1>
 
using native_uint32_buf_t = endian_buf_t<uint32_t, std::endian::native, 1>
 
using native_uint16_buf_t = endian_buf_t<uint16_t, std::endian::native, 1>
 
using native_int64_buf_t = endian_buf_t<int64_t, std::endian::native, 1>
 
using native_int32_buf_t = endian_buf_t<int32_t, std::endian::native, 1>
 
using native_int16_buf_t = endian_buf_t<int16_t, std::endian::native, 1>
 
using big_uint64_buf_at = endian_buf_t<uint64_t, std::endian::big>
 
using big_uint32_buf_at = endian_buf_t<uint32_t, std::endian::big>
 
using big_uint16_buf_at = endian_buf_t<uint16_t, std::endian::big>
 
using big_int64_buf_at = endian_buf_t<int64_t, std::endian::big>
 
using big_int32_buf_at = endian_buf_t<int32_t, std::endian::big>
 
using big_int16_buf_at = endian_buf_t<int16_t, std::endian::big>
 
using little_uint64_buf_at = endian_buf_t<uint64_t, std::endian::little>
 
using little_uint32_buf_at = endian_buf_t<uint32_t, std::endian::little>
 
using little_uint16_buf_at = endian_buf_t<uint16_t, std::endian::little>
 
using little_int64_buf_at = endian_buf_t<int64_t, std::endian::little>
 
using little_int32_buf_at = endian_buf_t<int32_t, std::endian::little>
 
using little_int16_buf_at = endian_buf_t<int16_t, std::endian::little>
 
using native_uint64_buf_at = endian_buf_t<uint64_t, std::endian::native>
 
using native_uint32_buf_at = endian_buf_t<uint32_t, std::endian::native>
 
using native_uint16_buf_at = endian_buf_t<uint16_t, std::endian::native>
 
using native_int64_buf_at = endian_buf_t<int64_t, std::endian::native>
 
using native_int32_buf_at = endian_buf_t<int32_t, std::endian::native>
 
using native_int16_buf_at = endian_buf_t<int16_t, std::endian::native>
 
template<typename T >
using enum_metadata_name_t = enum_metadata_name<T>::type
 
using ssize_t = std::ptrdiff_t
 Signed size/index into an array.
 
using kilometers = unit<si_length_tag, double, std::kilo>
 
using meters = unit<si_length_tag, double>
 
using centimeters = unit<si_length_tag, double, std::centi>
 
using decimeters = unit<si_length_tag, double, std::deci>
 
using millimeters = unit<si_length_tag, double, std::milli>
 
using points = unit<si_length_tag, double, std::ratio<254, 720'000>::type>
 Points: 1/72 inch.
 
using inches = unit<si_length_tag, double, std::ratio<254, 10'000>::type>
 Inch: 254 mm.
 
using feet = unit<si_length_tag, double, std::ratio<3'048, 10'000>::type>
 
using yards = unit<si_length_tag, double, std::ratio<9'144, 10'000>::type>
 
using miles = unit<si_length_tag, double, std::ratio<16'093'440, 10'000>::type>
 
using dips = unit<si_length_tag, double, std::ratio<254, 960'000>::type>
 Device Independent Pixels: 1/96 inch.
 
using pixels = unit<px_length_tag, double>
 A physical pixel on a display.
 
using em_quads = unit<em_length_tag, double>
 Em-quad: A font's line-height.
 
using row_widget = row_column_widget<axis::x>
 Lays out children in a row.
 
using column_widget = row_column_widget<axis::y>
 Lays out children in a column.
 
using vertical_scroll_widget = scroll_widget<axis::vertical>
 Vertical scroll widget.
 
using horizontal_scroll_widget = scroll_widget<axis::horizontal>
 Horizontal scroll widget.
 

Enumerations

enum class  audio_block_state { normal , silent , corrupt }
 
enum class  audio_device_state {
  uninitialized , active , disabled , not_present ,
  unplugged
}
 
enum class  audio_direction : unsigned char { none = 0b00 , input = 0b01 , output = 0b10 , bidirectional = 0b11 }
 
enum class  speaker_mapping : uint32_t {
  none = 0 , front_left = 0x0'0001 , front_right = 0x0'0002 , front_center = 0x0'0004 ,
  low_frequency = 0x0'0008 , back_left = 0x0'0010 , back_right = 0x0'0020 , front_left_of_center = 0x0'0040 ,
  front_right_of_center = 0x0'0080 , back_center = 0x0'0100 , side_left = 0x0'0200 , side_right = 0x0'0400 ,
  top_center = 0x0'0800 , top_front_left = 0x0'1000 , top_front_center = 0x0'2000 , top_front_right = 0x0'4000 ,
  top_back_left = 0x0'8000 , top_back_center = 0x1'0000 , top_back_right = 0x2'0000 , mono_1_0 = front_center ,
  stereo_2_0 = front_left | front_right , stereo_2_1 = stereo_2_0 | low_frequency , stereo_3_0 = stereo_2_0 | front_center , stereo_3_1 = stereo_3_0 | low_frequency ,
  quad_4_0 = stereo_2_0 | back_left | back_right , quad_side_4_0 = stereo_2_0 | side_left | side_right , hexagonal_6_0 = quad_4_0 | front_center | back_center , hexagonal_6_1 = hexagonal_6_0 | low_frequency ,
  octagonal_8_0 = hexagonal_6_0 | side_left | side_right , surround_3_0 = stereo_2_0 | back_center , surround_4_0 = surround_3_0 | front_center , surround_4_1 = surround_4_0 | low_frequency ,
  surround_5_0 = quad_4_0 | front_center , surround_5_1 = surround_5_0 | low_frequency , surround_7_0 = surround_5_0 | side_left | side_right , surround_7_1 = surround_7_0 | low_frequency ,
  surround_9_0 = surround_7_0 | top_front_left | top_front_right , surround_9_1 = surround_9_0 | low_frequency , surround_11_0 = surround_9_0 | front_left_of_center | front_right_of_center , surround_11_1 = surround_11_0 | low_frequency ,
  surround_side_5_0 = quad_side_4_0 | front_center , surround_side_5_1 = surround_side_5_0 | low_frequency , surround_side_6_0 = surround_side_5_0 | back_center , surround_side_6_1 = surround_side_6_0 | low_frequency ,
  surround_side_7_0 = surround_side_5_0 | front_left_of_center | front_right_of_center , surround_side_7_1 = surround_side_7_0 | low_frequency , surround_wide_6_0 = surround_4_0 | front_left_of_center | front_right_of_center , surround_wide_6_1 = surround_wide_6_0 | low_frequency ,
  surround_wide_7_0 = surround_5_0 | front_left_of_center | front_right_of_center , surround_wide_7_1 = surround_wide_7_0 | low_frequency , surround_atmos_5_1_4 = surround_5_1 | top_front_left | top_front_right | top_back_left | top_back_right , surround_atmos_7_1_4 = surround_7_1 | top_front_left | top_front_right | top_back_left | top_back_right
}
 
enum class  surround_mode : uint64_t {
  none = 0 , mono_1_0 = uint64_t{1} << 0 , stereo_2_0 = uint64_t{1} << 1 , stereo_2_1 = uint64_t{1} << 2 ,
  stereo_3_0 = uint64_t{1} << 3 , stereo_3_1 = uint64_t{1} << 4 , quad_4_0 = uint64_t{1} << 5 , quad_side_4_0 = uint64_t{1} << 6 ,
  hexagonal_6_0 = uint64_t{1} << 7 , hexagonal_6_1 = uint64_t{1} << 8 , octagonal_8_0 = uint64_t{1} << 9 , surround_3_0 = uint64_t{1} << 10 ,
  surround_4_0 = uint64_t{1} << 11 , surround_4_1 = uint64_t{1} << 12 , surround_5_0 = uint64_t{1} << 13 , surround_5_1 = uint64_t{1} << 14 ,
  surround_7_0 = uint64_t{1} << 15 , surround_7_1 = uint64_t{1} << 16 , surround_9_0 = uint64_t{1} << 17 , surround_9_1 = uint64_t{1} << 18 ,
  surround_11_0 = uint64_t{1} << 19 , surround_11_1 = uint64_t{1} << 20 , surround_side_5_0 = uint64_t{1} << 21 , surround_side_5_1 = uint64_t{1} << 22 ,
  surround_side_6_0 = uint64_t{1} << 23 , surround_side_6_1 = uint64_t{1} << 24 , surround_side_7_0 = uint64_t{1} << 25 , surround_side_7_1 = uint64_t{1} << 26 ,
  surround_wide_6_0 = uint64_t{1} << 27 , surround_wide_6_1 = uint64_t{1} << 28 , surround_wide_7_0 = uint64_t{1} << 29 , surround_wide_7_1 = uint64_t{1} << 30 ,
  surround_atmos_5_1_4 = uint64_t{1} << 31 , surround_atmos_7_1_4 = uint64_t{1} << 32
}
 
enum class  semantic_color : unsigned char {
  blue , green , indigo , orange ,
  pink , purple , red , teal ,
  yellow , gray , gray2 , gray3 ,
  gray4 , gray5 , gray6 , foreground ,
  border , fill , accent , text_select ,
  primary_cursor , secondary_cursor
}
 Semantic colors. More...
 
enum class  global_state_type : uint64_t {
  log_debug = 0x01 , log_info = 0x02 , log_statistics = 0x04 , log_trace = 0x08 ,
  log_audit = 0x10 , log_warning = 0x20 , log_error = 0x40 , log_fatal = 0x80 ,
  log_mask = log_debug | log_info | log_statistics | log_trace | log_audit | log_warning | log_error | log_fatal , log_level_default = log_audit | log_error | log_fatal , log_level_fatal = log_audit | log_fatal , log_level_error = log_trace | log_error | log_level_fatal ,
  log_level_warning = log_warning | log_level_error , log_level_info = log_info | log_statistics | log_level_warning , log_level_debug = log_debug | log_level_info , log_is_running = 0x1'00 ,
  time_stamp_utc_is_running = 0x2'00 , system_is_running = 0x1'000000'00 , system_is_shutting_down = 0x2'000000'00 , system_mask = system_is_running | system_is_shutting_down
}
 The flag-type used for global state. More...
 
enum class  dialog_type { ok , yes_no , yes_no_cancel }
 
enum class  access_mode {
  access_mode::read = 0x1 , access_mode::write = 0x2 , access_mode::rename = 0x4 , access_mode::read_lock = 0x10 ,
  access_mode::write_lock = 0x20 , access_mode::open = 0x100 , access_mode::create = 0x200 , access_mode::truncate = 0x400 ,
  access_mode::random = 0x1000 , access_mode::sequential = 0x2000 , access_mode::no_reuse = 0x4000 , access_mode::write_through = 0x8000 ,
  access_mode::create_directories = 0x10000 , access_mode::open_for_read = open | read , access_mode::open_for_read_and_write = open | read | write , truncate_or_create_for_write = create_directories | open | create | truncate | write
}
 The mode in which way to open a file. More...
 
enum class  seek_whence { seek_whence::begin , seek_whence::current , seek_whence::end }
 The position in the file to seek from. More...
 
enum class  font_style { normal = 0 , italic = 1 , oblique = 1 }
 The different styles a font-family comes with. More...
 
enum class  vertical_alignment : uint8_t { vertical_alignment::none = 0 , vertical_alignment::top = 1 , vertical_alignment::middle = 2 , vertical_alignment::bottom = 3 }
 Vertical alignment. More...
 
enum class  horizontal_alignment : uint8_t {
  horizontal_alignment::none = 0 , horizontal_alignment::flush = 1 , horizontal_alignment::left = 2 , horizontal_alignment::center = 3 ,
  horizontal_alignment::justified = 4 , horizontal_alignment::right = 5
}
 Horizontal alignment. More...
 
enum class  axis : unsigned char {
  none = 0 , x = 1 , y = 2 , z = 4 ,
  both = x | y , all = x | y | z , horizontal = x , vertical = y
}
 An enumeration of the 3 axis for 3D geometry. More...
 
enum class  line_end_cap { line_end_cap::flat , line_end_cap::round }
 The way two lines should be joined. More...
 
enum class  line_join_style { line_join_style::none , line_join_style::bevel , line_join_style::miter , line_join_style::round }
 The way two lines should be joined. More...
 
enum class  border_side { on , inside , outside }
 The side where the border is drawn. More...
 
enum class  gui_event_type {
  none , keyboard_down , keyboard_up , keyboard_grapheme ,
  keyboard_partial_grapheme , keyboard_enter , keyboard_exit , mouse_move ,
  mouse_drag , mouse_down , mouse_up , mouse_wheel ,
  mouse_enter , mouse_exit , mouse_exit_window , gui_event_type::window_redraw ,
  gui_event_type::window_relayout , gui_event_type::window_reconstrain , gui_event_type::window_resize , gui_event_type::window_minimize ,
  gui_event_type::window_maximize , gui_event_type::window_normalize , gui_event_type::window_close , gui_event_type::window_open_sysmenu ,
  gui_event_type::window_set_keyboard_target , gui_event_type::window_set_clipboard , text_cursor_left_char , text_cursor_right_char ,
  text_cursor_down_char , text_cursor_up_char , text_cursor_left_word , text_cursor_right_word ,
  text_cursor_begin_line , text_cursor_end_line , text_cursor_begin_sentence , text_cursor_end_sentence ,
  text_cursor_begin_document , text_cursor_end_document , text_select_left_char , text_select_right_char ,
  text_select_down_char , text_select_up_char , text_select_word , text_select_left_word ,
  text_select_right_word , text_select_begin_line , text_select_end_line , text_select_begin_sentence ,
  text_select_end_sentence , text_select_document , text_select_begin_document , text_select_end_document ,
  text_delete_char_prev , text_delete_char_next , text_delete_word_prev , text_delete_word_next ,
  text_swap_chars , text_edit_paste , text_edit_copy , text_edit_cut ,
  text_undo , text_redo , text_insert_line , text_insert_line_up ,
  text_insert_line_down , text_mode_insert , gui_widget_next , gui_widget_prev ,
  gui_menu_next , gui_menu_prev , gui_toolbar_open , gui_toolbar_next ,
  gui_toolbar_prev , gui_activate , gui_activate_next , gui_cancel
}
 GUI event type. More...
 
enum class  gui_event_variant {
  gui_event_variant::other , gui_event_variant::mouse , gui_event_variant::keyboard , gui_event_variant::keyboard_target ,
  gui_event_variant::grapheme , gui_event_variant::rectangle , gui_event_variant::clipboard_data
}
 A granular gui event type. More...
 
enum class  path_location {
  path_location::resource_dirs , path_location::executable_file , path_location::executable_dir , path_location::library_file ,
  path_location::library_dir , path_location::data_dir , path_location::log_dir , path_location::preferences_file ,
  path_location::system_font_dirs , path_location::font_dirs , path_location::theme_dirs
}
 File and Directory locations. More...
 
enum class  unicode_bidi_class : uint8_t {
  ON = 0 , L = 1 , R = 2 , BN = 3 ,
  S = 4 , B = 5 , WS = 6 , ET = 7 ,
  ES = 8 , CS = 9 , EN = 10 , NSM = 11 ,
  AN = 12 , AL = 13 , LRE = 14 , RLE = 15 ,
  PDF = 16 , LRO = 17 , RLO = 18 , LRI = 19 ,
  RLI = 20 , FSI = 21 , PDI = 22
}
 Bidirectional class Unicode Standard Annex #9: https://unicode.org/reports/tr9/. More...
 
enum class  unicode_bidi_paired_bracket_type : uint8_t { n = 0 , o = 1 , c = 2 }
 
enum class  unicode_decomposition_type : uint8_t {
  canonical = 0 , noBreak = 1 , compat = 2 , super = 3 ,
  fraction = 4 , sub = 5 , font = 6 , circle = 7 ,
  wide = 8 , vertical = 9 , square = 10 , isolated = 11 ,
  _final = 12 , initial = 13 , medial = 14 , small = 15 ,
  narrow = 16
}
 The decomposition type determines if a code-point should be decomposed canonically or for a compatibility. More...
 
enum class  unicode_east_asian_width : uint8_t {
  N = 0 , Na = 1 , A = 2 , W = 3 ,
  H = 4 , F = 5
}
 
enum class  unicode_general_category : uint8_t {
  Cn = 0 , Cc = 1 , Cf = 2 , Co = 3 ,
  Cs = 4 , Ll = 5 , Lm = 6 , Lo = 7 ,
  Lt = 8 , Lu = 9 , Mc = 10 , Me = 11 ,
  Mn = 12 , Nd = 13 , Nl = 14 , No = 15 ,
  Pc = 16 , Pd = 17 , Pe = 18 , Pf = 19 ,
  Pi = 20 , Po = 21 , Ps = 22 , Sc = 23 ,
  Sk = 24 , Sm = 25 , So = 26 , Zl = 27 ,
  Zp = 28 , Zs = 29
}
 
enum class  unicode_grapheme_cluster_break : uint8_t {
  Other = 0 , Control = 1 , LF = 2 , CR = 3 ,
  Extended_Pictographic = 4 , Extend = 5 , Prepend = 6 , SpacingMark = 7 ,
  L = 8 , V = 9 , T = 10 , ZWJ = 11 ,
  LV = 12 , LVT = 13 , Regional_Indicator = 14
}
 
enum class  unicode_lexical_class : uint8_t {
  other = 0 , id_continue = 1 , id_start = 2 , syntax = 3 ,
  white_space = 4
}
 
enum class  unicode_line_break_class : uint8_t {
  XX = 0 , CM = 1 , BA = 2 , LF = 3 ,
  BK = 4 , CR = 5 , SP = 6 , EX = 7 ,
  QU = 8 , AL = 9 , PR = 10 , PO = 11 ,
  OP = 12 , CP = 13 , IS = 14 , HY = 15 ,
  SY = 16 , NU = 17 , CL = 18 , NL = 19 ,
  GL = 20 , AI = 21 , BB = 22 , HL = 23 ,
  SA = 24 , JL = 25 , JV = 26 , JT = 27 ,
  NS = 28 , ZW = 29 , ZWJ = 30 , B2 = 31 ,
  IN = 32 , WJ = 33 , ID = 34 , EB = 35 ,
  CJ = 36 , H2 = 37 , H3 = 38 , SG = 39 ,
  CB = 40 , RI = 41 , EM = 42
}
 Unicode line break class. More...
 
enum class  unicode_script : uint16_t {
  Adlam = 166 , Ahom = 338 , Anatolian_Hieroglyphs = 80 , Arabic = 160 ,
  Armenian = 230 , Avestan = 134 , Balinese = 360 , Bamum = 435 ,
  Bassa_Vah = 259 , Batak = 365 , Bengali = 325 , Bhaiksuki = 334 ,
  Bopomofo = 285 , Brahmi = 300 , Braille = 570 , Buginese = 367 ,
  Buhid = 372 , Canadian_Aboriginal = 440 , Carian = 201 , Caucasian_Albanian = 239 ,
  Chakma = 349 , Cham = 358 , Cherokee = 445 , Chorasmian = 109 ,
  Common = 994 , Coptic = 204 , Cuneiform = 20 , Cypriot = 403 ,
  Cypro_Minoan = 402 , Cyrillic = 220 , Deseret = 250 , Devanagari = 315 ,
  Dives_Akuru = 342 , Dogra = 328 , Duployan = 755 , Egyptian_Hieroglyphs = 50 ,
  Elbasan = 226 , Elymaic = 128 , Ethiopic = 430 , Georgian = 240 ,
  Glagolitic = 225 , Gothic = 206 , Grantha = 343 , Greek = 200 ,
  Gujarati = 320 , Gunjala_Gondi = 312 , Gurmukhi = 310 , Han = 500 ,
  Hangul = 286 , Hanifi_Rohingya = 167 , Hanunoo = 371 , Hatran = 127 ,
  Hebrew = 125 , Hiragana = 410 , Imperial_Aramaic = 124 , Inherited = 994 ,
  Inscriptional_Pahlavi = 131 , Inscriptional_Parthian = 130 , Javanese = 361 , Kaithi = 317 ,
  Kannada = 345 , Katakana = 411 , Kawi = 368 , Kayah_Li = 357 ,
  Kharoshthi = 305 , Khitan_Small_Script = 288 , Khmer = 355 , Khojki = 322 ,
  Khudawadi = 318 , Lao = 356 , Latin = 215 , Lepcha = 335 ,
  Limbu = 336 , Linear_A = 400 , Linear_B = 401 , Lisu = 399 ,
  Lycian = 202 , Lydian = 116 , Mahajani = 314 , Makasar = 366 ,
  Malayalam = 347 , Mandaic = 140 , Manichaean = 139 , Marchen = 332 ,
  Masaram_Gondi = 313 , Medefaidrin = 265 , Meetei_Mayek = 337 , Mende_Kikakui = 438 ,
  Meroitic_Cursive = 101 , Meroitic_Hieroglyphs = 100 , Miao = 282 , Modi = 324 ,
  Mongolian = 145 , Mro = 264 , Multani = 323 , Myanmar = 350 ,
  Nabataean = 159 , Nag_Mundari = 295 , Nandinagari = 311 , New_Tai_Lue = 354 ,
  Newa = 333 , Nko = 165 , Nushu = 499 , Nyiakeng_Puachue_Hmong = 451 ,
  Ogham = 212 , Ol_Chiki = 261 , Old_Hungarian = 176 , Old_Italic = 210 ,
  Old_North_Arabian = 106 , Old_Permic = 227 , Old_Persian = 30 , Old_Sogdian = 142 ,
  Old_South_Arabian = 105 , Old_Turkic = 175 , Old_Uyghur = 143 , Oriya = 327 ,
  Osage = 219 , Osmanya = 260 , Pahawh_Hmong = 450 , Palmyrene = 126 ,
  Pau_Cin_Hau = 263 , Phags_Pa = 331 , Phoenician = 115 , Psalter_Pahlavi = 132 ,
  Rejang = 363 , Runic = 211 , Samaritan = 123 , Saurashtra = 344 ,
  Sharada = 319 , Shavian = 281 , Siddham = 302 , SignWriting = 95 ,
  Sinhala = 348 , Sogdian = 141 , Sora_Sompeng = 398 , Soyombo = 329 ,
  Sundanese = 362 , Syloti_Nagri = 316 , Syriac = 135 , Tagalog = 370 ,
  Tagbanwa = 373 , Tai_Le = 353 , Tai_Tham = 351 , Tai_Viet = 359 ,
  Takri = 321 , Tamil = 346 , Tangsa = 520 , Tangut = 520 ,
  Telugu = 340 , Thaana = 170 , Thai = 352 , Tibetan = 330 ,
  Tifinagh = 120 , Tirhuta = 326 , Toto = 294 , Ugaritic = 40 ,
  Vai = 470 , Vithkuqi = 228 , Wancho = 283 , Warang_Citi = 262 ,
  Yezidi = 192 , Yi = 460 , Zanabazar_Square = 339 , Zzzz = 0
}
 
enum class  unicode_sentence_break_property : uint8_t {
  Other = 0 , Sp = 1 , LF = 2 , CR = 3 ,
  STerm = 4 , Close = 5 , SContinue = 6 , ATerm = 7 ,
  Numeric = 8 , Upper = 9 , Lower = 10 , Sep = 11 ,
  Format = 12 , OLetter = 13 , Extend = 14
}
 
enum class  unicode_word_break_property : uint8_t {
  Other = 0 , LF = 1 , Newline = 2 , CR = 3 ,
  WSegSpace = 4 , Double_Quote = 5 , Single_Quote = 6 , MidNum = 7 ,
  MidNumLet = 8 , Numeric = 9 , MidLetter = 10 , ALetter = 11 ,
  ExtendNumLet = 12 , Format = 13 , Extend = 14 , Hebrew_Letter = 15 ,
  ZWJ = 16 , Katakana = 17 , Regional_Indicator = 18
}
 
enum class  plurality_value : uint8_t {
  zero = 0 , one = 1 , two = 2 , few = 3 ,
  many = 4 , other = 5
}
 The plurality value of a cardinal or ordinal number. More...
 
enum class  plurality_mask : uint8_t {
  zero = 1 << std::to_underlying(plurality_value::zero) , one = 1 << std::to_underlying(plurality_value::one) , two = 1 << std::to_underlying(plurality_value::two) , few = 1 << std::to_underlying(plurality_value::few) ,
  many = 1 << std::to_underlying(plurality_value::many) , other = 1 << std::to_underlying(plurality_value::other)
}
 A mask of plurality values that this language supports. More...
 
enum class  policy { unspecified , low_power , high_performance }
 The performance policy to use. More...
 
enum class  button_state { button_state::off , button_state::on , button_state::other }
 The state of a button. More...
 
enum class  widget_mode {
  widget_mode::collapse , widget_mode::invisible , widget_mode::disabled , widget_mode::display ,
  widget_mode::select , widget_mode::partial , widget_mode::enabled
}
 The mode that the widget is operating at. More...
 
enum class  win32_error : uint32_t { success = ERROR_SUCCESS , file_not_found = ERROR_FILE_NOT_FOUND , more_data = ERROR_MORE_DATA , invalid_data = ERROR_INVALID_DATA }
 

Functions

template<size_t LookaheadCount, typename Iterator >
auto make_lookahead_iterator (Iterator &&it) noexcept
 
template<typename Container >
constexpr auto recursive_iterator_begin (Container &rhs) noexcept
 Get a recursive iterator from the begin of a recursive container.
 
template<typename Container >
constexpr auto recursive_iterator_end (Container &rhs) noexcept
 Get a recursive iterator from one beyond the end of a recursive container.
 
template<typename Container >
constexpr auto recursive_iterator_begin (Container const &rhs) noexcept
 Get a recursive iterator from the begin of a recursive container.
 
template<typename Container >
constexpr auto recursive_iterator_end (Container const &rhs) noexcept
 Get a recursive iterator from one beyond the end of a recursive container.
 
hi_export constexpr std::string_view to_string (audio_device_state const &rhs) noexcept
 
hi_export constexpr audio_direction operator& (audio_direction const &lhs, audio_direction const &rhs) noexcept
 
hi_export constexpr audio_direction operator| (audio_direction const &lhs, audio_direction const &rhs) noexcept
 
hi_export constexpr bool to_bool (audio_direction const &rhs) noexcept
 
hi_export bool win32_use_extensible (audio_stream_format x) noexcept
 
hi_export WAVEFORMATEXTENSIBLE audio_stream_format_to_win32 (audio_stream_format stream_format, bool extensible) noexcept
 
hi_export audio_stream_format audio_stream_format_from_win32 (WAVEFORMATEXTENSIBLE const &wave_format)
 
hi_export audio_stream_format audio_stream_format_from_win32 (WAVEFORMATEX const &wave_format)
 
constexpr bool match_audio_device (audio_device const &device) noexcept
 
template<audio_device_filter FirstFilter, audio_device_filter... Filters>
bool match_audio_device (audio_device const &device, FirstFilter &&first_filter, Filters &&...filters) noexcept
 
template<audio_device_filter... Filters>
generator< audio_device & > audio_devices (Filters &&...filters) noexcept
 Get audio devices matching the filter arguments.
 
hi_export constexpr bool to_bool (speaker_mapping const &rhs) noexcept
 
hi_export constexpr unsigned int popcount (speaker_mapping const &rhs) noexcept
 
hi_export constexpr speaker_mapping operator| (speaker_mapping const &lhs, speaker_mapping const &rhs) noexcept
 
hi_export constexpr speaker_mapping operator& (speaker_mapping const &lhs, speaker_mapping const &rhs) noexcept
 
hi_export constexpr speaker_mapping & operator|= (speaker_mapping &lhs, speaker_mapping const &rhs) noexcept
 
hi_export constexpr speaker_mapping & operator&= (speaker_mapping &lhs, speaker_mapping const &rhs) noexcept
 
hi_export std::string to_string (speaker_mapping rhs) noexcept
 
hi_export speaker_mapping speaker_mapping_from_win32 (DWORD from)
 
hi_export DWORD speaker_mapping_to_win32 (speaker_mapping from) noexcept
 
hi_export constexpr surround_mode operator& (surround_mode const &lhs, surround_mode const &rhs) noexcept
 
hi_export constexpr surround_mode operator| (surround_mode const &lhs, surround_mode const &rhs) noexcept
 
hi_export constexpr surround_mode & operator|= (surround_mode &lhs, surround_mode const &rhs) noexcept
 
hi_export constexpr bool to_bool (surround_mode const &rhs) noexcept
 
hi_export constexpr speaker_mapping to_speaker_mapping (surround_mode const &rhs) noexcept
 
hi_export generator< surround_mode > enumerate_surround_modes () noexcept
 
hi_export constexpr std::string_view to_string_view_one (surround_mode const &mode) noexcept
 
hi_export constexpr std::string to_string (surround_mode const &mask) noexcept
 
char32_t random_char () noexcept
 
constexpr std::u32string to_u32string (std::u32string_view rhs) noexcept
 Identity conversion from UTF-32 to UTF-32.
 
constexpr std::u32string to_u32string (std::u16string_view rhs) noexcept
 Conversion from UTF-16 to UTF-32.
 
constexpr std::u32string to_u32string (std::u8string_view rhs) noexcept
 Conversion from UTF-8 to UTF-32.
 
constexpr std::u32string to_u32string (std::wstring_view rhs) noexcept
 Conversion from wide-string (UTF-16/32) to UTF-32.
 
constexpr std::u32string to_u32string (std::string_view rhs) noexcept
 Conversion from UTF-8 to UTF-32.
 
constexpr std::u16string to_u16string (std::u32string_view rhs) noexcept
 Conversion from UTF-32 to UTF-16.
 
constexpr std::u16string to_u16string (std::u16string_view rhs) noexcept
 Identity conversion from UTF-16 to UTF-16.
 
constexpr std::u16string to_u16string (std::u8string_view rhs) noexcept
 Conversion from UTF-8 to UTF-16.
 
constexpr std::u16string to_u16string (std::wstring_view rhs) noexcept
 Conversion from wide-string (UTF-16/32) to UTF-16.
 
constexpr std::u16string to_u16string (std::string_view rhs) noexcept
 Conversion from UTF-8 to UTF-16.
 
constexpr std::u8string to_u8string (std::u32string_view rhs) noexcept
 Conversion from UTF-32 to UTF-8.
 
constexpr std::u8string to_u8string (std::u16string_view rhs) noexcept
 Conversion from UTF-16 to UTF-8.
 
constexpr std::u8string to_u8string (std::u8string_view rhs) noexcept
 Identity conversion from UTF-8 to UTF-8.
 
constexpr std::u8string to_u8string (std::wstring_view rhs) noexcept
 Conversion from wide-string (UTF-16/32) to UTF-8.
 
constexpr std::u8string to_u8string (std::string_view rhs) noexcept
 Conversion from UTF-8 to UTF-8.
 
constexpr std::wstring to_wstring (std::u32string_view rhs) noexcept
 Conversion from UTF-32 to wide-string (UTF-16/32).
 
constexpr std::wstring to_wstring (std::u16string_view rhs) noexcept
 Conversion from UTF-16 to wide-string (UTF-16/32).
 
constexpr std::wstring to_wstring (std::u8string_view rhs) noexcept
 Conversion from UTF-8 to wide-string (UTF-16/32).
 
constexpr std::wstring to_wstring (std::wstring_view rhs) noexcept
 Identity conversion from wide-string (UTF-16/32) to wide-string (UTF-16/32).
 
constexpr std::wstring to_wstring (std::string_view rhs) noexcept
 Conversion from UTF-8 to wide-string (UTF-16/32).
 
constexpr std::string to_string (std::u32string_view rhs) noexcept
 Conversion from UTF-32 to UTF-8.
 
constexpr std::string to_string (std::u16string_view rhs) noexcept
 Conversion from UTF-16 to UTF-8.
 
constexpr std::string to_string (std::u8string_view rhs) noexcept
 Identity conversion from UTF-8 to UTF-8.
 
constexpr std::string to_string (std::wstring_view rhs) noexcept
 Conversion from wide-string (UTF-16/32) to UTF-8.
 
constexpr std::string to_string (std::string_view rhs) noexcept
 Conversion from UTF-8 to UTF-8.
 
hi_export bstring gzip_decompress (std::span< std::byte const > bytes, std::size_t max_size)
 
hi_export bstring gzip_decompress (std::filesystem::path const &path, std::size_t max_size=0x01000000)
 
hi_export bstring inflate (std::span< std::byte const > bytes, std::size_t &offset, std::size_t max_size=0x0100 '0000)
 Inflate compressed data using the deflate algorithm bytes should include at least 32 bit of trailer, for the overflow check which will slightly overrun the actual compressed data for performance reasons.
 
bstring zlib_decompress (std::span< std::byte const > bytes, std::size_t max_size)
 
bstring zlib_decompress (std::filesystem::path const &path, std::size_t max_size=0x01000000)
 
constexpr matrix3 color_primaries_to_RGBtoXYZ (float wx, float wy, float rx, float ry, float gx, float gy, float bx, float by) noexcept
 Create a color space conversion matrix.
 
float Rec2100_linear_to_gamma (float L) noexcept
 Rec.2100 linear to gamma transfer function.
 
float Rec2100_gamma_to_linear (float N) noexcept
 Rec.2100 gamma to linear transfer function.
 
std::string_view to_string (semantic_color rhs) noexcept
 Convert a semantic color to a string.
 
semantic_color semantic_color_from_string (std::string_view str)
 Convert a string to a semantic color.
 
float sRGB_linear_to_gamma (float u) noexcept
 sRGB linear to gamma transfer function.
 
float sRGB_gamma_to_linear (float u) noexcept
 sRGB gamma to linear transfer function.
 
uint8_t sRGB_linear16_to_gamma8 (float16 u) noexcept
 sRGB linear float-16 to gamma transfer function.
 
float16 sRGB_gamma8_to_linear16 (uint8_t u) noexcept
 sRGB gamma to linear float-16 transfer function.
 
color color_from_sRGB (float r, float g, float b, float a) noexcept
 Convert gama corrected sRGB color to the linear color.
 
color color_from_sRGB (uint8_t r, uint8_t g, uint8_t b, uint8_t a) noexcept
 Convert gama corrected sRGB color to the linear color.
 
color color_from_sRGB (std::string_view str)
 
constexpr global_state_type operator| (global_state_type lhs, global_state_type rhs) noexcept
 
constexpr global_state_type operator& (global_state_type lhs, global_state_type rhs) noexcept
 
constexpr global_state_type operator~ (global_state_type rhs) noexcept
 
constexpr bool to_bool (global_state_type rhs) noexcept
 
constexpr bool is_system_running (global_state_type rhs) noexcept
 
constexpr bool is_system_shutting_down (global_state_type rhs) noexcept
 
bool is_system_running () noexcept
 Check if the HikoGUI system is running.
 
bool is_system_shutting_down () noexcept
 Check if the HikoGUI system is being shut down.
 
void set_log_level (global_state_type log_level) noexcept
 Set the logging level.
 
bool global_state_disable (global_state_type subsystem, std::memory_order order=std::memory_order::seq_cst) noexcept
 Disable a subsystem.
 
bool global_state_enable (global_state_type subsystem, std::memory_order order=std::memory_order::seq_cst) noexcept
 Enable a subsystem.
 
template<typename T >
requires (is_atomic_v<T>)
T::value_type start_subsystem (T &check_variable, typename T::value_type off_value, typename T::value_type(*init_function)(), void(*deinit_function)())
 Start a sub-system.
 
bool start_subsystem (global_state_type state_bit, bool(*init_function)(), void(*deinit_function)())
 Start a sub-system.
 
template<typename T >
requires (is_atomic_v<T>)
T::value_type start_subsystem_or_terminate (T &check_variable, typename T::value_type off_value, typename T::value_type(*init_function)(), void(*deinit_function)())
 Start a sub-system.
 
void stop_subsystem (void(*deinit_function)())
 Stop a sub-system.
 
void start_system () noexcept
 Start the system.
 
void shutdown_system () noexcept
 Shutdown the system.
 
thread_id current_thread_id () noexcept
 Get the current thread id.
 
void set_thread_name (std::string_view name) noexcept
 Set the name of the current thread.
 
std::string get_thread_name (thread_id id) noexcept
 Get the thread name of a thread id.
 
std::vector< boolprocess_affinity_mask ()
 Get the current process CPU affinity mask.
 
std::vector< boolset_thread_affinity_mask (std::vector< bool > const &mask)
 Set the current thread CPU affinity mask.
 
std::vector< boolset_thread_affinity (std::size_t cpu_id)
 Set the current thread CPU affinity to a single CPU.
 
std::size_t advance_thread_affinity (std::size_t &cpu) noexcept
 Advance thread affinity to the next CPU.
 
std::size_t current_cpu_id () noexcept
 Get the current CPU id.
 
hi_export voidunfair_mutex_deadlock_lock (void *object) noexcept
 Lock an object on this thread.
 
hi_export bool unfair_mutex_deadlock_unlock (void *object) noexcept
 Unlock an object on this thread.
 
hi_export void unfair_mutex_deadlock_remove_object (void *object) noexcept
 Remove the object from the detection.
 
hi_export void unfair_mutex_deadlock_clear_stack () noexcept
 Clear the stack.
 
hi_export void unfair_mutex_deadlock_clear_graph () noexcept
 Clear the graph.
 
hi_export bool dialog (dialog_type type, std::string_view title, std::string_view text)
 Display a modal dialog.
 
hi_export void dialog_ok (std::string_view title, std::string_view message) noexcept
 
hi_export bool dialog_yes_no (std::string_view title, std::string_view message) noexcept
 
hi_export bool dialog_yes_no_cancel (std::string_view title, std::string_view message)
 
template<typename... Args>
hi_export void print (std::format_string< Args... > fmt, Args &&... args) noexcept
 Output text to the console.
 
template<typename... Args>
hi_export void println (std::format_string< Args... > fmt, Args &&... args) noexcept
 Output a line of text to the console.
 
template<std::input_iterator It, std::input_iterator ItEnd>
 lean_vector (It first, ItEnd last) -> lean_vector< typename std::iterator_traits< It >::value_type >
 
hi_export charmake_cstr (char const *c_str, std::size_t size=-1) noexcept
 Copy a std::string to new memory.
 
hi_export charmake_cstr (std::string const &s) noexcept
 Copy a std::string to new memory.
 
hi_export void console_start () noexcept
 
hi_export std::pair< int, char ** > crt_start (int, char **, void *instance, int show_cmd)
 
int crt_finish (int argc, char **argv, int exit_code)
 
void terminate_handler () noexcept
 The HikoGUI terminate handler.
 
template<typename T , typename Op >
void dsp_visit (std::span< T > r, std::span< T const > a, std::span< T const > b, Op op) noexcept
 
template<typename T , typename Op >
void dsp_visit (std::span< T > r, std::span< T const > a, T b, Op op) noexcept
 
template<typename T , typename Op >
void dsp_visit (std::span< float > r, float a, Op op) noexcept
 
void dsp_add (dsp_argument auto... args) noexcept
 
void dsp_sub (dsp-argument auto... args) noexcept
 
void dsp_mul (dsp-argument auto... args) noexcept
 
hi_export constexpr access_mode operator| (access_mode const &lhs, access_mode const &rhs) noexcept
 
hi_export constexpr access_mode operator& (access_mode const &lhs, access_mode const &rhs) noexcept
 
hi_export constexpr bool to_bool (access_mode const &rhs) noexcept
 
hi_export generator< font_stylealternatives (font_style const &start) noexcept
 
std::span< std::byte constotype_cmap_find (std::span< std::byte const > bytes, uint16_t platform_id, uint16_t platform_specific_id)
 
font_char_map otype_cmap_parse_map_4 (std::span< std::byte const > over_sized_bytes)
 
font_char_map otype_cmap_parse_map_6 (std::span< std::byte const > over_sized_bytes)
 
font_char_map otype_cmap_parse_map_12 (std::span< std::byte const > over_sized_bytes)
 
font_char_map otype_cmap_parse_map (std::span< std::byte const > bytes)
 
font_char_map otype_cmap_parse (std::span< std::byte const > bytes)
 
graphic_path otype_glyf_get_path (std::span< std::byte const > bytes, float em_scale)
 Get the graphic-path of a simple glyph.
 
generator< otype_glyf_componentotype_glyf_get_compound (std::span< std::byte const > bytes, float em_scale)
 Get the components of a compound glyph.
 
bool otype_glyf_is_compound (std::span< std::byte const > bytes)
 Check if this glyph is a compound or simple glyph.
 
aarectangle otype_glyf_get_bounding_box (std::span< std::byte const > bytes, float em_scale)
 Get the bounding box of a simple glyph.
 
auto otype_head_parse (std::span< std::byte const > bytes)
 
auto otype_hhea_parse (std::span< std::byte const > bytes, float em_scale)
 
auto otype_hmtx_get (std::span< std::byte const > bytes, hi::glyph_id glyph_id, uint16_t num_horizontal_metrics, float em_scale)
 
std::optional< floatotype_kern_sub0_find (size_t &offset, std::span< std::byte const > bytes, glyph_id first_glyph_id, glyph_id second_glyph_id, float em_scale)
 
vector2 otype_kern_v0_find (std::span< std::byte const > bytes, glyph_id first_glyph_id, glyph_id second_glyph_id, float em_scale)
 'kern' version 0 find.
 
vector2 otype_kern_v1_find (std::span< std::byte const > bytes, glyph_id first_glyph_id, glyph_id second_glyph_id, float em_scale)
 
vector2 otype_kern_find (std::span< std::byte const > bytes, glyph_id first_glyph_id, glyph_id second_glyph_id, float em_scale)
 
std::pair< size_t, size_t > otype_loca16_get (std::span< std::byte const > bytes, hi::glyph_id glyph_id)
 
std::pair< size_t, size_t > otype_loca32_get (std::span< std::byte const > bytes, hi::glyph_id glyph_id)
 
std::pair< size_t, size_t > otype_loca_get (std::span< std::byte const > loca_bytes, hi::glyph_id glyph_id, bool loca_is_offset32)
 
std::span< std::byte constotype_loca_get (std::span< std::byte const > loca_bytes, std::span< std::byte const > glyf_bytes, hi::glyph_id glyph_id, bool loca_is_offset32)
 
auto otype_maxp_parse (std::span< std::byte const > bytes)
 
std::optional< std::stringotype_name_search (std::span< std::byte const > bytes, uint16_t name_id, language_tag language=language_tag{"en"})
 Get a name from the name table.
 
auto otype_name_get_family (std::span< std::byte const > bytes)
 
auto otype_parse_os2 (std::span< std::byte const > bytes, float em_scale)
 
template<fixed_string Name>
std::span< std::byte constotype_sfnt_search (std::span< std::byte const > bytes)
 
std::optional< std::stringotype_get_string (std::span< std::byte const > bytes, uint16_t platform_id, uint16_t platform_specific_id)
 
std::ostreamoperator<< (std::ostream &lhs, formula_node const &rhs) noexcept
 
template<std::input_iterator It, std::sentinel_for< It > ItEnd>
std::unique_ptr< formula_nodeparse_formula_1 (It &it, ItEnd last, std::unique_ptr< formula_node > lhs, uint8_t min_precedence)
 Parse an formula.
 
template<std::input_iterator It, std::sentinel_for< It > ItEnd>
std::unique_ptr< formula_nodeparse_formula (It &it, ItEnd last)
 Parse an formula.
 
constexpr std::pair< uint8_t, booloperator_precedence (token const &op, bool binary) noexcept
 
std::unique_ptr< formula_nodeparse_operation_formula (std::unique_ptr< formula_node > lhs, token const &op, std::unique_ptr< formula_node > rhs)
 
template<std::input_iterator It, std::sentinel_for< It > ItEnd>
std::unique_ptr< formula_nodeparse_primary_formula (It &it, ItEnd last)
 Parse a lhs or rhs part of an formula.
 
template<std::input_iterator It, std::sentinel_for< It > ItEnd>
std::unique_ptr< formula_nodeparse_index_formula (It &it, ItEnd last)
 Parse the rhs of an index operator, including the closing bracket.
 
template<std::input_iterator It, std::sentinel_for< It > ItEnd>
std::unique_ptr< formula_nodeparse_ternary_argument_formula (It &it, ItEnd last)
 Parse the rhs of an index operator, including the closing bracket.
 
template<std::input_iterator It, std::sentinel_for< It > ItEnd>
std::unique_ptr< formula_nodeparse_call_argument_formula (It &it, ItEnd last)
 Parse the rhs of an index operator, including the closing bracket.
 
template<std::input_iterator It, std::sentinel_for< It > ItEnd>
bool parse_formula_is_at_end (It &it, ItEnd last)
 
std::unique_ptr< formula_nodeparse_formula_without_post_processing (std::string_view text)
 Parse an formula.
 
std::unique_ptr< formula_nodeparse_formula (std::string_view text, formula_post_process_context post_process_context={})
 Parse an formula.
 
constexpr std::string_view::const_iterator find_end_of_formula (std::string_view::const_iterator first, std::string_view::const_iterator last, std::string_view terminating_string) noexcept
 Find the end of an formula.
 
constexpr std::optional< floatmake_guideline (vertical_alignment alignment, float bottom, float top, float padding_bottom, float padding_top, float guideline_width)
 Create a guideline between two points.
 
constexpr std::optional< floatmake_guideline (horizontal_alignment alignment, float left, float right, float padding_left, float padding_right, float guideline_width=0.0f)
 Create a guideline between two points.
 
constexpr horizontal_alignment mirror (horizontal_alignment const &rhs) noexcept
 Mirror the horizontal alignment.
 
constexpr horizontal_alignment mirror (horizontal_alignment const &rhs, bool left_to_right) noexcept
 Mirror the horizontal alignment.
 
constexpr horizontal_alignment resolve (horizontal_alignment const &rhs, bool left_to_right) noexcept
 
constexpr horizontal_alignment resolve_mirror (horizontal_alignment const &rhs, bool left_to_right) noexcept
 
constexpr alignment operator| (horizontal_alignment lhs, vertical_alignment rhs) noexcept
 Combine vertical and horizontal alignment.
 
constexpr alignment operator| (vertical_alignment lhs, horizontal_alignment rhs) noexcept
 Combine vertical and horizontal alignment.
 
constexpr axis operator& (axis const &lhs, axis const &rhs) noexcept
 AND the axis.
 
constexpr axis operator| (axis const &lhs, axis const &rhs) noexcept
 OR the axis.
 
constexpr bool to_bool (axis const &rhs) noexcept
 Check if any of the axis are set.
 
constexpr matrix3 operator* (translate3 const &lhs, scale3 const &rhs) noexcept
 
constexpr matrix3 operator* (translate3 const &lhs, rotate3 const &rhs) noexcept
 
constexpr scale2 operator/ (extent2 const &lhs, extent2 const &rhs) noexcept
 
constexpr scale3 operator/ (extent3 const &lhs, extent3 const &rhs) noexcept
 
constexpr matrix2 operator* (matrix2 const &lhs, matrix2 const &rhs) noexcept
 Matrix/Matrix multiplication.
 
constexpr matrix3 operator* (matrix3 const &lhs, matrix3 const &rhs) noexcept
 Matrix/Matrix multiplication.
 
constexpr matrix2 operator* (translate2 const &lhs, matrix2 const &rhs) noexcept
 
constexpr matrix3 operator* (translate3 const &lhs, matrix3 const &rhs) noexcept
 
constexpr translate2 operator* (translate2 const &lhs, translate2 const &rhs) noexcept
 
constexpr translate3 operator* (translate3 const &lhs, translate3 const &rhs) noexcept
 
constexpr matrix2 operator* (translate2 const &lhs, scale2 const &rhs) noexcept
 
constexpr matrix2 operator* (translate2 const &lhs, rotate2 const &rhs) noexcept
 
constexpr matrix2 operator* (scale2 const &lhs, translate2 const &rhs) noexcept
 
constexpr matrix3 operator* (scale3 const &lhs, translate3 const &rhs) noexcept
 
constexpr scale2 operator* (scale2 const &lhs, scale2 const &rhs) noexcept
 
constexpr scale3 operator* (scale3 const &lhs, scale3 const &rhs) noexcept
 
float operator* (matrix2 const &lhs, float const &rhs) noexcept
 Transform a float by the scaling factor of the matrix.
 
float operator* (matrix3 const &lhs, float const &rhs) noexcept
 Transform a float by the scaling factor of the matrix.
 
constexpr float operator* (translate2 const &, float const &rhs) noexcept
 
constexpr float operator* (translate3 const &, float const &rhs) noexcept
 
constexpr float operator* (scale2 const &lhs, float const &rhs) noexcept
 
constexpr float operator* (scale3 const &lhs, float const &rhs) noexcept
 
constexpr float operator* (rotate2 const &, float const &rhs) noexcept
 
constexpr float operator* (rotate3 const &, float const &rhs) noexcept
 
constexpr vector2 operator* (matrix2 const &lhs, vector2 const &rhs) noexcept
 Transform a vector by the matrix.
 
constexpr vector2 operator* (translate2 const &, vector2 const &rhs) noexcept
 
constexpr vector2 operator* (translate3 const &, vector2 const &rhs) noexcept
 
constexpr vector2 operator* (scale2 const &lhs, vector2 const &rhs) noexcept
 
constexpr vector2 operator* (scale3 const &lhs, vector2 const &rhs) noexcept
 
constexpr vector3 operator* (matrix3 const &lhs, vector3 const &rhs) noexcept
 Transform a vector by the matrix.
 
constexpr vector3 operator* (translate3 const &, vector3 const &rhs) noexcept
 
constexpr vector3 operator* (scale3 const &lhs, vector3 const &rhs) noexcept
 
constexpr point2 operator* (matrix2 const &lhs, point2 const &rhs) noexcept
 Transform a point by the matrix.
 
constexpr point2 operator* (translate2 const &lhs, point2 const &rhs) noexcept
 
constexpr point2 operator* (scale2 const &lhs, point2 const &rhs) noexcept
 
constexpr point2 operator* (scale3 const &lhs, point2 const &rhs) noexcept
 
constexpr point3 operator* (matrix3 const &lhs, point3 const &rhs) noexcept
 Transform a point by the matrix.
 
constexpr point3 operator* (translate3 const &lhs, point3 const &rhs) noexcept
 
constexpr point3 operator* (scale3 const &lhs, point3 const &rhs) noexcept
 
constexpr extent2 operator* (transformer2 auto const &lhs, extent2 const &rhs) noexcept
 
constexpr extent3 operator* (transformer3 auto const &lhs, std::convertible_to< extent3 > auto const &rhs) noexcept
 
constexpr aarectangle operator* (translate2 const &lhs, aarectangle const &rhs) noexcept
 
constexpr aarectangle operator* (scale2 const &lhs, aarectangle const &rhs) noexcept
 Scale a rectangle around it's center.
 
constexpr rectangle operator* (transformer auto const &lhs, aarectangle const &rhs) noexcept
 Transform an axis-aligned rectangle by the matrix.
 
constexpr rectangle operator* (matrix2 const &lhs, aarectangle const &rhs) noexcept
 Transform an axis-aligned rectangle without rotation by the matrix.
 
constexpr rectangle full_mul (matrix2 const &lhs, aarectangle const &rhs) noexcept
 Transform an axis-aligned rectangle without rotation by the matrix.
 
constexpr aarectangle fast_mul (matrix2 const &lhs, aarectangle const &rhs) noexcept
 Transform an axis-aligned rectangle without rotation by the matrix.
 
constexpr rectangle operator* (transformer auto const &lhs, rectangle const &rhs) noexcept
 Transform a rectangle by the matrix.
 
constexpr quad operator* (transformer auto const &lhs, quad const &rhs) noexcept
 Transform a quad by the matrix.
 
constexpr circle operator* (transformer auto const &lhs, circle const &rhs) noexcept
 Transform a circle by the matrix.
 
constexpr line_segment operator* (transformer auto const &lhs, line_segment const &rhs) noexcept
 Transform a line-segment by the matrix.
 
constexpr corner_radii operator* (matrix3 const &lhs, corner_radii const &rhs) noexcept
 Transform a float by the scaling factor of the matrix.
 
template<typename Lhs , transformer Rhs>
requires requires(Lhs& a, Rhs const& b) { a = b * a; }
constexpr Lhsoperator*= (Lhs &lhs, Rhs const &rhs) noexcept
 Inplace geometric translation.
 
constexpr aarectangle fit (aarectangle const &bounds, aarectangle const &rectangle) noexcept
 
constexpr quad scale_from_center (quad const &lhs, scale2 const &rhs) noexcept
 scale the quad.
 
constexpr translate3 translate_z (float z) noexcept
 
point3 get_atlas_position (std::size_t page) noexcept
 Get the coordinate in the atlas from a page index.
 
point2 get_staging_position (const gfx_pipeline_image::paged_image &image, std::size_t page_index)
 Get the position in the staging texture map to copy from.
 
void render_doc_set_overlay (bool frameRate, bool frameNumber, bool captureList) noexcept
 
void start_render_doc () noexcept
 
template<typename T >
constexpr std::array< T, 2 > bezierToPolynomial (T P1, T P2) noexcept
 
template<typename T >
constexpr std::array< T, 3 > bezierToPolynomial (T P1, T C, T P2) noexcept
 
template<typename T >
constexpr std::array< T, 4 > bezierToPolynomial (T P1, T C1, T C2, T P2) noexcept
 
constexpr point2 bezierPointAt (point2 P1, point2 P2, float t) noexcept
 
constexpr point2 bezierPointAt (point2 P1, point2 C, point2 P2, float t) noexcept
 
constexpr point2 bezierPointAt (point2 P1, point2 C1, point2 C2, point2 P2, float t) noexcept
 
constexpr vector2 bezierTangentAt (point2 P1, point2 P2, float t) noexcept
 
constexpr vector2 bezierTangentAt (point2 P1, point2 C, point2 P2, float t) noexcept
 
constexpr vector2 bezierTangentAt (point2 P1, point2 C1, point2 C2, point2 P2, float t) noexcept
 
constexpr results< float, 1 > bezierFindT (float P1, float P2, float x) noexcept
 
constexpr results< float, 2 > bezierFindT (float P1, float C, float P2, float x) noexcept
 
hi_force_inline constexpr results< float, 3 > bezierFindT (float P1, float C1, float C2, float P2, float x) noexcept
 
hi_force_inline constexpr results< float, 1 > bezierFindTForNormalsIntersectingPoint (point2 P1, point2 P2, point2 P) noexcept
 Find t on the line P1->P2 which is closest to P.
 
hi_force_inline constexpr results< float, 3 > bezierFindTForNormalsIntersectingPoint (point2 P1, point2 C, point2 P2, point2 P) noexcept
 Find t on the curve P1->C->P2 which is closest to P.
 
constexpr results< float, 1 > bezierFindX (point2 P1, point2 P2, float y) noexcept
 
constexpr results< float, 2 > bezierFindX (point2 P1, point2 C, point2 P2, float y) noexcept
 
constexpr results< float, 3 > bezierFindX (point2 P1, point2 C1, point2 C2, point2 P2, float y) noexcept
 
float bezierFlatness (point2 P1, point2 P2) noexcept
 
float bezierFlatness (point2 P1, point2 C, point2 P2) noexcept
 
float bezierFlatness (point2 P1, point2 C1, point2 C2, point2 P2) noexcept
 
std::pair< point2, point2 > parallelLine (point2 P1, point2 P2, float distance) noexcept
 
std::optional< point2 > getIntersectionPoint (point2 A1, point2 A2, point2 B1, point2 B2) noexcept
 
std::optional< point2 > getExtrapolatedIntersectionPoint (point2 A1, point2 A2, point2 B1, point2 B2) noexcept
 
constexpr std::vector< bezier_curvemakeContourFromPoints (std::vector< bezier_point >::const_iterator begin, std::vector< bezier_point >::const_iterator end) noexcept
 Make a contour of Bezier curves from a list of points.
 
constexpr std::vector< bezier_curvemakeInverseContour (std::vector< bezier_curve > const &contour) noexcept
 Inverse a contour.
 
constexpr std::vector< bezier_curvemakeParallelContour (std::vector< bezier_curve > const &contour, float offset, hi::line_join_style line_join_style, float tolerance) noexcept
 
constexpr void fill (pixmap_span< uint8_t > image, std::vector< bezier_curve > const &curves) noexcept
 Fill a linear gray scale image by filling a curve with anti-aliasing.
 
constexpr void fill (pixmap_span< sdf_r8 > image, std::vector< bezier_curve > const &curves) noexcept
 Fill a signed distance field image from the given contour.
 
hi_export void composit (pixmap_span< sfloat_rgba16 > dst, hi::color color, graphic_path const &mask) noexcept
 Composit color onto the destination image where the mask is solid.
 
hi_export void composit (pixmap_span< sfloat_rgba16 > dst, graphic_path const &mask) noexcept
 Composit color onto the destination image where the mask is solid.
 
hi_export void fill (pixmap_span< sdf_r8 > dst, graphic_path const &path) noexcept
 Fill a signed distance field image from the given path.
 
std::string_view to_string (gui_event_type rhs) noexcept
 Convert a GUI event type to a string.
 
constexpr gui_event_type to_gui_event_type (std::string_view name) noexcept
 Convert a name to a GUI event type.
 
constexpr gui_event_variant to_gui_event_variant (gui_event_type type) noexcept
 Convert a gui event type, to an gui event variant.
 
void load_user_keyboard_bindings (std::filesystem::path const &path)
 
void load_system_keyboard_bindings (std::filesystem::path const &path)
 
generator< gui_eventtranslate_keyboard_event (gui_event event) noexcept
 
widget_intfget_if (widget_intf *start, widget_id id, bool include_invisible) noexcept
 
widget_intfget (widget_intf &start, widget_id id, bool include_invisible)
 
std::vector< language_tagvariants (std::vector< language_tag > languages)
 Add variants to the list of languages.
 
template<typename T , typename Allocator = std::allocator<std::remove_const_t<T>>>
 pixmap (pixmap_span< T > const &other, Allocator allocator=std::allocator{}) -> pixmap< std::remove_const_t< T > >
 
template<typename T , typename Allocator >
 pixmap_span (pixmap< T, Allocator > const &other) -> pixmap_span< T const >
 
template<typename T , typename Allocator >
 pixmap_span (pixmap< T, Allocator > &other) -> pixmap_span< T >
 
void add_translation (std::string_view msgid, language_tag language, std::vector< std::string > const &plural_forms) noexcept
 
void add_translations (po_translations const &po_translations) noexcept
 
void load_translations (std::filesystem::path path)
 
void load_translations ()
 
std::pair< std::string_view, language_tagget_translation (std::string_view msgid, long long n, std::vector< language_tag > const &languages) noexcept
 
constexpr long long get_first_integer_argument () noexcept
 
template<typename First , typename... Rest>
constexpr long long get_first_integer_argument (First const &first, Rest const &...rest) noexcept
 
template<size_t LookaheadCount, typename It , std::sentinel_for< It > ItEnd = std::default_sentinel_t>
auto make_lookahead_iterator (It first, ItEnd last=std::default_sentinel) noexcept
 Create a lookahead_iterator from a forward iterator.
 
template<size_t LookaheadCount, std::ranges::range Range>
auto make_lookahead_iterator (Range const &range) noexcept
 Create a lookahead_iterator from a forward iterator.
 
template<std::input_iterator It, std::sentinel_for< It > ItEnd>
hi_export constexpr std::string token_location (It &it, ItEnd last, std::string_view path) noexcept
 Create a location string for error messages.
 
template<std::input_iterator It>
hi_export constexpr std::string token_location (It &it, std::string_view path) noexcept
 
hi_export std::ostreamoperator<< (std::ostream &lhs, token const &rhs)
 
generator< std::filesystem::path > glob (glob_pattern pattern)
 Find paths on the filesystem that match the glob pattern.
 
generator< std::filesystem::path > glob (std::string_view pattern)
 Find paths on the filesystem that match the glob pattern.
 
generator< std::filesystem::path > glob (std::string pattern)
 Find paths on the filesystem that match the glob pattern.
 
generator< std::filesystem::path > glob (char const *pattern)
 Find paths on the filesystem that match the glob pattern.
 
generator< std::filesystem::path > glob (std::filesystem::path pattern)
 Find paths on the filesystem that match the glob pattern.
 
generator< std::filesystem::path > glob (path_location location, std::filesystem::path ref)
 Find paths on the filesystem that match the glob pattern.
 
generator< std::filesystem::path > glob (path_location location, std::string_view ref)
 Find paths on the filesystem that match the glob pattern.
 
generator< std::filesystem::path > glob (path_location location, std::string ref)
 Find paths on the filesystem that match the glob pattern.
 
generator< std::filesystem::path > glob (path_location location, char const *ref)
 Find paths on the filesystem that match the glob pattern.
 
generator< std::filesystem::path > get_paths (path_location location)
 Get a set of paths.
 
std::optional< std::filesystem::path > find_path (path_location location, std::filesystem::path const &ref) noexcept
 Find a path.
 
std::filesystem::path get_path (path_location location)
 Get the single and only path.
 
std::expected< std::string, std::error_codeget_user_setting_string (std::string_view key) noexcept
 
std::expected< long long, std::error_codeget_user_setting_integral (std::string_view key) noexcept
 
template<typename T >
std::expected< T, std::error_codeget_user_setting (std::string_view key) noexcept=delete
 Get a user-setting for the application.
 
std::error_code set_user_setting (std::string_view key, std::string_view value) noexcept
 Set a user-setting for the application.
 
std::error_code set_user_setting (std::string_view key, long long value) noexcept
 Set a user-setting for the application.
 
std::error_code delete_user_setting (std::string_view key) noexcept
 Delete a user-setting for the application.
 
std::error_code delete_user_settings () noexcept
 Delete all user-setting for the application.
 
template<>
std::expected< std::string, std::error_codeget_user_setting (std::string_view key) noexcept
 
std::string user_setting_registry_path ()
 
template<std::input_or_output_iterator It, std::sentinel_for< It > ItEnd>
requires std::same_as<typename It::value_type, grapheme>
hi_export constexpr It apply_markup (It first, ItEnd last, language_tag default_language=language_tag{"en-US"}, phrasing default_phrasing=phrasing::regular) noexcept
 Inplace-apply markup to a string of graphemes.
 
hi_export constexpr gstring apply_markup (gstring str, language_tag default_language=language_tag{"en-US"}, phrasing default_phrasing=phrasing::regular) noexcept
 Apply markup to a string of graphemes.
 
hi_export constexpr gstring apply_markup (std::string_view str, language_tag default_language=language_tag{"en-US"}, phrasing default_phrasing=phrasing::regular) noexcept
 Apply markup to a string of graphemes.
 
constexpr bool is_isolate_starter (unicode_bidi_class const &rhs) noexcept
 
constexpr bool is_isolate_formatter (unicode_bidi_class const &rhs) noexcept
 
constexpr bool is_NI (unicode_bidi_class const &rhs) noexcept
 
constexpr bool is_control (unicode_bidi_class const &rhs) noexcept
 
constexpr unicode_bidi_class unicode_bidi_class_from_string (std::string_view str) noexcept
 
constexpr unicode_bidi_class ucd_get_bidi_class (char32_t code_point) noexcept
 
constexpr char32_t ucd_get_bidi_mirroring_glyph (char32_t code_point) noexcept
 Get the bidi-mirroring-glyph for a code-point.
 
constexpr unicode_bidi_paired_bracket_type ucd_get_bidi_paired_bracket_type (char32_t code_point) noexcept
 
constexpr uint8_t ucd_get_canonical_combining_class (char32_t code_point) noexcept
 
constexpr std::optional< char32_tucd_get_composition (char32_t cp1, char32_t cp2) noexcept
 Get the composition info of two code-points.
 
constexpr ucd_decomposition_info ucd_get_decomposition (char32_t code_point) noexcept
 Get the decomposition info of a code-point.
 
constexpr unicode_east_asian_width ucd_get_east_asian_width (char32_t code_point) noexcept
 
constexpr bool is_LC (unicode_general_category const &rhs) noexcept
 
constexpr bool is_L (unicode_general_category const &rhs) noexcept
 
constexpr bool is_M (unicode_general_category const &rhs) noexcept
 
constexpr bool is_Mn_or_Mc (unicode_general_category const &rhs) noexcept
 
constexpr bool is_N (unicode_general_category const &rhs) noexcept
 
constexpr bool is_P (unicode_general_category const &rhs) noexcept
 
constexpr bool is_S (unicode_general_category const &rhs) noexcept
 
constexpr bool is_Z (unicode_general_category const &rhs) noexcept
 
constexpr bool is_Zp_or_Zl (unicode_general_category const &rhs) noexcept
 
constexpr bool is_C (unicode_general_category const &rhs) noexcept
 
constexpr bool is_visible (unicode_general_category const &rhs) noexcept
 
constexpr bool is_noncharacter (char32_t rhs) noexcept
 
constexpr unicode_general_category ucd_get_general_category (char32_t code_point) noexcept
 
constexpr unicode_grapheme_cluster_break ucd_get_grapheme_cluster_break (char32_t code_point) noexcept
 
constexpr unicode_lexical_class ucd_get_lexical_class (char32_t code_point) noexcept
 
constexpr unicode_line_break_class ucd_get_line_break_class (char32_t code_point) noexcept
 
constexpr bool operator== (iso_15924 const &lhs, unicode_script const &rhs) noexcept
 
constexpr iso_15924 ucd_get_script (char32_t code_point) noexcept
 
constexpr unicode_sentence_break_property ucd_get_sentence_break_property (char32_t code_point) noexcept
 
constexpr unicode_word_break_property ucd_get_word_break_property (char32_t code_point) noexcept
 
template<typename It , typename ItEnd >
constexpr std::vector< unicode_break_opportunity > unicode_grapheme_break (It first, ItEnd last) noexcept
 
constexpr plurality_mask operator| (plurality_mask const &lhs, plurality_mask const &rhs) noexcept
 Or plurality masks together.
 
constexpr plurality cardinal_plural (language_tag language, std::integral auto n) noexcept
 Get plural information of a number in a given language.
 
constexpr size_t cardinal_plural (language_tag language, std::integral auto n, size_t size) noexcept
 Get an index into message plural-variants for a given number.
 
hi_export constexpr bool bound_check (std::unsigned_integral auto index, std::unsigned_integral auto upper) noexcept
 Check if an unsigned index is less than the bound.
 
hi_export constexpr bool bound_check (std::unsigned_integral auto index, std::signed_integral auto upper) noexcept
 
hi_export constexpr bool bound_check (std::integral auto index, std::integral auto lower, std::integral auto upper) noexcept
 Check if an index is between the lower (inclusive) and upper (exclusive).
 
hi_export constexpr bool bound_check (std::integral auto index, bound_check_range_helper auto &&range) noexcept
 Check if an index is within a range.
 
bool get_bit (std::span< std::byte const > buffer, std::size_t &index) noexcept
 Read a single bit from span of bytes Bits are ordered LSB first.
 
std::size_t get_bits (std::span< std::byte const > buffer, std::size_t &index, std::size_t length) noexcept
 Read a bits from of span of bytes Bits are ordered LSB first.
 
template<typename T >
constexprcopy (T value) noexcept
 
template<typename Out , typename In >
constexpr Out up_cast (In *rhs) noexcept
 Cast a pointer to a class to its base class or itself.
 
template<typename Out >
constexpr Out up_cast (nullptr_t) noexcept
 Cast a nullptr to a class.
 
template<typename Out , typename In >
constexpr Out up_cast (In &rhs) noexcept
 Cast a reference to a class to its base class or itself.
 
template<typename Out , typename In >
constexpr Out down_cast (In *rhs) noexcept
 Cast a pointer to a class to its derived class or itself.
 
template<typename Out >
requires std::is_pointer_v<Out>
constexpr Out down_cast (nullptr_t) noexcept
 Cast a pointer to a class to its derived class or itself.
 
template<typename Out , typename In >
constexpr Out down_cast (In &rhs) noexcept
 Cast a reference to a class to its derived class or itself.
 
template<typename Out , std::same_as< Out > In>
constexpr Out wide_cast (In const &rhs) noexcept
 Cast to a type which can hold all values from the input type.
 
template<std::floating_point Out, std::floating_point In>
requires (not std::same_as<In, Out>)
constexpr Out wide_cast (In const &rhs) noexcept
 Cast a floating point number to a floating point type that is wider.
 
template<std::integral Out, std::integral In>
requires (not std::same_as<In, Out>)
constexpr Out wide_cast (In rhs) noexcept
 Cast a integer to an integer type which is wider.
 
template<std::floating_point Out, std::integral In>
constexpr Out wide_cast (In rhs) noexcept
 Cast a integer to an float type which is wider.
 
template<std::integral Out, arithmetic In>
constexpr Out saturate_cast (In rhs) noexcept
 Cast a numeric value to an integer saturating on overflow.
 
template<typename Out , std::same_as< Out > In>
constexpr bool can_narrow_cast (In const &rhs) noexcept
 Check if a value can be casted to a narrow type.
 
template<std::floating_point Out, std::floating_point In>
requires (not std::same_as<In, Out>)
constexpr bool can_narrow_cast (In const &rhs) noexcept
 Check if a value can be casted to a narrow type.
 
template<typename Out , std::same_as< Out > In>
constexpr Out narrow_cast (In const &rhs) noexcept
 Cast numeric values without loss of precision.
 
template<std::floating_point Out, std::floating_point In>
requires (not std::same_as<In, Out>)
constexpr Out narrow_cast (In const &rhs) noexcept
 Cast numeric values without loss of precision.
 
template<std::integral Out, std::floating_point In>
constexpr bool can_round_cast (In rhs) noexcept
 
template<std::integral Out, std::floating_point In>
constexpr bool can_floor_cast (In rhs) noexcept
 
template<std::integral Out, std::floating_point In>
constexpr bool can_ceil_cast (In rhs) noexcept
 
template<std::integral Out, std::floating_point In>
constexpr Out round_cast (In rhs) noexcept
 
template<std::integral Out, std::floating_point In>
constexpr Out floor_cast (In rhs) noexcept
 
template<std::integral Out, std::floating_point In>
constexpr Out ceil_cast (In rhs) noexcept
 
template<std::integral In>
constexpr std::make_unsigned_t< Into_unsigned (In rhs) noexcept
 Cast an integral to an unsigned integral of the same size.
 
template<std::integral In>
constexpr std::make_signed_t< Into_signed (In rhs) noexcept
 Cast an integral to an signed integral of the same size.
 
template<std::integral Out, std::integral In>
constexpr Out truncate (In rhs) noexcept
 Cast between integral types truncating or zero-extending the result.
 
template<std::integral Out, std::integral In>
constexpr Out char_cast (In rhs) noexcept
 Cast a character.
 
template<std::integral Out>
constexpr Out char_cast (std::byte rhs) noexcept
 Cast a character.
 
template<std::unsigned_integral OutType, std::unsigned_integral InType>
constexpr OutType low_bit_cast (InType value) noexcept
 Return the low half of the input value.
 
template<std::unsigned_integral OutType, std::unsigned_integral InType>
constexpr OutType high_bit_cast (InType value) noexcept
 Return the upper half of the input value.
 
template<std::unsigned_integral OutType, std::unsigned_integral InType>
constexpr OutType merge_bit_cast (InType hi, InType lo) noexcept
 Return the upper half of the input value.
 
template<typename T >
requires (requires(T&& x) { static_cast<bool>(std::forward<T>(x)); })
constexpr bool to_bool (T &&rhs) noexcept
 
template<typename T >
requires std::is_pointer_v<T>
to_ptr (std::intptr_t value) noexcept
 
template<typename T >
std::intptr_t to_int (T *ptr) noexcept
 
template<typename T , byte_like Byte>
copy_cv_t< T, Byte > & implicit_cast (std::span< Byte > bytes)
 
template<typename T , byte_like Byte>
std::span< copy_cv_t< T, Byte > > implicit_cast (std::span< Byte > bytes, size_t n)
 
template<typename T , byte_like Byte>
copy_cv_t< T, Byte > & implicit_cast (size_t &offset, std::span< Byte > bytes)
 
template<typename T , byte_like Byte>
std::span< copy_cv_t< T, Byte > > implicit_cast (size_t &offset, std::span< Byte > bytes, size_t n)
 
template<std::integral T>
std::string to_string (T const &value) noexcept
 Convert integer to string.
 
template<std::integral T>
from_string (std::string_view str, int base=10)
 Convert a string to an integer.
 
template<std::floating_point T>
from_string (std::string_view str)
 Convert a string to an floating point.
 
template<arithmetic Lhs, arithmetic Rhs>
constexpr auto three_way_compare (Lhs const &lhs, Rhs const &rhs) noexcept
 Safely compare two arithmetic values to each other.
 
bool prepare_debug_break () noexcept
 Prepare for breaking in the debugger.
 
hi_no_inline void prepare_debug_break (char const *msg) noexcept
 Prepare for breaking in the debugger.
 
template<std::integral T>
constexprlittle_to_native (T x)
 Convert an integral from little-to-native endian.
 
template<std::integral T>
constexprbig_to_native (T x)
 Convert an integral from big-to-native endian.
 
template<std::integral T>
constexprnative_to_little (T x)
 Convert an integral from native-to-little endian.
 
template<std::integral T>
constexprnative_to_big (T x)
 Convert an integral from native-to-big endian.
 
template<std::integral Out, std::endian Endian = std::endian::native, typename In >
constexpr Out load (In const *src) noexcept
 Unaligned Load of a numeric value from an array.
 
template<std::integral T, std::endian Endian = std::endian::native>
load (void const *src) noexcept
 Unaligned Load of a numeric value from a byte-like array.
 
template<std::integral T>
constexprload_le (T const *src) noexcept
 Load of a numeric value encoded in little-endian format.
 
template<std::integral T, byte_like B>
constexprload_le (B const *src) noexcept
 Unaligned load of a numeric value encoded in little-endian format.
 
template<std::integral T>
load_le (void const *src) noexcept
 Unaligned load of a numeric value encoded in little-endian format.
 
template<std::integral T>
constexprload_be (T const *src) noexcept
 Load of a numeric value encoded in big-endian format.
 
template<std::integral T, byte_like B>
constexprload_be (B const *src) noexcept
 Unaligned load of a numeric value encoded in byte-endian format.
 
template<std::integral T>
load_be (void const *src) noexcept
 Unaligned load of a numeric value encoded in byte-endian format.
 
template<unsigned int NumBits, byte_like B>
constexpr auto load_bits_be (B const *src, size_t bit_index) noexcept
 Unaligned load bits from a big-endian buffer at a bit-offset.
 
template<std::endian Endian = std::endian::native, std::integral T, byte_like B>
constexpr void store (T value, B const *dst) noexcept
 
template<std::endian Endian = std::endian::native, std::integral T>
constexpr void store (T value, void const *dst) noexcept
 
template<std::integral T, byte_like B>
constexpr void store_le (T value, B const *dst) noexcept
 
template<std::integral T>
void store_le (T value, void const *dst) noexcept
 
template<std::integral T, byte_like B>
constexpr void store_be (T value, B const *dst) noexcept
 
template<std::integral T>
void store_be (T value, void const *dst) noexcept
 
template<typename ValueType , typename NameType , typename... Rest>
 enum_metadata (ValueType const &, NameType const &, Rest const &...) -> enum_metadata< ValueType, enum_metadata_name_t< NameType >,(sizeof...(Rest)+2)/2 >
 
std::string get_last_error_message (uint32_t error_code)
 Get the error message from an error code.
 
std::string get_last_error_message ()
 Get the OS error message from the last error received on this thread.
 
template<fixed_string Tag>
consteval uint32_t fourcc () noexcept
 
template<fixed_string Tag>
consteval uint32_t operator""_fcc ()
 
template<std::size_t N>
 fixed_string (char const (&str)[N]) -> fixed_string< N - 1 >
 
template<std::invocable F>
 fixed_string (F const &f) -> fixed_string< std::ranges::size(F{}())>
 
constexpr std::size_t operator""_uz (unsigned long long lhs) noexcept
 
constexpr std::size_t operator""_zu (unsigned long long lhs) noexcept
 
constexpr std::ptrdiff_t operator""_z (unsigned long long lhs) noexcept
 
template<typename T , typename U >
bool compare_store (T &lhs, U &&rhs) noexcept
 Compare then store if there was a change.
 
template<typename T , typename U >
bool compare_store (std::atomic< T > &lhs, U &&rhs) noexcept
 Compare then store if there was a change.
 
template<class T , class U >
constexpr auto && forward_like (U &&x) noexcept
 
template<size_t Index, typename Type >
constexpr decltype(autoget_data_member (Type &&rhs) noexcept
 
template<typename T >
constexpr auto type_name () noexcept
 
std::chrono::time_zone constcached_current_zone () noexcept
 Cached current time zone.
 
template<typename Tag , typename T1 , typename Ratio1 , typename T2 , typename Ratio2 >
constexpr bool operator== (unit< Tag, T1, Ratio1 > const &lhs, unit< Tag, T2, Ratio2 > const &rhs) noexcept
 
template<typename Tag , typename T1 , typename Ratio1 , typename T2 , typename Ratio2 >
constexpr auto operator<=> (unit< Tag, T1, Ratio1 > const &lhs, unit< Tag, T2, Ratio2 > const &rhs) noexcept
 
template<typename Tag , typename T1 , typename Ratio1 , typename T2 , typename Ratio2 >
constexpr auto operator+ (unit< Tag, T1, Ratio1 > const &lhs, unit< Tag, T2, Ratio2 > const &rhs) noexcept
 
template<typename Tag , typename T1 , typename Ratio1 , typename T2 , typename Ratio2 >
constexpr auto operator- (unit< Tag, T1, Ratio1 > const &lhs, unit< Tag, T2, Ratio2 > const &rhs) noexcept
 
template<typename Tag , typename T1 , typename Ratio1 , typename T2 , typename Ratio2 >
constexpr auto operator/ (unit< Tag, T1, Ratio1 > const &lhs, unit< Tag, T2, Ratio2 > const &rhs) noexcept
 
template<std::integral T>
constexpr bool is_integral_value (T const &rhs) noexcept
 Check if a value is integral.
 
std::shared_ptr< button_delegatemake_default_radio_button_delegate (auto &&value, auto &&on_value) noexcept
 Make a shared pointer to a radio-button delegate.
 
std::shared_ptr< button_delegatemake_default_toggle_button_delegate (auto &&value, auto &&...args) noexcept
 Make a shared pointer to a toggle-button delegate.
 
std::shared_ptr< selection_delegatemake_default_selection_delegate (auto &&value, auto &&options, auto &&...off_value) noexcept
 Create a shared pointer to a default selection delegate.
 
std::shared_ptr< tab_delegatemake_default_tab_delegate (auto &&value) noexcept
 Create a shared pointer to a default tab delegate.
 
std::shared_ptr< text_delegatemake_default_text_delegate (auto &&value) noexcept
 Create a shared pointer to a default text delegate.
 
std::shared_ptr< text_field_delegatemake_default_text_field_delegate (auto &&value) noexcept
 Create a shared pointer to a default text delegate.
 
hi_export std::error_code make_error_code (win32_error code) noexcept
 
hi_export win32_error win32_GetLastError () noexcept
 
hi_export std::expected< std::string, win32_error > win32_WideCharToMultiByte (std::wstring_view s, unsigned int code_page=CP_UTF8, uint32_t flags=0) noexcept
 Convert a win32-API compatible std::wstring to a multi-byte std::string.
 
hi_export std::expected< std::wstring, win32_error > win32_MultiByteToWideChar (std::string_view s, unsigned int code_page=CP_UTF8, uint32_t flags=0) noexcept
 Convert a win32-API compatible std::wstring to a multi-byte std::string.
 
hi_export std::expected< std::vector< std::string >, win32_error > win32_MultiSZToStringVector (wchar_t const *first, wchar_t const *last) noexcept
 Convert a win32 zero terminated list of zero terminated strings.
 
hi_export std::expected< std::string, win32_error > win32_FormatMessage (win32_error error_code) noexcept
 
hi_export std::expected< std::string, win32_error > win32_GetUserDefaultLocaleName () noexcept
 

Variables

hi_export constexpr auto audio_device_state_metadata
 
hi_export constexpr auto audio_direction_metadata
 
hi_export constexpr auto common_sample_rates
 
hi_export constexpr auto surround_mode_icons
 
hi_export constexpr auto surround_mode_names
 
hi_export constexpr auto surround_mode_short_names
 
hi_export constexpr auto surround_mode_speaker_mappings
 
template<typename T >
hi_export constexpr bool is_datum_type_v = is_datum_type<T>::value
 
constexpr matrix3 Rec2020_to_XYZ = color_primaries_to_RGBtoXYZ(0.3127f, 0.3290f, 0.708f, 0.292f, 0.170f, 0.797f, 0.131f, 0.046f)
 Rec.2020 to XYZ color space conversion matrix.
 
constexpr matrix3 XYZ_to_Rec2020 = ~Rec2020_to_XYZ
 XYZ to Rec.2020 color space conversion matrix.
 
constexpr matrix3 Rec2100_to_XYZ = Rec2020_to_XYZ
 Rec.2100 to XYZ color space conversion matrix.
 
constexpr matrix3 XYZ_to_Rec2100 = XYZ_to_Rec2020
 XYZ to Rec.2100 color space conversion matrix.
 
constexpr auto semantic_color_metadata
 
constexpr matrix3 sRGB_to_XYZ
 Matrix to convert sRGB to XYZ.
 
constexpr matrix3 XYZ_to_sRGB
 Matrix to convert XYZ to sRGB.
 
std::atomic< global_state_typeglobal_state = global_state_type::log_level_default
 The global state of the hikogui framework.
 
std::terminate_handler old_terminate_handler
 The old terminate handler.
 
constexpr auto font_style_metadata
 
template<typename T >
constexpr bool transform2_v = transform2<T>::value
 
template<typename T >
constexpr bool transform3_v = transform3<T>::value
 
voidrender_doc_api = nullptr
 
constexpr auto gui_event_type_metadata
 
std::unordered_map< translation_key, std::vector< std::string > > translations
 
std::atomic< booltranslations_loaded = false
 
template<lexer_config Config>
constexpr auto lexer = detail::lexer<Config>()
 
log log_global
 
std::atomic< char const * > debug_message = nullptr
 Message to show when the application is terminated because of a debug_abort.
 
constexpr auto intrinsic = intrinsic_t{}
 
constexpr auto policy_metadata
 
template<typename T >
constexpr size_t number_of_data_members_v = number_of_data_members<T>::value
 
hi_export auto global_win32_error_category = win32_error_category{}
 

Detailed Description

The HikoGUI API version 1.

Typedef Documentation

◆ dips

Device Independent Pixels: 1/96 inch.

◆ em_quads

Em-quad: A font's line-height.

◆ inches

Inch: 254 mm.

◆ pixels

A physical pixel on a display.

◆ points

Points: 1/72 inch.

◆ ssize_t

Signed size/index into an array.

Enumeration Type Documentation

◆ border_side

The side where the border is drawn.

Enumerator
on 

The border is drawn on the edge of a quad.

inside 

The border is drawn inside the edge of a quad.

outside 

The border is drawn outside the edge of a quad.

◆ font_style

The different styles a font-family comes with.

Either normal, italic or oblique. Although technically there is a difference between italic and oblique this difference is small and font-families rarely include both those styles; HikoGUI will treat italic and oblique as the same.

Enumerator
normal 

A font that is normal, non-italic.

italic 

A font that is italic.

oblique 

A font that is oblique.

◆ plurality_mask

enum class hi::v1::plurality_mask : uint8_t
strong

A mask of plurality values that this language supports.

Enumerator
zero 

The number was zero, and this means something in the current language.

one 

The number was one, and this means something in the current language.

two 

The number was two, and this means something in the current language.

few 

The number is part of few, and this means something in the current language.

many 

The number is part of many, and this means something in the current language.

other 

Any other number, every language will have at least this.

◆ plurality_value

The plurality value of a cardinal or ordinal number.

Enumerator
zero 

The number was zero, and this means something in the current language.

one 

The number was one, and this means something in the current language.

two 

The number was two, and this means something in the current language.

few 

The number is part of few, and this means something in the current language.

many 

The number is part of many, and this means something in the current language.

other 

Any other number, every language will have at least this.

◆ policy

The performance policy to use.

This policy is used as an argument when initializing a system to select the correct parameters to satisfy the given policy.

◆ unicode_bidi_class

Bidirectional class Unicode Standard Annex #9: https://unicode.org/reports/tr9/.

◆ unicode_decomposition_type

The decomposition type determines if a code-point should be decomposed canonically or for a compatibility.

◆ unicode_line_break_class

Unicode line break class.

See "AUX14: Unicode line break algorithm" http://unicode.org/reports/tr14/

Function Documentation

◆ apply_markup() [1/3]

hi_export constexpr gstring hi::v1::apply_markup ( gstring str,
language_tag default_language = language_tag{"en-US"},
phrasing default_phrasing = phrasing::regular )
constexprnoexcept

Apply markup to a string of graphemes.

After the markup is applied the range is either the same or shorter.

Parameters
strA grapheme string to apply the markup to.
Returns
A grapheme string with the markup applied.

◆ apply_markup() [2/3]

template<std::input_or_output_iterator It, std::sentinel_for< It > ItEnd>
requires std::same_as<typename It::value_type, grapheme>
hi_export constexpr It hi::v1::apply_markup ( It first,
ItEnd last,
language_tag default_language = language_tag{"en-US"},
phrasing default_phrasing = phrasing::regular )
constexprnoexcept

Inplace-apply markup to a string of graphemes.

After the markup is applied the range is either the same or shorter.

Parameters
firstAn iterator to the first grapheme.
lastAn iterator beyond the last grapheme.
Returns
The new end iterator after applying the markup.

◆ apply_markup() [3/3]

hi_export constexpr gstring hi::v1::apply_markup ( std::string_view str,
language_tag default_language = language_tag{"en-US"},
phrasing default_phrasing = phrasing::regular )
constexprnoexcept

Apply markup to a string of graphemes.

After the markup is applied the range is either the same or shorter.

Parameters
strA UTF-8 string to apply the markup to.
Returns
A grapheme string with the markup applied.

◆ audio_devices()

template<audio_device_filter... Filters>
generator< audio_device & > hi::v1::audio_devices ( Filters &&... filters)
noexcept

Get audio devices matching the filter arguments.

Parameters
filtersA list of filters that the audio devices need to match with. Filters are of the types hi::audio_device_state and hi::audio_direction.
Returns
A list of audio devices matching the filters.

◆ bezierFindTForNormalsIntersectingPoint() [1/2]

hi_force_inline constexpr results< float, 3 > hi::v1::bezierFindTForNormalsIntersectingPoint ( point2 P1,
point2 C,
point2 P2,
point2 P )
constexprnoexcept

Find t on the curve P1->C->P2 which is closest to P.

Used for finding the shortest distance from a point to a curve. The shortest vector from a curve to a point is a normal.

◆ bezierFindTForNormalsIntersectingPoint() [2/2]

hi_force_inline constexpr results< float, 1 > hi::v1::bezierFindTForNormalsIntersectingPoint ( point2 P1,
point2 P2,
point2 P )
constexprnoexcept

Find t on the line P1->P2 which is closest to P.

Used for finding the shortest distance from a point to a curve. The shortest vector from a curve to a point is a normal.

◆ bezierFindX() [1/3]

constexpr results< float, 2 > hi::v1::bezierFindX ( point2 P1,
point2 C,
point2 P2,
float y )
constexprnoexcept

Find x for y on a bezier curve. In a contour, multiple bezier curves are attached to each other on the anchor point. We don't want duplicate results when passing y that is at the same height as an anchor point. So we compare with less than to the end-anchor point to remove it from the result.

◆ bezierFindX() [2/3]

constexpr results< float, 3 > hi::v1::bezierFindX ( point2 P1,
point2 C1,
point2 C2,
point2 P2,
float y )
constexprnoexcept

Find x for y on a bezier curve. In a contour, multiple bezier curves are attached to each other on the anchor point. We don't want duplicate results when passing y that is at the same height as an anchor point. So we compare with less than to the end-anchor point to remove it from the result.

◆ bezierFindX() [3/3]

constexpr results< float, 1 > hi::v1::bezierFindX ( point2 P1,
point2 P2,
float y )
constexprnoexcept

Find x for y on a bezier curve. In a contour, multiple bezier curves are attached to each other on the anchor point. We don't want duplicate results when passing y that is at the same height as an anchor point. So we compare with less than to the end-anchor point to remove it from the result.

◆ bezierFlatness() [1/3]

float hi::v1::bezierFlatness ( point2 P1,
point2 C,
point2 P2 )
inlinenoexcept

Return the flatness of a curve.

Returns
1.0 when completely flat, < 1.0 when curved.

◆ bezierFlatness() [2/3]

float hi::v1::bezierFlatness ( point2 P1,
point2 C1,
point2 C2,
point2 P2 )
inlinenoexcept

Return the flatness of a curve.

Returns
1.0 when completely flat, < 1.0 when curved.

◆ bezierFlatness() [3/3]

float hi::v1::bezierFlatness ( point2 P1,
point2 P2 )
inlinenoexcept

Return the flatness of a curve.

Returns
1.0 when completely flat, < 1.0 when curved.

◆ big_to_native()

template<std::integral T>
constexpr T hi::v1::big_to_native ( T x)
constexpr

Convert an integral from big-to-native endian.

◆ bound_check() [1/3]

hi_export constexpr bool hi::v1::bound_check ( std::integral auto index,
bound_check_range_helper auto && range )
constexprnoexcept

Check if an index is within a range.

Parameters
indexThe index to check.
rangeThe range object, such as a vector or array, which has a std::ranges::size().
Returns
true If index natural and below the size of the array.

◆ bound_check() [2/3]

hi_export constexpr bool hi::v1::bound_check ( std::integral auto index,
std::integral auto lower,
std::integral auto upper )
constexprnoexcept

Check if an index is between the lower (inclusive) and upper (exclusive).

Note
It is undefined behavior when upper is lower than lower.
Parameters
indexThe index to check.
lowerThe lower bound.
upperThe upper bound.
Returns
true If index is greater or equal to lower bound and index is less than upper bound.

◆ bound_check() [3/3]

hi_export constexpr bool hi::v1::bound_check ( std::unsigned_integral auto index,
std::unsigned_integral auto upper )
constexprnoexcept

Check if an unsigned index is less than the bound.

Parameters
indexThe unsigned index to check.
upperThe upper bound.
Returns
true If index is less than the upper bound.

◆ cached_current_zone()

std::chrono::time_zone const & hi::v1::cached_current_zone ( )
inlinenoexcept

Cached current time zone.

std::chrono::current_zone() is really slow, this keeps a cache.

The cached current time zone is not updated when the time zone is modified on the system.

◆ can_narrow_cast() [1/2]

template<typename Out , std::same_as< Out > In>
constexpr bool hi::v1::can_narrow_cast ( In const & rhs)
constexprnoexcept

Check if a value can be casted to a narrow type.

Template Parameters
OutThe output type.
Parameters
rhsThe input value to cast.
Returns
true if the value can be casted.

◆ can_narrow_cast() [2/2]

template<std::floating_point Out, std::floating_point In>
requires (not std::same_as<In, Out>)
constexpr bool hi::v1::can_narrow_cast ( In const & rhs)
constexprnoexcept

Check if a value can be casted to a narrow type.

Template Parameters
OutThe output type.
Parameters
rhsThe input value to cast.
Returns
true if the value can be casted.

◆ cardinal_plural() [1/2]

constexpr plurality hi::v1::cardinal_plural ( language_tag language,
std::integral auto n )
constexprnoexcept

Get plural information of a number in a given language.

Parameters
languageThe language.
nThe number to know the plurality for.
Returns
plurality information.

◆ cardinal_plural() [2/2]

constexpr size_t hi::v1::cardinal_plural ( language_tag language,
std::integral auto n,
size_t size )
constexprnoexcept

Get an index into message plural-variants for a given number.

Parameters
languageThe language the messages are in.
nThe number to format in the message.
sizeThe number of message plural-variants. Must be larger than 0.
Returns
An index into the plural-variants, if the number of variants is less than plurality suggest then zero is returned.

◆ char_cast() [1/2]

template<std::integral Out, std::integral In>
constexpr Out hi::v1::char_cast ( In rhs)
constexprnoexcept

Cast a character.

Both the input and output types are interpreted as unsigned values, even if they are signed values. For example char may be either signed or unsigned, but you have to treat those as unsigned values.

Note
rhs value after casting, must fit in the output type.
Parameters
rhsThe value of the character.
Returns
The casted value.

◆ char_cast() [2/2]

template<std::integral Out>
constexpr Out hi::v1::char_cast ( std::byte rhs)
constexprnoexcept

Cast a character.

Both the input and output types are interpreted as unsigned values, even if they are signed values. For example char may be either signed or unsigned, but you have to treat those as unsigned values.

Note
rhs value after casting, must fit in the output type.
Parameters
rhsThe value of the character.
Returns
The casted value.

◆ compare_store() [1/2]

template<typename T , typename U >
bool hi::v1::compare_store ( std::atomic< T > & lhs,
U && rhs )
noexcept

Compare then store if there was a change.

Note
This atomic version does an lhs.exchange(rhs, std::memory_order_relaxed)
Returns
true if a store was executed.

◆ compare_store() [2/2]

template<typename T , typename U >
bool hi::v1::compare_store ( T & lhs,
U && rhs )
noexcept

Compare then store if there was a change.

Returns
true if a store was executed.

◆ composit() [1/2]

hi_export void hi::v1::composit ( pixmap_span< sfloat_rgba16 > dst,
graphic_path const & mask )
inlinenoexcept

Composit color onto the destination image where the mask is solid.

Parameters
dstdestination image.
maskmask where the color will be composited on the destination.

◆ composit() [2/2]

hi_export void hi::v1::composit ( pixmap_span< sfloat_rgba16 > dst,
hi::color color,
graphic_path const & mask )
inlinenoexcept

Composit color onto the destination image where the mask is solid.

Parameters
dstdestination image.
colorcolor to composit.
maskmask where the color will be composited on the destination.

◆ delete_user_setting()

std::error_code hi::v1::delete_user_setting ( std::string_view key)
inlinenoexcept

Delete a user-setting for the application.

Keys starting with two consequitive underscores are reserved by the HikoGUI library.

Parameters
keyA key for the user setting.
Exceptions
std::invalid_argumentWhen the key is not valid.
std::out_of_rangeif the value in the default does not fit in the return value.

◆ delete_user_settings()

std::error_code hi::v1::delete_user_settings ( )
inlinenoexcept

Delete all user-setting for the application.

◆ dialog()

hi_export bool hi::v1::dialog ( dialog_type type,
std::string_view title,
std::string_view text )
inline

Display a modal dialog.

You should never display a modal dialog unless it is absolutely necessary for the user to respond right now, or on a catastrophic failure.

Exceptions
cancel_errorWhen the user presses "cancel".
Returns
True when the user presses "ok" or "yes"

◆ down_cast() [1/3]

template<typename Out , typename In >
constexpr Out hi::v1::down_cast ( In & rhs)
constexprnoexcept

Cast a reference to a class to its derived class or itself.

Note
It is undefined behaviour if the argument is not of type Out.
Parameters
rhsA reference to an object that is of type Out.
Returns
A reference to the same object with a new type.

◆ down_cast() [2/3]

template<typename Out , typename In >
constexpr Out hi::v1::down_cast ( In * rhs)
constexprnoexcept

Cast a pointer to a class to its derived class or itself.

Note
It is undefined behavior if the argument is not of type Out.
Parameters
rhsA pointer to an object that is of type Out. Or a nullptr which will be passed through.
Returns
A pointer to the same object with a new type.

◆ down_cast() [3/3]

template<typename Out >
requires std::is_pointer_v<Out>
constexpr Out hi::v1::down_cast ( nullptr_t )
constexprnoexcept

Cast a pointer to a class to its derived class or itself.

Returns
A pointer to the same object with a new type.

◆ fast_mul()

constexpr aarectangle hi::v1::fast_mul ( matrix2 const & lhs,
aarectangle const & rhs )
constexprnoexcept

Transform an axis-aligned rectangle without rotation by the matrix.

Note
It is undefined behaviour to perspective, rotate or skew transform a rectangle
Parameters
rhsThe axis-aligned rectangle to be transformed.
Returns
The transformed rectangle

◆ fill() [1/3]

hi_export void hi::v1::fill ( pixmap_span< sdf_r8 > dst,
graphic_path const & path )
inlinenoexcept

Fill a signed distance field image from the given path.

Parameters
dstAn signed-distance-field which show distance toward the closest curve
pathA path.

◆ fill() [2/3]

constexpr void hi::v1::fill ( pixmap_span< sdf_r8 > image,
std::vector< bezier_curve > const & curves )
constexprnoexcept

Fill a signed distance field image from the given contour.

Parameters
imageAn signed-distance-field which show distance toward the closest curve
curvesAll curves of path, in no particular order.

◆ fill() [3/3]

constexpr void hi::v1::fill ( pixmap_span< uint8_t > image,
std::vector< bezier_curve > const & curves )
constexprnoexcept

Fill a linear gray scale image by filling a curve with anti-aliasing.

Parameters
imageAn alpha-channel image to make opaque where pixel is inside the contours
curvesAll curves of path, in no particular order.

◆ find_end_of_formula()

constexpr std::string_view::const_iterator hi::v1::find_end_of_formula ( std::string_view::const_iterator first,
std::string_view::const_iterator last,
std::string_view terminating_string )
constexprnoexcept

Find the end of an formula.

This function will track nested brackets and strings, until the terminating_character is found.

Parameters
firstIterator to the first character of the formula.
lastIterator to beyond the last character of the text.
terminating_stringThe string to find, which is not part of the formula.
Returns
Iterator to the terminating character if found, or last.

◆ from_string() [1/2]

template<std::floating_point T>
T hi::v1::from_string ( std::string_view str)

Convert a string to an floating point.

This function bypasses std::locale

Template Parameters
TThe integer type.
Parameters
strThe string is an integer.
Returns
The integer converted from a string.

◆ from_string() [2/2]

template<std::integral T>
T hi::v1::from_string ( std::string_view str,
int base = 10 )

Convert a string to an integer.

This function bypasses std::locale

Template Parameters
TThe integer type.
Parameters
strThe string is an integer.
baseThe base radix of the string encoded integer.
Returns
The integer converted from a string.

◆ full_mul()

constexpr rectangle hi::v1::full_mul ( matrix2 const & lhs,
aarectangle const & rhs )
constexprnoexcept

Transform an axis-aligned rectangle without rotation by the matrix.

Note
It is undefined behaviour to perspective, rotate or skew transform a rectangle
Parameters
rhsThe axis-aligned rectangle to be transformed.
Returns
The transformed rectangle

◆ get_atlas_position()

point3 hi::v1::get_atlas_position ( std::size_t page)
inlinenoexcept

Get the coordinate in the atlas from a page index.

Parameters
pagenumber in the atlas
Returns
x, y pixel coordinate in an atlasTexture and z the atlasTextureIndex. Inside the border.

◆ get_bit()

bool hi::v1::get_bit ( std::span< std::byte const > buffer,
std::size_t & index )
inlinenoexcept

Read a single bit from span of bytes Bits are ordered LSB first.

Parameters
bufferThe buffer of bytes to extract the bit from.
indexThe index of the bit in the byte span.

◆ get_bits()

std::size_t hi::v1::get_bits ( std::span< std::byte const > buffer,
std::size_t & index,
std::size_t length )
inlinenoexcept

Read a bits from of span of bytes Bits are ordered LSB first.

Bits are copied as if the byte array is layed out from right to left, example:

7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | byte 1 | byte 0 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ : : index=6 +-+-+-+-+-+ length=5 | Return | +-+-+-+-+-+ 4 3 2 1 0

Parameters
bufferThe buffer of bytes to extract bits from.
indexThe index of the bit in the byte span.
lengththe number of bits to return.

◆ get_last_error_message() [1/2]

std::string hi::v1::get_last_error_message ( )
inline

Get the OS error message from the last error received on this thread.

Returns
A formatted message.

◆ get_last_error_message() [2/2]

std::string hi::v1::get_last_error_message ( uint32_t error_code)
inline

Get the error message from an error code.

Parameters
error_codeThe error code returned by an os call.
Returns
A formatted message.

◆ get_staging_position()

point2 hi::v1::get_staging_position ( const gfx_pipeline_image::paged_image & image,
std::size_t page_index )
inline

Get the position in the staging texture map to copy from.

Parameters
imageThe image
page_indexThe index of the page of the image.
Returns
The position into the staging map.

◆ get_user_setting()

template<typename T >
std::expected< T, std::error_code > hi::v1::get_user_setting ( std::string_view key)
inlinedeletenoexcept

Get a user-setting for the application.

Keys starting with two consequitive underscores are reserved by the HikoGUI library.

Parameters
keyA key for the user setting.
Returns
The value from the user-settings.
Return values
std::nulloptThe key was not found in the user-settings.
Exceptions
std::invalid_argumentWhen the key is not valid.
std::out_of_rangeif the value in the default does not fit in the return value.

◆ get_user_setting_string()

std::expected< std::string, std::error_code > hi::v1::get_user_setting_string ( std::string_view name)
inlinenoexcept
Returns
A string value, or std::errc::file_not_found if entry not found, or other error.

◆ getExtrapolatedIntersectionPoint()

std::optional< point2 > hi::v1::getExtrapolatedIntersectionPoint ( point2 A1,
point2 A2,
point2 B1,
point2 B2 )
inlinenoexcept

Find the intersect points between two line segments.

◆ getIntersectionPoint()

std::optional< point2 > hi::v1::getIntersectionPoint ( point2 A1,
point2 A2,
point2 B1,
point2 B2 )
inlinenoexcept

Find the intersect points between two line segments.

◆ high_bit_cast()

template<std::unsigned_integral OutType, std::unsigned_integral InType>
constexpr OutType hi::v1::high_bit_cast ( InType value)
constexprnoexcept

Return the upper half of the input value.

◆ inflate()

hi_export bstring hi::v1::inflate ( std::span< std::byte const > bytes,
std::size_t & offset,
std::size_t max_size = 0x0100'0000 )
inline

Inflate compressed data using the deflate algorithm bytes should include at least 32 bit of trailer, for the overflow check which will slightly overrun the actual compressed data for performance reasons.

  • gzip has a CRC32+ISIZE trailer. Since gzip has no end-of-segment indicator, we need to include the trailer in the byte array passed to inflate anyway.
  • zlib has a 32 bit check value. Since zlib has no end-of-segment indicator, we need to include the trailer in the byte array passed to inflate anyway.
  • png IDAT chunks include the full zlib-format, including the 32 bit check value.

◆ is_integral_value()

template<std::integral T>
constexpr bool hi::v1::is_integral_value ( T const & rhs)
constexprnoexcept

Check if a value is integral.

Parameters
rhsA integral value.
Returns
Always true.
Parameters
rhsA floating point value.
Returns
True if the floating point value is an integer.

◆ little_to_native()

template<std::integral T>
constexpr T hi::v1::little_to_native ( T x)
constexpr

Convert an integral from little-to-native endian.

◆ load() [1/2]

template<std::integral Out, std::endian Endian = std::endian::native, typename In >
constexpr Out hi::v1::load ( In const * src)
constexprnoexcept

Unaligned Load of a numeric value from an array.

Template Parameters
OutThe type of the integer or floating point value to load.
EndianThe endianness of the data.
Parameters
srcA pointer to byte-like array.
Returns
The numeric value after endian conversion.

◆ load() [2/2]

template<std::integral T, std::endian Endian = std::endian::native>
T hi::v1::load ( void const * src)
inlinenoexcept

Unaligned Load of a numeric value from a byte-like array.

Template Parameters
TThe type of the integer or floating point value to load.
EndianThe endianness of the data.
Parameters
srcA pointer to memory.
Returns
The numeric value after endian conversion.

◆ load_be() [1/3]

template<std::integral T, byte_like B>
constexpr T hi::v1::load_be ( B const * src)
constexprnoexcept

Unaligned load of a numeric value encoded in byte-endian format.

Template Parameters
TThe type of the integer or floating point value to load.
Parameters
srcA pointer to a byte like buffer.
Returns
The numeric value after endian conversion.

◆ load_be() [2/3]

template<std::integral T>
constexpr T hi::v1::load_be ( T const * src)
constexprnoexcept

Load of a numeric value encoded in big-endian format.

Template Parameters
TThe type of the integer or floating point value to load.
Parameters
srcA pointer to a byte like memory.
Returns
The numeric value after endian conversion.

◆ load_be() [3/3]

template<std::integral T>
T hi::v1::load_be ( void const * src)
inlinenoexcept

Unaligned load of a numeric value encoded in byte-endian format.

Template Parameters
TThe type of the integer or floating point value to load.
Parameters
srcA pointer to memory.
Returns
The numeric value after endian conversion.

◆ load_bits_be()

template<unsigned int NumBits, byte_like B>
constexpr auto hi::v1::load_bits_be ( B const * src,
size_t bit_index )
constexprnoexcept

Unaligned load bits from a big-endian buffer at a bit-offset.

To create the packed byte array from values.

  • Shift each value into a bigint object.
  • Shift by an aditional 0 to 7 bits to align the first value to the MSB of a byte.
  • Shift by an aditional 128 bits for the over-read extension.
  • Make a byte buffer with how many bits where added to the bigint.
  • Reverse iterate over the bytes in the buffer and shift out bytes from the bigint.
Note
The src buffer should be extented by 128-bits to allow over-reading beyond the end of the data.
Template Parameters
NumBitsthe number of bits to read.
Parameters
srcA byte-like buffer to load bits from.
bit_indexThe bit offset into the buffer. 0 is the 7th bit of the 1st byte in src.
Returns
The loaded bits in the least-signigicant-bits of an unsigned integer type that can hold the bits requested.

◆ load_le() [1/3]

template<std::integral T, byte_like B>
constexpr T hi::v1::load_le ( B const * src)
constexprnoexcept

Unaligned load of a numeric value encoded in little-endian format.

Template Parameters
TThe type of the integer or floating point value to load.
Parameters
srcA pointer to a byte like memory.
Returns
The numeric value after endian conversion.

◆ load_le() [2/3]

template<std::integral T>
constexpr T hi::v1::load_le ( T const * src)
constexprnoexcept

Load of a numeric value encoded in little-endian format.

Template Parameters
TThe type of the integer or floating point value to load.
Parameters
srcA pointer to the numeric value.
Returns
The numeric value after endian conversion.

◆ load_le() [3/3]

template<std::integral T>
T hi::v1::load_le ( void const * src)
inlinenoexcept

Unaligned load of a numeric value encoded in little-endian format.

Template Parameters
TThe type of the integer or floating point value to load.
Parameters
srcA pointer to memory.
Returns
The numeric value after endian conversion.

◆ low_bit_cast()

template<std::unsigned_integral OutType, std::unsigned_integral InType>
constexpr OutType hi::v1::low_bit_cast ( InType value)
constexprnoexcept

Return the low half of the input value.

◆ make_cstr() [1/2]

hi_export char * hi::v1::make_cstr ( char const * c_str,
std::size_t size = -1 )
inlinenoexcept

Copy a std::string to new memory.

The caller will have to delete [] return value.

◆ make_cstr() [2/2]

hi_export char * hi::v1::make_cstr ( std::string const & s)
inlinenoexcept

Copy a std::string to new memory.

The caller will have to delete [] return value.

◆ make_lookahead_iterator() [1/2]

template<size_t LookaheadCount, typename It , std::sentinel_for< It > ItEnd = std::default_sentinel_t>
auto hi::v1::make_lookahead_iterator ( It first,
ItEnd last = std::default_sentinel )
noexcept

Create a lookahead_iterator from a forward iterator.

Template Parameters
LookaheadCountNumber of items to lookahead, including the iterator itself. Must be a power-of-two.
Parameters
firstA forward iterator.
lastA sentinel or end-iterator.
Returns
A lookahead iterator.

◆ make_lookahead_iterator() [2/2]

template<size_t LookaheadCount, std::ranges::range Range>
auto hi::v1::make_lookahead_iterator ( Range const & range)
noexcept

Create a lookahead_iterator from a forward iterator.

Template Parameters
LookaheadCountNumber of items to lookahead, including the iterator itself. Must be a power-of-two.
Parameters
firstA forward iterator.
lastA sentinel or end-iterator.
Returns
A lookahead iterator.

◆ makeContourFromPoints()

constexpr std::vector< bezier_curve > hi::v1::makeContourFromPoints ( std::vector< bezier_point >::const_iterator begin,
std::vector< bezier_point >::const_iterator end )
constexprnoexcept

Make a contour of Bezier curves from a list of points.

The contour is also colorized to be used for creating multichannel-signed-distance-fields.

Parameters
firstIterator to the first point in a list
lastIterator one beyond the last point in a list

◆ makeInverseContour()

constexpr std::vector< bezier_curve > hi::v1::makeInverseContour ( std::vector< bezier_curve > const & contour)
constexprnoexcept

Inverse a contour.

Reverse the direction of the whole contour, turning it inside out. This is useful for creating a stroke, by inverting the inner offset contour.

Parameters
contourcontour to reverse.
Returns
the reversed contour.

◆ makeParallelContour()

constexpr std::vector< bezier_curve > hi::v1::makeParallelContour ( std::vector< bezier_curve > const & contour,
float offset,
hi::line_join_style line_join_style,
float tolerance )
constexprnoexcept

Make a contour of Bezier curves from another contour of Bezier curves at a offset. Make a new contour made out of line-segments offset from the original curve. After offsetting the line segment the line segments are properly cut or extended to cover all intersections and gaps.

Parameters
contoura list of bezier curve segments forming a closed contour.
offsetpositive means the parallel contour will be on the starboard side of the given contour.
line_join_stylehow the gaps between line segments are joined together.
toleranceto how curved the new contour should look.

◆ merge_bit_cast()

template<std::unsigned_integral OutType, std::unsigned_integral InType>
constexpr OutType hi::v1::merge_bit_cast ( InType hi,
InType lo )
constexprnoexcept

Return the upper half of the input value.

◆ mirror() [1/2]

constexpr horizontal_alignment hi::v1::mirror ( horizontal_alignment const & rhs)
constexprnoexcept

Mirror the horizontal alignment.

◆ mirror() [2/2]

constexpr horizontal_alignment hi::v1::mirror ( horizontal_alignment const & rhs,
bool left_to_right )
constexprnoexcept

Mirror the horizontal alignment.

◆ narrow_cast() [1/2]

template<typename Out , std::same_as< Out > In>
constexpr Out hi::v1::narrow_cast ( In const & rhs)
constexprnoexcept

Cast numeric values without loss of precision.

Note
It is undefined behavior to cast a value which will cause a loss of precision.
Template Parameters
OutThe numeric type to cast to
InThe numeric type to cast from
Parameters
rhsThe value to cast.
Returns
The value casted to a different type without loss of precision.

◆ narrow_cast() [2/2]

template<std::floating_point Out, std::floating_point In>
requires (not std::same_as<In, Out>)
constexpr Out hi::v1::narrow_cast ( In const & rhs)
constexprnoexcept

Cast numeric values without loss of precision.

Note
It is undefined behavior to cast a value which will cause a loss of precision.
Template Parameters
OutThe numeric type to cast to
InThe numeric type to cast from
Parameters
rhsThe value to cast.
Returns
The value casted to a different type without loss of precision.

◆ native_to_big()

template<std::integral T>
constexpr T hi::v1::native_to_big ( T x)
constexpr

Convert an integral from native-to-big endian.

◆ native_to_little()

template<std::integral T>
constexpr T hi::v1::native_to_little ( T x)
constexpr

Convert an integral from native-to-little endian.

◆ operator*() [1/16]

constexpr rectangle hi::v1::operator* ( matrix2 const & lhs,
aarectangle const & rhs )
constexprnoexcept

Transform an axis-aligned rectangle without rotation by the matrix.

Note
It is undefined behaviour to perspective, rotate or skew transform a rectangle
Parameters
rhsThe axis-aligned rectangle to be transformed.
Returns
The transformed rectangle

◆ operator*() [2/16]

float hi::v1::operator* ( matrix2 const & lhs,
float const & rhs )
inlinenoexcept

Transform a float by the scaling factor of the matrix.

The floating point number is transformed into a vector laying on the x-axis, then transformed, then extracting the hypot from it.

◆ operator*() [3/16]

constexpr matrix2 hi::v1::operator* ( matrix2 const & lhs,
matrix2 const & rhs )
constexprnoexcept

Matrix/Matrix multiplication.

◆ operator*() [4/16]

constexpr point2 hi::v1::operator* ( matrix2 const & lhs,
point2 const & rhs )
constexprnoexcept

Transform a point by the matrix.

Parameters
rhsThe point to be transformed.
Returns
The transformed point.

◆ operator*() [5/16]

constexpr vector2 hi::v1::operator* ( matrix2 const & lhs,
vector2 const & rhs )
constexprnoexcept

Transform a vector by the matrix.

Vectors will not be translated.

Parameters
rhsThe vector to be transformed.
Returns
The transformed vector.

◆ operator*() [6/16]

constexpr corner_radii hi::v1::operator* ( matrix3 const & lhs,
corner_radii const & rhs )
constexprnoexcept

Transform a float by the scaling factor of the matrix.

The floating point number is transformed into a vector laying on the x-axis, then transformed, then extracting the hypot from it.

◆ operator*() [7/16]

float hi::v1::operator* ( matrix3 const & lhs,
float const & rhs )
inlinenoexcept

Transform a float by the scaling factor of the matrix.

The floating point number is transformed into a vector laying on the x-axis, then transformed, then extracting the hypot from it.

◆ operator*() [8/16]

constexpr matrix3 hi::v1::operator* ( matrix3 const & lhs,
matrix3 const & rhs )
constexprnoexcept

Matrix/Matrix multiplication.

◆ operator*() [9/16]

constexpr point3 hi::v1::operator* ( matrix3 const & lhs,
point3 const & rhs )
constexprnoexcept

Transform a point by the matrix.

Parameters
rhsThe point to be transformed.
Returns
The transformed point.

◆ operator*() [10/16]

constexpr vector3 hi::v1::operator* ( matrix3 const & lhs,
vector3 const & rhs )
constexprnoexcept

Transform a vector by the matrix.

Vectors will not be translated.

Parameters
rhsThe vector to be transformed.
Returns
The transformed vector.

◆ operator*() [11/16]

constexpr aarectangle hi::v1::operator* ( scale2 const & lhs,
aarectangle const & rhs )
constexprnoexcept

Scale a rectangle around it's center.

◆ operator*() [12/16]

constexpr rectangle hi::v1::operator* ( transformer auto const & lhs,
aarectangle const & rhs )
constexprnoexcept

Transform an axis-aligned rectangle by the matrix.

After transformation it can not be guaranteed that an axis-aligned rectangle remained aligned to axis, therefor a normal rectangle is returned

Note
It is undefined behavior to perspective transform a rectangle
Parameters
rhsThe axis-aligned rectangle to be transformed.
Returns
The transformed rectangle

◆ operator*() [13/16]

constexpr circle hi::v1::operator* ( transformer auto const & lhs,
circle const & rhs )
constexprnoexcept

Transform a circle by the matrix.

Parameters
rhsThe circle to be transformed.
Returns
The transformed circle

◆ operator*() [14/16]

constexpr line_segment hi::v1::operator* ( transformer auto const & lhs,
line_segment const & rhs )
constexprnoexcept

Transform a line-segment by the matrix.

Parameters
rhsThe line-segment to be transformed.
Returns
The transformed line-segment

◆ operator*() [15/16]

constexpr quad hi::v1::operator* ( transformer auto const & lhs,
quad const & rhs )
constexprnoexcept

Transform a quad by the matrix.

Parameters
rhsThe quad to be transformed.
Returns
The transformed quad

◆ operator*() [16/16]

constexpr rectangle hi::v1::operator* ( transformer auto const & lhs,
rectangle const & rhs )
constexprnoexcept

Transform a rectangle by the matrix.

Note
It is undefined behavior to perspective transform a rectangle
Parameters
rhsThe rectangle to be transformed.
Returns
The transformed rectangle

◆ operator*=()

template<typename Lhs , transformer Rhs>
requires requires(Lhs& a, Rhs const& b) { a = b * a; }
constexpr Lhs & hi::v1::operator*= ( Lhs & lhs,
Rhs const & rhs )
constexprnoexcept

Inplace geometric translation.

Parameters
lhsA geometry shape of some kind.
rhsA geometry transformation of some kind.
Returns
A reference to the modified lhs.

◆ operator|() [1/3]

Combine vertical and horizontal alignment.

Parameters
lhsA text alignment.
rhsA vertical alignment.
Returns
A combined vertical and horizontal alignment.

◆ operator|() [2/3]

Or plurality masks together.

◆ operator|() [3/3]

Combine vertical and horizontal alignment.

Parameters
lhsA text alignment.
rhsA vertical alignment.
Returns
A combined vertical and horizontal alignment.

◆ otype_glyf_get_bounding_box()

aarectangle hi::v1::otype_glyf_get_bounding_box ( std::span< std::byte const > bytes,
float em_scale )
inline

Get the bounding box of a simple glyph.

Note
Only call this function when otype_glyf_is_compound() == false.

◆ otype_glyf_get_compound()

generator< otype_glyf_component > hi::v1::otype_glyf_get_compound ( std::span< std::byte const > bytes,
float em_scale )
inline

Get the components of a compound glyph.

Note
Only call this function when otype_glyf_is_compound() == true.

◆ otype_glyf_get_path()

graphic_path hi::v1::otype_glyf_get_path ( std::span< std::byte const > bytes,
float em_scale )
inline

Get the graphic-path of a simple glyph.

Note
Only call this function when otype_glyf_is_compound() == false.

◆ otype_glyf_is_compound()

bool hi::v1::otype_glyf_is_compound ( std::span< std::byte const > bytes)
inline

Check if this glyph is a compound or simple glyph.

◆ otype_kern_v0_find()

vector2 hi::v1::otype_kern_v0_find ( std::span< std::byte const > bytes,
glyph_id first_glyph_id,
glyph_id second_glyph_id,
float em_scale )
inline

'kern' version 0 find.

'kern' version 0 is used by Microsoft and is not in use anymore by Apple. However it is part of open-type.

◆ otype_name_search()

std::optional< std::string > hi::v1::otype_name_search ( std::span< std::byte const > bytes,
uint16_t name_id,
language_tag language = language_tag{"en"} )
inline

Get a name from the name table.

Parameters
bytesThe bytes of the name table.
name_idThe name to find a string for.
languageThe language to find the string for (default "en").
Returns
The string of the name was found, or std::nullopt if not found.

◆ parse_call_argument_formula()

template<std::input_iterator It, std::sentinel_for< It > ItEnd>
std::unique_ptr< formula_node > hi::v1::parse_call_argument_formula ( It & it,
ItEnd last )

Parse the rhs of an index operator, including the closing bracket.

◆ parse_formula() [1/2]

template<std::input_iterator It, std::sentinel_for< It > ItEnd>
std::unique_ptr< formula_node > hi::v1::parse_formula ( It & it,
ItEnd last )

Parse an formula.

Parses an formula until EOF, ')', ',', '}'

◆ parse_formula() [2/2]

std::unique_ptr< formula_node > hi::v1::parse_formula ( std::string_view text,
formula_post_process_context post_process_context = {} )
inline

Parse an formula.

Parses an formula until EOF, ')', ',', '}'

◆ parse_formula_1()

template<std::input_iterator It, std::sentinel_for< It > ItEnd>
std::unique_ptr< formula_node > hi::v1::parse_formula_1 ( It & it,
ItEnd last,
std::unique_ptr< formula_node > lhs,
uint8_t min_precedence )

Parse an formula.

https://en.wikipedia.org/wiki/Operator-precedence_parser Parses an formula until EOF, ')', '}', ']', ':', ','

◆ parse_formula_without_post_processing()

std::unique_ptr< formula_node > hi::v1::parse_formula_without_post_processing ( std::string_view text)
inline

Parse an formula.

Parses an formula until EOF, ')', ',', '}'

◆ parse_index_formula()

template<std::input_iterator It, std::sentinel_for< It > ItEnd>
std::unique_ptr< formula_node > hi::v1::parse_index_formula ( It & it,
ItEnd last )

Parse the rhs of an index operator, including the closing bracket.

◆ parse_primary_formula()

template<std::input_iterator It, std::sentinel_for< It > ItEnd>
std::unique_ptr< formula_node > hi::v1::parse_primary_formula ( It & it,
ItEnd last )

Parse a lhs or rhs part of an formula.

This should expect any off:

◆ parse_ternary_argument_formula()

template<std::input_iterator It, std::sentinel_for< It > ItEnd>
std::unique_ptr< formula_node > hi::v1::parse_ternary_argument_formula ( It & it,
ItEnd last )

Parse the rhs of an index operator, including the closing bracket.

◆ prepare_debug_break() [1/2]

hi_no_inline bool hi::v1::prepare_debug_break ( )
inlinenoexcept

Prepare for breaking in the debugger.

This will check if a debugger exists and potentially launch the Just-In-Time debugger if one is configured. It does not do the actual breaking.

Returns
true if the debugger is attached.

◆ prepare_debug_break() [2/2]

hi_no_inline void hi::v1::prepare_debug_break ( char const * msg)
inlinenoexcept

Prepare for breaking in the debugger.

This will check if a debugger exists and potentially launch the Just-In-Time debugger if one is configured. It does not do the actual breaking.

If no debugger is attached, then the application is terminated with the given message.

Parameters
msgThe message to print to the console and dialogue window.

◆ print()

template<typename... Args>
hi_export void hi::v1::print ( std::format_string< Args... > fmt,
Args &&... args )
noexcept

Output text to the console.

This will output the text to the console. During debugging the console will be the debugger's output panel/window.

Parameters
textThe text to display on the console.
outputEither std::cout or std::cerr. (No other stream is allowed here).

◆ println()

template<typename... Args>
hi_export void hi::v1::println ( std::format_string< Args... > fmt,
Args &&... args )
noexcept

Output a line of text to the console.

This will output the text to the console. During debugging the console will be the debugger's output panel/window.

Parameters
textThe text to display on the console.
outputEither std::cout or std::cerr. (No other stream is allowed here).

◆ recursive_iterator_begin() [1/2]

template<typename Container >
constexpr auto hi::v1::recursive_iterator_begin ( Container & rhs)
constexprnoexcept

Get a recursive iterator from the begin of a recursive container.

◆ recursive_iterator_begin() [2/2]

template<typename Container >
constexpr auto hi::v1::recursive_iterator_begin ( Container const & rhs)
constexprnoexcept

Get a recursive iterator from the begin of a recursive container.

◆ recursive_iterator_end() [1/2]

template<typename Container >
constexpr auto hi::v1::recursive_iterator_end ( Container & rhs)
constexprnoexcept

Get a recursive iterator from one beyond the end of a recursive container.

◆ recursive_iterator_end() [2/2]

template<typename Container >
constexpr auto hi::v1::recursive_iterator_end ( Container const & rhs)
constexprnoexcept

Get a recursive iterator from one beyond the end of a recursive container.

◆ saturate_cast()

template<std::integral Out, arithmetic In>
constexpr Out hi::v1::saturate_cast ( In rhs)
constexprnoexcept

Cast a numeric value to an integer saturating on overflow.

Template Parameters
Outthe signed- or unsigned-integer type to cast to.
Parameters
rhsThe value to convert.
Returns
The converted value, which is saturated if rhs is over- or underflowing.

◆ scale_from_center()

constexpr quad hi::v1::scale_from_center ( quad const & lhs,
scale2 const & rhs )
constexprnoexcept

scale the quad.

Each edge of the quad scaled.

Parameters
lhsA quad.
rhsThe width and height to scale each edge with.
Returns
The new quad extended by the size.

◆ set_user_setting() [1/2]

std::error_code hi::v1::set_user_setting ( std::string_view key,
long long value )
inlinenoexcept

Set a user-setting for the application.

Keys starting with two consequitive underscores are reserved by the HikoGUI library.

Parameters
keyA key for the user setting.
valueThe value to set.
Exceptions
std::invalid_argumentWhen the key is not valid.
std::out_of_rangeif the value in the default does not fit in the return value.

◆ set_user_setting() [2/2]

std::error_code hi::v1::set_user_setting ( std::string_view key,
std::string_view value )
inlinenoexcept

Set a user-setting for the application.

Keys starting with two consequitive underscores are reserved by the HikoGUI library.

Parameters
keyA key for the user setting.
valueThe value to set.
Exceptions
std::invalid_argumentWhen the key is not valid.
std::out_of_rangeif the value in the default does not fit in the return value.

◆ terminate_handler()

void hi::v1::terminate_handler ( )
inlinenoexcept

The HikoGUI terminate handler.

This handler will print an error message on the console or pop-up a dialogue box.

Note
Use hi_set_terminate_message() to set a message.

◆ three_way_compare()

template<arithmetic Lhs, arithmetic Rhs>
constexpr auto hi::v1::three_way_compare ( Lhs const & lhs,
Rhs const & rhs )
constexprnoexcept

Safely compare two arithmetic values to each other.

Parameters
lhsThe left-hand-side arithmetic value.
rhsThe right-hand-side arithmetic value.
Returns
A std::strong_ordering or std::weak_ordering of the lhs and rhs.

◆ to_gui_event_type()

constexpr gui_event_type hi::v1::to_gui_event_type ( std::string_view name)
constexprnoexcept

Convert a name to a GUI event type.

◆ to_signed()

template<std::integral In>
constexpr std::make_signed_t< In > hi::v1::to_signed ( In rhs)
constexprnoexcept

Cast an integral to an signed integral of the same size.

◆ to_string() [1/2]

std::string_view hi::v1::to_string ( gui_event_type rhs)
inlinenoexcept

Convert a GUI event type to a string.

◆ to_string() [2/2]

template<std::integral T>
std::string hi::v1::to_string ( T const & value)
noexcept

Convert integer to string.

Convert floating point to string.

This function bypasses std::locale.

Parameters
valueThe signed or unsigned integer value.
Returns
The integer converted to a decimal string.

◆ to_unsigned()

template<std::integral In>
constexpr std::make_unsigned_t< In > hi::v1::to_unsigned ( In rhs)
constexprnoexcept

Cast an integral to an unsigned integral of the same size.

◆ token_location()

template<std::input_iterator It, std::sentinel_for< It > ItEnd>
hi_export constexpr std::string hi::v1::token_location ( It & it,
ItEnd last,
std::string_view path )
constexprnoexcept

Create a location string for error messages.

Parameters
itAn iterator that dereferences to a hi::token.
lastThe sentinel for it.
pathThe filename of the file being parsed.
Returns
A string with the location of the token.

◆ truncate()

template<std::integral Out, std::integral In>
constexpr Out hi::v1::truncate ( In rhs)
constexprnoexcept

Cast between integral types truncating or zero-extending the result.

◆ ucd_get_bidi_mirroring_glyph()

constexpr char32_t hi::v1::ucd_get_bidi_mirroring_glyph ( char32_t code_point)
constexprnoexcept

Get the bidi-mirroring-glyph for a code-point.

Parameters
code_pointThe code-point to query
Returns
The mirroring glyph, or U+0000 when the mirroring glyph was not found.

◆ ucd_get_composition()

constexpr std::optional< char32_t > hi::v1::ucd_get_composition ( char32_t cp1,
char32_t cp2 )
constexprnoexcept

Get the composition info of two code-points.

Parameters
cp1The first code-point
cp2The second code-point
Returns
The code-point forming the composition of the two given code-points, or std::nullopt if the two code-point don't composit.

◆ ucd_get_decomposition()

constexpr ucd_decomposition_info hi::v1::ucd_get_decomposition ( char32_t code_point)
constexprnoexcept

Get the decomposition info of a code-point.

◆ unfair_mutex_deadlock_clear_graph()

hi_export void hi::v1::unfair_mutex_deadlock_clear_graph ( )
inlinenoexcept

Clear the graph.

Is used in unit-tests.

◆ unfair_mutex_deadlock_clear_stack()

hi_export void hi::v1::unfair_mutex_deadlock_clear_stack ( )
inlinenoexcept

Clear the stack.

Is used in unit-tests.

◆ unfair_mutex_deadlock_lock()

hi_export void * hi::v1::unfair_mutex_deadlock_lock ( void * object)
inlinenoexcept

Lock an object on this thread.

Parameters
objectThe object that is being locked.
Returns
nullptr on success, object if the mutex was already locked, a pointer to another mutex if potential dead-lock is found.

◆ unfair_mutex_deadlock_remove_object()

hi_export void hi::v1::unfair_mutex_deadlock_remove_object ( void * object)
inlinenoexcept

Remove the object from the detection.

This function is needed when there are mutex-like objects that are dynamically de-allocated.

Parameters
objectThe object to remove from the lock order graph.

◆ unfair_mutex_deadlock_unlock()

hi_export bool hi::v1::unfair_mutex_deadlock_unlock ( void * object)
inlinenoexcept

Unlock an object on this thread.

Parameters
objectThe object that is being locked.
Returns
true on success, false on failure.

◆ up_cast() [1/3]

template<typename Out , typename In >
constexpr Out hi::v1::up_cast ( In & rhs)
constexprnoexcept

Cast a reference to a class to its base class or itself.

Template Parameters
OutThe output type; a base-class of the input.
Parameters
rhsA reference to a object to cast.
Returns
A reference to casted type.

◆ up_cast() [2/3]

template<typename Out , typename In >
constexpr Out hi::v1::up_cast ( In * rhs)
constexprnoexcept

Cast a pointer to a class to its base class or itself.

Template Parameters
OutThe output type; a base-class of the input.
Parameters
rhsA pointer to a object to cast.
Returns
A pointer to casted type.

◆ up_cast() [3/3]

template<typename Out >
constexpr Out hi::v1::up_cast ( nullptr_t )
constexprnoexcept

Cast a nullptr to a class.

Template Parameters
OutThe output type.
Parameters
rhsA nullptr.
Returns
A nullptr of the output type

◆ variants()

hi_export std::vector< language_tag > hi::v1::variants ( std::vector< language_tag > languages)
inline

Add variants to the list of languages.

This function is mostly used to add languages to a list of preferred languages to search for translations in the translation catalog.

Parameters
languagesA list of languages ordered by preference.
Returns
A new list of languages which includes variants and ordered by the given list of languages.

◆ wide_cast() [1/4]

template<typename Out , std::same_as< Out > In>
constexpr Out hi::v1::wide_cast ( In const & rhs)
constexprnoexcept

Cast to a type which can hold all values from the input type.

Note
This is the identity operation, when casting to the same type.
Template Parameters
OutThe same type as the input.
Parameters
rhsThe value of the input type.
Returns
A copy of the input value.

◆ wide_cast() [2/4]

template<std::floating_point Out, std::floating_point In>
requires (not std::same_as<In, Out>)
constexpr Out hi::v1::wide_cast ( In const & rhs)
constexprnoexcept

Cast a floating point number to a floating point type that is wider.

Template Parameters
OutA floating point type larger than the input type.
Parameters
rhsThe floating point input value.
Returns
The floating point value converted to a wider floating point type.

◆ wide_cast() [3/4]

template<std::integral Out, std::integral In>
requires (not std::same_as<In, Out>)
constexpr Out hi::v1::wide_cast ( In rhs)
constexprnoexcept

Cast a integer to an integer type which is wider.

Template Parameters
OutAn integer type that can hold all values of the input type.
Parameters
rhsThe integer input value.
Returns
The value converted to a wider integer type.

◆ wide_cast() [4/4]

template<std::floating_point Out, std::integral In>
constexpr Out hi::v1::wide_cast ( In rhs)
constexprnoexcept

Cast a integer to an float type which is wider.

Since wide_cast() must be perfect the integers must be perfectly representable by a floating point number. Integers that have number of binary digits less or equal to the size of the mantissa of a floating point number can be perfectly represented.

Template Parameters
OutAn float type that can hold all values of the input type without loss of precission.
Parameters
rhsThe integer input value.
Returns
The value converted to a wider float type.

◆ win32_MultiByteToWideChar()

hi_export std::expected< std::wstring, win32_error > hi::v1::win32_MultiByteToWideChar ( std::string_view s,
unsigned int code_page = CP_UTF8,
uint32_t flags = 0 )
inlinenoexcept

Convert a win32-API compatible std::wstring to a multi-byte std::string.

Parameters
sThe wide string to convert
code_pageThe code-page to use for conversion
flagsThe flags to passing
Returns
multi-byte string.

◆ win32_MultiSZToStringVector()

hi_export std::expected< std::vector< std::string >, win32_error > hi::v1::win32_MultiSZToStringVector ( wchar_t const * first,
wchar_t const * last )
inlinenoexcept

Convert a win32 zero terminated list of zero terminated strings.

This function will treat the array as-if it is a list of zero terminated strings, where the last string is a zero terminated empty string.

Parameters
firstA pointer to a buffer of a zero terminated list of zero terminated string.
lastA pointer one beyond the buffer.
Returns
A vector of UTF-8 encoded strings, win32_error::invalid_data when the list is incorrectly terminated.

◆ win32_WideCharToMultiByte()

hi_export std::expected< std::string, win32_error > hi::v1::win32_WideCharToMultiByte ( std::wstring_view s,
unsigned int code_page = CP_UTF8,
uint32_t flags = 0 )
inlinenoexcept

Convert a win32-API compatible std::wstring to a multi-byte std::string.

Parameters
sThe wide string to convert
code_pageThe code-page to use for conversion
flagsThe flags to passing
Returns
multi-byte string.

Variable Documentation

◆ audio_device_state_metadata

hi_export constexpr auto hi::v1::audio_device_state_metadata
constexpr
Initial value:
= enum_metadata{
audio_device_state::uninitialized, "uninitialized",
audio_device_state::active, "active",
audio_device_state::disabled, "disabled",
audio_device_state::not_present, "not_present",
audio_device_state::unplugged, "unplugged",
}

◆ audio_direction_metadata

hi_export constexpr auto hi::v1::audio_direction_metadata
constexpr
Initial value:
= enum_metadata{
audio_direction::none, "none",
audio_direction::input, "input",
audio_direction::output, "output",
audio_direction::bidirectional, "bidirectional"
}

◆ common_sample_rates

hi_export constexpr auto hi::v1::common_sample_rates
constexpr
Initial value:
uint32_t{8000},
uint32_t{16000},
uint32_t{32000},
uint32_t{44100},
uint32_t{47952},
uint32_t{48000},
uint32_t{48048},
uint32_t{88200},
uint32_t{95904},
uint32_t{96000},
uint32_t{96096},
uint32_t{176400},
uint32_t{191808},
uint32_t{192000},
uint32_t{192192},
uint32_t{352800},
uint32_t{383616},
uint32_t{384000},
uint32_t{384384}}

◆ debug_message

std::atomic<char const *> hi::v1::debug_message = nullptr
inline

Message to show when the application is terminated because of a debug_abort.

◆ font_style_metadata

constexpr auto hi::v1::font_style_metadata
constexpr
Initial value:
= enum_metadata{
font_style::normal, "normal",
font_style::italic, "italic",
}

◆ old_terminate_handler

std::terminate_handler hi::v1::old_terminate_handler
inline

The old terminate handler.

This is the handler returned by std::set_terminate().

◆ policy_metadata

constexpr auto hi::v1::policy_metadata
constexpr
Initial value:
= enum_metadata{
policy::unspecified, "unspecified",
policy::low_power, "low-power",
policy::high_performance, "high-performance"
}

◆ semantic_color_metadata

constexpr auto hi::v1::semantic_color_metadata
constexpr
Initial value:
= enum_metadata{
semantic_color::blue, "blue",
semantic_color::green, "green",
semantic_color::indigo, "indigo",
semantic_color::orange, "orange",
semantic_color::pink, "pink",
semantic_color::purple, "purple",
semantic_color::red, "red",
semantic_color::teal, "teal",
semantic_color::yellow, "yellow",
semantic_color::gray, "gray",
semantic_color::gray2, "gray2",
semantic_color::gray3, "gray3",
semantic_color::gray4, "gray4",
semantic_color::gray5, "gray5",
semantic_color::gray6, "gray6",
semantic_color::foreground, "foreground",
semantic_color::border, "border",
semantic_color::fill, "fill",
semantic_color::accent, "accent",
semantic_color::text_select, "text-select",
semantic_color::primary_cursor, "primary-cursor",
semantic_color::secondary_cursor, "secondary-cursor",
}