aboutsummaryrefslogtreecommitdiff
path: root/CruUI
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2018-09-23 20:29:45 +0800
committercrupest <crupest@outlook.com>2018-09-23 20:29:45 +0800
commit26813b4c72ab6222861859848952d68586f1e283 (patch)
tree3881f7e9ae39501347925f51bc50ba49bdc7ad7c /CruUI
parent5eb05140c67db521654f5b7e69c2eacf332588f6 (diff)
downloadcru-26813b4c72ab6222861859848952d68586f1e283.tar.gz
cru-26813b4c72ab6222861859848952d68586f1e283.tar.bz2
cru-26813b4c72ab6222861859848952d68586f1e283.zip
Add GetCaretBlinkDuration.
Diffstat (limited to 'CruUI')
-rw-r--r--CruUI/application.cpp2
-rw-r--r--CruUI/application.h7
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_;
};