2015-05-24 06:55:12 +02:00
|
|
|
// Copyright 2008 Dolphin Emulator Project
|
2015-05-18 01:08:10 +02:00
|
|
|
// Licensed under GPLv2+
|
2014-02-10 13:54:46 -05:00
|
|
|
// Refer to the license.txt file included.
|
2013-04-14 23:02:53 -05:00
|
|
|
|
2014-02-10 13:54:46 -05:00
|
|
|
#pragma once
|
2013-04-14 23:02:53 -05:00
|
|
|
|
2016-06-12 17:08:04 +02:00
|
|
|
#include "InputCommon/ControllerInterface/ControllerInterface.h"
|
2016-01-06 15:35:15 -06:00
|
|
|
#include "jni/ButtonManager.h"
|
2013-04-14 23:02:53 -05:00
|
|
|
|
|
|
|
namespace ciface
|
|
|
|
{
|
|
|
|
namespace Android
|
|
|
|
{
|
2016-06-12 17:08:04 +02:00
|
|
|
void Init();
|
2013-06-16 20:07:10 -04:00
|
|
|
class Touchscreen : public Core::Device
|
2013-04-14 23:02:53 -05:00
|
|
|
{
|
|
|
|
private:
|
2016-06-24 10:43:46 +02: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 11:05:44 +01:00
|
|
|
|
2013-04-14 23:02:53 -05:00
|
|
|
public:
|
2016-06-24 10:43:46 +02:00
|
|
|
Touchscreen(int padID);
|
|
|
|
~Touchscreen() {}
|
|
|
|
std::string GetName() const;
|
|
|
|
int GetId() const;
|
|
|
|
std::string GetSource() const;
|
2013-04-14 23:02:53 -05:00
|
|
|
|
2013-11-24 15:04:53 -06:00
|
|
|
private:
|
2016-06-24 10:43:46 +02:00
|
|
|
const int _padID;
|
2013-04-14 23:02:53 -05:00
|
|
|
};
|
|
|
|
}
|
|
|
|
}
|