summaryrefslogtreecommitdiff
path: root/packages/cocoaint/src/gamecontroller/GCMotion.inc
blob: 5b791be4f2a93ac106ee6b4f7c9e502873263462 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{ Parsed from GameController.framework GCMotion.h }


{ Types from GCMotion }
{$ifdef TYPES}


type
  GCMotionValueChangedHandler = OpaqueCBlock;
{$endif}


{$ifdef TYPES}
type
  GCMotionPtr = ^GCMotion;
{$endif}

{$ifdef TYPES}
type
  GCAcceleration = record
    x, y, z: double;
  end;
type
  GCAccelerationPtr = ^GCAcceleration;
type
  GCRotationRate = record
    x, y, z: double;
  end;
type
  GCRotationRatePtr = ^GCRotationRate;
type
  GCQuaternion = record
    x, y, z, w: double;
  end;
type
  GCQuaternionPtr = ^GCQuaternion;
{$endif}

{$ifdef CLASSES}

type
  GCMotion = objcclass external (NSObject)
  public
    {$if  not defined(__has_feature)}
    function controller: GCController; message 'controller';
    {$else}
    function controller_: GCController; message 'controller';
    {$endif}
    procedure setValueChangedHandler(newValue: GCMotionValueChangedHandler); message 'setValueChangedHandler:';
    function valueChangedHandler: GCMotionValueChangedHandler; message 'valueChangedHandler';
    function gravity: GCAcceleration; message 'gravity';
    function userAcceleration: GCAcceleration; message 'userAcceleration';
    function attitude: GCQuaternion; message 'attitude';
    function rotationRate: GCRotationRate; message 'rotationRate';
  end;
{$endif}