#include <TInputInterface_Win.h>
|
enum | EVENT_TYPE {
EVENT_TYPE_GONE_DOWN
, EVENT_TYPE_GONE_UP
, EVENT_TYPE_REPEAT
, EVENT_TYPE_VIRTUAL
,
EVENT_TYPE_MOVED
} |
|
using | EventEmitter = TEmitter<TInputInterface, TInputInterface::InputEvent> |
|
enum | { IsTObject = TTRUE
} |
|
static Toshi::TObject * | CreateTObject () |
|
static Toshi::TObject * | CreateTObjectInPlace (void *a_pPtr) |
|
static void | InitialiseClass () |
|
static void | DeinitialiseClass () |
|
static TFORCEINLINE TClass * | GetClassStatic () |
|
static TFORCEINLINE TInputInterface * | CreateSingleton (Args &&... args) |
|
static TFORCEINLINE D * | CreateSingleton (Args &&... args) |
|
static TFORCEINLINE void | DestroySingleton () |
|
static TFORCEINLINE TInputInterface * | GetSingletonSafe () |
|
static TFORCEINLINE TBOOL | IsSingletonCreated () |
|
static TFORCEINLINE TInputInterface * | GetSingleton () |
|
static constexpr Toshi::TClass * | PARENTCLASS = TNULL |
|
static constinit Toshi::TClass | ms_oClass = Toshi::TClass( "TObject", TObject::CreateTObject, TObject::CreateTObjectInPlace, TObject::InitialiseClass, TObject::DeinitialiseClass, 0, 2, sizeof( TObject ), alignof( TObject ) ) |
|
TFORCEINLINE | TSingleton () |
|
TFORCEINLINE | ~TSingleton () |
|
static TInputInterface * | ms_pSingleton |
|
Definition at line 7 of file TInputInterface_Win.h.
◆ TInputDXInterface()
TInputDXInterface::TInputDXInterface |
( |
| ) |
|
|
inline |
Definition at line 13 of file TInputInterface_Win.h.
14 {
15 m_poDirectInput8 = NULL;
16 m_hMainWindow = NULL;
18 }
◆ ~TInputDXInterface()
virtual TInputDXInterface::~TInputDXInterface |
( |
| ) |
|
|
inlineoverridevirtual |
Definition at line 20 of file TInputInterface_Win.h.
21 {
23
24 if ( m_poDirectInput8 )
25 {
26 m_poDirectInput8->Release();
27 m_poDirectInput8 =
TNULL;
28 }
29 }
◆ Deinitialise()
TBOOL TInputDXInterface::Deinitialise |
( |
| ) |
|
|
overridevirtual |
Implements TInputInterface.
Definition at line 45 of file TInputInterface_Win.cpp.
46{
48
49 if ( m_poDirectInput8 != NULL )
50 {
51 m_poDirectInput8->Release();
52 m_poDirectInput8 = NULL;
53 }
54
56}
◆ GetMainWindow()
HWND TInputDXInterface::GetMainWindow |
( |
| ) |
const |
|
inline |
◆ Initialise()
TBOOL TInputDXInterface::Initialise |
( |
| ) |
|
|
overridevirtual |
Implements TInputInterface.
Definition at line 18 of file TInputInterface_Win.cpp.
19{
21 HRESULT hRes = DirectInput8Create( GetModuleHandle( NULL ),
DIRECTINPUT_VERSION, IID_IDirectInput8, (LPVOID*)&m_poDirectInput8, NULL );
22
23 if ( SUCCEEDED( hRes ) )
24 {
25 if ( m_hMainWindow == NULL )
26 {
27 m_hMainWindow = FindWindowA( "TRenderD3DInterface", NULL );
28 }
29
30 hRes = m_poDirectInput8->EnumDevices( DI8DEVCLASS_ALL, TInputDXInterface::EnumerateDeviceCallback, this, DIEDFL_ATTACHEDONLY );
31
32 if ( hRes == DI_OK )
33 {
35 }
36 else
37 {
39 }
40 }
41
43}
#define DIRECTINPUT_VERSION
virtual TBOOL Deinitialise() override
◆ LostDevice()
TBOOL TInputDXInterface::LostDevice |
( |
| ) |
|
Definition at line 67 of file TInputInterface_Win.cpp.
68{
69 auto input = GetDirectInput();
70
71 if ( input != NULL )
72 {
73 return input->EnumDevices( DI8DEVCLASS_ALL, EnumerateDeviceCallback, this, DIEDFL_ATTACHEDONLY ) != DI_OK;
74 }
75
77}
◆ RefreshDirect()
virtual void TInputDXInterface::RefreshDirect |
( |
| ) |
|
|
inlinevirtual |
◆ SetExclusiveMode()
void TInputDXInterface::SetExclusiveMode |
( |
TBOOL | a_bIsExclusive | ) |
|
|
overridevirtual |
Reimplemented from TInputInterface.
Definition at line 58 of file TInputInterface_Win.cpp.
59{
61 pMouse->Unacquire();
62 pMouse->SetExclusive( m_hMainWindow, a_bIsExclusive );
63 pMouse->Acquire();
65}
TInputDevice * GetDeviceByIndex(TClass *a_pClass, TUINT a_uiIndex)
virtual void SetExclusiveMode(TBOOL a_bIsExclusive)
◆ SetMainWindow()
void TInputDXInterface::SetMainWindow |
( |
HWND | a_hMainWindow | ) |
|
|
inline |
◆ TDECLARE_CLASS()
The documentation for this class was generated from the following files: