first commit

This commit is contained in:
2026-06-22 11:49:35 +02:00
commit d805f2ba86
619 changed files with 126873 additions and 0 deletions

View File

@ -0,0 +1,59 @@
/* -----------------------------------------------------------------------------
GSFramework
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
----------------------------------------------------------------------------- */
#ifndef __INPUT_TOUCH__
#define __INPUT_TOUCH__
#include "input/input_device.h"
namespace GS {
namespace Input {
/*
@short Touch input device.
@author Emmanuel Julien (ejulien@nworks.fr)
*/
class TouchDevice : public Device
{
protected:
struct State
{
float x, y;
bool button;
};
int index;
State state, last_state, pending_state;
public:
virtual Type GetType() const;
virtual const char *GetName() const;
virtual void Update();
virtual bool IsDown(KeyCode) const;
virtual bool WasDown(KeyCode) const;
virtual bool GetInputRange(InputCode, float &min, float &max) const;
virtual float GetValue(InputCode) const;
virtual float GetLastValue(InputCode) const;
void SetIndex(int);
void RegisterTouchEvent(float x, float y, float weight);
TouchDevice(int index = -1);
};
} // Input
} // GS
#endif // __INPUT_TOUCH__