some implementations
This commit is contained in:
parent
a78a4f70f1
commit
2c8b52e0fa
|
@ -5,17 +5,28 @@
|
||||||
#define INPUT_APPLICATION_KEBOARD_H
|
#define INPUT_APPLICATION_KEBOARD_H
|
||||||
|
|
||||||
#include "InputObject.h"
|
#include "InputObject.h"
|
||||||
#include <vector>
|
#include <string>
|
||||||
|
|
||||||
namespace Input
|
namespace Input
|
||||||
{
|
{
|
||||||
class AplicationKeyboard : public InputObject
|
class ApplicationKeyboard : public InputObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
bool IsActive() const;
|
||||||
|
|
||||||
|
void Activate();
|
||||||
|
void Deactivate();
|
||||||
|
|
||||||
|
void SetTargetText( ::std::wstring *field );
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
AplicationKeyboard();
|
::std::wstring *targetText;
|
||||||
~AplicationKeyboard();
|
|
||||||
|
ApplicationKeyboard();
|
||||||
|
~ApplicationKeyboard();
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool active;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,6 +21,7 @@ namespace Input
|
||||||
{
|
{
|
||||||
SAIType_Keyboard,
|
SAIType_Keyboard,
|
||||||
SAIType_Mouse,
|
SAIType_Mouse,
|
||||||
|
SAIType_ApplicationKeyboard,
|
||||||
SAIType_futureExample1,
|
SAIType_futureExample1,
|
||||||
SAIType_futureExample2,
|
SAIType_futureExample2,
|
||||||
SAIType_futureExample3,
|
SAIType_futureExample3,
|
||||||
|
|
|
@ -4,17 +4,19 @@
|
||||||
#ifndef INPUT_WIN32_APPLICATION_KEBOARD_H
|
#ifndef INPUT_WIN32_APPLICATION_KEBOARD_H
|
||||||
#define INPUT_WIN32_APPLICATION_KEBOARD_H
|
#define INPUT_WIN32_APPLICATION_KEBOARD_H
|
||||||
|
|
||||||
|
#define NOMINMAX
|
||||||
|
#include <Windows.h>
|
||||||
#include "..\ApplicationKeyboard.h"
|
#include "..\ApplicationKeyboard.h"
|
||||||
//#include <Windows.h>
|
|
||||||
|
|
||||||
namespace Input
|
namespace Input
|
||||||
{
|
{
|
||||||
class Win32ApplicationKeyboard :public AplicationKeyboard
|
class Win32ApplicationKeyboard : public ApplicationKeyboard
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Win32ApplicationKeyboard();
|
Win32ApplicationKeyboard();
|
||||||
~Win32ApplicationKeyboard();
|
~Win32ApplicationKeyboard();
|
||||||
|
|
||||||
|
LRESULT CALLBACK WindowCallback( HWND h, UINT m, WPARAM w, LPARAM l );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
|
|
|
@ -20,14 +20,17 @@
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<ClCompile Include="L_inputClass.cpp" />
|
<ClCompile Include="L_inputClass.cpp" />
|
||||||
|
<ClCompile Include="Source\ApplicationKeyboard.cpp" />
|
||||||
<ClCompile Include="Source\InputManager.cpp" />
|
<ClCompile Include="Source\InputManager.cpp" />
|
||||||
<ClCompile Include="Source\Keyboard.cpp" />
|
<ClCompile Include="Source\Keyboard.cpp" />
|
||||||
<ClCompile Include="Source\Mouse.cpp" />
|
<ClCompile Include="Source\Mouse.cpp" />
|
||||||
|
<ClCompile Include="Source\Win32\Win32ApplicationKeyboard.cpp" />
|
||||||
<ClCompile Include="Source\Win32\Win32Input.cpp" />
|
<ClCompile Include="Source\Win32\Win32Input.cpp" />
|
||||||
<ClCompile Include="Source\Win32\Win32Keyboard.cpp" />
|
<ClCompile Include="Source\Win32\Win32Keyboard.cpp" />
|
||||||
<ClCompile Include="Source\Win32\Win32Mouse.cpp" />
|
<ClCompile Include="Source\Win32\Win32Mouse.cpp" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ClInclude Include="Include\ApplicationKeyboard.h" />
|
||||||
<ClInclude Include="Include\Common.h" />
|
<ClInclude Include="Include\Common.h" />
|
||||||
<ClInclude Include="Include\Input.h" />
|
<ClInclude Include="Include\Input.h" />
|
||||||
<ClInclude Include="Include\InputManager.h" />
|
<ClInclude Include="Include\InputManager.h" />
|
||||||
|
@ -35,6 +38,7 @@
|
||||||
<ClInclude Include="Include\Keyboard.h" />
|
<ClInclude Include="Include\Keyboard.h" />
|
||||||
<ClInclude Include="Include\Mouse.h" />
|
<ClInclude Include="Include\Mouse.h" />
|
||||||
<ClInclude Include="Include\PreReq.h" />
|
<ClInclude Include="Include\PreReq.h" />
|
||||||
|
<ClInclude Include="Include\Win32\Win32ApplicationKeyboard.h" />
|
||||||
<ClInclude Include="Include\Win32\Win32Input.h" />
|
<ClInclude Include="Include\Win32\Win32Input.h" />
|
||||||
<ClInclude Include="Include\Win32\Win32Keyboard.h" />
|
<ClInclude Include="Include\Win32\Win32Keyboard.h" />
|
||||||
<ClInclude Include="Include\Win32\Win32Mouse.h" />
|
<ClInclude Include="Include\Win32\Win32Mouse.h" />
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
#include "../Include/ApplicationKeyboard.h"
|
||||||
|
|
||||||
|
using namespace ::Input;
|
||||||
|
|
||||||
|
ApplicationKeyboard::ApplicationKeyboard() :
|
||||||
|
InputObject( Enum::SAIType_ApplicationKeyboard )
|
||||||
|
{
|
||||||
|
this->targetText = nullptr;
|
||||||
|
this->isEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
ApplicationKeyboard::~ApplicationKeyboard()
|
||||||
|
{ /* DO nothing */ }
|
||||||
|
|
||||||
|
bool ApplicationKeyboard::IsActive() const
|
||||||
|
{
|
||||||
|
return this->isEnabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApplicationKeyboard::Activate()
|
||||||
|
{
|
||||||
|
this->isEnabled = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApplicationKeyboard::Deactivate()
|
||||||
|
{
|
||||||
|
this->isEnabled = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ApplicationKeyboard::SetTargetText( ::std::wstring *field )
|
||||||
|
{
|
||||||
|
this->targetText = field;
|
||||||
|
}
|
|
@ -0,0 +1,20 @@
|
||||||
|
#include "../../Include/Win32/Win32ApplicationKeyboard.h"
|
||||||
|
|
||||||
|
using namespace ::Input;
|
||||||
|
|
||||||
|
|
||||||
|
//{
|
||||||
|
// class Win32ApplicationKeyboard : public ApplicationKeyboard
|
||||||
|
// {
|
||||||
|
// public:
|
||||||
|
// Win32ApplicationKeyboard();
|
||||||
|
// ~Win32ApplicationKeyboard();
|
||||||
|
//
|
||||||
|
// LRESULT CALLBACK WindowCallback( HWND h, UINT m, WPARAM w, LPARAM l );
|
||||||
|
//
|
||||||
|
// private:
|
||||||
|
//
|
||||||
|
// };
|
||||||
|
//}
|
||||||
|
//
|
||||||
|
//#endif // !INPUT_WIN32_APPLICATION_KEBOARD_H
|
Loading…
Reference in New Issue