Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/intern
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2010-06-25 04:09:50 +0400
committerMike Erwin <significant.bit@gmail.com>2010-06-25 04:09:50 +0400
commit185c77989e2692c13b65cea0ca8c58c4dcb51a2e (patch)
treec3c179e5a7e36c696fa3e9fd65826bb1a2ff096e /intern
parentda314f51bfab03252a7c530eeb3bbd5585327a25 (diff)
hint for mouse/pen input fidelity
Diffstat (limited to 'intern')
-rw-r--r--intern/ghost/GHOST_ISystem.h10
-rw-r--r--intern/ghost/intern/GHOST_System.cpp7
-rw-r--r--intern/ghost/intern/GHOST_System.h8
3 files changed, 23 insertions, 2 deletions
diff --git a/intern/ghost/GHOST_ISystem.h b/intern/ghost/GHOST_ISystem.h
index 8d80c74e140..1760fe30b7f 100644
--- a/intern/ghost/GHOST_ISystem.h
+++ b/intern/ghost/GHOST_ISystem.h
@@ -353,7 +353,15 @@ public:
*/
virtual GHOST_TSuccess getButtonState(GHOST_TButtonMask mask, bool& isDown) const = 0;
-
+ /** Fidelity of mouse and pen input (this definition will probably live somewhere else)*/
+ typedef enum { LO_FI, NORMAL_FI, HI_FI } InputFidelity;
+
+ /**
+ * Requests input at a certain fidelity. Certain tools want very smooth input, others don't care.
+ * @param hint Desired fidelity of mouse and pen events.
+ */
+ virtual void setInputFidelity(InputFidelity hint) = 0;
+
/***************************************************************************************
** Access to clipboard.
***************************************************************************************/
diff --git a/intern/ghost/intern/GHOST_System.cpp b/intern/ghost/intern/GHOST_System.cpp
index c89534e01c5..3cd3528eeb6 100644
--- a/intern/ghost/intern/GHOST_System.cpp
+++ b/intern/ghost/intern/GHOST_System.cpp
@@ -48,7 +48,7 @@
GHOST_System::GHOST_System()
-: m_displayManager(0), m_timerManager(0), m_windowManager(0), m_eventManager(0), m_ndofManager(0)
+: m_displayManager(0), m_timerManager(0), m_windowManager(0), m_eventManager(0), m_ndofManager(0), m_input_fidelity_hint(NORMAL_FI)
{
}
@@ -271,6 +271,11 @@ GHOST_TSuccess GHOST_System::getButtonState(GHOST_TButtonMask mask, bool& isDown
return success;
}
+void GHOST_System::setInputFidelity(InputFidelity hint)
+{
+ m_input_fidelity_hint = hint;
+}
+
GHOST_TSuccess GHOST_System::init()
{
m_timerManager = new GHOST_TimerManager ();
diff --git a/intern/ghost/intern/GHOST_System.h b/intern/ghost/intern/GHOST_System.h
index d6c6a356323..6f570b33079 100644
--- a/intern/ghost/intern/GHOST_System.h
+++ b/intern/ghost/intern/GHOST_System.h
@@ -281,6 +281,12 @@ public:
* @return Indication of success.
*/
virtual GHOST_TSuccess getButtons(GHOST_Buttons& buttons) const = 0;
+
+ /**
+ * Requests input at a certain fidelity. Certain tools want very smooth input, others don't care.
+ * @param hint Desired fidelity of mouse and pen events.
+ */
+ void setInputFidelity(InputFidelity hint);
/**
* Returns the selection buffer
@@ -354,6 +360,8 @@ protected:
/** Settings of the display before the display went fullscreen. */
GHOST_DisplaySetting m_preFullScreenSetting;
+
+ InputFidelity m_input_fidelity_hint;
};
inline GHOST_TimerManager* GHOST_System::getTimerManager() const