forked from bartvdbraak/blender
hint for mouse/pen input fidelity
This commit is contained in:
parent
da314f51bf
commit
185c77989e
@ -353,6 +353,14 @@ 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.
|
||||
|
@ -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 ();
|
||||
|
@ -282,6 +282,12 @@ public:
|
||||
*/
|
||||
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
|
||||
* @param selection Only used on X11
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user