Permalink
Browse files

Move Finger out of Touch namespace

Change 'namespace' hack from final abstract class to interface
  • Loading branch information...
Dgame committed May 31, 2015
1 parent 96c4070 commit ac846f08caf641be87722c250ebcbdd5e7fe73e7
@@ -61,7 +61,7 @@ struct Battery {
*
* Author: Randy Schuett (rswhite4@googlemail.com)k
*/
final abstract class System {
interface System {
/**
* Returns the PowerInfo structure with the currently power informations
*
@@ -35,8 +35,7 @@ public:
*
* Author: Randy Schuett (rswhite4@googlemail.com)
*/
final abstract class Keyboard {
public:
interface Keyboard {
/**
* Returns if the given Keyboard.Code is pressed.
*
@@ -7,35 +7,35 @@ import derelict.sdl2.sdl;
public:
/**
* Represent Touch-Events
*
* Author: Randy Schuett (rswhite4@googlemail.com)
* The Finger structure
*/
final abstract class Touch {
struct Finger {
/**
* The Finger structure
* The Finger ID
*/
static struct Finger {
/**
* The Finger ID
*/
long id;
/**
* The x coordinate in range of 0 .. 1
* Multiply it with the width of the Window to get the real x coordinate
*/
float x;
/**
* The y coordinate in range of 0 .. 1
* Multiply it with the height of the Window to get the real y coordinate
*/
float y;
/**
* The quantity of pressure applied in range of 0 .. 1
*/
float pressure;
}
long id; // TODO: change to (u)int?
/**
* The x coordinate in range of 0 .. 1
* Multiply it with the width of the Window to get the real x coordinate
*/
float x;
/**
* The y coordinate in range of 0 .. 1
* Multiply it with the height of the Window to get the real y coordinate
*/
float y;
/**
* The quantity of pressure applied in range of 0 .. 1
*/
float pressure;
}
/**
* Represent Touch-Events
*
* Author: Randy Schuett (rswhite4@googlemail.com)
*/
interface Touch {
/**
* Returns of many Touch-Devices exist
*/
@@ -52,7 +52,7 @@ <h1>Dgame.System.Battery</h1>
</dd>
</dl>
</dd>
<dt><big><a name="System"></a>abstract class <u>System</u>;
<dt><big><a name="System"></a>interface <u>System</u>;
</big></dt>
<dd>The <u>System</u> struct contains the Power struct,
which give information about your current battery
@@ -5,7 +5,7 @@
<h1>Dgame.System.Keyboard</h1>
<!-- Generated by Ddoc from ..\System\Keyboard.d -->
<br><br>
<dl><dt><big><a name="Keyboard"></a>abstract class <u>Keyboard</u>;
<dl><dt><big><a name="Keyboard"></a>interface <u>Keyboard</u>;
</big></dt>
<dd>Represent the <u>Keyboard</u>
<br><br>
@@ -5,42 +5,42 @@
<h1>Dgame.System.Touch</h1>
<!-- Generated by Ddoc from ..\System\Touch.d -->
<br><br>
<dl><dt><big><a name="Touch"></a>abstract class <u>Touch</u>;
</big></dt>
<dd>Represent <u>Touch</u>-Events
<br><br>
<b>Author:</b><br>
Randy Schuett (rswhite4@googlemail.com)<br><br>
<dl><dt><big><a name="Touch.Finger"></a>struct <u>Finger</u>;
<dl><dt><big><a name="Finger"></a>struct <u>Finger</u>;
</big></dt>
<dd>The <u>Finger</u> structure<br><br>
<dl><dt><big><a name="Touch.Finger.id"></a>long <u>id</u>;
<dl><dt><big><a name="Finger.id"></a>long <u>id</u>;
</big></dt>
<dd>The Finger ID<br><br>
</dd>
<dt><big><a name="Touch.Finger.x"></a>float <u>x</u>;
<dt><big><a name="Finger.x"></a>float <u>x</u>;
</big></dt>
<dd>The <u>x</u> coordinate in range of 0 .. 1
Multiply it with the width of the Window to get the real <u>x</u> coordinate<br><br>
</dd>
<dt><big><a name="Touch.Finger.y"></a>float <u>y</u>;
<dt><big><a name="Finger.y"></a>float <u>y</u>;
</big></dt>
<dd>The <u>y</u> coordinate in range of 0 .. 1
Multiply it with the height of the Window to get the real <u>y</u> coordinate<br><br>
</dd>
<dt><big><a name="Touch.Finger.pressure"></a>float <u>pressure</u>;
<dt><big><a name="Finger.pressure"></a>float <u>pressure</u>;
</big></dt>
<dd>The quantity of <u>pressure</u> applied in range of 0 .. 1<br><br>
</dd>
</dl>
</dd>
<dt><big><a name="Touch.getNumOfDevices"></a>static nothrow @nogc int <u>getNumOfDevices</u>();
<dt><big><a name="Touch"></a>interface <u>Touch</u>;
</big></dt>
<dd>Represent <u>Touch</u>-Events
<br><br>
<b>Author:</b><br>
Randy Schuett (rswhite4@googlemail.com)<br><br>
<dl><dt><big><a name="Touch.getNumOfDevices"></a>static nothrow @nogc int <u>getNumOfDevices</u>();
</big></dt>
<dd>Returns of many Touch-Devices exist<br><br>

0 comments on commit ac846f0

Please sign in to comment.