2014-02-10 18:54:46 +00:00
|
|
|
// Copyright 2013 Dolphin Emulator Project
|
|
|
|
// Licensed under GPLv2
|
|
|
|
// Refer to the license.txt file included.
|
2013-04-15 04:02:53 +00:00
|
|
|
|
2014-02-10 18:54:46 +00:00
|
|
|
#pragma once
|
2013-04-15 04:02:53 +00:00
|
|
|
|
2014-02-17 10:18:15 +00:00
|
|
|
#include "DolphinWX/Android/ButtonManager.h"
|
|
|
|
#include "InputCommon/ControllerInterface/Device.h"
|
2013-04-15 04:02:53 +00:00
|
|
|
|
|
|
|
namespace ciface
|
|
|
|
{
|
|
|
|
namespace Android
|
|
|
|
{
|
|
|
|
|
2013-06-17 00:07:10 +00:00
|
|
|
void Init( std::vector<Core::Device*>& devices );
|
|
|
|
class Touchscreen : public Core::Device
|
2013-04-15 04:02:53 +00:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
class Button : public Input
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
std::string GetName() const;
|
2013-11-24 21:04:53 +00:00
|
|
|
Button(int padID, ButtonManager::ButtonType index) : _padID(padID), _index(index) {}
|
2013-04-15 04:02:53 +00:00
|
|
|
ControlState GetState() const;
|
|
|
|
private:
|
2013-11-24 21:04:53 +00:00
|
|
|
const int _padID;
|
|
|
|
const ButtonManager::ButtonType _index;
|
2013-06-18 12:09:20 +00:00
|
|
|
};
|
|
|
|
class Axis : public Input
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
std::string GetName() const;
|
2013-12-13 03:24:39 +00:00
|
|
|
Axis(int padID, ButtonManager::ButtonType index, float neg = 1.0f) : _padID(padID), _index(index), _neg(neg) {}
|
2013-06-18 12:09:20 +00:00
|
|
|
ControlState GetState() const;
|
|
|
|
private:
|
2013-11-24 21:04:53 +00:00
|
|
|
const int _padID;
|
|
|
|
const ButtonManager::ButtonType _index;
|
2013-12-13 03:24:39 +00:00
|
|
|
const float _neg;
|
2013-04-15 04:02:53 +00:00
|
|
|
};
|
2014-03-29 10:05:44 +00:00
|
|
|
|
2013-04-15 04:02:53 +00:00
|
|
|
public:
|
2013-11-24 21:04:53 +00:00
|
|
|
Touchscreen(int padID);
|
2013-04-15 04:02:53 +00:00
|
|
|
~Touchscreen() {}
|
|
|
|
|
|
|
|
std::string GetName() const;
|
|
|
|
int GetId() const;
|
|
|
|
std::string GetSource() const;
|
2013-11-24 21:04:53 +00:00
|
|
|
private:
|
|
|
|
const int _padID;
|
2013-04-15 04:02:53 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|