OGLplus  (0.59.0) a C++ wrapper for rendering APIs

eagine::application::context_state_view Class Reference

Read-only view of application context state values. More...

#include <eagine/application/state_view.hpp>

Public Types

using clock_type = std::chrono::steady_clock
 The clock type for run-time duration measurements.
 

Public Member Functions

auto run_time () const noexcept -> clock_type::duration
 Returns the application run time duration.
 
auto user_idle_time () const noexcept -> clock_type::duration
 Returns for how long was the user idle. More...
 
auto frame_time () const noexcept -> seconds_t< float >
 Returns the simulation time of the current frame. More...
 
auto frame_duration () const noexcept -> seconds_t< float >
 Returns the duration of the previos frame. More...
 
auto is_active () const noexcept -> bool
 Indicates if the example or the user is active in some way. More...
 
auto user_is_idle () const noexcept -> value_with_history< bool, 2 >
 Indicates if the user is idle (does not generate input events). More...
 
auto user_became_idle () const noexcept -> bool
 Indicates that the used became idle. More...
 
auto user_became_active () const noexcept -> bool
 Indicates that the used became active (generated input events). More...
 
auto user_idle_too_long () const noexcept -> bool
 Indicates that the user became idle for too long (may depend on config).
 

Detailed Description

Read-only view of application context state values.

Member Function Documentation

◆ frame_duration()

auto eagine::application::context_state_view::frame_duration ( ) const -> seconds_t<float>
inlinenoexcept

Returns the duration of the previos frame.

See also
frame_time

◆ frame_time()

auto eagine::application::context_state_view::frame_time ( ) const -> seconds_t<float>
inlinenoexcept

Returns the simulation time of the current frame.

See also
frame_duration

◆ is_active()

auto eagine::application::context_state_view::is_active ( ) const -> bool
inlinenoexcept

Indicates if the example or the user is active in some way.

See also
user_idle_time

◆ user_became_active()

auto eagine::application::context_state_view::user_became_active ( ) const -> bool
inlinenoexcept

Indicates that the used became active (generated input events).

See also
user_is_idle
user_became_idle

◆ user_became_idle()

auto eagine::application::context_state_view::user_became_idle ( ) const -> bool
inlinenoexcept

Indicates that the used became idle.

See also
user_is_idle
user_became_active

◆ user_idle_time()

auto eagine::application::context_state_view::user_idle_time ( ) const -> clock_type::duration
inlinenoexcept

Returns for how long was the user idle.

See also
user_is_idle
user_became_active
user_idle_too_long

Referenced by user_idle_too_long().

◆ user_is_idle()

auto eagine::application::context_state_view::user_is_idle ( ) const -> value_with_history<bool, 2>
inlinenoexcept

Indicates if the user is idle (does not generate input events).

See also
user_became_active
user_idle_time
user_idle_too_long
is_active

Referenced by user_became_active(), and user_became_idle().


The documentation for this class was generated from the following file:

Copyright © 2015-2021 Matúš Chochlík.
<chochlik -at -gmail.com>
Documentation generated on Tue Apr 13 2021 by Doxygen (version 1.8.17).