-
Notifications
You must be signed in to change notification settings - Fork 3
/
EyeX.pas
8539 lines (7978 loc) · 303 KB
/
EyeX.pas
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
(*********************************************************************************************************************
* Delphi header file for EyeX v1.0
* Converted from the original C header files (Copyright 2013-2014 Tobii Technology AB, all rights reserved)
* by Alan McNicol, Ealanach Ltd
*********************************************************************************************************************)
//Compliler directives - 64bit code works only if Z4 is set (32 bit also works).
//The appropriate value value for $A (align) has not yet been determined
{$A4,Z4}
unit EyeX;
interface
const
TX_ENUM_STARTVALUE = 1;
TX_INTERNAL_ENUM_STARTVALUE = 10000000;
TX_FLAGS_NONE_VALUE = 0;
//If the eyeX dll is in the same folder as the exe file or is in the windows/system32 folder for the 64-bit dll and/or the windows/sysWOW64 folder for
//the 32-bit dll then no path is required and the below will function. If you wish the program to load
//the dll from a specific folder then add paths to the eyeXdll values below as appropriate.
{$IFDEF WIN32}
eyeXdll = 'Tobii.EyeX.Client.dll';
{$ENDIF}
{$IFDEF WIN64}
eyeXdll = 'Tobii.EyeX.Client.dll';
{$ENDIF}
(*********************************************************************************************************************
* EyeXLiterals.h
*********************************************************************************************************************)
(*********************************************************************************************************************
* Literals
*********************************************************************************************************************)
(**
* Message Literals
*)
const TX_LITERAL_HEADER: PAnsiChar ='Header';
const TX_LITERAL_BODY: PAnsiChar ='Body';
const TX_LITERAL_ID: PAnsiChar ='Id';
const TX_LITERAL_PROCESSID: PAnsiChar ='ProcessId';
(**
* Client Literals
*)
const TX_LITERAL_AGENTID: PAnsiChar ='AgentId';
const TX_LITERAL_TARGETPROCESSID: PAnsiChar ='TargetProcessId';
const TX_LITERAL_CLIENTMODE: PAnsiChar ='ClientMode';
(**
* Miscellaneous Literals
*)
const TX_LITERAL_TYPE: PAnsiChar ='Type';
const TX_LITERAL_TIMESTAMP: PAnsiChar ='Timestamp';
const TX_LITERAL_DATA: PAnsiChar ='Data';
const TX_LITERAL_PARAMETERS: PAnsiChar = 'Parameters';
const TX_LITERAL_X: PAnsiChar = 'X';
const TX_LITERAL_Y: PAnsiChar = 'Y';
const TX_LITERAL_Z: PAnsiChar = 'Z';
(**
* Bounds Literals
*)
const TX_LITERAL_BOUNDS: PAnsiChar = 'Bounds';
const TX_LITERAL_BOUNDSTYPE: PAnsiChar = 'BoundsType';
const TX_LITERAL_NONE: PAnsiChar = 'None';
const TX_LITERAL_RECTANGULAR: PAnsiChar = 'Rectangular';
const TX_LITERAL_TOP: PAnsiChar = 'Top';
const TX_LITERAL_LEFT: PAnsiChar = 'Left';
const TX_LITERAL_RIGHT: PAnsiChar = 'Right';
const TX_LITERAL_BOTTOM: PAnsiChar = 'Bottom';
const TX_LITERAL_WIDTH: PAnsiChar = 'Width';
const TX_LITERAL_HEIGHT: PAnsiChar = 'Height';
(**
* Interactor Literals
*)
const TX_LITERAL_ROOTID: PAnsiChar = '_RootId';
const TX_LITERAL_GLOBALINTERACTORWINDOWID: PAnsiChar = 'GlobalInteractorWindowId';
const TX_LITERAL_MASK: PAnsiChar = 'Mask';
const TX_LITERAL_MASKID: PAnsiChar = 'MaskId';
const TX_LITERAL_MASKBOUNDS: PAnsiChar = 'MaskBounds';
(**
* Mask Literals
*)
const TX_LITERAL_MASKTYPE: PAnsiChar = 'MaskType';
const TX_LITERAL_ROWCOUNT: PAnsiChar = 'RowCount';
const TX_LITERAL_COLUMNCOUNT: PAnsiChar = 'ColumnCount';
(**
* Gaze Point Data Behavior Literals
*)
const TX_LITERAL_GAZEPOINTDATAMODE: PAnsiChar = 'GazePointDataMode';
const TX_LITERAL_GAZEPOINTDATAEVENTTYPE: PAnsiChar = 'GazePointDataEventType';
(**
* Activation Behavior Literals
*)
const TX_LITERAL_ACTIVATABLEEVENTTYPE: PAnsiChar = 'ActivatableEventType';
const TX_LITERAL_HASACTIVATIONFOCUS: PAnsiChar = 'HasActivationFocus';
const TX_LITERAL_HASTENTATIVEACTIVATIONFOCUS: PAnsiChar = 'HasTentativeActivationFocus';
const TX_LITERAL_ISACTIVATED: PAnsiChar = 'IsActivated';
const TX_LITERAL_ISTENTATIVEFOCUSENABLED: PAnsiChar = 'IsTentativeFocusEnabled';
const TX_LITERAL_ISSMALLITEMDETECTIONENABLED: PAnsiChar = 'IsSmallItemDetectionEnabled';
(**
* Fixation Data Behavior Literals
*)
const TX_LITERAL_FIXATIONDATAMODE: PAnsiChar = 'FixationDataMode';
const TX_LITERAL_FIXATIONDATAEVENTTYPE: PAnsiChar = 'FixationDataEventType';
(**
* Action data Behavior Literals
*)
const TX_LITERAL_ACTIONDATAEVENTTYPE: PAnsiChar = 'ActionDataEventType';
const TX_LITERAL_ACTIVATIONMISSED: PAnsiChar = 'ActivationMissed';
(**
* Gaze-Aware Behavior Literals
*)
const TX_LITERAL_HASGAZE: PAnsiChar = 'HasGaze';
const TX_LITERAL_GAZEAWAREMODE: PAnsiChar = 'GazeAwareMode';
const TX_LITERAL_DELAYTIME: PAnsiChar = 'DelayTime';
(**
* Gaze Data Diagnostics Behavior Literals
*)
const TX_LITERAL_QUALITY: PAnsiChar = 'Quality';
const TX_LITERAL_NOISE: PAnsiChar = 'Noise';
const TX_LITERAL_INSACCADE: PAnsiChar = 'InSaccade';
const TX_LITERAL_INFIXATION: PAnsiChar = 'InFixation';
(**
* Eye Position Behavior Literals
*)
const TX_LITERAL_LEFTEYEPOSITION: PAnsiChar = 'LeftEyePosition';
const TX_LITERAL_RIGHTEYEPOSITION: PAnsiChar = 'RightEyePosition';
const TX_LITERAL_LEFTEYEPOSITIONNORMALIZED: PAnsiChar = 'LeftEyePositionNormalized';
const TX_LITERAL_RIGHTEYEPOSITIONNORMALIZED: PAnsiChar = 'RightEyePositionNormalized';
const TX_LITERAL_HASLEFTEYEPOSITION: PAnsiChar = 'HasLeftEyePosition';
const TX_LITERAL_HASRIGHTEYEPOSITION: PAnsiChar = 'HasRightEyePosition';
(**
* Presence Behavior Literals
*)
const TX_LITERAL_PRESENCEDATA: PAnsiChar = 'Presence';
(**
* Pannable Behavior Literals
*)
const TX_LITERAL_PANVELOCITYX: PAnsiChar = 'PanVelocityX';
const TX_LITERAL_PANVELOCITYY: PAnsiChar = 'PanVelocityY';
const TX_LITERAL_PANSTEPX: PAnsiChar = 'PanStepX';
const TX_LITERAL_PANSTEPY: PAnsiChar = 'PanStepY';
const TX_LITERAL_PANSTEPDURATION: PAnsiChar = 'PanStepDuration';
const TX_LITERAL_PANHANDSFREE: PAnsiChar = 'PanHandsFree';
const TX_LITERAL_PANPROFILE: PAnsiChar = 'Profile';
const TX_LITERAL_PANDIRECTIONSAVAILABLE: PAnsiChar = 'PanDirectionsAvailable';
const TX_LITERAL_PANPEAKVELOCITY: PAnsiChar = 'PeakVelocity';
const TX_LITERAL_PANADAPTVELOCITYTOVIEWPORT: PAnsiChar = 'AdaptVelocityToViewport';
const TX_LITERAL_PANMAXZONERELATIVESIZE: PAnsiChar = 'MaxPanZoneRelativeSize';
const TX_LITERAL_PANMAXZONESIZE: PAnsiChar = 'MaxPanZoneSize';
const TX_LITERAL_PANZONESIZE: PAnsiChar = 'PanZoneSize';
const TX_LITERAL_PANNABLEEVENTTYPE: PAnsiChar = 'PannableEventType';
(**
* Callback Response Literals
*)
const TX_LITERAL_REQUESTTYPE: PAnsiChar = 'RequestType';
const TX_LITERAL_REQUESTID: PAnsiChar = 'RequestId';
const TX_LITERAL_ERRORMESSAGE: PAnsiChar = 'ErrorMessage';
const TX_LITERAL_RESULT: PAnsiChar = 'Result';
(**
* Interaction Mode Literals
*)
const TX_LITERAL_ACTIONTYPE: PAnsiChar = 'ActionType';
(**
* State literals
*)
const TX_LITERAL_STATEPATH: PAnsiChar = 'StatePath';
const TX_LITERAL_STATEPATHDELIMITER: PAnsiChar = '.';
(*
* Configuration Tool Literals
*)
const TX_LITERAL_CONFIGURATIONTOOL: PAnsiChar = 'ConfigurationTool';
(*
* Current Profile Literals
*)
const TX_LITERAL_PROFILENAME: PAnsiChar = 'ProfileName';
(*********************************************************************************************************************)
(**
* Literals for state paths.
*
* @field TX_STATEPATH_EYETRACKING:
* The root node for all eyetracking information.
* GETTABLE.
*
* @field TX_STATEPATH_EYETRACKINGSCREENBOUNDS:
* Holds the virtual screen bounds in pixels.
* The value can be retrieved from the state bag as a TX_RECT structure with GetStateValueAsRectangle.
* If the screen bounds can not be determined screen bounds (0, 0, 0, 0) will be returned.
* Replaces deprecated state path TX_STATEPATH_SCREENBOUNDS from version 1.3.0.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_EYETRACKINGDISPLAYSIZE:
* Holds the display size in millimeters as width and height.
* The value can be retrieved from the state bag as a TX_SIZE2 structure with GetStateValueAsSize2.
* If the display size can not be determined Width and Height (0, 0) will be returned.
* Replaces deprecated state path TX_STATEPATH_DISPLAYSIZE from version 1.3.0.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_EYETRACKINGSTATE:
* Holds the eye tracking state. The value is of type TX_EYETRACKINGDEVICESTATUS.
* GETTABLE.
*
* @field TX_STATEPATH_EYETRACKINGCURRENTPROFILE:
* Holds the following data:
* 'name' - See TX_STATEPATH_EYETRACKINGCURRENTPROFILENAME.
* 'trackedeyes' - See TX_STATEPATH_EYETRACKINGCURRENTPROFILETRACKEDEYES.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_EYETRACKINGCURRENTPROFILENAME:
* Holds the name of the current eye tracking profile. The value is of type TX_STRING.
* Replaces deprecated state path TX_STATEPATH_PROFILENAME from version 1.3.0.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_EYETRACKINGCURRENTPROFILETRACKEDEYES:
* Holds the tracked eyes of the current eye tracking profile. The value is of type TX_TRACKEDEYES.
* GETTABLE and SETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_EYETRACKINGPROFILES:
* Holds the list of available eye tracking profiles. The value is an array of TX_STRING. It can be accessed with
* txGetStateValueAsString as a string containing all profiles separated with a null termination character.
* There is also a utility function available to access profiles as a std::vector of std::strings, see Tx::GetStateValueAsArrayOfStrings.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_EYETRACKINGCONFIGURATIONSTATUS:
* Holds the configuration status of the eye tracker. The value is of type TX_EYETRACKINGCONFIGURATIONSTATUS.
* GETTABLE.
* \since Version 1.1.0
*
* @field TX_STATEPATH_EYETRACKINGINFO:
* Holds information about the eye tracker.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_EYETRACKINGINFOMODELNAME:
* Eye tracker model name. The value is of type TX_STRING.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_EYETRACKINGINFOSERIALNUMBER:
* Eye tracker serial number. The value is of type TX_STRING.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_EYETRACKINGINFOGENERATION:
* Eye tracker generation name. The value is of type TX_STRING.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_EYETRACKINGINFOFIRMWAREVERSION:
* Eye tracker firmware version. The value is of type TX_STRING.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_EYETRACKINGINFOEYEXCONTROLLERCOREVERSION:
* EyeX Controller Core Version. The value is of type TX_STRING.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_ENGINEINFOVERSION:
* Reports the engine version. The value is of type TX_STRING.
* Replaces deprecated state path TX_STATEPATH_ENGINEVERSION since version 1.3.0.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_ENGINEINFOINTERNAL:
* Holds the following data:
* 'tobiiserviceversion' - The installed version of Tobii Service as TX_STRING or empty string if not installed.
* 'tobiieyexcontrollerdriverversion' - The installed version of Tobii EyeX Controller Driver as TX_STRING or empty string if not installed.
* 'tobiiusbserviceversion' - The installed version of Tobii USB Service version as TX_STRING or empty string if not installed.
* 'tobiieyexinteractionversion' - The installed version of Tobii EyeX Interaction as TX_STRING or empty string if not installed.
* 'tobiieyexconfigversion' - The installed version of Tobii EyeX Config as TX_STRING or empty string if not installed.
* GETTABLE.
* \since Version 1.3.0
*
* @field TX_STATEPATH_USERPRESENCE:
* Holds data about user presence. The value is of type TX_USERPRESENCE.
* The value of TX_USERPRESENCE will be TX_USERPRESENCE_UNKNOWN if there isn't any observer registered for this state.
* GETTABLE.
*
* @field TX_STATEPATH_FAILEDACTION:
* Notifies when interactions fail. The value is of type TX_FAILEDACTIONTYPE.
* SUBSCRIBABLE.
*
* @field TX_STATEPATH_INTERACTIONMODES:
* Holds the current engine interaction mode. The value is of type TX_INTERACTIONMODES.
* GETTABLE.
* \since Version 1.1.0
*
* @field TX_STATEPATH_PROFILENAME:
* Holds the name of the eye tracking profile used. The value is of type TX_STRING.
* Deprecated, use TX_STATEPATH_EYETRACKINGCURRENTPROFILENAME for engine version 1.3.0 and greater.
* GETTABLE.
*
* @field TX_STATEPATH_ENGINEVERSION:
* Reports the engine version. The value is of type TX_STRING.
* Deprecated, use TX_STATEPATH_ENGINEINFOVERSION for engine version 1.3.0 and greater.
* GETTABLE.
*
* @field TX_STATEPATH_SCREENBOUNDS:
* Holds the virtual screen bounds in pixels.
* The value can be retrieved from the state bag as a TX_RECT structure with GetStateValueAsRectangle.
* If the screen bounds can not be determined screen bounds (0, 0, 0, 0) will be returned.
* Deprecated, use TX_STATEPATH_EYETRACKINGSCREENBOUNDS for engine version 1.3.0 and greater.
* GETTABLE.
*
* @field TX_STATEPATH_DISPLAYSIZE:
* Holds the display size in millimeters as width and height.
* The value can be retrieved from the state bag as a TX_SIZE2 structure with GetStateValueAsSize2.
* If the display size can not be determined Width and Height (0, 0) will be returned.
* Deprecated, use TX_STATEPATH_EYETRACKINGDISPLAYSIZE for engine version 1.3.0 and greater.
* GETTABLE.
*
* @field TX_STATEPATH_CONFIGURATIONSTATUS:
* Holds the configuration status of the eye tracker. The value is of type TX_EYETRACKINGCONFIGURATIONSTATUS.
* \since Version 1.1.0
* Deprecated, use TX_STATEPATH_EYETRACKINGCONFIGURATIONSTATUS for engine version 1.3.0 and greater.
* GETTABLE.
*
*)
const
/// <summary>
/// The root node for all eyetracking information.
/// </summary>
TX_STATEPATH_EYETRACKING: PAnsiChar = 'eyeTracking';
const
/// <summary>
/// Holds the virtual screen bounds in pixels. <br />The value can be
/// retrieved from the state bag as a TX_RECT structure with
/// GetStateValueAsRectangle. <br />If the screen bounds can not be
/// determined screen bounds (0, 0, 0, 0) will be returned. <br /><br />
/// </summary>
/// <remarks>
/// Replaces deprecated state path TX_STATEPATH_SCREENBOUNDS from version
/// 1.3.0.
/// </remarks>
TX_STATEPATH_EYETRACKINGSCREENBOUNDS: PAnsiChar = 'eyeTracking.screenBounds';
const
/// <summary>
/// Holds the display size in millimeters as width and height. <br />The
/// value can be retrieved from the state bag as a TX_SIZE2 structure
/// with GetStateValueAsSize2. <br />If the display size can not be
/// determined Width and Height (0, 0) will be returned. <br />
/// </summary>
/// <remarks>
/// Replaces deprecated state path TX_STATEPATH_DISPLAYSIZE from version
/// 1.3.0.
/// </remarks>
TX_STATEPATH_EYETRACKINGDISPLAYSIZE: PAnsiChar = 'eyeTracking.displaySize';
const
/// <summary>
/// Holds the eye tracking state. The value is of type
/// TX_EYETRACKINGDEVICESTATUS.
/// </summary>
TX_STATEPATH_EYETRACKINGSTATE: PAnsiChar = 'eyeTracking.state';
const
/// <summary>
/// Holds the list of available eye tracking profiles. The value is an
/// array of TX_STRING. It can be accessed with TxGetStateValueAsString
/// as a string containing all profiles separated with a null termination
/// character. <br />There is also a utility function available to access
/// profiles as a std::vector of std::strings, see
/// TxGetStateValueAsArrayOfStrings. <br />
/// </summary>
TX_STATEPATH_EYETRACKINGPROFILES: PAnsiChar = 'eyeTracking.profiles';
const
/// <summary>
/// Holds the name of the eye tracking profile used. The value is of type
/// TX_STRING. <br />Deprecated, use
/// TX_STATEPATH_EYETRACKINGCURRENTPROFILENAME for engine version 1.3.0
/// and greater. <br />
/// </summary>
TX_STATEPATH_EYETRACKINGCURRENTPROFILE: PAnsiChar = 'eyeTracking.currentprofile';
const
/// <summary>
/// Holds the name of the current eye tracking profile. The value is of
/// type TX_STRING. <br />Replaces deprecated state path
/// TX_STATEPATH_PROFILENAME from version 1.3.0.
/// </summary>
TX_STATEPATH_EYETRACKINGCURRENTPROFILENAME: PAnsiChar = 'eyeTracking.currentprofile.name';
const
/// <summary>
/// Holds the tracked eyes of the current eye tracking profile. The value
/// is of type TX_TRACKEDEYES.
/// </summary>
TX_STATEPATH_EYETRACKINGCURRENTPROFILETRACKEDEYES: PAnsiChar = 'eyeTracking.currentprofile.trackedeyes';
const
/// <summary>
/// Holds the configuration status of the eye tracker. The value is of
/// type TX_EYETRACKINGCONFIGURATIONSTATUS. <br />
/// </summary>
TX_STATEPATH_EYETRACKINGCONFIGURATIONSTATUS: PAnsiChar = 'eyeTracking.configurationStatus';
const
/// <summary>
/// EyeX Controller Core Version. The value is of type TX_STRING.
/// </summary>
TX_STATEPATH_EYETRACKINGINFO: PAnsiChar = 'eyeTracking.info';
const
/// <summary>
/// Eye tracker model name. The value is of type TX_STRING.
/// </summary>
TX_STATEPATH_EYETRACKINGINFOMODELNAME: PAnsiChar = 'eyeTracking.info.modelname';
const
/// <summary>
/// Eye tracker serial number. The value is of type TX_STRING.
/// </summary>
TX_STATEPATH_EYETRACKINGINFOSERIALNUMBER: PAnsiChar = 'eyeTracking.info.serialnumber';
const
/// <summary>
/// Eye tracker generation name. The value is of type TX_STRING.
/// </summary>
TX_STATEPATH_EYETRACKINGINFOGENERATION: PAnsiChar = 'eyeTracking.info.generation';
const
/// <summary>
/// Eye tracker firmware version. The value is of type TX_STRING.
/// </summary>
TX_STATEPATH_EYETRACKINGINFOFIRMWAREVERSION: PAnsiChar = 'eyeTracking.info.firmwareversion';
const TX_STATEPATH_EYETRACKINGINFOHASFIXEDDISPLAYAREA: PAnsiChar = 'eyeTracking.info.hasfixeddisplayarea';
const TX_STATEPATH_EYETRACKINGINFOTOBIIEYEXCONTROLLERCOREVERSION: PAnsiChar = 'eyeTracking.info.tobiieyexcontrollercoreversion';
const
/// <summary>
/// Reports the engine version. The value is of type TX_STRING. <br />
/// Replaces deprecated state path TX_STATEPATH_ENGINEVERSION since
/// version 1.3.0.
/// </summary>
TX_STATEPATH_ENGINEINFOVERSION: PAnsiChar = 'engine.info.version';
const
/// <summary>
/// Holds the following data: <br />* 'tobiiserviceversion' - The
/// installed version of Tobii Service as TX_STRING or empty string if
/// not installed. <br />* 'tobiieyexcontrollerdriverversion' - The
/// installed version of Tobii EyeX Controller Driver as TX_STRING or
/// empty string if not installed. <br />* 'tobiiusbserviceversion' - The
/// installed version of Tobii USB Service version as TX_STRING or empty
/// string if not installed. <br />* 'tobiieyexinteractionversion' - The
/// installed version of Tobii EyeX Interaction as TX_STRING or empty
/// string if not installed. <br />* 'tobiieyexconfigversion' - The
/// installed version of Tobii EyeX Config as TX_STRING or empty string
/// if not installed. <br />
/// </summary>
TX_STATEPATH_ENGINEINFOINTERNAL: PAnsiChar = 'engine.info.internal';
const TX_STATEPATH_GAZETRACKING: PAnsiChar = 'status.gazeTracking';
const
/// <summary>
/// Holds data about user presence. The value is of type TX_USERPRESENCE.
/// <br />The value of TX_USERPRESENCE will be TX_USERPRESENCE_UNKNOWN if
/// there isn't any observer registered for this state. <br />
/// </summary>
TX_STATEPATH_USERPRESENCE: PAnsiChar = 'userPresence';
const
/// <summary>
/// Notifies when interactions fail. The value is of type
/// TX_FAILEDACTIONTYPE.
/// </summary>
TX_STATEPATH_FAILEDACTION: PAnsiChar = 'failedAction';
const
/// <summary>
/// Holds the current engine interaction mode. The value is of type
/// TX_INTERACTIONMODES.
/// </summary>
TX_STATEPATH_INTERACTIONMODES: PAnsiChar = 'status.interaction.interactionModes';
(* Deprecated since version 1.3.0. For compatibility between client libs and engine version 1.2.1 or lesser *)
const
/// <summary>
/// Holds the name of the eye tracking profile used. The value is of type
/// TX_STRING. <br />Deprecated, use
/// TX_STATEPATH_EYETRACKINGCURRENTPROFILENAME for engine version 1.3.0
/// and greater.
/// </summary>
TX_STATEPATH_PROFILENAME: PAnsiChar = 'eyeTracking.profileName';
const
/// <summary>
/// Reports the engine version. The value is of type TX_STRING. <br />
/// Deprecated, use TX_STATEPATH_ENGINEINFOVERSION for engine version
/// 1.3.0 and greater.
/// </summary>
TX_STATEPATH_ENGINEVERSION: PAnsiChar = 'engineVersion';
const
/// <summary>
/// Holds the configuration status of the eye tracker. The value is of
/// type TX_EYETRACKINGCONFIGURATIONSTATUS.
/// </summary>
TX_STATEPATH_CONFIGURATIONSTATUS: PAnsiChar = 'eyeTracking.configurationStatus';
const
/// <summary>
/// Holds the virtual screen bounds in pixels. <br />* The value can be
/// retrieved from the state bag as a TX_RECT structure with
/// GetStateValueAsRectangle. <br />* If the screen bounds can not be
/// determined screen bounds (0, 0, 0, 0) will be returned. <br />*
/// Deprecated, use TX_STATEPATH_EYETRACKINGSCREENBOUNDS for engine
/// version 1.3.0 and greater.
/// </summary>
TX_STATEPATH_SCREENBOUNDS: PAnsiChar = 'eyeTracking.screenBounds';
const
/// <summary>
/// Holds the display size in millimeters as width and height. <br />*
/// The value can be retrieved from the state bag as a TX_SIZE2 structure
/// with GetStateValueAsSize2. <br />* If the display size can not be
/// determined Width and Height (0, 0) will be returned. <br />*
/// Deprecated, use TX_STATEPATH_EYETRACKINGDISPLAYSIZE for engine
/// version 1.3.0 and greater.
/// </summary>
TX_STATEPATH_DISPLAYSIZE: PAnsiChar = 'eyeTracking.displaySize';
(*********************************************************************************************************************)
(*********************************************************************************************************************
* Copyright 2013-2014 Tobii Technology AB. All rights reserved.
* EyeXConstants.h
*********************************************************************************************************************)
(*********************************************************************************************************************)
const
/// <summary>
/// Use this mask weight to indicate that a region of an interactor has no
/// weight (not interactable).
/// </summary>
TX_MASKWEIGHT_NONE: Byte = 0;
const
/// <summary>
/// Use this mask weight to indicate that a region of an interactor has a
/// default weight.
/// </summary>
TX_MASKWEIGHT_DEFAULT: Byte = 1;
const
/// <summary>
/// Use this mask weight to indicate that a region of an interactor has a
/// high weight (more likely to be interacted with).
/// </summary>
TX_MASKWEIGHT_HIGH: Byte = 255;
(*********************************************************************************************************************)
(*********************************************************************************************************************
* EyeXSharedLiterals.h
*********************************************************************************************************************)
(*********************************************************************************************************************
* Literals
*********************************************************************************************************************)
(**
* State literals
*)
const TX_SHAREDLITERAL_STATEPATH: PAnsiChar = 'StatePath';
(**
* Snapshot Literals
*)
const TX_SHAREDLITERAL_WINDOWIDS: PAnsiChar = 'WindowIds';
const TX_SHAREDLITERAL_INTERACTORS: PAnsiChar = 'Interactors';
const TX_SHAREDLITERAL_METADATA: PAnsiChar = 'Metadata';
const TX_SHAREDLITERAL_SERIALNUMBER: PAnsiChar = 'SerialNumber';
const TX_SHAREDLITERAL_MESSAGETYPE: PAnsiChar = 'MessageType';
const TX_SHAREDLITERAL_WINDOWID: PAnsiChar = 'WindowId';
const TX_SHAREDLITERAL_COMMANDTYPE: PAnsiChar = 'CommandType';
const TX_SHAREDLITERAL_ISVISIBLE: PAnsiChar = 'IsVisible';
(**
* Callback Response Literals
*)
const TX_SHAREDLITERAL_NOTIFICATIONTYPE: PAnsiChar = 'NotificationType';
(**
* Interactor Literals
*)
const TX_SHAREDLITERAL_BEHAVIORTYPE: PAnsiChar = 'BehaviorType';
const TX_SHAREDLITERAL_BEHAVIORS: PAnsiChar = 'Behaviors';
const TX_SHAREDLITERAL_PARENTID: PAnsiChar = 'ParentId';
const TX_SHAREDLITERAL_INTERACTORID: PAnsiChar = 'InteractorId';
const TX_SHAREDLITERAL_ISENABLED: PAnsiChar = 'IsEnabled';
const TX_SHAREDLITERAL_ISDELETED: PAnsiChar = 'IsDeleted';
const TX_CONNECTIONTOKEN_GETVERSION: PAnsiChar = 'GET_VERSION';
const TX_CONNECTIONTOKEN_GETMINORVERSION: PAnsiChar = 'GET_MINORVERSION';
const TX_CONNECTIONTOKEN_CONNECT: PAnsiChar = 'CONNECT';
const TX_CONNECTIONTOKEN_CLIENTVERSION: PAnsiChar = 'CLIENT_VERSION';
const TX_CONNECTIONTOKEN_CLIENTMODE: PAnsiChar = 'CLIENT_MODE';
const TX_CONNECTIONTOKEN_CLIENTID: PAnsiChar = 'CLIENT_ID';
const TX_CONNECTIONTOKEN_LITERALLIST: PAnsiChar = 'LITERAL_LIST';
(*********************************************************************************************************************)
(*********************************************************************************************************************
* Copyright 2013-2014 Tobii Technology AB. All rights reserved.
* EyeXFrameworkTypes.h
*********************************************************************************************************************)
type
/// <summary>
/// Enumeration for all result codes returned by the API functions.
/// </summary>
TX_RESULT = (
/// <summary>
/// Unknown error, typically returned if something unexpected occurs in
/// the API. Is most likely a bug in the API.
/// </summary>
TX_RESULT_UNKNOWN = TX_ENUM_STARTVALUE,
/// <summary>
/// Everything went well.
/// </summary>
TX_RESULT_OK,
/// <summary>
/// The EyeX client environment is not initalized. All API functions
/// except txInitializeEyeX requires the EyeX client environment to be
/// initialized prior to being called. <br />
/// </summary>
TX_RESULT_EYEXNOTINITIALIZED,
/// <summary>
/// The EyeX client environment has already been initialized. This is
/// returned by txInitializeEyeX if called twice without being
/// uninitialized in between. <br />
/// </summary>
TX_RESULT_EYEXALREADYINITIALIZED,
/// <summary>
/// The EyeX client environment is still in use. This is returned by
/// txUninitializeEyeX if at least one context is still being used.
/// </summary>
TX_RESULT_EYEXSTILLINUSE,
/// <summary>
/// An invalid argument was passed to an API function. All arguments are
/// checked before an API function actually does something. There are
/// many reasons why an argument can be considered invalid. Check the log
/// for more details if this code is returned. <br />
/// </summary>
TX_RESULT_INVALIDARGUMENT,
/// <summary>
/// The handle for an interaction object is not valid.
/// </summary>
TX_RESULT_INVALIDHANDLE,
/// <summary>
/// Generic result code when something could not be found.
/// </summary>
TX_RESULT_NOTFOUND,
/// <summary>
/// Some buffer; string, array, etc had an invalid size. Typically, API
/// functions that return this result code also provides the required
/// size. <br />
/// </summary>
TX_RESULT_INVALIDBUFFERSIZE,
/// <summary>
/// An attempt has been made to create a property that does already
/// exist.
/// </summary>
TX_RESULT_DUPLICATEPROPERTY,
/// <summary>
/// An attempt has been made to create bounds that already exists.
/// </summary>
TX_RESULT_DUPLICATEBOUNDS,
/// <summary>
/// An attempt has been made to create a behavior that already exists.
/// </summary>
TX_RESULT_DUPLICATEBEHAVIOR,
/// <summary>
/// An attempt has been made to create an interactor with the same id as
/// another in the same snapshot.
/// </summary>
TX_RESULT_DUPLICATEINTERACTOR,
/// <summary>
/// An attempt has been made to register the same state observer twice.
/// </summary>
TX_RESULT_DUPLICATESTATEOBSERVER,
/// <summary>
/// An attempt has been made to create more than one mask on an
/// interactor.
/// </summary>
TX_RESULT_DUPLICATEMASK,
/// <summary>
/// A type specific operation has been made on a property of a different
/// type. For example a property containing a TX_INTEGER has been
/// requested for its value as a TX_STRING.
/// </summary>
TX_RESULT_INVALIDPROPERTYTYPE,
/// <summary>
/// The specified property name is invalid.
/// </summary>
TX_RESULT_INVALIDPROPERTYNAME,
/// <summary>
/// An attempt has been made to remove a property that is not removable.
/// Typically such properties are the ones backing up data that is
/// required on different interaction objects.
/// </summary>
TX_RESULT_PROPERTYNOTREMOVABLE,
/// <summary>
/// An attempt was made to perform an operation that requires a valid
/// connection to the client.
/// </summary>
TX_RESULT_NOTCONNECTED,
/// <summary>
/// A handle for a different type of interaction object than expected was
/// provided.
/// </summary>
TX_RESULT_INVALIDOBJECTCAST,
/// <summary>
/// An attempt was made to perform an operation on a thread that is not
/// allowed to perform such an operation. For example a context can not
/// be deleted on a callback from the API. <br />
/// </summary>
TX_RESULT_INVALIDTHREAD,
/// <summary>
/// An attempt was made to perform an operation that does not apply to
/// the current bounds type.
/// </summary>
TX_RESULT_INVALIDBOUNDSTYPE,
/// <summary>
/// An attempt was made to perform an operation that does not apply to
/// the current behavior type.
/// </summary>
TX_RESULT_INVALIDBEHAVIORTYPE,
/// <summary>
/// A leakage of an interaction object has been detected. May be returned
/// by a successful txReleaseContext call where some object were not
/// released properly.
/// </summary>
TX_RESULT_OBJECTLEAKAGE,
/// <summary>
/// An attempt to retrieve tracked object has been made without tracking
/// of objects being enabled.
/// </summary>
TX_RESULT_OBJECTTRACKINGNOTENABLED,
/// <summary>
/// The snapshot committed to the client contained some invalid data.
/// </summary>
TX_RESULT_INVALIDSNAPSHOT,
/// <summary>
/// The submitted command was malformed or not recognized by the client.
/// </summary>
TX_RESULT_INVALIDCOMMAND,
/// <summary>
/// An attempt has been made to perform an operation that is not
/// supported during shutdown.
/// </summary>
TX_RESULT_CANCELLED,
/// <summary>
/// The scheduling mode is invalid.
/// </summary>
TX_RESULT_INVALIDSCHEDULINGMODE,
/// <summary>
/// The supplied mask is too large, width*height must be less than 65536
/// </summary>
TX_RESULT_MASKTOOLARGE,
/// <summary>
/// The submitted command can not be executed in the current state of the
/// eye tracker
/// </summary>
TX_RESULT_INVALIDEYETRACKERSTATE
);
TTxResult = TX_RESULT;
PTxResult = ^TTxResult;
(*********************************************************************************************************************
* Interaction Object Types
*********************************************************************************************************************)
/// <summary>
/// Enumeration for all the types of interaction objects that can be
/// exposed through the API.
/// </summary>
TX_INTERACTIONOBJECTTYPE = (
/// <summary>
/// The object is a snapshot.
/// </summary>
TX_INTERACTIONOBJECTTYPE_SNAPSHOT = TX_ENUM_STARTVALUE,
/// <summary>
/// The object is an interactor.
/// </summary>
TX_INTERACTIONOBJECTTYPE_INTERACTOR,
/// <summary>
/// The object is a query.
/// </summary>
TX_INTERACTIONOBJECTTYPE_QUERY,
/// <summary>
/// The object is an event.
/// </summary>
TX_INTERACTIONOBJECTTYPE_EVENT,
/// <summary>
/// The object is a behavior.
/// </summary>
TX_INTERACTIONOBJECTTYPE_BEHAVIOR,
/// <summary>
/// The object is a bounds structure.
/// </summary>
TX_INTERACTIONOBJECTTYPE_BOUNDS,
/// <summary>
/// The object is a property bag. <br />
/// </summary>
TX_INTERACTIONOBJECTTYPE_PROPERTYBAG,
/// <summary>
/// The object is a command.
/// </summary>
TX_INTERACTIONOBJECTTYPE_COMMAND,
/// <summary>
/// The object is a state bag.
/// </summary>
TX_INTERACTIONOBJECTTYPE_STATEBAG,
/// <summary>
/// The object is a notification.
/// </summary>
TX_INTERACTIONOBJECTTYPE_NOTIFICATION,
/// <summary>
/// The object is a mask.
/// </summary>
TX_INTERACTIONOBJECTTYPE_MASK,
/// <summary>
/// The object is an asyncdata structure.
/// </summary>
TX_INTERACTIONOBJECTTYPE_ASYNCDATA,
{ for internal use only }
/// <summary>
/// The object is an internal message.
/// </summary>
TX_INTERACTIONOBJECTTYPE_INTERNAL_MESSAGE = TX_INTERNAL_ENUM_STARTVALUE,
/// <summary>
/// The object is an internal messageheader.
/// </summary>
TX_INTERACTIONOBJECTTYPE_INTERNAL_MESSAGEHEADER
);
/// <summary>
/// <para>
/// Enumeration for all message types.
/// </para>
/// <para>
/// The messages type is metadata contained by all packets sent between
/// the client and server.
/// </para>
/// <para>
/// Some messages should be handled by the application to do proper
/// interaction, others are internal and should be ignored. <br />
/// </para>
/// </summary>
TX_MESSAGETYPE = (
/// <summary>
/// Message contains a query.
/// </summary>
TX_MESSAGETYPE_QUERY = TX_ENUM_STARTVALUE,
/// <summary>
/// Message contains an event.
/// </summary>
TX_MESSAGETYPE_EVENT,
/// <summary>
/// Message contains a notification. This is an internal message type.
/// </summary>
TX_MESSAGETYPE_NOTIFICATION = TX_INTERNAL_ENUM_STARTVALUE,
/// <summary>
/// Message contains a request. This is an internal message type.
/// </summary>
TX_MESSAGETYPE_REQUEST,
/// <summary>
/// Message contains a response. This is an internal message type.
/// </summary>
TX_MESSAGETYPE_RESPONSE,
/// <summary>
/// Base value for custom message defined by other protocols.
/// </summary>
TX_MESSAGETYPE_CUSTOM
);
/// <summary>
/// <para>
/// Enumeration for all notification types.
/// </para>
/// <para>
/// The notification type is metadata contained by all notifications to
/// specify what kind of notification it is. <br />
/// </para>
/// </summary>
TX_NOTIFICATIONTYPE = (
/// <summary>
/// Notifies that some states have changed.
/// </summary>
TX_NOTIFICATIONTYPE_STATECHANGED = TX_ENUM_STARTVALUE,
TX_NOTIFICATIONTYPE_DIAGNOSTICSDATA
);
/// <summary>
/// <para>
/// Enumeration for all behavior types. <br />
/// </para>
/// <para>
/// The behavior type is metadata contained by all behaviors to specify
/// what kind of behavior it is. <br />
/// </para>
/// </summary>
TX_BEHAVIORTYPE = (
/// <summary>
/// Behavior used on interactors to receive gaze point data.
/// </summary>
TX_BEHAVIORTYPE_GAZEPOINTDATA = TX_ENUM_STARTVALUE,
/// <summary>
/// Behavior used on interactors to receive eye position data.
/// </summary>
TX_BEHAVIORTYPE_EYEPOSITIONDATA,
/// <summary>
/// Behavior used on interactors to perform gaze-aware interaction.
/// </summary>
TX_BEHAVIORTYPE_GAZEAWARE,
/// <summary>
/// Behavior used on interactors to perform activation interaction. <br />
/// </summary>
TX_BEHAVIORTYPE_ACTIVATABLE,
/// <summary>
/// Behavior used on interactors to perform panning interaction.
/// </summary>
TX_BEHAVIORTYPE_PANNABLE,
/// <summary>
/// Behavior used on interactors to receive fixation data.
/// </summary>
TX_BEHAVIORTYPE_FIXATIONDATA,
{ For Internal use }
TX_INTERNAL_BEHAVIORTYPE_RAWGAZEDATA = TX_INTERNAL_ENUM_STARTVALUE,
TX_INTERNAL_BEHAVIORTYPE_ZOOMABLE,
TX_BEHAVIORTYPE_GAZEDATADIAGNOSTICS
);
TTxBehaviortype = TX_BEHAVIORTYPE;
PTxBehaviortype = ^TTxBehaviortype;
(*********************************************************************************************************************)
(**
Enumeration for all bounds types.
@field TX_BOUNDSTYPE_NONE:
No bounds.
@field TX_BOUNDSTYPE_RECTANGULAR:
Rectangular bounds.
*)
TX_BOUNDSTYPE = (
TX_BOUNDSTYPE_NONE = TX_ENUM_STARTVALUE,
TX_BOUNDSTYPE_RECTANGULAR
);
/// <summary>
/// <para>
/// Enumeration for all activation event types. <br />
/// </para>
/// <para>
/// Activatable event type are metadata contained by all behaviors of
/// type TX_BEHAVIORTYPE_ACTIVATABLE sent from the client. This event
/// type specifies what kind of activation event actually happened. <br />
/// </para>
/// </summary>
TX_ACTIVATABLEEVENTTYPE = (
/// <summary>
/// The interactor has been activated.
/// </summary>
TX_ACTIVATABLEEVENTTYPE_ACTIVATED = TX_ENUM_STARTVALUE,
/// <summary>
/// The activation focus and/or tentative activation focus has changed. <br />
/// </summary>
TX_ACTIVATABLEEVENTTYPE_ACTIVATIONFOCUSCHANGED
);