2015-05-24 04:55:12 +00:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-17 23:08:10 +00:00
|
|
|
// Licensed under GPLv2+
|
2014-02-10 18:54:46 +00:00
|
|
|
// 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
|
|
|
|
2016-06-12 15:08:04 +00:00
|
|
|
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
2016-01-06 21:35:15 +00:00
|
|
|
#include "jni/ButtonManager.h"
|
2013-04-15 04:02:53 +00:00
|
|
|
|
|
|
|
namespace ciface
|
|
|
|
{
|
|
|
|
namespace Android
|
|
|
|
{
|
2016-10-16 20:39:05 +00:00
|
|
|
void PopulateDevices();
|
2013-06-17 00:07:10 +00:00
|
|
|
class Touchscreen : public Core::Device
|
2013-04-15 04:02:53 +00:00
|
|
|
{
|
|
|
|
private:
|
2016-06-24 08:43:46 +00:00
|
|
|
class Button : public Input
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
std::string GetName() const;
|
|
|
|
Button(int padID, ButtonManager::ButtonType index) : _padID(padID), _index(index) {}
|
|
|
|
ControlState GetState() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
const int _padID;
|
|
|
|
const ButtonManager::ButtonType _index;
|
|
|
|
};
|
|
|
|
class Axis : public Input
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
std::string GetName() const;
|
|
|
|
Axis(int padID, ButtonManager::ButtonType index, float neg = 1.0f)
|
|
|
|
: _padID(padID), _index(index), _neg(neg)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
ControlState GetState() const;
|
|
|
|
|
|
|
|
private:
|
|
|
|
const int _padID;
|
|
|
|
const ButtonManager::ButtonType _index;
|
|
|
|
const float _neg;
|
|
|
|
};
|
2014-03-29 10:05:44 +00:00
|
|
|
|
2013-04-15 04:02:53 +00:00
|
|
|
public:
|
2016-06-24 08:43:46 +00:00
|
|
|
Touchscreen(int padID);
|
|
|
|
~Touchscreen() {}
|
|
|
|
std::string GetName() const;
|
|
|
|
std::string GetSource() const;
|
2013-04-15 04:02:53 +00:00
|
|
|
|
2013-11-24 21:04:53 +00:00
|
|
|
private:
|
2016-06-24 08:43:46 +00:00
|
|
|
const int _padID;
|
2013-04-15 04:02:53 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|