diff options
author | crupest <crupest@outlook.com> | 2018-09-23 20:29:45 +0800 |
---|---|---|
committer | crupest <crupest@outlook.com> | 2018-09-23 20:29:45 +0800 |
commit | 26813b4c72ab6222861859848952d68586f1e283 (patch) | |
tree | 3881f7e9ae39501347925f51bc50ba49bdc7ad7c | |
parent | 5eb05140c67db521654f5b7e69c2eacf332588f6 (diff) | |
download | cru-26813b4c72ab6222861859848952d68586f1e283.tar.gz cru-26813b4c72ab6222861859848952d68586f1e283.tar.bz2 cru-26813b4c72ab6222861859848952d68586f1e283.zip |
Add GetCaretBlinkDuration.
-rw-r--r-- | CruUI/application.cpp | 2 | ||||
-rw-r--r-- | CruUI/application.h | 7 |
2 files changed, 9 insertions, 0 deletions
diff --git a/CruUI/application.cpp b/CruUI/application.cpp index 1375ed99..2d949edb 100644 --- a/CruUI/application.cpp +++ b/CruUI/application.cpp @@ -104,6 +104,8 @@ namespace cru { #ifdef CRU_DEBUG_DRAW_CONTROL_BORDER debug_border_brush_ = graph::CreateSolidBrush(D2D1::ColorF(D2D1::ColorF::Crimson)); #endif + + caret_blink_duration_ = std::chrono::milliseconds(::GetCaretBlinkTime()); } Application::~Application() diff --git a/CruUI/application.h b/CruUI/application.h index 1ce6f035..521c3436 100644 --- a/CruUI/application.h +++ b/CruUI/application.h @@ -101,6 +101,11 @@ namespace cru return god_window_.get(); } + std::chrono::milliseconds GetCaretBlinkDuration() const + { + return caret_blink_duration_; + } + #ifdef CRU_DEBUG_DRAW_CONTROL_BORDER Microsoft::WRL::ComPtr<ID2D1Brush> GetDebugBorderBrush() const { @@ -121,6 +126,8 @@ namespace cru #ifdef CRU_DEBUG_DRAW_CONTROL_BORDER Microsoft::WRL::ComPtr<ID2D1Brush> debug_border_brush_; #endif + + std::chrono::milliseconds caret_blink_duration_; }; |