From 72c46bdd7f5d430ab1ad1d420ed77c7f22df857a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sat, 30 Sep 2017 15:01:35 +0200 Subject: rename --- Tobii EyeX/samples/.vs/Samples/v14/.suo | Bin 19456 -> 0 bytes .../ActivatableBoardGame/ActivatableBoardGame.cpp | 54 --- .../ActivatableBoardGame/ActivatableBoardGame.ico | Bin 2998 -> 0 bytes .../ActivatableBoardGame/ActivatableBoardGame.rc | Bin 8056 -> 0 bytes .../ActivatableBoardGame.vcxproj | 193 -------- .../ActivatableBoardGame.vcxproj.filters | 70 --- Tobii EyeX/samples/ActivatableBoardGame/Board.cpp | 220 ---------- Tobii EyeX/samples/ActivatableBoardGame/Board.h | 110 ----- .../samples/ActivatableBoardGame/BoardWindow.cpp | 488 --------------------- .../samples/ActivatableBoardGame/BoardWindow.h | 94 ---- .../ActivatableBoardGame.lastbuildstate | 2 - .../Debug/Activata.2732E876.tlog/CL.command.1.tlog | Bin 4002 -> 0 bytes .../Debug/Activata.2732E876.tlog/CL.read.1.tlog | Bin 97924 -> 0 bytes .../Debug/Activata.2732E876.tlog/CL.write.1.tlog | Bin 2792 -> 0 bytes .../Activata.2732E876.tlog/link.command.1.tlog | Bin 2284 -> 0 bytes .../Debug/Activata.2732E876.tlog/link.read.1.tlog | Bin 4972 -> 0 bytes .../Debug/Activata.2732E876.tlog/link.write.1.tlog | Bin 1100 -> 0 bytes .../Debug/Activata.2732E876.tlog/rc.command.1.tlog | Bin 432 -> 0 bytes .../Debug/Activata.2732E876.tlog/rc.read.1.tlog | Bin 2714 -> 0 bytes .../Debug/Activata.2732E876.tlog/rc.write.1.tlog | Bin 286 -> 0 bytes .../Debug/ActivatableBoardGame.log | 8 - .../Debug/ActivatableBoardGame.obj | Bin 131239 -> 0 bytes .../Debug/ActivatableBoardGame.pch | Bin 8323072 -> 0 bytes .../Debug/ActivatableBoardGame.res | Bin 7312 -> 0 bytes .../samples/ActivatableBoardGame/Debug/Board.obj | Bin 257029 -> 0 bytes .../ActivatableBoardGame/Debug/BoardWindow.obj | Bin 348456 -> 0 bytes .../ActivatableBoardGame/Debug/EyeXHost.obj | Bin 353721 -> 0 bytes .../samples/ActivatableBoardGame/Debug/stdafx.obj | Bin 142759 -> 0 bytes .../samples/ActivatableBoardGame/Debug/vc140.idb | Bin 1330176 -> 0 bytes .../samples/ActivatableBoardGame/Debug/vc140.pdb | Bin 1552384 -> 0 bytes .../samples/ActivatableBoardGame/EyeXHost.cpp | 377 ---------------- Tobii EyeX/samples/ActivatableBoardGame/EyeXHost.h | 111 ----- Tobii EyeX/samples/ActivatableBoardGame/Observer.h | 13 - Tobii EyeX/samples/ActivatableBoardGame/Resource.h | Bin 2126 -> 0 bytes Tobii EyeX/samples/ActivatableBoardGame/small.ico | Bin 2998 -> 0 bytes Tobii EyeX/samples/ActivatableBoardGame/stdafx.cpp | 3 - Tobii EyeX/samples/ActivatableBoardGame/stdafx.h | 17 - .../samples/ActivatableBoardGame/targetver.h | 8 - .../ActivatableButtons/ActivatableButtons.cpp | 357 --------------- .../ActivatableButtons/ActivatableButtons.ico | Bin 2998 -> 0 bytes .../ActivatableButtons/ActivatableButtons.rc | Bin 5276 -> 0 bytes .../ActivatableButtons/ActivatableButtons.vcxproj | 188 -------- .../ActivatableButtons.vcxproj.filters | 55 --- .../ActivatableButtons.lastbuildstate | 2 - .../Debug/Activata.3E2A1867.tlog/CL.command.1.tlog | Bin 2374 -> 0 bytes .../Debug/Activata.3E2A1867.tlog/CL.read.1.tlog | Bin 62318 -> 0 bytes .../Debug/Activata.3E2A1867.tlog/CL.write.1.tlog | Bin 1784 -> 0 bytes .../Activata.3E2A1867.tlog/link.command.1.tlog | Bin 1924 -> 0 bytes .../Debug/Activata.3E2A1867.tlog/link.read.1.tlog | Bin 4432 -> 0 bytes .../Debug/Activata.3E2A1867.tlog/link.write.1.tlog | Bin 820 -> 0 bytes .../Debug/Activata.3E2A1867.tlog/rc.command.1.tlog | Bin 412 -> 0 bytes .../Debug/Activata.3E2A1867.tlog/rc.read.1.tlog | Bin 2686 -> 0 bytes .../Debug/Activata.3E2A1867.tlog/rc.write.1.tlog | Bin 270 -> 0 bytes .../Debug/ActivatableButtons.log | 6 - .../Debug/ActivatableButtons.obj | Bin 286795 -> 0 bytes .../Debug/ActivatableButtons.pch | Bin 8323072 -> 0 bytes .../Debug/ActivatableButtons.res | Bin 6584 -> 0 bytes .../samples/ActivatableButtons/Debug/EyeXHost.obj | Bin 344750 -> 0 bytes .../samples/ActivatableButtons/Debug/stdafx.obj | Bin 142737 -> 0 bytes .../samples/ActivatableButtons/Debug/vc140.idb | Bin 1289216 -> 0 bytes .../samples/ActivatableButtons/Debug/vc140.pdb | Bin 1486848 -> 0 bytes Tobii EyeX/samples/ActivatableButtons/EyeXHost.cpp | 294 ------------- Tobii EyeX/samples/ActivatableButtons/EyeXHost.h | 79 ---- Tobii EyeX/samples/ActivatableButtons/Resource.h | Bin 1814 -> 0 bytes Tobii EyeX/samples/ActivatableButtons/small.ico | Bin 2998 -> 0 bytes Tobii EyeX/samples/ActivatableButtons/stdafx.cpp | 3 - Tobii EyeX/samples/ActivatableButtons/stdafx.h | 17 - Tobii EyeX/samples/ActivatableButtons/targetver.h | 8 - .../samples/CopyEyeXDllToOutputDirectory.targets | 19 - Tobii EyeX/samples/Debug/ActivatableBoardGame.exe | Bin 170496 -> 0 bytes Tobii EyeX/samples/Debug/ActivatableBoardGame.ilk | Bin 836812 -> 0 bytes Tobii EyeX/samples/Debug/ActivatableBoardGame.pdb | Bin 2412544 -> 0 bytes Tobii EyeX/samples/Debug/ActivatableButtons.exe | Bin 123904 -> 0 bytes Tobii EyeX/samples/Debug/ActivatableButtons.ilk | Bin 668848 -> 0 bytes Tobii EyeX/samples/Debug/ActivatableButtons.pdb | Bin 2142208 -> 0 bytes .../samples/Debug/MinimalEyePositionDataStream.exe | Bin 48128 -> 0 bytes .../samples/Debug/MinimalEyePositionDataStream.ilk | Bin 376208 -> 0 bytes .../samples/Debug/MinimalEyePositionDataStream.pdb | Bin 634880 -> 0 bytes .../samples/Debug/MinimalFixationDataStream.exe | Bin 46080 -> 0 bytes .../samples/Debug/MinimalFixationDataStream.ilk | Bin 368880 -> 0 bytes .../samples/Debug/MinimalFixationDataStream.pdb | Bin 634880 -> 0 bytes Tobii EyeX/samples/Debug/MinimalGazeDataStream.exe | Bin 46080 -> 0 bytes Tobii EyeX/samples/Debug/MinimalGazeDataStream.ilk | Bin 368508 -> 0 bytes Tobii EyeX/samples/Debug/MinimalGazeDataStream.pdb | Bin 634880 -> 0 bytes .../samples/Debug/MinimalStatusNotifications.exe | Bin 48128 -> 0 bytes .../samples/Debug/MinimalStatusNotifications.ilk | Bin 373656 -> 0 bytes .../samples/Debug/MinimalStatusNotifications.pdb | Bin 634880 -> 0 bytes Tobii EyeX/samples/Debug/MinimalUserProfiles.exe | Bin 109568 -> 0 bytes Tobii EyeX/samples/Debug/MinimalUserProfiles.ilk | Bin 542504 -> 0 bytes Tobii EyeX/samples/Debug/MinimalUserProfiles.pdb | Bin 1249280 -> 0 bytes Tobii EyeX/samples/Debug/Tobii.EyeX.Client.dll | Bin 824536 -> 0 bytes .../Debug/MinimalE.6D2CFFFE.tlog/CL.command.1.tlog | Bin 798 -> 0 bytes .../Debug/MinimalE.6D2CFFFE.tlog/CL.read.1.tlog | Bin 23524 -> 0 bytes .../Debug/MinimalE.6D2CFFFE.tlog/CL.write.1.tlog | Bin 616 -> 0 bytes .../MinimalEyePositionDataStream.lastbuildstate | 2 - .../MinimalE.6D2CFFFE.tlog/link.command.1.tlog | Bin 1336 -> 0 bytes .../Debug/MinimalE.6D2CFFFE.tlog/link.read.1.tlog | Bin 3182 -> 0 bytes .../Debug/MinimalE.6D2CFFFE.tlog/link.write.1.tlog | Bin 550 -> 0 bytes .../Debug/MinimalEyePositionDataStream.log | 2 - .../Debug/MinimalEyePositionDataStream.obj | Bin 76309 -> 0 bytes .../MinimalEyePositionDataStream/Debug/vc140.idb | Bin 265216 -> 0 bytes .../MinimalEyePositionDataStream/Debug/vc140.pdb | Bin 86016 -> 0 bytes .../MinimalEyePositionDataStream.c | 199 --------- .../MinimalEyePositionDataStream.vcxproj | 160 ------- .../MinimalEyePositionDataStream.vcxproj.filters | 6 - .../Debug/MinimalF.9345876F.tlog/CL.command.1.tlog | Bin 764 -> 0 bytes .../Debug/MinimalF.9345876F.tlog/CL.read.1.tlog | Bin 23366 -> 0 bytes .../Debug/MinimalF.9345876F.tlog/CL.write.1.tlog | Bin 580 -> 0 bytes .../MinimalFixationDataStream.lastbuildstate | 2 - .../MinimalF.9345876F.tlog/link.command.1.tlog | Bin 1300 -> 0 bytes .../Debug/MinimalF.9345876F.tlog/link.read.1.tlog | Bin 3158 -> 0 bytes .../Debug/MinimalF.9345876F.tlog/link.write.1.tlog | Bin 520 -> 0 bytes .../Debug/MinimalFixationDataStream.log | 2 - .../Debug/MinimalFixationDataStream.obj | Bin 72441 -> 0 bytes .../MinimalFixationDataStream/Debug/vc140.idb | Bin 265216 -> 0 bytes .../MinimalFixationDataStream/Debug/vc140.pdb | Bin 86016 -> 0 bytes .../MinimalFixationDataStream.c | 181 -------- .../MinimalFixationDataStream.vcxproj | 156 ------- .../MinimalFixationDataStream.vcxproj.filters | 6 - .../Debug/MinimalG.CB99F84F.tlog/CL.command.1.tlog | Bin 742 -> 0 bytes .../Debug/MinimalG.CB99F84F.tlog/CL.read.1.tlog | Bin 23350 -> 0 bytes .../Debug/MinimalG.CB99F84F.tlog/CL.write.1.tlog | Bin 532 -> 0 bytes .../MinimalGazeDataStream.lastbuildstate | 2 - .../MinimalG.CB99F84F.tlog/link.command.1.tlog | Bin 1252 -> 0 bytes .../Debug/MinimalG.CB99F84F.tlog/link.read.1.tlog | Bin 3126 -> 0 bytes .../Debug/MinimalG.CB99F84F.tlog/link.write.1.tlog | Bin 480 -> 0 bytes .../Debug/MinimalGazeDataStream.log | 2 - .../Debug/MinimalGazeDataStream.obj | Bin 71927 -> 0 bytes .../samples/MinimalGazeDataStream/Debug/vc140.idb | Bin 265216 -> 0 bytes .../samples/MinimalGazeDataStream/Debug/vc140.pdb | Bin 86016 -> 0 bytes .../MinimalGazeDataStream/MinimalGazeDataStream.c | 171 -------- .../MinimalGazeDataStream.vcxproj | 160 ------- .../MinimalGazeDataStream.vcxproj.filters | 6 - .../Debug/MinimalS.30C25EF3.tlog/CL.command.1.tlog | Bin 782 -> 0 bytes .../Debug/MinimalS.30C25EF3.tlog/CL.read.1.tlog | Bin 23370 -> 0 bytes .../Debug/MinimalS.30C25EF3.tlog/CL.write.1.tlog | Bin 592 -> 0 bytes .../MinimalStatusNotifications.lastbuildstate | 2 - .../MinimalS.30C25EF3.tlog/link.command.1.tlog | Bin 1312 -> 0 bytes .../Debug/MinimalS.30C25EF3.tlog/link.read.1.tlog | Bin 3166 -> 0 bytes .../Debug/MinimalS.30C25EF3.tlog/link.write.1.tlog | Bin 530 -> 0 bytes .../Debug/MinimalStatusNotifications.log | 2 - .../Debug/MinimalStatusNotifications.obj | Bin 72743 -> 0 bytes .../MinimalStatusNotifications/Debug/vc140.idb | Bin 265216 -> 0 bytes .../MinimalStatusNotifications/Debug/vc140.pdb | Bin 86016 -> 0 bytes .../MinimalStatusNotifications.c | 186 -------- .../MinimalStatusNotifications.vcxproj | 156 ------- .../MinimalStatusNotifications.vcxproj.filters | 6 - .../Debug/MinimalU.7644167B.tlog/CL.command.1.tlog | Bin 1394 -> 0 bytes .../Debug/MinimalU.7644167B.tlog/CL.read.1.tlog | Bin 39772 -> 0 bytes .../Debug/MinimalU.7644167B.tlog/CL.write.1.tlog | Bin 1208 -> 0 bytes .../MinimalUserProfiles.lastbuildstate | 2 - .../MinimalU.7644167B.tlog/link.command.1.tlog | Bin 1376 -> 0 bytes .../Debug/MinimalU.7644167B.tlog/link.read.1.tlog | Bin 3490 -> 0 bytes .../Debug/MinimalU.7644167B.tlog/link.write.1.tlog | Bin 576 -> 0 bytes .../Debug/MinimalUserProfiles.log | 4 - .../Debug/MinimalUserProfiles.obj | Bin 408719 -> 0 bytes .../samples/MinimalUserProfiles/Debug/stdafx.obj | Bin 4286 -> 0 bytes .../samples/MinimalUserProfiles/Debug/vc140.idb | Bin 887808 -> 0 bytes .../samples/MinimalUserProfiles/Debug/vc140.pdb | Bin 552960 -> 0 bytes .../MinimalUserProfiles/MinimalUserProfiles.cpp | 269 ------------ .../MinimalUserProfiles.vcxproj | 163 ------- .../MinimalUserProfiles.vcxproj.filters | 36 -- Tobii EyeX/samples/MinimalUserProfiles/ReadMe.txt | 40 -- Tobii EyeX/samples/MinimalUserProfiles/stdafx.cpp | 3 - Tobii EyeX/samples/MinimalUserProfiles/stdafx.h | 13 - Tobii EyeX/samples/MinimalUserProfiles/targetver.h | 8 - Tobii EyeX/samples/Samples.VC.db | Bin 36241408 -> 0 bytes Tobii EyeX/samples/Samples.sln | 85 ---- 168 files changed, 4828 deletions(-) delete mode 100755 Tobii EyeX/samples/.vs/Samples/v14/.suo delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.cpp delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.ico delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.rc delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.vcxproj delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.vcxproj.filters delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Board.cpp delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Board.h delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/BoardWindow.cpp delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/BoardWindow.h delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/ActivatableBoardGame.lastbuildstate delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/CL.command.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/CL.read.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/CL.write.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/link.command.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/link.read.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/link.write.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/rc.command.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/rc.read.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/rc.write.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.log delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.obj delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.pch delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.res delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/Board.obj delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/BoardWindow.obj delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/EyeXHost.obj delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/stdafx.obj delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/vc140.idb delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Debug/vc140.pdb delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/EyeXHost.cpp delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/EyeXHost.h delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Observer.h delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/Resource.h delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/small.ico delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/stdafx.cpp delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/stdafx.h delete mode 100755 Tobii EyeX/samples/ActivatableBoardGame/targetver.h delete mode 100755 Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.cpp delete mode 100755 Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.ico delete mode 100755 Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.rc delete mode 100755 Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.vcxproj delete mode 100755 Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.vcxproj.filters delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/ActivatableButtons.lastbuildstate delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/CL.command.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/CL.read.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/CL.write.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/link.command.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/link.read.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/link.write.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/rc.command.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/rc.read.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/rc.write.1.tlog delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.log delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.obj delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.pch delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.res delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/EyeXHost.obj delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/stdafx.obj delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/vc140.idb delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Debug/vc140.pdb delete mode 100755 Tobii EyeX/samples/ActivatableButtons/EyeXHost.cpp delete mode 100755 Tobii EyeX/samples/ActivatableButtons/EyeXHost.h delete mode 100755 Tobii EyeX/samples/ActivatableButtons/Resource.h delete mode 100755 Tobii EyeX/samples/ActivatableButtons/small.ico delete mode 100755 Tobii EyeX/samples/ActivatableButtons/stdafx.cpp delete mode 100755 Tobii EyeX/samples/ActivatableButtons/stdafx.h delete mode 100755 Tobii EyeX/samples/ActivatableButtons/targetver.h delete mode 100755 Tobii EyeX/samples/CopyEyeXDllToOutputDirectory.targets delete mode 100755 Tobii EyeX/samples/Debug/ActivatableBoardGame.exe delete mode 100755 Tobii EyeX/samples/Debug/ActivatableBoardGame.ilk delete mode 100755 Tobii EyeX/samples/Debug/ActivatableBoardGame.pdb delete mode 100755 Tobii EyeX/samples/Debug/ActivatableButtons.exe delete mode 100755 Tobii EyeX/samples/Debug/ActivatableButtons.ilk delete mode 100755 Tobii EyeX/samples/Debug/ActivatableButtons.pdb delete mode 100755 Tobii EyeX/samples/Debug/MinimalEyePositionDataStream.exe delete mode 100755 Tobii EyeX/samples/Debug/MinimalEyePositionDataStream.ilk delete mode 100755 Tobii EyeX/samples/Debug/MinimalEyePositionDataStream.pdb delete mode 100755 Tobii EyeX/samples/Debug/MinimalFixationDataStream.exe delete mode 100755 Tobii EyeX/samples/Debug/MinimalFixationDataStream.ilk delete mode 100755 Tobii EyeX/samples/Debug/MinimalFixationDataStream.pdb delete mode 100755 Tobii EyeX/samples/Debug/MinimalGazeDataStream.exe delete mode 100755 Tobii EyeX/samples/Debug/MinimalGazeDataStream.ilk delete mode 100755 Tobii EyeX/samples/Debug/MinimalGazeDataStream.pdb delete mode 100755 Tobii EyeX/samples/Debug/MinimalStatusNotifications.exe delete mode 100755 Tobii EyeX/samples/Debug/MinimalStatusNotifications.ilk delete mode 100755 Tobii EyeX/samples/Debug/MinimalStatusNotifications.pdb delete mode 100755 Tobii EyeX/samples/Debug/MinimalUserProfiles.exe delete mode 100755 Tobii EyeX/samples/Debug/MinimalUserProfiles.ilk delete mode 100755 Tobii EyeX/samples/Debug/MinimalUserProfiles.pdb delete mode 100755 Tobii EyeX/samples/Debug/Tobii.EyeX.Client.dll delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/CL.command.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/CL.read.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/CL.write.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/MinimalEyePositionDataStream.lastbuildstate delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/link.command.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/link.read.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/link.write.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalEyePositionDataStream.log delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalEyePositionDataStream.obj delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/vc140.idb delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/vc140.pdb delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/MinimalEyePositionDataStream.c delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/MinimalEyePositionDataStream.vcxproj delete mode 100755 Tobii EyeX/samples/MinimalEyePositionDataStream/MinimalEyePositionDataStream.vcxproj.filters delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/CL.command.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/CL.read.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/CL.write.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/MinimalFixationDataStream.lastbuildstate delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/link.command.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/link.read.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/link.write.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalFixationDataStream.log delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalFixationDataStream.obj delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/Debug/vc140.idb delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/Debug/vc140.pdb delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/MinimalFixationDataStream.c delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/MinimalFixationDataStream.vcxproj delete mode 100755 Tobii EyeX/samples/MinimalFixationDataStream/MinimalFixationDataStream.vcxproj.filters delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/CL.command.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/CL.read.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/CL.write.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/MinimalGazeDataStream.lastbuildstate delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/link.command.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/link.read.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/link.write.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalGazeDataStream.log delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalGazeDataStream.obj delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/Debug/vc140.idb delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/Debug/vc140.pdb delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/MinimalGazeDataStream.c delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/MinimalGazeDataStream.vcxproj delete mode 100755 Tobii EyeX/samples/MinimalGazeDataStream/MinimalGazeDataStream.vcxproj.filters delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/CL.command.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/CL.read.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/CL.write.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/MinimalStatusNotifications.lastbuildstate delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/link.command.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/link.read.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/link.write.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalStatusNotifications.log delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalStatusNotifications.obj delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/Debug/vc140.idb delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/Debug/vc140.pdb delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/MinimalStatusNotifications.c delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/MinimalStatusNotifications.vcxproj delete mode 100755 Tobii EyeX/samples/MinimalStatusNotifications/MinimalStatusNotifications.vcxproj.filters delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.command.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.read.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.write.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/MinimalUserProfiles.lastbuildstate delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.command.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.read.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.write.1.tlog delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalUserProfiles.log delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalUserProfiles.obj delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/Debug/stdafx.obj delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.idb delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.pdb delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.cpp delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.vcxproj delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.vcxproj.filters delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/ReadMe.txt delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/stdafx.cpp delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/stdafx.h delete mode 100755 Tobii EyeX/samples/MinimalUserProfiles/targetver.h delete mode 100755 Tobii EyeX/samples/Samples.VC.db delete mode 100755 Tobii EyeX/samples/Samples.sln (limited to 'Tobii EyeX/samples') diff --git a/Tobii EyeX/samples/.vs/Samples/v14/.suo b/Tobii EyeX/samples/.vs/Samples/v14/.suo deleted file mode 100755 index c6b0831..0000000 Binary files a/Tobii EyeX/samples/.vs/Samples/v14/.suo and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.cpp b/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.cpp deleted file mode 100755 index 4fbe055..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.cpp +++ /dev/null @@ -1,54 +0,0 @@ -/* - * ActivatableBoardGame sample: - * This is an example that demonstrates the use of Activatable interactors in the context of a board game. - * - * Copyright 2013 Tobii Technology AB. All rights reserved. - */ - -#include "stdafx.h" -#include -#include -#include -#include "Resource.h" -#include "Board.h" -#include "BoardWindow.h" - -#pragma comment (lib, "Gdiplus.lib") - -// Application entry point. -int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, - _In_opt_ HINSTANCE hPrevInstance, - _In_ LPTSTR lpCmdLine, - _In_ int nCmdShow) -{ - UNREFERENCED_PARAMETER(hPrevInstance); - UNREFERENCED_PARAMETER(lpCmdLine); - - // initialize the GDI+ library. - ULONG_PTR gdiplusToken; - Gdiplus::GdiplusStartupInput gdiplusStartupInput; - Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - // initialize the Board and the BoardWindow. - // these will be un-initialized automatically when they fall out of scope. - Board board(8); - BoardWindow::RegisterWindowClass(hInstance); - BoardWindow window(board, hInstance, nCmdShow); - - HACCEL hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_GOBANG)); - - // Main message loop - MSG msg; - while (GetMessage(&msg, NULL, 0, 0)) - { - if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - - Gdiplus::GdiplusShutdown(gdiplusToken); - - return (int) msg.wParam; -} diff --git a/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.ico b/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.ico deleted file mode 100755 index 449296f..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.ico and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.rc b/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.rc deleted file mode 100755 index 718dee1..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.rc and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.vcxproj b/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.vcxproj deleted file mode 100755 index 5b82b9c..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2732E876-973B-4453-AA9F-D306EFB11922} - Win32Proj - ActivatableBoardGame - - - - Application - true - v140 - Unicode - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - Application - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - Use - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - ..\..\include;%(AdditionalIncludeDirectories) - - - Windows - true - ..\..\lib\x86 - - - true - - - - - Use - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - ..\..\include;%(AdditionalIncludeDirectories) - - - Windows - true - ..\..\lib\x64 - - - true - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - ..\..\include;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - ..\..\lib\x86 - - - true - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - ..\..\include;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - ..\..\lib\x64 - - - true - - - - - - - - - - - - - - - - - - Create - Create - Create - Create - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.vcxproj.filters b/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.vcxproj.filters deleted file mode 100755 index 9baf12a..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/ActivatableBoardGame.vcxproj.filters +++ /dev/null @@ -1,70 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Board.cpp b/Tobii EyeX/samples/ActivatableBoardGame/Board.cpp deleted file mode 100755 index e59fc92..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/Board.cpp +++ /dev/null @@ -1,220 +0,0 @@ -/* - * ActivatableBoardGame sample: - * This is an example that demonstrates the use of Activatable interactors in the context of a board game. - * - * Copyright 2013 Tobii Technology AB. All rights reserved. - */ - -#include "stdafx.h" -#include "Board.h" -#include -#include -#include "Observer.h" - -// initialize the random number generator. -auto const seed = std::random_device()(); -std::mt19937 Board::_randomNumberGenerator(seed); - -Board::Board(int size) - : _size(size), _board(nullptr), _boardChangedObserver(nullptr) -{ - _board = new Marker[_size * _size]; - BeginNewGame(); -} - -Board::~Board() -{ - delete[] _board; -} - -void Board::InitBoard() -{ - for (int i = 0; i < _size; ++i) - { - for (int j = 0; j < _size; ++j) - { - SetMarkerAt(Position(i, j), Marker::None); - } - } - - SetMarkerAt(Position((_size - 1) / 2, (_size - 1) / 2), Marker::X); - SetMarkerAt(Position((_size - 1) / 2, (_size - 1) / 2 + 1), Marker::O); - SetMarkerAt(Position((_size - 1) / 2 + 1, (_size - 1) / 2), Marker::O); - SetMarkerAt(Position((_size - 1) / 2 + 1, (_size - 1) / 2 + 1), Marker::X); -} - -Board::Marker Board::GetMarkerAt(Position position) const -{ - assert(IsValidPosition(position)); - - return _board[position.column + position.row * _size]; -} - -void Board::SetMarkerAt(Position position, Marker marker) -{ - assert(IsValidPosition(position)); - - _board[position.column + position.row * _size] = marker; - - NotifyObserver(); -} - -void Board::MakeHumanPlayerMove(Position position) -{ - if (_playerInTurn == Marker::X && - !IsGameOver() && - GetMarkerAt(position) == Marker::None) - { - MakeMove(position); - - if (!IsGameOver()) - { - MakeAIPlayerMove(); - } - } -} - -bool Board::CanMakeMoveAt(Position position) const -{ - return IsValidPosition(position) && - GetMarkerAt(position) == Marker::None; -} - -void Board::BeginNewGame() -{ - InitBoard(); - _playerInTurn = Marker::X; - _winner = Marker::None; -} - -bool Board::IsValidPosition(Position position) const -{ - return 0 <= position.row && position.row < _size && - 0 <= position.column && position.column < _size; -} - -void Board::MakeAIPlayerMove() -{ - // generate the list of all possible moves. not that they are good or anything, just possible. - std::vector possibleMoves; - for (int i = 0; i < _size; i++) - { - for (int j = 0; j < _size; j++) - { - Position position(i, j); - if (GetMarkerAt(position) == Marker::None) - { - possibleMoves.push_back(position); - } - } - } - - // since we check whether the game is a draw before calling this method, there should always be at least one possible move. - assert(possibleMoves.size() > 0); - - // pick a move at random. - std::uniform_int_distribution idist(0, (int)possibleMoves.size() - 1); - int randomMoveIndex = idist(_randomNumberGenerator); - MakeMove(possibleMoves[randomMoveIndex]); -} - -void Board::MakeMove(Position position) -{ - SetMarkerAt(position, _playerInTurn); - _playerInTurn = (_playerInTurn == Marker::O) ? Marker::X : Marker::O; - - DetectWinner(position); - DetectDrawGame(); -} - -void Board::DetectWinner(Position position) -{ - auto marker = GetMarkerAt(position); - - for (int i = 0; i < OrientationMaxValue; ++i) - { - Orientation orientation = (Orientation)i; - int sequenceLength(1); - - bool directions[] = { true, false }; - - for each (auto forward in directions) - { - auto neighbor = GetAdjacentPosition(position, orientation, forward); - while (IsValidPosition(neighbor) && GetMarkerAt(neighbor) == marker) - { - sequenceLength++; - neighbor = GetAdjacentPosition(neighbor, orientation, forward); - } - } - - if (sequenceLength >= WinningSequenceLength) - { - _winner = marker; - _playerInTurn = Marker::None; - NotifyObserver(); - } - } -} - -void Board::DetectDrawGame() -{ - // if there is an empty position, the game isn't a draw (yet). - for (int i = 0; i < _size; ++i) - { - for (int j = 0; j < _size; ++j) - { - if (GetMarkerAt(Position(i, j)) == Marker::None) - { - return; - } - } - } - - // no empty positions found: it's a draw. - _playerInTurn = Marker::None; - NotifyObserver(); -} - -Board::Position Board::GetAdjacentPosition(Position position, Orientation orientation, bool forward) const -{ - Position delta(-1, -1); - switch (orientation) - { - case Orientation::North: - delta = Position(+1, 0); - break; - case Orientation::East: - delta = Position(0, +1); - break; - case Orientation::Northeast: - delta = Position(+1, +1); - break; - case Orientation::Southeast: - delta = Position(-1, +1); - break; - default: - assert(false); - } - - if (!forward) - { - delta.row = -delta.row; - delta.column = -delta.column; - } - - return Position(position.row + delta.row, position.column + delta.column); -} - -void Board::RegisterBoardChangedObserver(Observer* boardChangedObserver) -{ - _boardChangedObserver = boardChangedObserver; -} - -void Board::NotifyObserver() -{ - if (_boardChangedObserver) - { - _boardChangedObserver->SubjectChanged(); - } -} diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Board.h b/Tobii EyeX/samples/ActivatableBoardGame/Board.h deleted file mode 100755 index d6abbe3..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/Board.h +++ /dev/null @@ -1,110 +0,0 @@ -/* - * Board class: Implements the game logic and the not-so-clever AI player for the exciting Gobang game. - * - * Copyright 2013 Tobii Technology AB. All rights reserved. - */ - -#pragma once - -#include - -class Observer; - -class Board -{ -public: - // Represents a position on the board. - struct Position - { - int row; - int column; - - Position(int paramRow, int paramColumn) : row(paramRow), column(paramColumn) { } - }; - - // Possible contents of a board position. - enum Marker - { - None, - X, - O - }; - - Board(int size); - virtual ~Board(); - - // gets the size of the board, which is assumed to be square: the number of positions on each side. - int Size() const { return _size; } - - // indicates whether the game is over. - bool IsGameOver() const { return _playerInTurn == Marker::None; } - - // gets the "name" of the lucky winner. - Marker GetWinner() const { return _winner; } - - // gets what's on the board at a given position. - Marker GetMarkerAt(Position position) const; - - // indicates whether it is possible to place a marker at a given position. - bool CanMakeMoveAt(Position position) const; - - // makes a move for the human player (which will also trigger an AI move). - void MakeHumanPlayerMove(Position position); - - // restarts the game. - void BeginNewGame(); - - // registers an observer that is notified when the board has changed. - void RegisterBoardChangedObserver(Observer* boardChangedObserver); - -private: - enum Orientation - { - North, - East, - Northeast, - Southeast, - OrientationMaxValue - }; - - // tests whether a position is on the board. - bool IsValidPosition(Position position) const; - - // gets a position adjacent to the given one, in a particular direction. - Position GetAdjacentPosition(Position position, Orientation orientation, bool forward) const; - - // prepares the board for a new, exciting game. - void InitBoard(); - - // lets the miserable AI player make a move. - void MakeAIPlayerMove(); - - // makes a move: places a marker and checks whether anyone has won or if it's a draw game. - void MakeMove(Position position); - - // places a marker at the given position. - void SetMarkerAt(Position position, Marker marker); - - // checks if the given position is part of a winning sequence. - void DetectWinner(Position position); - - // checks if the game is a draw. - void DetectDrawGame(); - - // notifies the observer, if any, that the board has changed. - void NotifyObserver(); - - static const int WinningSequenceLength = 5; - - static std::mt19937 _randomNumberGenerator; - - int _size; - Marker* _board; - Marker _playerInTurn; - Marker _winner; - Observer* _boardChangedObserver; - - // private copy constructor and operator making the class non-copyable (declared but not implemented). - Board(const Board&); - Board& operator = (const Board&); -}; diff --git a/Tobii EyeX/samples/ActivatableBoardGame/BoardWindow.cpp b/Tobii EyeX/samples/ActivatableBoardGame/BoardWindow.cpp deleted file mode 100755 index 7f8b9a7..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/BoardWindow.cpp +++ /dev/null @@ -1,488 +0,0 @@ -/* - * ActivatableBoardGame sample: - * This is an example that demonstrates the use of Activatable interactors in the context of a board game. - * - * Copyright 2013 Tobii Technology AB. All rights reserved. - */ - -#include "stdafx.h" -#include "BoardWindow.h" -#include "Board.h" -#include "resource.h" - -// window messages used for notifications from the EyeXHost. -#define WM_EYEX_HOST_STATUS_CHANGED WM_USER + 0 -#define WM_FOCUSED_REGION_CHANGED WM_USER + 1 -#define WM_REGION_ACTIVATED WM_USER + 2 - -// color scheme. -const Gdiplus::Color BoardWindow::BackgroundGazeInteractionFunctionalColor = Gdiplus::Color(134, 152, 172); // blue -const Gdiplus::Color BoardWindow::BackgroundMouseOnlyColor = Gdiplus::Color(164, 156, 153); // grey -const Gdiplus::Color BoardWindow::GridColor = Gdiplus::Color(110, 57, 88, 109); // dark blue -const Gdiplus::Color BoardWindow::MarkerColor = Gdiplus::Color(242, 233, 216); // off white -const Gdiplus::Color BoardWindow::HighlightColor = Gdiplus::Color(20, 242, 233, 216); // transparent off white -const Gdiplus::Color BoardWindow::WonMessageColor = Gdiplus::Color(200, 64, 82, 60); // transparent dark green -const Gdiplus::Color BoardWindow::LostMessageColor = Gdiplus::Color(200, 155, 109, 135); // transparent grape - -// constants. -const int BoardWindow::SquareSize = 100; -const int BoardWindow::MarkerMargin = 14; -const int BoardWindow::MarkerDiameter = SquareSize - MarkerMargin * 2; -const TCHAR* BoardWindow::WindowClassName = _T("GobangBoard"); - -BoardWindow::BoardWindow(Board& board, HINSTANCE hInstance, int nCmdShow) - : _board(board), _hInstance(hInstance), _hWnd(0), _hMenu(0), _leftMargin(0), _upperMargin(0) -{ - // create the window instance. - _hWnd = CreateWindow( - WindowClassName, - _T("Gobang!"), - WS_OVERLAPPED | WS_MINIMIZEBOX | WS_SYSMENU, - CW_USEDEFAULT, - CW_USEDEFAULT, - (_board.Size() + 1) * SquareSize, - (_board.Size() + 1) * SquareSize + 40, - NULL, - NULL, - hInstance, - NULL); - - if (!_hWnd) - { - throw new std::runtime_error("Could not create main window."); - } - - _hMenu = GetMenu(_hWnd); - - // write the "this" pointer to the extra window memory so that we can reference back to this - // object from the window function. - SetWindowLongPtr(_hWnd, 0, (LONG_PTR)this); - - ShowWindow(_hWnd, nCmdShow); - UpdateWindow(_hWnd); - - _board.RegisterBoardChangedObserver(this); - - // initialize the EyeX host and the activatable regions. - _eyeXHost.Init(_hWnd, WM_EYEX_HOST_STATUS_CHANGED, WM_FOCUSED_REGION_CHANGED, WM_REGION_ACTIVATED); - UpdateActivatableRegions(); -} - -BoardWindow::~BoardWindow() -{ -} - -void BoardWindow::RegisterWindowClass(HINSTANCE hInstance) -{ - WNDCLASSEX wcex; - - wcex.cbSize = sizeof(WNDCLASSEX); - - wcex.style = CS_HREDRAW | CS_VREDRAW; - wcex.lpfnWndProc = WndProc; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = sizeof(void*); // make room for the "this" pointer. - wcex.hInstance = hInstance; - wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_GOBANG)); - wcex.hCursor = LoadCursor(NULL, IDC_ARROW); - wcex.hbrBackground = 0; - wcex.lpszMenuName = MAKEINTRESOURCE(IDC_GOBANG); - wcex.lpszClassName = WindowClassName; - wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); - - RegisterClassEx(&wcex); -} - -// Callback function invoked when the Board has changed. -void BoardWindow::SubjectChanged() -{ - InvalidateRect(_hWnd, NULL, FALSE); - UpdateActivatableRegions(); -} - -// Callback function invoked from the message loop to process a Windows message. -LRESULT CALLBACK BoardWindow::WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - int wmId, wmEvent; - PAINTSTRUCT ps; - HDC hdc; - - // read the "this" pointer from extra window memory. - BoardWindow* instance = reinterpret_cast(GetWindowLongPtr(hWnd, 0)); - - switch (message) - { - case WM_COMMAND: - wmId = LOWORD(wParam); - wmEvent = HIWORD(wParam); - - // Parse the menu selections: - switch (wmId) - { - case IDM_NEWGAME: - instance->OnNewGameClicked(); - break; - - case IDM_ABOUT: - DialogBox(instance->_hInstance, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); - break; - - case IDM_EXIT: - DestroyWindow(hWnd); - break; - - default: - return DefWindowProc(hWnd, message, wParam, lParam); - } - break; - - case WM_LBUTTONDOWN: - { - // mouse button pressed; possibly on a board square. - auto point = MAKEPOINTS(lParam); - instance->OnSquareClicked(point); - } - break; - - case WM_PAINT: - instance->UpdateMargins(); - hdc = BeginPaint(hWnd, &ps); - instance->OnDraw(hdc); - EndPaint(hWnd, &ps); - break; - - case WM_ERASEBKGND: - // no background erasing needed since our OnDraw method draws the entire window. - return TRUE; - - case WM_EYEX_HOST_STATUS_CHANGED: - // the background color of the board indicates whether we have a working connection to the engine or not. - // so, when the status changes, we force a redraw of the window. - InvalidateRect(hWnd, 0, FALSE); - break; - - case WM_FOCUSED_REGION_CHANGED: - // redraw to display the new focus state. - InvalidateRect(hWnd, 0, FALSE); - break; - - case WM_REGION_ACTIVATED: - instance->OnSquareActivated((UINT)wParam); - break; - - case WM_WINDOWPOSCHANGED: - // the window was moved, so we need to refresh the screen bounds of our activatable regions. - instance->UpdateActivatableRegions(); - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - case WM_KEYUP: - // trigger an activation command when space is released. - if (VK_SPACE == wParam) - { - instance->_eyeXHost.TriggerActivation(); - } - break; - - case WM_KEYDOWN: - // trigger activation mode on when space is pressed down (so activation focus changed events are received, and a highlight can be drawn). - if (VK_SPACE == wParam) - { - instance->_eyeXHost.TriggerActivationModeOn(); - } - break; - - - default: - return DefWindowProc(hWnd, message, wParam, lParam); - } - - return 0; -} - -void BoardWindow::OnDraw(HDC hdc) -{ - // use double-buffer drawing to speed up the drawing and reduce flicker. - // (the drawing is performed on a bitmap, which is then blitted to the screen in one fell swoop.) - - RECT rect; - GetClientRect(_hWnd, &rect); - Gdiplus::Bitmap bitmap(rect.right - rect.left, rect.bottom - rect.top); - Gdiplus::Graphics graphics(&bitmap); - - // draw the background in a color which depends on the state of the connection to the engine. - // blue if the connection is functional, gray otherwise. - Gdiplus::Color backgroundColor(BackgroundGazeInteractionFunctionalColor); - if (!_eyeXHost.IsFunctional()) - { - backgroundColor = BackgroundMouseOnlyColor; - } - Gdiplus::SolidBrush backgroundBrush(backgroundColor); - graphics.FillRectangle(&backgroundBrush, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top); - - // draw the grid - DrawGrid(&graphics); - - // draw the markers - Gdiplus::Pen markerPen(MarkerColor, 5.0F); - for (int row = 0; row < _board.Size(); row++) - { - for (int col = 0; col < _board.Size(); col++) - { - switch (_board.GetMarkerAt(Board::Position(row, col))) - { - case Board::Marker::X: - DrawXMarker(&graphics, &markerPen, row, col); - break; - - case Board::Marker::O: - DrawOMarker(&graphics, &markerPen, row, col); - break; - } - } - } - - // draw the focus highlight - int focusedRegionId = _eyeXHost.GetFocusedRegionId(); - if (focusedRegionId >= 0) - { - DrawHighlight(&graphics, RegionIdToBoardRow(focusedRegionId), RegionIdToBoardColumn(focusedRegionId)); - } - - // draw the game over message - if (_board.IsGameOver()) - { - WCHAR* message; - Gdiplus::Color messageColor(0,0,0); - switch (_board.GetWinner()) - { - case Board::Marker::X: - message = L"YOU WON :)"; - messageColor = WonMessageColor; - break; - - case Board::Marker::O: - message = L"YOU LOST :("; - messageColor = LostMessageColor; - break; - - default: - message = L"DRAW"; - messageColor = LostMessageColor; - break; - } - - DrawGameOver(&graphics, message, messageColor); - } - - Gdiplus::Graphics screen(hdc); - screen.DrawImage(&bitmap, 0, 0); -} - -void BoardWindow::DrawGrid(Gdiplus::Graphics *graphics) -{ - const int lineMargin = 14; - - Gdiplus::Pen gridPen(GridColor); - gridPen.SetDashStyle(Gdiplus::DashStyleDash); - - // horizontal lines - auto x0 = _leftMargin - lineMargin; - auto x1 = _leftMargin + _board.Size() * SquareSize + lineMargin; - for (int i = 0; i <= _board.Size(); i++) - { - auto y = _upperMargin + i * SquareSize; - graphics->DrawLine(&gridPen, x0, y, x1, y); - } - - // vertical lines - auto y0 = _upperMargin - lineMargin; - auto y1 = _upperMargin + _board.Size() * SquareSize + lineMargin; - for (int j = 0; j <= _board.Size(); j++) - { - auto x = _leftMargin + j * SquareSize; - graphics->DrawLine(&gridPen, x, y0, x, y1); - } - - // dots that guide the eye to the center of the square - Gdiplus::SolidBrush gridBrush(GridColor); - for (int i = 0; i <= _board.Size(); i++) - { - for (int j = 0; j <= _board.Size(); j++) - { - auto x = _leftMargin + (j + 0.5) * SquareSize; - auto y = _upperMargin + (i + 0.5) * SquareSize; - graphics->FillEllipse(&gridBrush, (Gdiplus::REAL)(x - 1), (Gdiplus::REAL)(y - 1), (Gdiplus::REAL)3, (Gdiplus::REAL)3); - } - } -} - -void BoardWindow::DrawHighlight(Gdiplus::Graphics *graphics, INT row, INT column) -{ - Gdiplus::SolidBrush highlightBrush(HighlightColor); - - int x = BoardToClientAreaX(column) + 1; - int y = BoardToClientAreaY(row) + 1; - - graphics->FillRectangle(&highlightBrush, x, y, SquareSize - 1, SquareSize - 1); -} - -void BoardWindow::DrawOMarker(Gdiplus::Graphics *graphics, Gdiplus::Pen *markerPen, INT row, INT column) -{ - int x = BoardToClientAreaX(column) + MarkerMargin; - int y = BoardToClientAreaY(row) + MarkerMargin; - - graphics->DrawEllipse(markerPen, x, y, MarkerDiameter, MarkerDiameter); -} - -void BoardWindow::DrawXMarker(Gdiplus::Graphics *graphics, Gdiplus::Pen *markerPen, INT row, INT column) -{ - int x = BoardToClientAreaX(column) + MarkerMargin; - int y = BoardToClientAreaY(row) + MarkerMargin; - - graphics->DrawLine(markerPen, x, y + MarkerDiameter, x + MarkerDiameter, y); - graphics->DrawLine(markerPen, x, y, x + MarkerDiameter, y + MarkerDiameter); -} - -void BoardWindow::DrawGameOver(Gdiplus::Graphics *graphics, WCHAR* message, const Gdiplus::Color& messageColor) -{ - Gdiplus::Font myFont(L"Arial", 72); - - RECT rect; - GetClientRect(_hWnd, &rect); - Gdiplus::RectF layoutRect((float)rect.left, (float)rect.top, (float)(rect.right - rect.left), (float)(rect.bottom - rect.top)); - - Gdiplus::StringFormat format; - format.SetAlignment(Gdiplus::StringAlignmentCenter); - format.SetLineAlignment(Gdiplus::StringAlignmentCenter); - - Gdiplus::SolidBrush messageBrush(messageColor); - - graphics->DrawString( - message, - (INT)wcslen(message), - &myFont, - layoutRect, - &format, - &messageBrush); -} - -INT BoardWindow::BoardToClientAreaX(INT column) -{ - return column * SquareSize + _leftMargin; -} - -INT BoardWindow::BoardToClientAreaY(INT row) -{ - return row * SquareSize + _upperMargin; -} - -INT BoardWindow::ClientAreaToBoardColumn(INT x) -{ - return (x - _upperMargin) / SquareSize; -} - -INT BoardWindow::ClientAreaToBoardRow(INT y) -{ - return (y - _leftMargin) / SquareSize; -} - -int BoardWindow::BoardPositionToRegionId(int row, int column) -{ - return column + row * _board.Size(); -} - -int BoardWindow::RegionIdToBoardRow(int regionId) -{ - return regionId / _board.Size(); -} - -int BoardWindow::RegionIdToBoardColumn(int regionId) -{ - return regionId % _board.Size(); -} - -void BoardWindow::UpdateMargins() -{ - RECT rect; - GetClientRect(_hWnd, &rect); - _upperMargin = ((rect.bottom - rect.top) - _board.Size() * SquareSize) / 2; - _leftMargin = ((rect.right - rect.left) - _board.Size() * SquareSize) / 2; -} - -void BoardWindow::OnSquareClicked(POINTS point) -{ - MakeHumanPlayerMove(ClientAreaToBoardRow(point.y), ClientAreaToBoardColumn(point.x)); -} - -void BoardWindow::OnSquareActivated(UINT regionId) -{ - MakeHumanPlayerMove(RegionIdToBoardRow(regionId), RegionIdToBoardColumn(regionId)); -} - -void BoardWindow::MakeHumanPlayerMove(int row, int column) -{ - Board::Position position(row, column); - if (_board.CanMakeMoveAt(position)) - { - _board.MakeHumanPlayerMove(position); - } -} - -void BoardWindow::UpdateActivatableRegions() -{ - std::vector regions; - - if (!_board.IsGameOver()) - { - for (int row = 0; row < _board.Size(); row++) - { - for (int column = 0; column < _board.Size(); column++) - { - POINT point; - point.x = BoardToClientAreaX(column); - point.y = BoardToClientAreaY(row); - ClientToScreen(_hWnd, &point); - - RECT bounds; - bounds.left = point.x; - bounds.top = point.y; - bounds.right = point.x + SquareSize; - bounds.bottom = point.y + SquareSize; - - regions.push_back(EyeXHost::ActivatableRegion(BoardPositionToRegionId(row, column), bounds)); - } - } - } - - _eyeXHost.SetActivatableRegions(regions); -} - -void BoardWindow::OnNewGameClicked() -{ - _board.BeginNewGame(); - UpdateActivatableRegions(); -} - -// Message handler for about box. -INT_PTR CALLBACK BoardWindow::About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) -{ - UNREFERENCED_PARAMETER(lParam); - switch (message) - { - case WM_INITDIALOG: - return (INT_PTR)TRUE; - - case WM_COMMAND: - if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) - { - EndDialog(hDlg, LOWORD(wParam)); - return (INT_PTR)TRUE; - } - break; - } - - return (INT_PTR)FALSE; -} diff --git a/Tobii EyeX/samples/ActivatableBoardGame/BoardWindow.h b/Tobii EyeX/samples/ActivatableBoardGame/BoardWindow.h deleted file mode 100755 index 50dc346..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/BoardWindow.h +++ /dev/null @@ -1,94 +0,0 @@ -/* - * BoardWindow class: Responsible for the game window and the GDI+ drawing. - * Listens to notifications from the Board. - * Owns the EyeX host. - * - * Copyright 2013 Tobii Technology AB. All rights reserved. - */ - -#pragma once - -#include -#include -#include -#include "Observer.h" -#include "EyeXHost.h" - -class Board; - -class BoardWindow : Observer -{ -public: - BoardWindow(Board& board, HINSTANCE hInstance, int nCmdShow); - virtual ~BoardWindow(); - - // registers the window class; must be called once at application initialization. - static void RegisterWindowClass(HINSTANCE hInstance); - - // From Observer - void SubjectChanged(); - -private: - // window procedure for the main window. - static LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); - - // window procedure for the About dialog. - static INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); - - // GDI+ drawing methods. - void OnDraw(HDC hdc); - void DrawGrid(Gdiplus::Graphics *graphics); - void DrawHighlight(Gdiplus::Graphics* graphics, int row, int column); - void DrawXMarker(Gdiplus::Graphics* graphics, Gdiplus::Pen* pen, int row, int column); - void DrawOMarker(Gdiplus::Graphics* graphics, Gdiplus::Pen* pen, int row, int column); - void DrawGameOver(Gdiplus::Graphics* graphics, WCHAR* message, const Gdiplus::Color& messageColor); - - // coordinate/board position mapping methods. - int BoardToClientAreaX(int column); - int BoardToClientAreaY(int row); - int ClientAreaToBoardColumn(int x); - int ClientAreaToBoardRow(int y); - - // region id/board position mapping methods. - int BoardPositionToRegionId(int row, int column); - int RegionIdToBoardRow(int regionId); - int RegionIdToBoardColumn(int regionId); - - // re-calculates the margins based on the size of the window. - void UpdateMargins(); - - // reports all vacant board positions as activatable regions to the EyeX host. - void UpdateActivatableRegions(); - - // makes a move at the given position. - void MakeHumanPlayerMove(int row, int column); - - // event handlers. - void OnSquareClicked(POINTS point); - void OnSquareActivated(UINT regionId); - void OnNewGameClicked(); - - static const Gdiplus::Color BackgroundGazeInteractionFunctionalColor; - static const Gdiplus::Color BackgroundMouseOnlyColor; - static const Gdiplus::Color GridColor; - static const Gdiplus::Color MarkerColor; - static const Gdiplus::Color HighlightColor; - static const Gdiplus::Color WonMessageColor; - static const Gdiplus::Color LostMessageColor; - static const int SquareSize; - static const int MarkerMargin; - static const int MarkerDiameter; - static const TCHAR* WindowClassName; - - Board& _board; - EyeXHost _eyeXHost; - HINSTANCE _hInstance; - HWND _hWnd; - HMENU _hMenu; - int _leftMargin; - int _upperMargin; - - // private copy constructor and operator making the class non-copyable (declared but not implemented). - BoardWindow(const BoardWindow&); - BoardWindow& operator = (const BoardWindow&); -}; diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/ActivatableBoardGame.lastbuildstate b/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/ActivatableBoardGame.lastbuildstate deleted file mode 100755 index 5cd4c3b..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/ActivatableBoardGame.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 -Debug|Win32|D:\dev\tobii\samples\| diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/CL.command.1.tlog b/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/CL.command.1.tlog deleted file mode 100755 index 001d8ba..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/CL.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/CL.read.1.tlog b/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/CL.read.1.tlog deleted file mode 100755 index ff00e89..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/CL.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/CL.write.1.tlog b/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/CL.write.1.tlog deleted file mode 100755 index f3a1acb..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/CL.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/link.command.1.tlog b/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/link.command.1.tlog deleted file mode 100755 index 5f8e2da..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/link.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/link.read.1.tlog b/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/link.read.1.tlog deleted file mode 100755 index de1b91d..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/link.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/link.write.1.tlog b/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/link.write.1.tlog deleted file mode 100755 index 97ed8cf..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/link.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/rc.command.1.tlog b/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/rc.command.1.tlog deleted file mode 100755 index 57e38ff..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/rc.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/rc.read.1.tlog b/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/rc.read.1.tlog deleted file mode 100755 index 7e1acc5..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/rc.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/rc.write.1.tlog b/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/rc.write.1.tlog deleted file mode 100755 index 6c4a07a..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Activata.2732E876.tlog/rc.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.log b/Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.log deleted file mode 100755 index 8d71d0b..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.log +++ /dev/null @@ -1,8 +0,0 @@ - stdafx.cpp - EyeXHost.cpp -d:\dev\tobii\samples\activatableboardgame\eyexhost.cpp(243): warning C4477: 'sprintf_s' : format string '%d' requires an argument of type 'int', but variadic argument 1 has type 'HWND' - ActivatableBoardGame.cpp - BoardWindow.cpp - Board.cpp - Generating Code... - ActivatableBoardGame.vcxproj -> D:\dev\tobii\samples\Debug\ActivatableBoardGame.exe diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.obj b/Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.obj deleted file mode 100755 index cdf81f4..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.obj and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.pch b/Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.pch deleted file mode 100755 index d560dcc..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.pch and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.res b/Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.res deleted file mode 100755 index 6aae112..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/ActivatableBoardGame.res and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Board.obj b/Tobii EyeX/samples/ActivatableBoardGame/Debug/Board.obj deleted file mode 100755 index 32b7253..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/Board.obj and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/BoardWindow.obj b/Tobii EyeX/samples/ActivatableBoardGame/Debug/BoardWindow.obj deleted file mode 100755 index 15d39e6..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/BoardWindow.obj and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/EyeXHost.obj b/Tobii EyeX/samples/ActivatableBoardGame/Debug/EyeXHost.obj deleted file mode 100755 index 69a81a1..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/EyeXHost.obj and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/stdafx.obj b/Tobii EyeX/samples/ActivatableBoardGame/Debug/stdafx.obj deleted file mode 100755 index cb850a6..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/stdafx.obj and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/vc140.idb b/Tobii EyeX/samples/ActivatableBoardGame/Debug/vc140.idb deleted file mode 100755 index 46ca7f9..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/vc140.idb and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Debug/vc140.pdb b/Tobii EyeX/samples/ActivatableBoardGame/Debug/vc140.pdb deleted file mode 100755 index 8d46bc5..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Debug/vc140.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/EyeXHost.cpp b/Tobii EyeX/samples/ActivatableBoardGame/EyeXHost.cpp deleted file mode 100755 index 410a6cf..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/EyeXHost.cpp +++ /dev/null @@ -1,377 +0,0 @@ -/* - * ActivatableBoardGame sample: - * This is an example that demonstrates the use of Activatable interactors in the context of a board game. - * - * Copyright 2013-2014 Tobii Technology AB. All rights reserved. - */ - -#include "stdafx.h" -#include "EyeXHost.h" -#include -#include -#include -#include - -#pragma comment (lib, "Tobii.EyeX.Client.lib") - -#if INTPTR_MAX == INT64_MAX -#define WINDOW_HANDLE_FORMAT "%lld" -#else -#define WINDOW_HANDLE_FORMAT "%d" -#endif - -EyeXHost::EyeXHost() - : _state(Initializing), - _hWnd(nullptr), - _statusChangedMessage(0), _focusedRegionChangedMessage(0), _regionActivatedMessage(0), - _focusedRegionId(-1), - _context(TX_EMPTY_HANDLE), - _connectionStateChangedTicket(0), _queryHandlerTicket(0), _eventHandlerTicket(0) -{ - // initialize the EyeX Engine client library. - txInitializeEyeX(TX_EYEXCOMPONENTOVERRIDEFLAG_NONE, nullptr, nullptr, nullptr, nullptr); - - // create a context and register event handlers, but don't enable the connection to the engine just yet. - // we'll enable the connection in the Init method, when we're ready to handle the - // connection-status-changed notifications. - bool success = txCreateContext(&_context, TX_FALSE) == TX_RESULT_OK; - success &= RegisterConnectionStateChangedHandler(); - success &= RegisterQueryHandler(); - success &= RegisterEventHandler(); - - if (!success) - { - SetState(Failed); - } -} - -EyeXHost::~EyeXHost() -{ - if (_context != TX_EMPTY_HANDLE) - { - // shut down, then release the context. - txShutdownContext(_context, TX_CLEANUPTIMEOUT_DEFAULT, TX_FALSE); - txReleaseContext(&_context); - } -} - -void EyeXHost::Init(HWND hWnd, UINT statusChangedMessage, UINT focusedRegionChangedMessage, UINT regionActivatedMessage) -{ - _hWnd = hWnd; - _statusChangedMessage = statusChangedMessage; - _focusedRegionChangedMessage = focusedRegionChangedMessage; - _regionActivatedMessage = regionActivatedMessage; - - // connect to the engine. - if (txEnableConnection(_context) != TX_RESULT_OK) - { - SetState(Failed); - } -} - -void EyeXHost::SetActivatableRegions(const std::vector& regions) -{ - std::lock_guard lock(_mutex); - - _regions.assign(regions.begin(), regions.end()); - ResetFocusedRegionIdIfNonExistent(); -} - -int EyeXHost::GetFocusedRegionId() const -{ - std::lock_guard lock(const_cast(_mutex)); - - return _focusedRegionId; -} - -void EyeXHost::TriggerActivation() -{ - TX_HANDLE command(TX_EMPTY_HANDLE); - txCreateActionCommand(_context, &command, TX_ACTIONTYPE_ACTIVATE); - txExecuteCommandAsync(command, NULL, NULL); - txReleaseObject(&command); -} - -void EyeXHost::TriggerActivationModeOn() -{ - TX_HANDLE command(TX_EMPTY_HANDLE); - txCreateActionCommand(_context, &command, TX_ACTIONTYPE_ACTIVATIONMODEON); - txExecuteCommandAsync(command, NULL, NULL); - txReleaseObject(&command); -} - -void EyeXHost::SetFocusedRegionId(int regionId) -{ - std::lock_guard lock(_mutex); - - _focusedRegionId = regionId; - ResetFocusedRegionIdIfNonExistent(); - PostMessage(_hWnd, _focusedRegionChangedMessage, 0, 0); -} - -// this method assumes that the mutex is held during the call. -void EyeXHost::ResetFocusedRegionIdIfNonExistent() -{ - for (auto region : _regions) - { - if (region.id == _focusedRegionId) - { - return; - } - } - - _focusedRegionId = -1; -} - -bool EyeXHost::IsFunctional() const -{ - return _state == Initializing || - _state == Connected; -} - -void EyeXHost::SetState(State state) -{ - std::lock_guard lock(_mutex); - - if (_state != state) - { - _state = state; - - // note the use of the asynchronous PostMessage function to marshal the event to the main thread. - // (this method is called from OnEngineConnectionStateChanged, which is typically invoked on a worker thread.) - PostMessage(_hWnd, _statusChangedMessage, 0, 0); - } -} - -bool EyeXHost::RegisterConnectionStateChangedHandler() -{ - // we pass the "this" pointer as the user parameter when registering the event handler, - // so that we can access it in the callback function. - - auto connectionStateChangedTrampoline = [](TX_CONNECTIONSTATE connectionState, TX_USERPARAM userParam) - { - static_cast(userParam)->OnEngineConnectionStateChanged(connectionState); - }; - - bool success = txRegisterConnectionStateChangedHandler( - _context, - &_connectionStateChangedTicket, - connectionStateChangedTrampoline, - this) == TX_RESULT_OK; - - return success; -} - -bool EyeXHost::RegisterQueryHandler() -{ - auto queryHandlerTrampoline = [](TX_CONSTHANDLE hObject, TX_USERPARAM userParam) - { - static_cast(userParam)->HandleQuery(hObject); - }; - - bool success = txRegisterQueryHandler( - _context, - &_queryHandlerTicket, - queryHandlerTrampoline, - this) == TX_RESULT_OK; - - return success; -} - -bool EyeXHost::RegisterEventHandler() -{ - auto eventHandlerTrampoline = [](TX_CONSTHANDLE hObject, TX_USERPARAM userParam) - { - static_cast(userParam)->HandleEvent(hObject); - }; - - bool success = txRegisterEventHandler(_context, - &_eventHandlerTicket, - eventHandlerTrampoline, - this) == TX_RESULT_OK; - - return success; -} - -void EyeXHost::OnEngineConnectionStateChanged(TX_CONNECTIONSTATE connectionState) -{ - switch (connectionState) - { - case TX_CONNECTIONSTATE::TX_CONNECTIONSTATE_CONNECTED: - SetState(Connected); - break; - - case TX_CONNECTIONSTATE::TX_CONNECTIONSTATE_DISCONNECTED: - case TX_CONNECTIONSTATE::TX_CONNECTIONSTATE_TRYINGTOCONNECT: - case TX_CONNECTIONSTATE::TX_CONNECTIONSTATE_SERVERVERSIONTOOLOW: - case TX_CONNECTIONSTATE::TX_CONNECTIONSTATE_SERVERVERSIONTOOHIGH: - SetState(Disconnected); - break; - - default: - break; - } -} - -void EyeXHost::HandleQuery(TX_CONSTHANDLE hAsyncData) -{ - std::lock_guard lock(_mutex); - - // NOTE. This method will fail silently if, for example, the connection is lost before the snapshot has been committed, - // or if we run out of memory. This is by design, because there is nothing we can do to recover from these errors anyway. - - TX_HANDLE hQuery(TX_EMPTY_HANDLE); - txGetAsyncDataContent(hAsyncData, &hQuery); - - const int bufferSize = 20; - TX_CHAR stringBuffer[bufferSize]; - - // read the query bounds from the query, that is, the area on the screen that the query concerns. - // the query region is always rectangular. - TX_HANDLE hBounds(TX_EMPTY_HANDLE); - txGetQueryBounds(hQuery, &hBounds); - TX_REAL pX, pY, pWidth, pHeight; - txGetRectangularBoundsData(hBounds, &pX, &pY, &pWidth, &pHeight); - txReleaseObject(&hBounds); - Gdiplus::Rect queryBounds((INT)pX, (INT)pY, (INT)pWidth, (INT)pHeight); - - // create a new snapshot with the same window id and bounds as the query. - TX_HANDLE hSnapshot(TX_EMPTY_HANDLE); - txCreateSnapshotForQuery(hQuery, &hSnapshot); - - TX_CHAR windowIdString[bufferSize]; - sprintf_s(windowIdString, bufferSize, WINDOW_HANDLE_FORMAT, _hWnd); - - if (QueryIsForWindowId(hQuery, windowIdString)) - { - // define options for our activatable regions: no, we don't want tentative focus events. - TX_ACTIVATABLEPARAMS params = { TX_FALSE }; - - // iterate through all regions and create interactors for those that overlap with the query bounds. - for (auto region : _regions) - { - Gdiplus::Rect regionBounds((INT)region.bounds.left, (INT)region.bounds.top, - (INT)(region.bounds.right - region.bounds.left), (INT)(region.bounds.bottom - region.bounds.top)); - - if (queryBounds.IntersectsWith(regionBounds)) - { - TX_HANDLE hInteractor(TX_EMPTY_HANDLE); - sprintf_s(stringBuffer, bufferSize, "%d", region.id); - - TX_RECT bounds; - bounds.X = region.bounds.left; - bounds.Y = region.bounds.top; - bounds.Width = region.bounds.right - region.bounds.left; - bounds.Height = region.bounds.bottom - region.bounds.top; - - txCreateRectangularInteractor(hSnapshot, &hInteractor, stringBuffer, &bounds, TX_LITERAL_ROOTID, windowIdString); - txCreateActivatableBehavior(hInteractor, ¶ms); - - txReleaseObject(&hInteractor); - } - } - } - - txCommitSnapshotAsync(hSnapshot, OnSnapshotCommitted, nullptr); - txReleaseObject(&hSnapshot); - txReleaseObject(&hQuery); -} - -void EyeXHost::HandleEvent(TX_CONSTHANDLE hAsyncData) -{ - TX_HANDLE hEvent(TX_EMPTY_HANDLE); - txGetAsyncDataContent(hAsyncData, &hEvent); - - // NOTE. Uncomment the following line of code to view the event object. The same function can be used with any interaction object. - //OutputDebugStringA(txDebugObject(hEvent)); - - // read the interactor ID from the event. - const int bufferSize = 20; - TX_CHAR stringBuffer[bufferSize]; - TX_SIZE idLength(bufferSize); - if (txGetEventInteractorId(hEvent, stringBuffer, &idLength) == TX_RESULT_OK) - { - int interactorId = atoi(stringBuffer); - - HandleActivatableEvent(hEvent, interactorId); - } - - txReleaseObject(&hEvent); -} - -void EyeXHost::HandleActivatableEvent(TX_HANDLE hEvent, int interactorId) -{ - TX_HANDLE hActivatable(TX_EMPTY_HANDLE); - if (txGetEventBehavior(hEvent, &hActivatable, TX_BEHAVIORTYPE_ACTIVATABLE) == TX_RESULT_OK) - { - TX_ACTIVATABLEEVENTTYPE eventType; - if (txGetActivatableEventType(hActivatable, &eventType) == TX_RESULT_OK) - { - if (eventType == TX_ACTIVATABLEEVENTTYPE_ACTIVATED) - { - OnActivated(hActivatable, interactorId); - } - else if (eventType == TX_ACTIVATABLEEVENTTYPE_ACTIVATIONFOCUSCHANGED) - { - OnActivationFocusChanged(hActivatable, interactorId); - } - } - - txReleaseObject(&hActivatable); - } -} - -void EyeXHost::OnActivationFocusChanged(TX_HANDLE hBehavior, int interactorId) -{ - TX_ACTIVATIONFOCUSCHANGEDEVENTPARAMS eventData; - if (txGetActivationFocusChangedEventParams(hBehavior, &eventData) == TX_RESULT_OK) - { - if (eventData.HasActivationFocus) - { - SetFocusedRegionId(interactorId); - } - else - { - SetFocusedRegionId(-1); - } - } -} - -void EyeXHost::OnActivated(TX_HANDLE hBehavior, int interactorId) -{ - PostMessage(_hWnd, _regionActivatedMessage, interactorId, 0); -} - -void TX_CALLCONVENTION EyeXHost::OnSnapshotCommitted(TX_CONSTHANDLE hAsyncData, TX_USERPARAM param) -{ - // check the result code using an assertion. - // this will catch validation errors and runtime errors in debug builds. in release builds it won't do anything. - - TX_RESULT result = TX_RESULT_UNKNOWN; - txGetAsyncDataResultCode(hAsyncData, &result); - assert(result == TX_RESULT_OK || result == TX_RESULT_CANCELLED); -} - -bool EyeXHost::QueryIsForWindowId(TX_HANDLE hQuery, const TX_CHAR* windowId) -{ - const int bufferSize = 20; - TX_CHAR buffer[bufferSize]; - - TX_SIZE count; - if (TX_RESULT_OK == txGetQueryWindowIdCount(hQuery, &count)) - { - for (int i = 0; i < count; i++) - { - TX_SIZE size = bufferSize; - if (TX_RESULT_OK == txGetQueryWindowId(hQuery, i, buffer, &size)) - { - if (0 == strcmp(windowId, buffer)) - { - return true; - } - } - } - } - - return false; -} diff --git a/Tobii EyeX/samples/ActivatableBoardGame/EyeXHost.h b/Tobii EyeX/samples/ActivatableBoardGame/EyeXHost.h deleted file mode 100755 index 98aa84d..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/EyeXHost.h +++ /dev/null @@ -1,111 +0,0 @@ -/* - * EyeXHost class: Responsible for the gaze interaction within a window. - * Holds the current set of activatable regions and acts as a simple interactor repository. - * Sends notifications as Windows messages so that they are received on the main thread and can be handled there. - * - * Copyright 2013 Tobii Technology AB. All rights reserved. - */ - -#pragma once - -#include -#include -#include -#include "eyex/EyeX.h" - -class EyeXHost -{ -public: - // Represents an activatable region, that is, one particular kind of interactor. - struct ActivatableRegion - { - int id; - RECT bounds; - - ActivatableRegion(int paramId, RECT paramBounds) : id(paramId), bounds(paramBounds) { } - }; - - EyeXHost(); - virtual ~EyeXHost(); - - // attaches to the window with the given handle. - // the message parameters are custom windows messages sent to the window when an event has occurred. - void Init(HWND hWnd, UINT statusChangedMessage, UINT focusedRegionChangedMessage, UINT regionActivatedMessage); - - // updates the collection (repository) of activatable regions. - void SetActivatableRegions(const std::vector& regions); - - // gets the ID of the region that currently has the activation focus. - int GetFocusedRegionId() const; - - // triggers an activation ("direct click"). - void TriggerActivation(); - - // trigger a request to the EyeX Engine to switch activation mode on. - // this will trigger Activation Focus Changed events to be raised for the - // interactor the user is looking at/no longer looking at. - // in this sample, the focus is used to draw a highlight on in the square - // that is about to be "clicked" - where the "X" will be placed. - void TriggerActivationModeOn(); - - // indicates whether the connection to the EyeX Engine is working. - bool IsFunctional() const; - -private: - enum State - { - Initializing, - Connected, - Disconnected, - Failed - }; - - // registers handlers for notifications from the engine. - bool RegisterConnectionStateChangedHandler(); - bool RegisterQueryHandler(); - bool RegisterEventHandler(); - - // event handlers. - void OnEngineConnectionStateChanged(TX_CONNECTIONSTATE connectionState); - void HandleQuery(TX_CONSTHANDLE hAsyncData); - void HandleEvent(TX_CONSTHANDLE hAsyncData); - void HandleActivatableEvent(TX_HANDLE hEvent, int interactorId); - void OnActivationFocusChanged(TX_HANDLE hBehavior, int interactorId); - void OnActivated(TX_HANDLE hBehavior, int interactorId); - - // callback function invoked when a snapshot has been committed. - static void TX_CALLCONVENTION OnSnapshotCommitted(TX_CONSTHANDLE hAsyncData, TX_USERPARAM param); - - // sets the internal state. - void SetState(State state); - - // sets the ID of the region that currently has the activation focus. - void SetFocusedRegionId(int regionId); - - // clears the focused region ID if there is no matching region in the repository. - void ResetFocusedRegionIdIfNonExistent(); - - static bool QueryIsForWindowId(TX_HANDLE hQuery, const TX_CHAR* windowId); - - // mutex protecting the state of the object from race conditions caused by multiple threads. - // (for example, a call to SetActivatableRegions from the main thread while the HandleQuery - // method is iterating through the regions on a worker thread.) - std::mutex _mutex; - State _state; - std::vector _regions; - int _focusedRegionId; - TX_CONTEXTHANDLE _context; - TX_TICKET _connectionStateChangedTicket; - TX_TICKET _queryHandlerTicket; - TX_TICKET _eventHandlerTicket; - - // attached window and custom messages. - HWND _hWnd; - UINT _statusChangedMessage; - UINT _focusedRegionChangedMessage; - UINT _regionActivatedMessage; - - // private copy constructor and operator making the class non-copyable (declared but not implemented). - EyeXHost(const EyeXHost&); - EyeXHost& operator = (const EyeXHost&); -}; diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Observer.h b/Tobii EyeX/samples/ActivatableBoardGame/Observer.h deleted file mode 100755 index 8aa98c1..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/Observer.h +++ /dev/null @@ -1,13 +0,0 @@ -/* - * Observer interface: Standard Observer interface used for notifying an object of a change in another object. - * - * Copyright 2013 Tobii Technology AB. All rights reserved. - */ - -#pragma once - -class Observer -{ -public: - virtual void SubjectChanged() = 0; -}; diff --git a/Tobii EyeX/samples/ActivatableBoardGame/Resource.h b/Tobii EyeX/samples/ActivatableBoardGame/Resource.h deleted file mode 100755 index 6a23727..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/Resource.h and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/small.ico b/Tobii EyeX/samples/ActivatableBoardGame/small.ico deleted file mode 100755 index 449296f..0000000 Binary files a/Tobii EyeX/samples/ActivatableBoardGame/small.ico and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableBoardGame/stdafx.cpp b/Tobii EyeX/samples/ActivatableBoardGame/stdafx.cpp deleted file mode 100755 index 92e931f..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/stdafx.cpp +++ /dev/null @@ -1,3 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes - -#include "stdafx.h" diff --git a/Tobii EyeX/samples/ActivatableBoardGame/stdafx.h b/Tobii EyeX/samples/ActivatableBoardGame/stdafx.h deleted file mode 100755 index 705c92c..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/stdafx.h +++ /dev/null @@ -1,17 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently - -#pragma once - -#include "targetver.h" - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -// Windows Header Files: -#include - -// C RunTime Header Files -#include -#include -#include -#include diff --git a/Tobii EyeX/samples/ActivatableBoardGame/targetver.h b/Tobii EyeX/samples/ActivatableBoardGame/targetver.h deleted file mode 100755 index 90e767b..0000000 --- a/Tobii EyeX/samples/ActivatableBoardGame/targetver.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -// Including SDKDDKVer.h defines the highest available Windows platform. - -// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and -// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. - -#include diff --git a/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.cpp b/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.cpp deleted file mode 100755 index 8cee1c3..0000000 --- a/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.cpp +++ /dev/null @@ -1,357 +0,0 @@ -/* - * ActivatableButtons sample: - * This is an example that demonstrates the Activatable behavior. - * It features two buttons that can be clicked by looking at the button and pressing the space bar. - * - * Copyright 2013 Tobii Technology AB. All rights reserved. - */ - -#include "stdafx.h" -#include -#include -#include -#include "resource.h" -#include "EyeXHost.h" - -#pragma comment (lib, "Gdiplus.lib") - -// window messages used for notifications from the EyeXHost. -#define WM_EYEX_HOST_STATUS_CHANGED WM_USER + 0 -#define WM_REGION_GOT_ACTIVATION_FOCUS WM_USER + 1 -#define WM_REGION_ACTIVATED WM_USER + 2 - -// constants. -static const Gdiplus::Color OriginalBackgroundColor(66, 173, 209); -static const Gdiplus::Color OtherBackgroundColor(89, 169, 108); -static const int ChangeButtonLeft = 50; -static const int ResetButtonLeft = 260; -static const int ButtonTop = 100; -static const int ButtonWidth = 160; -static const int ButtonHeight = 100; -static const TCHAR* g_szWindowClass = _T("ActivatableButtons"); - -// global variables. -static EyeXHost g_eyeXHost; -static HWND g_hWnd; -static HWND g_hChangeButton; -static HWND g_hResetButton; -static bool g_useOriginalColor = true; - -// gets the bounds of a button in screen coordinates. -RECT GetScreenBounds(HWND hButton) -{ - POINT point = { 0, 0 }; - ClientToScreen(hButton, &point); - - RECT bounds; - bounds.left = point.x; - bounds.top = point.y; - bounds.right = bounds.left + ButtonWidth; - bounds.bottom = bounds.top + ButtonHeight; - - return bounds; -} - -// reports the buttons as activatable regions to the EyeX host. -void UpdateActivatableRegions() -{ - std::vector regions; - - regions.push_back(EyeXHost::ActivatableRegion(IDC_CHANGE_COLOR_BUTTON, GetScreenBounds(g_hChangeButton))); - regions.push_back(EyeXHost::ActivatableRegion(IDC_RESET_COLOR_BUTTON, GetScreenBounds(g_hResetButton))); - - g_eyeXHost.SetActivatableRegions(regions); -} - -// event handler invoked when a "status changed" event has been received from the EyeX host. -void OnStatusChanged(bool engineConnectionIsFunctional) -{ - // update the window title to reflect the engine connection state. - if (engineConnectionIsFunctional) - { - SetWindowText(g_hWnd, _T("ActivatableButtons - Use Ur Eyez! :)")); - } - else - { - SetWindowText(g_hWnd, _T("ActivatableButtons - Mouse Only :(")); - } -} - -// event handler invoked when a region has received the activation focus. -void OnRegionGotActivationFocus(UINT regionId) -{ - // set the keyboard focus to the corresponding button. - switch(regionId) - { - case IDC_CHANGE_COLOR_BUTTON: - SetFocus(g_hChangeButton); - break; - - case IDC_RESET_COLOR_BUTTON: - SetFocus(g_hResetButton); - break; - } -} - -// event handler invoked when the "change color" button has been activated. -void OnChangeColorActivated() -{ - g_useOriginalColor = false; - InvalidateRect(g_hWnd, 0, FALSE); -} - -// event handler invoked when the "reset color" button has been activated. -void OnResetColorActivated() -{ - g_useOriginalColor = true; - InvalidateRect(g_hWnd, 0, FALSE); -} - -// event handler invoked when a region has received an activation event. -void OnRegionActivated(UINT regionId) -{ - // route the event to the corresponding button. - switch(regionId) - { - case IDC_CHANGE_COLOR_BUTTON: - OnChangeColorActivated(); - break; - - case IDC_RESET_COLOR_BUTTON: - OnResetColorActivated(); - break; - } -} - -void OnDraw(HDC hdc) -{ - Gdiplus::Graphics graphics(hdc); - - RECT rect; - GetClientRect(g_hWnd, &rect); - - Gdiplus::Color backgroundColor(OriginalBackgroundColor); - if (!g_useOriginalColor) - { - backgroundColor = OtherBackgroundColor; - } - - Gdiplus::SolidBrush backgroundBrush(backgroundColor); - graphics.FillRectangle(&backgroundBrush, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top); - - const TCHAR* message = _T("Click the buttons with your eyes! Look at a button and press the space bar to click. ") - _T("(Make sure the window has input focus.)"); - Gdiplus::Font font(_T("Arial"), 10); - Gdiplus::SolidBrush textBrush(Gdiplus::Color::Black); - Gdiplus::RectF textRect((Gdiplus::REAL)10, - (Gdiplus::REAL)(ButtonTop + ButtonHeight + 20), - (Gdiplus::REAL)(rect.right - 20), - (Gdiplus::REAL)(rect.bottom - rect.top)); - Gdiplus::StringFormat textFormat; - graphics.DrawString(message, (INT)_tcslen(message), &font, textRect, &textFormat, &textBrush); -} - -// -// FUNCTION: WndProc(HWND, UINT, WPARAM, LPARAM) -// -// PURPOSE: Processes messages for the main window. -// -// WM_COMMAND - process the application menu -// WM_PAINT - Paint the main window -// WM_DESTROY - post a quit message and return -// -// -LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - int wmId, wmEvent; - PAINTSTRUCT ps; - HDC hdc; - - switch (message) - { - case WM_COMMAND: - wmId = LOWORD(wParam); - wmEvent = HIWORD(wParam); - switch (wmId) - { - case IDC_CHANGE_COLOR_BUTTON: - OnChangeColorActivated(); - break; - - case IDC_RESET_COLOR_BUTTON: - OnResetColorActivated(); - break; - - case IDM_EXIT: - DestroyWindow(hWnd); - break; - - default: - return DefWindowProc(hWnd, message, wParam, lParam); - } - break; - - case WM_CREATE: - { - g_hChangeButton = CreateWindow( - _T("BUTTON"), - _T("Change color"), - WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON, - ChangeButtonLeft, ButtonTop, ButtonWidth, ButtonHeight, - hWnd, - (HMENU)IDC_CHANGE_COLOR_BUTTON, - GetModuleHandle(NULL), - NULL); - g_hResetButton = CreateWindow( - _T("BUTTON"), - _T("Reset color"), - WS_TABSTOP|WS_VISIBLE|WS_CHILD|BS_DEFPUSHBUTTON, - ResetButtonLeft, ButtonTop, ButtonWidth, ButtonHeight, - hWnd, - (HMENU)IDC_RESET_COLOR_BUTTON, - GetModuleHandle(NULL), - NULL); - } - break; - - case WM_PAINT: - hdc = BeginPaint(hWnd, &ps); - OnDraw(hdc); - EndPaint(hWnd, &ps); - break; - - case WM_ERASEBKGND: - // no background erasing needed since our OnDraw method draws the entire window. - return TRUE; - - case WM_EYEX_HOST_STATUS_CHANGED: - OnStatusChanged(wParam != FALSE); - break; - - case WM_REGION_GOT_ACTIVATION_FOCUS: - OnRegionGotActivationFocus((UINT)wParam); - break; - - case WM_REGION_ACTIVATED: - OnRegionActivated((UINT)wParam); - break; - - case WM_WINDOWPOSCHANGED: - UpdateActivatableRegions(); - break; - - case WM_DESTROY: - PostQuitMessage(0); - break; - - case WM_KEYDOWN: - // trigger an activation command when space is pressed. - if (VK_SPACE == wParam) - { - g_eyeXHost.TriggerActivation(); - } - break; - - default: - return DefWindowProc(hWnd, message, wParam, lParam); - } - return 0; -} - -// -// FUNCTION: MyRegisterClass() -// -// PURPOSE: Registers the window class. -// -ATOM MyRegisterClass(HINSTANCE hInstance) -{ - WNDCLASSEX wcex; - - wcex.cbSize = sizeof(WNDCLASSEX); - - wcex.style = CS_HREDRAW | CS_VREDRAW; - wcex.lpfnWndProc = WndProc; - wcex.cbClsExtra = 0; - wcex.cbWndExtra = 0; - wcex.hInstance = hInstance; - wcex.hIcon = LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ACTIVATABLEBUTTONS)); - wcex.hCursor = LoadCursor(NULL, IDC_ARROW); - wcex.hbrBackground = 0; - wcex.lpszMenuName = MAKEINTRESOURCE(IDC_ACTIVATABLEBUTTONS); - wcex.lpszClassName = g_szWindowClass; - wcex.hIconSm = LoadIcon(wcex.hInstance, MAKEINTRESOURCE(IDI_SMALL)); - - return RegisterClassEx(&wcex); -} - -// -// FUNCTION: InitInstance(HINSTANCE, int) -// -// PURPOSE: Saves instance handle and creates main window -// -// COMMENTS: -// -// In this function, we save the instance handle in a global variable and -// create and display the main program window. -// -BOOL InitInstance(HINSTANCE hInstance, int nCmdShow) -{ - g_hWnd = CreateWindow(g_szWindowClass, _T(""), WS_OVERLAPPEDWINDOW, - CW_USEDEFAULT, 0, 490, 380, NULL, NULL, hInstance, NULL); - - if (!g_hWnd) - { - return FALSE; - } - - ShowWindow(g_hWnd, nCmdShow); - UpdateWindow(g_hWnd); - - // initialize the EyeX host and the activatable regions. - g_eyeXHost.Init(g_hWnd, WM_EYEX_HOST_STATUS_CHANGED, WM_REGION_GOT_ACTIVATION_FOCUS, WM_REGION_ACTIVATED); - UpdateActivatableRegions(); - - return TRUE; -} - -// Application entry point. -int APIENTRY _tWinMain(_In_ HINSTANCE hInstance, - _In_opt_ HINSTANCE hPrevInstance, - _In_ LPTSTR lpCmdLine, - _In_ int nCmdShow) -{ - UNREFERENCED_PARAMETER(hPrevInstance); - UNREFERENCED_PARAMETER(lpCmdLine); - - // Initialize gdiplus - ULONG_PTR gdiplusToken; - Gdiplus::GdiplusStartupInput gdiplusStartupInput; - Gdiplus::GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL); - - MyRegisterClass(hInstance); - - // Perform application initialization: - if (!InitInstance (hInstance, nCmdShow)) - { - return FALSE; - } - - HACCEL hAccelTable; - hAccelTable = LoadAccelerators(hInstance, MAKEINTRESOURCE(IDC_ACTIVATABLEBUTTONS)); - - // Main message loop: - MSG msg; - while (GetMessage(&msg, NULL, 0, 0)) - { - if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg)) - { - TranslateMessage(&msg); - DispatchMessage(&msg); - } - } - - // Shutdown: - Gdiplus::GdiplusShutdown(gdiplusToken); - - return (int) msg.wParam; -} diff --git a/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.ico b/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.ico deleted file mode 100755 index 449296f..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.ico and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.rc b/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.rc deleted file mode 100755 index 8f97f8c..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.rc and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.vcxproj b/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.vcxproj deleted file mode 100755 index 9bc381e..0000000 --- a/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.vcxproj +++ /dev/null @@ -1,188 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {3E2A1867-D554-4655-8F03-B6A4C06D4967} - Win32Proj - ActivatableButtons - - - - Application - true - v140 - Unicode - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - Application - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - Use - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - ..\..\include;%(AdditionalIncludeDirectories) - - - Windows - true - ..\..\lib\x86 - - - true - - - - - Use - Level3 - Disabled - WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - ..\..\include;%(AdditionalIncludeDirectories) - - - Windows - true - ..\..\lib\x64 - - - true - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - ..\..\include;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - ..\..\lib\x86 - - - true - - - - - Level3 - Use - MaxSpeed - true - true - WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) - true - ..\..\include;%(AdditionalIncludeDirectories) - - - Windows - true - true - true - ..\..\lib\x64 - - - true - - - - - - - - - - - - - Create - Create - Create - Create - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.vcxproj.filters b/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.vcxproj.filters deleted file mode 100755 index dd3cdd3..0000000 --- a/Tobii EyeX/samples/ActivatableButtons/ActivatableButtons.vcxproj.filters +++ /dev/null @@ -1,55 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - - - Resource Files - - - - - Resource Files - - - Resource Files - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/ActivatableButtons.lastbuildstate b/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/ActivatableButtons.lastbuildstate deleted file mode 100755 index 5cd4c3b..0000000 --- a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/ActivatableButtons.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 -Debug|Win32|D:\dev\tobii\samples\| diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/CL.command.1.tlog b/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/CL.command.1.tlog deleted file mode 100755 index 8c2918b..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/CL.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/CL.read.1.tlog b/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/CL.read.1.tlog deleted file mode 100755 index 64925ad..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/CL.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/CL.write.1.tlog b/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/CL.write.1.tlog deleted file mode 100755 index 54a1b52..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/CL.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/link.command.1.tlog b/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/link.command.1.tlog deleted file mode 100755 index 5c8ec49..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/link.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/link.read.1.tlog b/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/link.read.1.tlog deleted file mode 100755 index 5822f11..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/link.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/link.write.1.tlog b/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/link.write.1.tlog deleted file mode 100755 index 2f69de6..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/link.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/rc.command.1.tlog b/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/rc.command.1.tlog deleted file mode 100755 index 4506a2b..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/rc.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/rc.read.1.tlog b/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/rc.read.1.tlog deleted file mode 100755 index a3ad644..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/rc.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/rc.write.1.tlog b/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/rc.write.1.tlog deleted file mode 100755 index 952d17c..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/Activata.3E2A1867.tlog/rc.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.log b/Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.log deleted file mode 100755 index 87b519f..0000000 --- a/Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.log +++ /dev/null @@ -1,6 +0,0 @@ - stdafx.cpp - EyeXHost.cpp -d:\dev\tobii\samples\activatablebuttons\eyexhost.cpp(158): warning C4477: 'sprintf_s' : format string '%d' requires an argument of type 'int', but variadic argument 1 has type 'HWND' - ActivatableButtons.cpp - Generating Code... - ActivatableButtons.vcxproj -> D:\dev\tobii\samples\Debug\ActivatableButtons.exe diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.obj b/Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.obj deleted file mode 100755 index d058330..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.obj and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.pch b/Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.pch deleted file mode 100755 index cee1ac5..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.pch and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.res b/Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.res deleted file mode 100755 index 9cfd8cd..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/ActivatableButtons.res and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/EyeXHost.obj b/Tobii EyeX/samples/ActivatableButtons/Debug/EyeXHost.obj deleted file mode 100755 index b7e4d31..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/EyeXHost.obj and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/stdafx.obj b/Tobii EyeX/samples/ActivatableButtons/Debug/stdafx.obj deleted file mode 100755 index b3c70a5..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/stdafx.obj and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/vc140.idb b/Tobii EyeX/samples/ActivatableButtons/Debug/vc140.idb deleted file mode 100755 index ec0d0d4..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/vc140.idb and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/Debug/vc140.pdb b/Tobii EyeX/samples/ActivatableButtons/Debug/vc140.pdb deleted file mode 100755 index 8f0aa96..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Debug/vc140.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/EyeXHost.cpp b/Tobii EyeX/samples/ActivatableButtons/EyeXHost.cpp deleted file mode 100755 index 3291e54..0000000 --- a/Tobii EyeX/samples/ActivatableButtons/EyeXHost.cpp +++ /dev/null @@ -1,294 +0,0 @@ -/* - * ActivatableButtons sample: - * This is an example that demonstrates the Activatable behavior. - * It features two buttons that can be clicked by looking at the button and pressing the space bar. - * - * Copyright 2013 Tobii Technology AB. All rights reserved. - */ - -#include "stdafx.h" -#include "EyeXHost.h" -#include -#include -#include -#include - -#pragma comment (lib, "Tobii.EyeX.Client.lib") - -#if INTPTR_MAX == INT64_MAX -#define WINDOW_HANDLE_FORMAT "%lld" -#else -#define WINDOW_HANDLE_FORMAT "%d" -#endif - -EyeXHost::EyeXHost() - : _hWnd(nullptr), _statusChangedMessage(0), _focusedRegionChangedMessage(0), _regionActivatedMessage(0) -{ - // initialize the EyeX Engine client library. - txInitializeEyeX(TX_EYEXCOMPONENTOVERRIDEFLAG_NONE, nullptr, nullptr, nullptr, nullptr); - - // create a context and register event handlers. - txCreateContext(&_context, TX_FALSE); - RegisterConnectionStateChangedHandler(); - RegisterQueryHandler(); - RegisterEventHandler(); -} - -EyeXHost::~EyeXHost() -{ - if (_context != TX_EMPTY_HANDLE) - { - // shut down, then release the context. - txShutdownContext(_context, TX_CLEANUPTIMEOUT_DEFAULT, TX_FALSE); - txReleaseContext(&_context); - } -} - -void EyeXHost::Init(HWND hWnd, UINT statusChangedMessage, UINT focusedRegionChangedMessage, UINT regionActivatedMessage) -{ - _hWnd = hWnd; - _statusChangedMessage = statusChangedMessage; - _focusedRegionChangedMessage = focusedRegionChangedMessage; - _regionActivatedMessage = regionActivatedMessage; - - // connect to the engine. - if (txEnableConnection(_context) != TX_RESULT_OK) - { - PostMessage(_hWnd, _statusChangedMessage, false, 0); - } -} - -void EyeXHost::SetActivatableRegions(const std::vector& regions) -{ - std::lock_guard lock(_mutex); - - _regions.assign(regions.begin(), regions.end()); -} - -void EyeXHost::TriggerActivation() -{ - TX_HANDLE command(TX_EMPTY_HANDLE); - txCreateActionCommand(_context, &command, TX_ACTIONTYPE_ACTIVATE); - txExecuteCommandAsync(command, NULL, NULL); - txReleaseObject(&command); -} - -void EyeXHost::OnEngineConnectionStateChanged(TX_CONNECTIONSTATE connectionState) -{ - // note the use of the asynchronous PostMessage function to marshal the event to the main thread. - // (this callback function is typically invoked on a worker thread.) - switch (connectionState) - { - case TX_CONNECTIONSTATE::TX_CONNECTIONSTATE_CONNECTED: - PostMessage(_hWnd, _statusChangedMessage, true, 0); - break; - - case TX_CONNECTIONSTATE::TX_CONNECTIONSTATE_DISCONNECTED: - case TX_CONNECTIONSTATE::TX_CONNECTIONSTATE_TRYINGTOCONNECT: - case TX_CONNECTIONSTATE::TX_CONNECTIONSTATE_SERVERVERSIONTOOLOW: - case TX_CONNECTIONSTATE::TX_CONNECTIONSTATE_SERVERVERSIONTOOHIGH: - PostMessage(_hWnd, _statusChangedMessage, false, 0); - break; - - default: - break; - } -} - -bool EyeXHost::RegisterConnectionStateChangedHandler() -{ - auto connectionStateChangedTrampoline = [](TX_CONNECTIONSTATE connectionState, TX_USERPARAM userParam) - { - static_cast(userParam)->OnEngineConnectionStateChanged(connectionState); - }; - - bool success = txRegisterConnectionStateChangedHandler(_context, &_connectionStateChangedTicket, connectionStateChangedTrampoline, this) == TX_RESULT_OK; - return success; -} - -bool EyeXHost::RegisterQueryHandler() -{ - auto queryHandlerTrampoline = [](TX_CONSTHANDLE hObject, TX_USERPARAM userParam) - { - static_cast(userParam)->HandleQuery(hObject); - }; - - bool success = txRegisterQueryHandler(_context, &_queryHandlerTicket, queryHandlerTrampoline, this) == TX_RESULT_OK; - return success; -} - -bool EyeXHost::RegisterEventHandler() -{ - auto eventHandlerTrampoline = [](TX_CONSTHANDLE hObject, TX_USERPARAM userParam) - { - static_cast(userParam)->HandleEvent(hObject); - }; - - bool success = txRegisterEventHandler(_context, &_eventHandlerTicket, eventHandlerTrampoline, this) == TX_RESULT_OK; - return success; -} - -void EyeXHost::HandleQuery(TX_CONSTHANDLE hAsyncData) -{ - std::lock_guard lock(_mutex); - - // NOTE. This method will fail silently if, for example, the connection is lost before the snapshot has been committed, - // or if we run out of memory. This is by design, because there is nothing we can do to recover from these errors anyway. - - TX_HANDLE hQuery(TX_EMPTY_HANDLE); - txGetAsyncDataContent(hAsyncData, &hQuery); - - const int bufferSize = 20; - TX_CHAR stringBuffer[bufferSize]; - - // read the query bounds from the query, that is, the area on the screen that the query concerns. - // the query region is always rectangular. - TX_HANDLE hBounds(TX_EMPTY_HANDLE); - txGetQueryBounds(hQuery, &hBounds); - TX_REAL pX, pY, pWidth, pHeight; - txGetRectangularBoundsData(hBounds, &pX, &pY, &pWidth, &pHeight); - txReleaseObject(&hBounds); - Gdiplus::Rect queryBounds((INT)pX, (INT)pY, (INT)pWidth, (INT)pHeight); - - // create a new snapshot with the same window id and bounds as the query. - TX_HANDLE hSnapshot(TX_EMPTY_HANDLE); - txCreateSnapshotForQuery(hQuery, &hSnapshot); - - TX_CHAR windowIdString[bufferSize]; - sprintf_s(windowIdString, bufferSize, WINDOW_HANDLE_FORMAT, _hWnd); - - if (QueryIsForWindowId(hQuery, windowIdString)) - { - // define options for our activatable regions: no, we don't want tentative focus events. - TX_ACTIVATABLEPARAMS params = { TX_FALSE }; - - // iterate through all regions and create interactors for those that overlap with the query bounds. - for (auto region : _regions) - { - Gdiplus::Rect regionBounds((INT)region.bounds.left, (INT)region.bounds.top, - (INT)(region.bounds.right - region.bounds.left), (INT)(region.bounds.bottom - region.bounds.top)); - - if (queryBounds.IntersectsWith(regionBounds)) - { - TX_HANDLE hInteractor(TX_EMPTY_HANDLE); - - sprintf_s(stringBuffer, bufferSize, "%d", region.id); - - TX_RECT bounds; - bounds.X = region.bounds.left; - bounds.Y = region.bounds.top; - bounds.Width = region.bounds.right - region.bounds.left; - bounds.Height = region.bounds.bottom - region.bounds.top; - - txCreateRectangularInteractor(hSnapshot, &hInteractor, stringBuffer, &bounds, TX_LITERAL_ROOTID, windowIdString); - txCreateActivatableBehavior(hInteractor, ¶ms); - - txReleaseObject(&hInteractor); - } - } - } - - txCommitSnapshotAsync(hSnapshot, OnSnapshotCommitted, nullptr); - txReleaseObject(&hSnapshot); - txReleaseObject(&hQuery); -} - -void EyeXHost::HandleEvent(TX_CONSTHANDLE hAsyncData) -{ - TX_HANDLE hEvent(TX_EMPTY_HANDLE); - txGetAsyncDataContent(hAsyncData, &hEvent); - - // NOTE. Uncomment the following line of code to view the event object. The same function can be used with any interaction object. - //OutputDebugStringA(txDebugObject(hEvent)); - - // read the interactor ID from the event. - const int bufferSize = 20; - TX_CHAR stringBuffer[bufferSize]; - TX_SIZE idLength(bufferSize); - if (txGetEventInteractorId(hEvent, stringBuffer, &idLength) == TX_RESULT_OK) - { - int interactorId = atoi(stringBuffer); - - HandleActivatableEvent(hEvent, interactorId); - } - - txReleaseObject(&hEvent); -} - -void EyeXHost::HandleActivatableEvent(TX_HANDLE hEvent, int interactorId) -{ - TX_HANDLE hActivatable(TX_EMPTY_HANDLE); - if (txGetEventBehavior(hEvent, &hActivatable, TX_BEHAVIORTYPE_ACTIVATABLE) == TX_RESULT_OK) - { - TX_ACTIVATABLEEVENTTYPE eventType; - if (txGetActivatableEventType(hActivatable, &eventType) == TX_RESULT_OK) - { - if (eventType == TX_ACTIVATABLEEVENTTYPE_ACTIVATED) - { - OnActivated(hActivatable, interactorId); - } - else if (eventType == TX_ACTIVATABLEEVENTTYPE_ACTIVATIONFOCUSCHANGED) - { - OnActivationFocusChanged(hActivatable, interactorId); - } - } - - txReleaseObject(&hActivatable); - } -} - -void EyeXHost::OnActivationFocusChanged(TX_HANDLE hBehavior, int interactorId) -{ - TX_ACTIVATIONFOCUSCHANGEDEVENTPARAMS eventData; - if (txGetActivationFocusChangedEventParams(hBehavior, &eventData) == TX_RESULT_OK) - { - if (eventData.HasActivationFocus) - { - PostMessage(_hWnd, _focusedRegionChangedMessage, interactorId, 0); - } - else - { - PostMessage(_hWnd, _focusedRegionChangedMessage, -1, 0); - } - - } -} - -void EyeXHost::OnActivated(TX_HANDLE hBehavior, int interactorId) -{ - PostMessage(_hWnd, _regionActivatedMessage, interactorId, 0); -} - -void TX_CALLCONVENTION EyeXHost::OnSnapshotCommitted(TX_CONSTHANDLE hAsyncData, TX_USERPARAM param) -{ - // check the result code using an assertion. - // this will catch validation errors and runtime errors in debug builds. in release builds it won't do anything. - - TX_RESULT result = TX_RESULT_UNKNOWN; - txGetAsyncDataResultCode(hAsyncData, &result); - assert(result == TX_RESULT_OK || result == TX_RESULT_CANCELLED); -} - -bool EyeXHost::QueryIsForWindowId(TX_HANDLE hQuery, const TX_CHAR* windowId) -{ - const int bufferSize = 20; - TX_CHAR buffer[bufferSize]; - - TX_SIZE count; - if (TX_RESULT_OK == txGetQueryWindowIdCount(hQuery, &count)) - { - for (int i = 0; i < count; i++) - { - TX_SIZE size = bufferSize; - if (TX_RESULT_OK == txGetQueryWindowId(hQuery, i, buffer, &size)) - { - if (0 == strcmp(windowId, buffer)) - { - return true; - } - } - } - } - - return false; -} diff --git a/Tobii EyeX/samples/ActivatableButtons/EyeXHost.h b/Tobii EyeX/samples/ActivatableButtons/EyeXHost.h deleted file mode 100755 index 6ee7493..0000000 --- a/Tobii EyeX/samples/ActivatableButtons/EyeXHost.h +++ /dev/null @@ -1,79 +0,0 @@ -/* - * EyeXHost class: Responsible for the gaze interaction within a window. - * Holds the current set of activatable regions and acts as a simple interactor repository. - * Sends notifications as Windows messages so that they are received on the main thread and can be handled there. - * - * Copyright 2013 Tobii Technology AB. All rights reserved. - */ - -#pragma once - -#include -#include -#include -#include "eyex/EyeX.h" - -class EyeXHost -{ -public: - // Represents an activatable region, that is, one particular kind of interactor. - struct ActivatableRegion - { - int id; - RECT bounds; - - ActivatableRegion(int paramId, RECT paramBounds) : id(paramId), bounds(paramBounds) { } - }; - - EyeXHost(); - virtual ~EyeXHost(); - - // attaches to the window with the given handle. - // the message parameters are custom windows messages sent to the window when an event has occurred. - void Init(HWND hWnd, UINT statusChangedMessage, UINT focusedRegionChangedMessage, UINT regionActivatedMessage); - - // updates the collection (repository) of activatable regions. - void SetActivatableRegions(const std::vector& regions); - - // triggers an activation ("direct click"). - void TriggerActivation(); - -private: - // registers handlers for notifications from the engine. - bool RegisterConnectionStateChangedHandler(); - bool RegisterQueryHandler(); - bool RegisterEventHandler(); - - // event handlers. - void OnEngineConnectionStateChanged(TX_CONNECTIONSTATE connectionState); - void HandleQuery(TX_CONSTHANDLE hAsyncData); - void HandleEvent(TX_CONSTHANDLE hAsyncData); - void HandleActivatableEvent(TX_HANDLE hEvent, int interactorId); - void OnActivationFocusChanged(TX_HANDLE hBehavior, int interactorId); - void OnActivated(TX_HANDLE hBehavior, int interactorId); - - // callback function invoked when a snapshot has been committed. - static void TX_CALLCONVENTION OnSnapshotCommitted(TX_CONSTHANDLE hAsyncData, TX_USERPARAM param); - - static bool QueryIsForWindowId(TX_HANDLE hQuery, const TX_CHAR* windowId); - - // mutex protecting the state of the object from race conditions caused by multiple threads. - // (for example, a call to SetActivatableRegions from the main thread while the HandleQuery - // method is iterating through the regions on a worker thread.) - std::mutex _mutex; - std::vector _regions; - TX_CONTEXTHANDLE _context; - TX_TICKET _connectionStateChangedTicket; - TX_TICKET _queryHandlerTicket; - TX_TICKET _eventHandlerTicket; - - // attached window and custom messages. - HWND _hWnd; - UINT _statusChangedMessage; - UINT _focusedRegionChangedMessage; - UINT _regionActivatedMessage; - - // private copy constructor and operator making the class non-copyable (declared but not implemented). - EyeXHost(const EyeXHost&); - EyeXHost& operator = (const EyeXHost&); -}; diff --git a/Tobii EyeX/samples/ActivatableButtons/Resource.h b/Tobii EyeX/samples/ActivatableButtons/Resource.h deleted file mode 100755 index 0d9e811..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/Resource.h and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/small.ico b/Tobii EyeX/samples/ActivatableButtons/small.ico deleted file mode 100755 index 449296f..0000000 Binary files a/Tobii EyeX/samples/ActivatableButtons/small.ico and /dev/null differ diff --git a/Tobii EyeX/samples/ActivatableButtons/stdafx.cpp b/Tobii EyeX/samples/ActivatableButtons/stdafx.cpp deleted file mode 100755 index 92e931f..0000000 --- a/Tobii EyeX/samples/ActivatableButtons/stdafx.cpp +++ /dev/null @@ -1,3 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes - -#include "stdafx.h" diff --git a/Tobii EyeX/samples/ActivatableButtons/stdafx.h b/Tobii EyeX/samples/ActivatableButtons/stdafx.h deleted file mode 100755 index 705c92c..0000000 --- a/Tobii EyeX/samples/ActivatableButtons/stdafx.h +++ /dev/null @@ -1,17 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently - -#pragma once - -#include "targetver.h" - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers -// Windows Header Files: -#include - -// C RunTime Header Files -#include -#include -#include -#include diff --git a/Tobii EyeX/samples/ActivatableButtons/targetver.h b/Tobii EyeX/samples/ActivatableButtons/targetver.h deleted file mode 100755 index 90e767b..0000000 --- a/Tobii EyeX/samples/ActivatableButtons/targetver.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -// Including SDKDDKVer.h defines the highest available Windows platform. - -// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and -// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. - -#include diff --git a/Tobii EyeX/samples/CopyEyeXDllToOutputDirectory.targets b/Tobii EyeX/samples/CopyEyeXDllToOutputDirectory.targets deleted file mode 100755 index bdc798e..0000000 --- a/Tobii EyeX/samples/CopyEyeXDllToOutputDirectory.targets +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - $(BuildLinkAction);CopyEyeXDllToOutputDirectory - - - - Tobii.EyeX.Client.dll - ..\..\lib\x64\$(EyeXDllName) - ..\..\lib\x86\$(EyeXDllName) - - - - - - - diff --git a/Tobii EyeX/samples/Debug/ActivatableBoardGame.exe b/Tobii EyeX/samples/Debug/ActivatableBoardGame.exe deleted file mode 100755 index e13b5d0..0000000 Binary files a/Tobii EyeX/samples/Debug/ActivatableBoardGame.exe and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/ActivatableBoardGame.ilk b/Tobii EyeX/samples/Debug/ActivatableBoardGame.ilk deleted file mode 100755 index 86410d6..0000000 Binary files a/Tobii EyeX/samples/Debug/ActivatableBoardGame.ilk and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/ActivatableBoardGame.pdb b/Tobii EyeX/samples/Debug/ActivatableBoardGame.pdb deleted file mode 100755 index 647659b..0000000 Binary files a/Tobii EyeX/samples/Debug/ActivatableBoardGame.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/ActivatableButtons.exe b/Tobii EyeX/samples/Debug/ActivatableButtons.exe deleted file mode 100755 index fbb924d..0000000 Binary files a/Tobii EyeX/samples/Debug/ActivatableButtons.exe and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/ActivatableButtons.ilk b/Tobii EyeX/samples/Debug/ActivatableButtons.ilk deleted file mode 100755 index dae3b90..0000000 Binary files a/Tobii EyeX/samples/Debug/ActivatableButtons.ilk and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/ActivatableButtons.pdb b/Tobii EyeX/samples/Debug/ActivatableButtons.pdb deleted file mode 100755 index 66c7dd9..0000000 Binary files a/Tobii EyeX/samples/Debug/ActivatableButtons.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalEyePositionDataStream.exe b/Tobii EyeX/samples/Debug/MinimalEyePositionDataStream.exe deleted file mode 100755 index eb8dea2..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalEyePositionDataStream.exe and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalEyePositionDataStream.ilk b/Tobii EyeX/samples/Debug/MinimalEyePositionDataStream.ilk deleted file mode 100755 index 1104292..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalEyePositionDataStream.ilk and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalEyePositionDataStream.pdb b/Tobii EyeX/samples/Debug/MinimalEyePositionDataStream.pdb deleted file mode 100755 index c00ee89..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalEyePositionDataStream.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalFixationDataStream.exe b/Tobii EyeX/samples/Debug/MinimalFixationDataStream.exe deleted file mode 100755 index cede5c1..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalFixationDataStream.exe and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalFixationDataStream.ilk b/Tobii EyeX/samples/Debug/MinimalFixationDataStream.ilk deleted file mode 100755 index eb7355f..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalFixationDataStream.ilk and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalFixationDataStream.pdb b/Tobii EyeX/samples/Debug/MinimalFixationDataStream.pdb deleted file mode 100755 index ba64025..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalFixationDataStream.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalGazeDataStream.exe b/Tobii EyeX/samples/Debug/MinimalGazeDataStream.exe deleted file mode 100755 index 38cca37..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalGazeDataStream.exe and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalGazeDataStream.ilk b/Tobii EyeX/samples/Debug/MinimalGazeDataStream.ilk deleted file mode 100755 index 82cdd05..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalGazeDataStream.ilk and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalGazeDataStream.pdb b/Tobii EyeX/samples/Debug/MinimalGazeDataStream.pdb deleted file mode 100755 index f2b24b2..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalGazeDataStream.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalStatusNotifications.exe b/Tobii EyeX/samples/Debug/MinimalStatusNotifications.exe deleted file mode 100755 index 8354e4f..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalStatusNotifications.exe and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalStatusNotifications.ilk b/Tobii EyeX/samples/Debug/MinimalStatusNotifications.ilk deleted file mode 100755 index 771b8f9..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalStatusNotifications.ilk and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalStatusNotifications.pdb b/Tobii EyeX/samples/Debug/MinimalStatusNotifications.pdb deleted file mode 100755 index c73bf24..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalStatusNotifications.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalUserProfiles.exe b/Tobii EyeX/samples/Debug/MinimalUserProfiles.exe deleted file mode 100755 index 7c21075..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalUserProfiles.exe and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalUserProfiles.ilk b/Tobii EyeX/samples/Debug/MinimalUserProfiles.ilk deleted file mode 100755 index 6b20d3f..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalUserProfiles.ilk and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/MinimalUserProfiles.pdb b/Tobii EyeX/samples/Debug/MinimalUserProfiles.pdb deleted file mode 100755 index 897badd..0000000 Binary files a/Tobii EyeX/samples/Debug/MinimalUserProfiles.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/Debug/Tobii.EyeX.Client.dll b/Tobii EyeX/samples/Debug/Tobii.EyeX.Client.dll deleted file mode 100755 index 0e1e975..0000000 Binary files a/Tobii EyeX/samples/Debug/Tobii.EyeX.Client.dll and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/CL.command.1.tlog b/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/CL.command.1.tlog deleted file mode 100755 index 778592a..0000000 Binary files a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/CL.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/CL.read.1.tlog b/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/CL.read.1.tlog deleted file mode 100755 index d263c73..0000000 Binary files a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/CL.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/CL.write.1.tlog b/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/CL.write.1.tlog deleted file mode 100755 index 66e1721..0000000 Binary files a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/CL.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/MinimalEyePositionDataStream.lastbuildstate b/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/MinimalEyePositionDataStream.lastbuildstate deleted file mode 100755 index 5cd4c3b..0000000 --- a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/MinimalEyePositionDataStream.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 -Debug|Win32|D:\dev\tobii\samples\| diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/link.command.1.tlog b/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/link.command.1.tlog deleted file mode 100755 index 063463c..0000000 Binary files a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/link.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/link.read.1.tlog b/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/link.read.1.tlog deleted file mode 100755 index 0209802..0000000 Binary files a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/link.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/link.write.1.tlog b/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/link.write.1.tlog deleted file mode 100755 index dfdfde0..0000000 Binary files a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalE.6D2CFFFE.tlog/link.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalEyePositionDataStream.log b/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalEyePositionDataStream.log deleted file mode 100755 index f4e7d98..0000000 --- a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalEyePositionDataStream.log +++ /dev/null @@ -1,2 +0,0 @@ - MinimalEyePositionDataStream.c - MinimalEyePositionDataStream.vcxproj -> D:\dev\tobii\samples\Debug\MinimalEyePositionDataStream.exe diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalEyePositionDataStream.obj b/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalEyePositionDataStream.obj deleted file mode 100755 index 94714f2..0000000 Binary files a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/MinimalEyePositionDataStream.obj and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/vc140.idb b/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/vc140.idb deleted file mode 100755 index 65a10a3..0000000 Binary files a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/vc140.idb and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/vc140.pdb b/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/vc140.pdb deleted file mode 100755 index b8a41a3..0000000 Binary files a/Tobii EyeX/samples/MinimalEyePositionDataStream/Debug/vc140.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/MinimalEyePositionDataStream.c b/Tobii EyeX/samples/MinimalEyePositionDataStream/MinimalEyePositionDataStream.c deleted file mode 100755 index b979c6c..0000000 --- a/Tobii EyeX/samples/MinimalEyePositionDataStream/MinimalEyePositionDataStream.c +++ /dev/null @@ -1,199 +0,0 @@ -/* - * This is an example that demonstrates how to connect to the EyeX Engine and subscribe to the eye position data stream. - * - * Copyright 2013-2014 Tobii Technology AB. All rights reserved. - */ - -#include -#include -#include -#include -#include "eyex/EyeX.h" - -#pragma comment (lib, "Tobii.EyeX.Client.lib") - -// ID of the global interactor that provides our data stream; must be unique within the application. -static const TX_STRING InteractorId = "Fluttershy"; - -// global variables -static TX_HANDLE g_hGlobalInteractorSnapshot = TX_EMPTY_HANDLE; - -/* - * Initializes g_hGlobalInteractorSnapshot with an interactor that has the Eye Position behavior. - */ -BOOL InitializeGlobalInteractorSnapshot(TX_CONTEXTHANDLE hContext) -{ - TX_HANDLE hInteractor = TX_EMPTY_HANDLE; - TX_HANDLE hBehaviorWithoutParameters = TX_EMPTY_HANDLE; - - BOOL success; - - success = txCreateGlobalInteractorSnapshot( - hContext, - InteractorId, - &g_hGlobalInteractorSnapshot, - &hInteractor) == TX_RESULT_OK; - success &= txCreateInteractorBehavior(hInteractor, &hBehaviorWithoutParameters, TX_BEHAVIORTYPE_EYEPOSITIONDATA) == TX_RESULT_OK; - - txReleaseObject(&hInteractor); - - return success; -} - -/* - * Callback function invoked when a snapshot has been committed. - */ -void TX_CALLCONVENTION OnSnapshotCommitted(TX_CONSTHANDLE hAsyncData, TX_USERPARAM param) -{ - // check the result code using an assertion. - // this will catch validation errors and runtime errors in debug builds. in release builds it won't do anything. - - TX_RESULT result = TX_RESULT_UNKNOWN; - txGetAsyncDataResultCode(hAsyncData, &result); - assert(result == TX_RESULT_OK || result == TX_RESULT_CANCELLED); -} - -/* - * Callback function invoked when the status of the connection to the EyeX Engine has changed. - */ -void TX_CALLCONVENTION OnEngineConnectionStateChanged(TX_CONNECTIONSTATE connectionState, TX_USERPARAM userParam) -{ - switch (connectionState) { - case TX_CONNECTIONSTATE_CONNECTED: { - BOOL success; - printf("The connection state is now CONNECTED (We are connected to the EyeX Engine)\n"); - // commit the snapshot with the global interactor as soon as the connection to the engine is established. - // (it cannot be done earlier because committing means "send to the engine".) - success = txCommitSnapshotAsync(g_hGlobalInteractorSnapshot, OnSnapshotCommitted, NULL) == TX_RESULT_OK; - if (!success) { - printf("Failed to initialize the data stream.\n"); - } - else { - printf("Waiting for eye position data to start streaming...\n"); - } - } - break; - - case TX_CONNECTIONSTATE_DISCONNECTED: - printf("The connection state is now DISCONNECTED (We are disconnected from the EyeX Engine)\n"); - break; - - case TX_CONNECTIONSTATE_TRYINGTOCONNECT: - printf("The connection state is now TRYINGTOCONNECT (We are trying to connect to the EyeX Engine)\n"); - break; - - case TX_CONNECTIONSTATE_SERVERVERSIONTOOLOW: - printf("The connection state is now SERVER_VERSION_TOO_LOW: this application requires a more recent version of the EyeX Engine to run.\n"); - break; - - case TX_CONNECTIONSTATE_SERVERVERSIONTOOHIGH: - printf("The connection state is now SERVER_VERSION_TOO_HIGH: this application requires an older version of the EyeX Engine to run.\n"); - break; - } -} - -/* - * Handles an event from the Eye Position data stream. - */ -void OnEyePositionDataEvent(TX_HANDLE hEyePositionDataBehavior) -{ - COORD position = {0,8}; - TX_EYEPOSITIONDATAEVENTPARAMS eventParams; - if (txGetEyePositionDataEventParams(hEyePositionDataBehavior, &eventParams) == TX_RESULT_OK) { - SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), position); - - // Output information about the left eye. - printf("LEFT EYE\n"); - printf("========\n"); - printf("3D position: (%.1f, %.1f, %.1f) \n", - eventParams.LeftEyeX, eventParams.LeftEyeY, eventParams.LeftEyeZ); - printf("Normalized : (%.1f, %.1f, %.1f) \n", - eventParams.LeftEyeXNormalized, eventParams.LeftEyeYNormalized, eventParams.LeftEyeZNormalized); - - // Output information about the right eye. - printf("\n"); - printf("RIGHT EYE\n"); - printf("=========\n"); - printf("3D position: (%.1f, %.1f, %.1f) \n", - eventParams.RightEyeX, eventParams.RightEyeY, eventParams.RightEyeZ); - printf("Normalized : (%.1f, %.1f, %.1f) \n", - eventParams.RightEyeXNormalized, eventParams.RightEyeYNormalized, eventParams.RightEyeZNormalized); - - printf("\n"); - printf("The 3D position consists of X,Y,Z coordinates expressed in millimeters \n"); - printf("in relation to the center of the screen where the eye tracker is mounted. \n"); - printf("\n"); - printf("The normalized coordinates are expressed in relation to the track box, \n"); - printf("i.e. the volume in which the eye tracker is theoretically able to track eyes. \n"); - printf("- (0,0,0) represents the upper, right corner closest to the eye tracker. \n"); - printf("- (1,1,1) represents the lower, left corner furthest away from the eye tracker. \n"); - } else { - printf("Failed to interpret eye position data event packet.\n"); - } -} - -/* - * Callback function invoked when an event has been received from the EyeX Engine. - */ -void TX_CALLCONVENTION HandleEvent(TX_CONSTHANDLE hAsyncData, TX_USERPARAM userParam) -{ - TX_HANDLE hEvent = TX_EMPTY_HANDLE; - TX_HANDLE hBehavior = TX_EMPTY_HANDLE; - - txGetAsyncDataContent(hAsyncData, &hEvent); - - // NOTE. Uncomment the following line of code to view the event object. The same function can be used with any interaction object. - //OutputDebugStringA(txDebugObject(hEvent)); - - if (txGetEventBehavior(hEvent, &hBehavior, TX_BEHAVIORTYPE_EYEPOSITIONDATA) == TX_RESULT_OK) { - OnEyePositionDataEvent(hBehavior); - txReleaseObject(&hBehavior); - } - - // NOTE since this is a very simple application with a single interactor and a single data stream, - // our event handling code can be very simple too. A more complex application would typically have to - // check for multiple behaviors and route events based on interactor IDs. - - txReleaseObject(&hEvent); -} - -/* - * Application entry point. - */ -int main(int argc, char* argv[]) -{ - TX_CONTEXTHANDLE hContext = TX_EMPTY_HANDLE; - TX_TICKET hConnectionStateChangedTicket = TX_INVALID_TICKET; - TX_TICKET hEventHandlerTicket = TX_INVALID_TICKET; - BOOL success; - - // initialize and enable the context that is our link to the EyeX Engine. - success = txInitializeEyeX(TX_EYEXCOMPONENTOVERRIDEFLAG_NONE, NULL, NULL, NULL, NULL) == TX_RESULT_OK; - success &= txCreateContext(&hContext, TX_FALSE) == TX_RESULT_OK; - success &= InitializeGlobalInteractorSnapshot(hContext); - success &= txRegisterConnectionStateChangedHandler(hContext, &hConnectionStateChangedTicket, OnEngineConnectionStateChanged, NULL) == TX_RESULT_OK; - success &= txRegisterEventHandler(hContext, &hEventHandlerTicket, HandleEvent, NULL) == TX_RESULT_OK; - success &= txEnableConnection(hContext) == TX_RESULT_OK; - - // let the events flow until a key is pressed. - if (success) { - printf("Initialization was successful.\n"); - } else { - printf("Initialization failed.\n"); - } - printf("Press any key to exit...\n"); - _getch(); - printf("Exiting.\n"); - - // disable and delete the context. - txDisableConnection(hContext); - txReleaseObject(&g_hGlobalInteractorSnapshot); - success = txShutdownContext(hContext, TX_CLEANUPTIMEOUT_DEFAULT, TX_FALSE) == TX_RESULT_OK; - success &= txReleaseContext(&hContext) == TX_RESULT_OK; - success &= txUninitializeEyeX() == TX_RESULT_OK; - if (!success) { - printf("EyeX could not be shut down cleanly. Did you remember to release all handles?\n"); - } - - return 0; -} diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/MinimalEyePositionDataStream.vcxproj b/Tobii EyeX/samples/MinimalEyePositionDataStream/MinimalEyePositionDataStream.vcxproj deleted file mode 100755 index fa69b14..0000000 --- a/Tobii EyeX/samples/MinimalEyePositionDataStream/MinimalEyePositionDataStream.vcxproj +++ /dev/null @@ -1,160 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - {6D2CFFFE-00E9-41C8-B389-059DA9AABDFC} - Win32Proj - MinimalEyePositionDataStream - - - - Application - true - v140 - Unicode - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - Application - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\include - - - Console - true - ..\..\lib\x86 - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\include - - - Console - true - ..\..\lib\x64 - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\include - - - Console - true - true - true - ..\..\lib\x86 - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\include - - - Console - true - true - true - ..\..\lib\x64 - - - - - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/MinimalEyePositionDataStream/MinimalEyePositionDataStream.vcxproj.filters b/Tobii EyeX/samples/MinimalEyePositionDataStream/MinimalEyePositionDataStream.vcxproj.filters deleted file mode 100755 index eded50f..0000000 --- a/Tobii EyeX/samples/MinimalEyePositionDataStream/MinimalEyePositionDataStream.vcxproj.filters +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/CL.command.1.tlog b/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/CL.command.1.tlog deleted file mode 100755 index 71e55ee..0000000 Binary files a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/CL.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/CL.read.1.tlog b/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/CL.read.1.tlog deleted file mode 100755 index 5f407c0..0000000 Binary files a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/CL.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/CL.write.1.tlog b/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/CL.write.1.tlog deleted file mode 100755 index d898b96..0000000 Binary files a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/CL.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/MinimalFixationDataStream.lastbuildstate b/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/MinimalFixationDataStream.lastbuildstate deleted file mode 100755 index 5cd4c3b..0000000 --- a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/MinimalFixationDataStream.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 -Debug|Win32|D:\dev\tobii\samples\| diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/link.command.1.tlog b/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/link.command.1.tlog deleted file mode 100755 index e5015ab..0000000 Binary files a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/link.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/link.read.1.tlog b/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/link.read.1.tlog deleted file mode 100755 index e83e6a0..0000000 Binary files a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/link.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/link.write.1.tlog b/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/link.write.1.tlog deleted file mode 100755 index 51ff531..0000000 Binary files a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalF.9345876F.tlog/link.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalFixationDataStream.log b/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalFixationDataStream.log deleted file mode 100755 index 4122cb4..0000000 --- a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalFixationDataStream.log +++ /dev/null @@ -1,2 +0,0 @@ - MinimalFixationDataStream.c - MinimalFixationDataStream.vcxproj -> D:\dev\tobii\samples\Debug\MinimalFixationDataStream.exe diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalFixationDataStream.obj b/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalFixationDataStream.obj deleted file mode 100755 index 16c002d..0000000 Binary files a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/MinimalFixationDataStream.obj and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/vc140.idb b/Tobii EyeX/samples/MinimalFixationDataStream/Debug/vc140.idb deleted file mode 100755 index 9079705..0000000 Binary files a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/vc140.idb and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/vc140.pdb b/Tobii EyeX/samples/MinimalFixationDataStream/Debug/vc140.pdb deleted file mode 100755 index 01d5e16..0000000 Binary files a/Tobii EyeX/samples/MinimalFixationDataStream/Debug/vc140.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/MinimalFixationDataStream.c b/Tobii EyeX/samples/MinimalFixationDataStream/MinimalFixationDataStream.c deleted file mode 100755 index 92b530e..0000000 --- a/Tobii EyeX/samples/MinimalFixationDataStream/MinimalFixationDataStream.c +++ /dev/null @@ -1,181 +0,0 @@ -/* - * This is an example that demonstrates how to connect to the EyeX Engine and subscribe to the fixation data stream. - * - * Copyright 2013-2014 Tobii Technology AB. All rights reserved. - */ - -#include -#include -#include -#include -#include "eyex/EyeX.h" - -#pragma comment (lib, "Tobii.EyeX.Client.lib") - -// ID of the global interactor that provides our data stream; must be unique within the application. -static const TX_STRING InteractorId = "Rainbow Dash"; - -// global variables -static TX_HANDLE g_hGlobalInteractorSnapshot = TX_EMPTY_HANDLE; - -/* - * Initializes g_hGlobalInteractorSnapshot with an interactor that has the Fixation Data behavior. - */ -BOOL InitializeGlobalInteractorSnapshot(TX_CONTEXTHANDLE hContext) -{ - TX_HANDLE hInteractor = TX_EMPTY_HANDLE; - TX_FIXATIONDATAPARAMS params = { TX_FIXATIONDATAMODE_SENSITIVE }; - BOOL success; - - success = txCreateGlobalInteractorSnapshot( - hContext, - InteractorId, - &g_hGlobalInteractorSnapshot, - &hInteractor) == TX_RESULT_OK; - success &= txCreateFixationDataBehavior(hInteractor, ¶ms) == TX_RESULT_OK; - - txReleaseObject(&hInteractor); - - return success; -} - -/* - * Callback function invoked when a snapshot has been committed. - */ -void TX_CALLCONVENTION OnSnapshotCommitted(TX_CONSTHANDLE hAsyncData, TX_USERPARAM param) -{ - // check the result code using an assertion. - // this will catch validation errors and runtime errors in debug builds. in release builds it won't do anything. - - TX_RESULT result = TX_RESULT_UNKNOWN; - txGetAsyncDataResultCode(hAsyncData, &result); - assert(result == TX_RESULT_OK || result == TX_RESULT_CANCELLED); -} - -/* - * Callback function invoked when the status of the connection to the EyeX Engine has changed. - */ -void TX_CALLCONVENTION OnEngineConnectionStateChanged(TX_CONNECTIONSTATE connectionState, TX_USERPARAM userParam) -{ - switch (connectionState) { - case TX_CONNECTIONSTATE_CONNECTED: { - BOOL success; - printf("The connection state is now CONNECTED (We are connected to the EyeX Engine)\n"); - // commit the snapshot with the global interactor as soon as the connection to the engine is established. - // (it cannot be done earlier because committing means "send to the engine".) - success = txCommitSnapshotAsync(g_hGlobalInteractorSnapshot, OnSnapshotCommitted, NULL) == TX_RESULT_OK; - if (!success) { - printf("Failed to initialize the data stream.\n"); - } - else - { - printf("Waiting for fixation data to start streaming...\n"); - } - } - break; - - case TX_CONNECTIONSTATE_DISCONNECTED: - printf("The connection state is now DISCONNECTED (We are disconnected from the EyeX Engine)\n"); - break; - - case TX_CONNECTIONSTATE_TRYINGTOCONNECT: - printf("The connection state is now TRYINGTOCONNECT (We are trying to connect to the EyeX Engine)\n"); - break; - - case TX_CONNECTIONSTATE_SERVERVERSIONTOOLOW: - printf("The connection state is now SERVER_VERSION_TOO_LOW: this application requires a more recent version of the EyeX Engine to run.\n"); - break; - - case TX_CONNECTIONSTATE_SERVERVERSIONTOOHIGH: - printf("The connection state is now SERVER_VERSION_TOO_HIGH: this application requires an older version of the EyeX Engine to run.\n"); - break; - } -} - -/* - * Handles an event from the fixation data stream. - */ -void OnFixationDataEvent(TX_HANDLE hFixationDataBehavior) -{ - TX_FIXATIONDATAEVENTPARAMS eventParams; - TX_FIXATIONDATAEVENTTYPE eventType; - char* eventDescription; - - if (txGetFixationDataEventParams(hFixationDataBehavior, &eventParams) == TX_RESULT_OK) { - eventType = eventParams.EventType; - - eventDescription = (eventType == TX_FIXATIONDATAEVENTTYPE_DATA) ? "Data" - : ((eventType == TX_FIXATIONDATAEVENTTYPE_END) ? "End" - : "Begin"); - - printf("Fixation %s: (%.1f, %.1f) timestamp %.0f ms\n", eventDescription, eventParams.X, eventParams.Y, eventParams.Timestamp); - } else { - printf("Failed to interpret fixation data event packet.\n"); - } -} - -/* - * Callback function invoked when an event has been received from the EyeX Engine. - */ -void TX_CALLCONVENTION HandleEvent(TX_CONSTHANDLE hAsyncData, TX_USERPARAM userParam) -{ - TX_HANDLE hEvent = TX_EMPTY_HANDLE; - TX_HANDLE hBehavior = TX_EMPTY_HANDLE; - - txGetAsyncDataContent(hAsyncData, &hEvent); - - // NOTE. Uncomment the following line of code to view the event object. The same function can be used with any interaction object. - //OutputDebugStringA(txDebugObject(hEvent)); - - if (txGetEventBehavior(hEvent, &hBehavior, TX_BEHAVIORTYPE_FIXATIONDATA) == TX_RESULT_OK) { - OnFixationDataEvent(hBehavior); - txReleaseObject(&hBehavior); - } - - // NOTE since this is a very simple application with a single interactor and a single data stream, - // our event handling code can be very simple too. A more complex application would typically have to - // check for multiple behaviors and route events based on interactor IDs. - - txReleaseObject(&hEvent); -} - -/* - * Application entry point. - */ -int main(int argc, char* argv[]) -{ - TX_CONTEXTHANDLE hContext = TX_EMPTY_HANDLE; - TX_TICKET hConnectionStateChangedTicket = TX_INVALID_TICKET; - TX_TICKET hEventHandlerTicket = TX_INVALID_TICKET; - BOOL success; - - // initialize and enable the context that is our link to the EyeX Engine. - success = txInitializeEyeX(TX_EYEXCOMPONENTOVERRIDEFLAG_NONE, NULL, NULL, NULL, NULL) == TX_RESULT_OK; - success &= txCreateContext(&hContext, TX_FALSE) == TX_RESULT_OK; - success &= InitializeGlobalInteractorSnapshot(hContext); - success &= txRegisterConnectionStateChangedHandler(hContext, &hConnectionStateChangedTicket, OnEngineConnectionStateChanged, NULL) == TX_RESULT_OK; - success &= txRegisterEventHandler(hContext, &hEventHandlerTicket, HandleEvent, NULL) == TX_RESULT_OK; - success &= txEnableConnection(hContext) == TX_RESULT_OK; - - // let the events flow until a key is pressed. - if (success) { - printf("Initialization was successful.\n"); - } else { - printf("Initialization failed.\n"); - } - printf("Press any key to exit...\n"); - _getch(); - printf("Exiting.\n"); - - // disable and delete the context. - txDisableConnection(hContext); - txReleaseObject(&g_hGlobalInteractorSnapshot); - success = txShutdownContext(hContext, TX_CLEANUPTIMEOUT_DEFAULT, TX_FALSE) == TX_RESULT_OK; - success &= txReleaseContext(&hContext) == TX_RESULT_OK; - success &= txUninitializeEyeX() == TX_RESULT_OK; - if (!success) { - printf("EyeX could not be shut down cleanly. Did you remember to release all handles?\n"); - } - - return 0; -} diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/MinimalFixationDataStream.vcxproj b/Tobii EyeX/samples/MinimalFixationDataStream/MinimalFixationDataStream.vcxproj deleted file mode 100755 index c341a56..0000000 --- a/Tobii EyeX/samples/MinimalFixationDataStream/MinimalFixationDataStream.vcxproj +++ /dev/null @@ -1,156 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {9345876F-09E3-4764-9B3C-6496152D523E} - Win32Proj - MinimalFixationStream - MinimalFixationDataStream - - - - Application - true - v140 - Unicode - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - Application - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\include - - - Console - true - ..\..\lib\x86 - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\include - - - Console - true - ..\..\lib\x64 - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\include - - - Console - true - true - true - ..\..\lib\x86 - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - - - Console - true - true - true - ..\..\lib\x64 - - - - - - - - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/MinimalFixationDataStream/MinimalFixationDataStream.vcxproj.filters b/Tobii EyeX/samples/MinimalFixationDataStream/MinimalFixationDataStream.vcxproj.filters deleted file mode 100755 index f22a6b0..0000000 --- a/Tobii EyeX/samples/MinimalFixationDataStream/MinimalFixationDataStream.vcxproj.filters +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/CL.command.1.tlog b/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/CL.command.1.tlog deleted file mode 100755 index a5e9eba..0000000 Binary files a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/CL.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/CL.read.1.tlog b/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/CL.read.1.tlog deleted file mode 100755 index 2e1fac2..0000000 Binary files a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/CL.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/CL.write.1.tlog b/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/CL.write.1.tlog deleted file mode 100755 index 5d60166..0000000 Binary files a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/CL.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/MinimalGazeDataStream.lastbuildstate b/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/MinimalGazeDataStream.lastbuildstate deleted file mode 100755 index 5cd4c3b..0000000 --- a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/MinimalGazeDataStream.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 -Debug|Win32|D:\dev\tobii\samples\| diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/link.command.1.tlog b/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/link.command.1.tlog deleted file mode 100755 index 00cba87..0000000 Binary files a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/link.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/link.read.1.tlog b/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/link.read.1.tlog deleted file mode 100755 index ccbfc24..0000000 Binary files a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/link.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/link.write.1.tlog b/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/link.write.1.tlog deleted file mode 100755 index acf58be..0000000 Binary files a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalG.CB99F84F.tlog/link.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalGazeDataStream.log b/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalGazeDataStream.log deleted file mode 100755 index 08e8caa..0000000 --- a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalGazeDataStream.log +++ /dev/null @@ -1,2 +0,0 @@ - MinimalGazeDataStream.c - MinimalGazeDataStream.vcxproj -> D:\dev\tobii\samples\Debug\MinimalGazeDataStream.exe diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalGazeDataStream.obj b/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalGazeDataStream.obj deleted file mode 100755 index 21cef4f..0000000 Binary files a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/MinimalGazeDataStream.obj and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/vc140.idb b/Tobii EyeX/samples/MinimalGazeDataStream/Debug/vc140.idb deleted file mode 100755 index 7720ab5..0000000 Binary files a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/vc140.idb and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/vc140.pdb b/Tobii EyeX/samples/MinimalGazeDataStream/Debug/vc140.pdb deleted file mode 100755 index 022bd91..0000000 Binary files a/Tobii EyeX/samples/MinimalGazeDataStream/Debug/vc140.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/MinimalGazeDataStream.c b/Tobii EyeX/samples/MinimalGazeDataStream/MinimalGazeDataStream.c deleted file mode 100755 index 20b3eab..0000000 --- a/Tobii EyeX/samples/MinimalGazeDataStream/MinimalGazeDataStream.c +++ /dev/null @@ -1,171 +0,0 @@ -/* - * This is an example that demonstrates how to connect to the EyeX Engine and subscribe to the lightly filtered gaze data stream. - * - * Copyright 2013-2014 Tobii Technology AB. All rights reserved. - */ - -#include -#include -#include -#include -#include "eyex/EyeX.h" - -#pragma comment (lib, "Tobii.EyeX.Client.lib") - -// ID of the global interactor that provides our data stream; must be unique within the application. -static const TX_STRING InteractorId = "Twilight Sparkle"; - -// global variables -static TX_HANDLE g_hGlobalInteractorSnapshot = TX_EMPTY_HANDLE; - -/* - * Initializes g_hGlobalInteractorSnapshot with an interactor that has the Gaze Point behavior. - */ -BOOL InitializeGlobalInteractorSnapshot(TX_CONTEXTHANDLE hContext) -{ - TX_HANDLE hInteractor = TX_EMPTY_HANDLE; - TX_GAZEPOINTDATAPARAMS params = { TX_GAZEPOINTDATAMODE_LIGHTLYFILTERED }; - BOOL success; - - success = txCreateGlobalInteractorSnapshot( - hContext, - InteractorId, - &g_hGlobalInteractorSnapshot, - &hInteractor) == TX_RESULT_OK; - success &= txCreateGazePointDataBehavior(hInteractor, ¶ms) == TX_RESULT_OK; - - txReleaseObject(&hInteractor); - - return success; -} - -/* - * Callback function invoked when a snapshot has been committed. - */ -void TX_CALLCONVENTION OnSnapshotCommitted(TX_CONSTHANDLE hAsyncData, TX_USERPARAM param) -{ - // check the result code using an assertion. - // this will catch validation errors and runtime errors in debug builds. in release builds it won't do anything. - - TX_RESULT result = TX_RESULT_UNKNOWN; - txGetAsyncDataResultCode(hAsyncData, &result); - assert(result == TX_RESULT_OK || result == TX_RESULT_CANCELLED); -} - -/* - * Callback function invoked when the status of the connection to the EyeX Engine has changed. - */ -void TX_CALLCONVENTION OnEngineConnectionStateChanged(TX_CONNECTIONSTATE connectionState, TX_USERPARAM userParam) -{ - switch (connectionState) { - case TX_CONNECTIONSTATE_CONNECTED: { - BOOL success; - printf("The connection state is now CONNECTED (We are connected to the EyeX Engine)\n"); - // commit the snapshot with the global interactor as soon as the connection to the engine is established. - // (it cannot be done earlier because committing means "send to the engine".) - success = txCommitSnapshotAsync(g_hGlobalInteractorSnapshot, OnSnapshotCommitted, NULL) == TX_RESULT_OK; - if (!success) { - printf("Failed to initialize the data stream.\n"); - } - else { - printf("Waiting for gaze data to start streaming...\n"); - } - } - break; - - case TX_CONNECTIONSTATE_DISCONNECTED: - printf("The connection state is now DISCONNECTED (We are disconnected from the EyeX Engine)\n"); - break; - - case TX_CONNECTIONSTATE_TRYINGTOCONNECT: - printf("The connection state is now TRYINGTOCONNECT (We are trying to connect to the EyeX Engine)\n"); - break; - - case TX_CONNECTIONSTATE_SERVERVERSIONTOOLOW: - printf("The connection state is now SERVER_VERSION_TOO_LOW: this application requires a more recent version of the EyeX Engine to run.\n"); - break; - - case TX_CONNECTIONSTATE_SERVERVERSIONTOOHIGH: - printf("The connection state is now SERVER_VERSION_TOO_HIGH: this application requires an older version of the EyeX Engine to run.\n"); - break; - } -} - -/* - * Handles an event from the Gaze Point data stream. - */ -void OnGazeDataEvent(TX_HANDLE hGazeDataBehavior) -{ - TX_GAZEPOINTDATAEVENTPARAMS eventParams; - if (txGetGazePointDataEventParams(hGazeDataBehavior, &eventParams) == TX_RESULT_OK) { - printf("Gaze Data: (%.1f, %.1f) timestamp %.0f ms\n", eventParams.X, eventParams.Y, eventParams.Timestamp); - } else { - printf("Failed to interpret gaze data event packet.\n"); - } -} - -/* - * Callback function invoked when an event has been received from the EyeX Engine. - */ -void TX_CALLCONVENTION HandleEvent(TX_CONSTHANDLE hAsyncData, TX_USERPARAM userParam) -{ - TX_HANDLE hEvent = TX_EMPTY_HANDLE; - TX_HANDLE hBehavior = TX_EMPTY_HANDLE; - - txGetAsyncDataContent(hAsyncData, &hEvent); - - // NOTE. Uncomment the following line of code to view the event object. The same function can be used with any interaction object. - //OutputDebugStringA(txDebugObject(hEvent)); - - if (txGetEventBehavior(hEvent, &hBehavior, TX_BEHAVIORTYPE_GAZEPOINTDATA) == TX_RESULT_OK) { - OnGazeDataEvent(hBehavior); - txReleaseObject(&hBehavior); - } - - // NOTE since this is a very simple application with a single interactor and a single data stream, - // our event handling code can be very simple too. A more complex application would typically have to - // check for multiple behaviors and route events based on interactor IDs. - - txReleaseObject(&hEvent); -} - -/* - * Application entry point. - */ -int main(int argc, char* argv[]) -{ - TX_CONTEXTHANDLE hContext = TX_EMPTY_HANDLE; - TX_TICKET hConnectionStateChangedTicket = TX_INVALID_TICKET; - TX_TICKET hEventHandlerTicket = TX_INVALID_TICKET; - BOOL success; - - // initialize and enable the context that is our link to the EyeX Engine. - success = txInitializeEyeX(TX_EYEXCOMPONENTOVERRIDEFLAG_NONE, NULL, NULL, NULL, NULL) == TX_RESULT_OK; - success &= txCreateContext(&hContext, TX_FALSE) == TX_RESULT_OK; - success &= InitializeGlobalInteractorSnapshot(hContext); - success &= txRegisterConnectionStateChangedHandler(hContext, &hConnectionStateChangedTicket, OnEngineConnectionStateChanged, NULL) == TX_RESULT_OK; - success &= txRegisterEventHandler(hContext, &hEventHandlerTicket, HandleEvent, NULL) == TX_RESULT_OK; - success &= txEnableConnection(hContext) == TX_RESULT_OK; - - // let the events flow until a key is pressed. - if (success) { - printf("Initialization was successful.\n"); - } else { - printf("Initialization failed.\n"); - } - printf("Press any key to exit...\n"); - _getch(); - printf("Exiting.\n"); - - // disable and delete the context. - txDisableConnection(hContext); - txReleaseObject(&g_hGlobalInteractorSnapshot); - success = txShutdownContext(hContext, TX_CLEANUPTIMEOUT_DEFAULT, TX_FALSE) == TX_RESULT_OK; - success &= txReleaseContext(&hContext) == TX_RESULT_OK; - success &= txUninitializeEyeX() == TX_RESULT_OK; - if (!success) { - printf("EyeX could not be shut down cleanly. Did you remember to release all handles?\n"); - } - - return 0; -} diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/MinimalGazeDataStream.vcxproj b/Tobii EyeX/samples/MinimalGazeDataStream/MinimalGazeDataStream.vcxproj deleted file mode 100755 index efd3412..0000000 --- a/Tobii EyeX/samples/MinimalGazeDataStream/MinimalGazeDataStream.vcxproj +++ /dev/null @@ -1,160 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - - - - {CB99F84F-43D5-4F18-A2A9-79E4669A300E} - Win32Proj - MinimalGazeDataStream - - - - Application - true - v140 - Unicode - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - Application - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\include - - - Console - true - ..\..\lib\x86 - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\include - - - Console - true - ..\..\lib\x64 - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\include - - - Console - true - true - true - ..\..\lib\x86 - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\include - - - Console - true - true - true - ..\..\lib\x64 - - - - - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/MinimalGazeDataStream/MinimalGazeDataStream.vcxproj.filters b/Tobii EyeX/samples/MinimalGazeDataStream/MinimalGazeDataStream.vcxproj.filters deleted file mode 100755 index 7d650f2..0000000 --- a/Tobii EyeX/samples/MinimalGazeDataStream/MinimalGazeDataStream.vcxproj.filters +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/CL.command.1.tlog b/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/CL.command.1.tlog deleted file mode 100755 index 200a5ed..0000000 Binary files a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/CL.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/CL.read.1.tlog b/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/CL.read.1.tlog deleted file mode 100755 index 4844ea7..0000000 Binary files a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/CL.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/CL.write.1.tlog b/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/CL.write.1.tlog deleted file mode 100755 index 616875d..0000000 Binary files a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/CL.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/MinimalStatusNotifications.lastbuildstate b/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/MinimalStatusNotifications.lastbuildstate deleted file mode 100755 index 5cd4c3b..0000000 --- a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/MinimalStatusNotifications.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 -Debug|Win32|D:\dev\tobii\samples\| diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/link.command.1.tlog b/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/link.command.1.tlog deleted file mode 100755 index 6472281..0000000 Binary files a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/link.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/link.read.1.tlog b/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/link.read.1.tlog deleted file mode 100755 index 8855258..0000000 Binary files a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/link.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/link.write.1.tlog b/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/link.write.1.tlog deleted file mode 100755 index 5bd757b..0000000 Binary files a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalS.30C25EF3.tlog/link.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalStatusNotifications.log b/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalStatusNotifications.log deleted file mode 100755 index ce35307..0000000 --- a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalStatusNotifications.log +++ /dev/null @@ -1,2 +0,0 @@ - MinimalStatusNotifications.c - MinimalStatusNotifications.vcxproj -> D:\dev\tobii\samples\Debug\MinimalStatusNotifications.exe diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalStatusNotifications.obj b/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalStatusNotifications.obj deleted file mode 100755 index d7cb8b6..0000000 Binary files a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/MinimalStatusNotifications.obj and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/vc140.idb b/Tobii EyeX/samples/MinimalStatusNotifications/Debug/vc140.idb deleted file mode 100755 index cf7c720..0000000 Binary files a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/vc140.idb and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/vc140.pdb b/Tobii EyeX/samples/MinimalStatusNotifications/Debug/vc140.pdb deleted file mode 100755 index 64cd628..0000000 Binary files a/Tobii EyeX/samples/MinimalStatusNotifications/Debug/vc140.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/MinimalStatusNotifications.c b/Tobii EyeX/samples/MinimalStatusNotifications/MinimalStatusNotifications.c deleted file mode 100755 index 1d7ce26..0000000 --- a/Tobii EyeX/samples/MinimalStatusNotifications/MinimalStatusNotifications.c +++ /dev/null @@ -1,186 +0,0 @@ -/* - * This is an example that demonstrates two ways of getting status information from the EyeX Engine. - * - * Copyright 2013-2014 Tobii Technology AB. All rights reserved. - */ - -#include -#include -#include -#include -#include "eyex/EyeX.h" - -#pragma comment (lib, "Tobii.EyeX.Client.lib") - -// global variables -static TX_CONTEXTHANDLE g_hContext = TX_EMPTY_HANDLE; - -/* - * Handles a state-changed notification, or the response from a get-state operation. - */ -void OnStateReceived(TX_HANDLE hStateBag) -{ - TX_BOOL success; - TX_INTEGER eyeTrackingState; - TX_SIZE2 displaySize; - TX_SIZE2 screenBounds; - TX_SIZE stringSize = 0; - TX_STRING currentProfileName; - TX_INTEGER presenceData; - TX_INTEGER gazeTracking; - - success = (txGetStateValueAsInteger(hStateBag, TX_STATEPATH_EYETRACKINGSTATE, &eyeTrackingState) == TX_RESULT_OK); - if (success) { - switch (eyeTrackingState) { - case TX_EYETRACKINGDEVICESTATUS_TRACKING: - printf("Eye Tracking Device Status: 'TRACKING'.\n" - "That means that the eye tracker is up and running and trying to track your eyes.\n"); - break; - - default: - printf("The eye tracking device is not tracking.\n" - "It could be a that the eye tracker is not connected, or that a screen setup or\n" - "user calibration is missing. The status code is %d.\n", eyeTrackingState); - } - } - - success = (txGetStateValueAsSize2(hStateBag, TX_STATEPATH_EYETRACKINGDISPLAYSIZE, &displaySize) == TX_RESULT_OK); - if (success) { - printf("Display Size: %5.2f x %5.2f mm\n", displaySize.Width, displaySize.Height); - } - - success = (txGetStateValueAsSize2(hStateBag, TX_STATEPATH_EYETRACKINGSCREENBOUNDS, &screenBounds) == TX_RESULT_OK); - if (success) { - printf("Screen Bounds: %5.0f x %5.0f pixels\n\n", screenBounds.Width, screenBounds.Height); - } - - success = (txGetStateValueAsInteger(hStateBag, TX_STATEPATH_USERPRESENCE, &presenceData) == TX_RESULT_OK); - if (success) { - if (presenceData != TX_USERPRESENCE_UNKNOWN) { - printf("User is %s\n", presenceData == TX_USERPRESENCE_PRESENT ? "present" : "NOT present" ); - } - } - - // The following state requires EyeX Engine 1.3.0 or later: - success = (txGetStateValueAsString(hStateBag, TX_STATEPATH_EYETRACKINGCURRENTPROFILENAME, NULL, &stringSize) == TX_RESULT_OK); - if (success) { - currentProfileName = (TX_STRING)malloc(stringSize*sizeof(char)); - success = (txGetStateValueAsString(hStateBag, TX_STATEPATH_EYETRACKINGCURRENTPROFILENAME, currentProfileName, &stringSize) == TX_RESULT_OK); - if (success) { - printf("Current user profile name is: %s\n", currentProfileName); - } - free(currentProfileName); - } - - // The following state requires EyeX Engine 1.4.0 or later: - success = (txGetStateValueAsInteger(hStateBag, TX_STATEPATH_GAZETRACKING, &gazeTracking) == TX_RESULT_OK); - if (success) { - printf("User's eye-gaze is %s\n", gazeTracking == TX_GAZETRACKING_GAZETRACKED ? "tracked" : "NOT tracked"); - } -} - -/* - * Handles engine state change notifications. - */ -void TX_CALLCONVENTION OnEngineStateChanged(TX_CONSTHANDLE hAsyncData, TX_USERPARAM userParam) -{ - TX_RESULT result = TX_RESULT_UNKNOWN; - TX_HANDLE hStateBag = TX_EMPTY_HANDLE; - - if (txGetAsyncDataResultCode(hAsyncData, &result) == TX_RESULT_OK && - txGetAsyncDataContent(hAsyncData, &hStateBag) == TX_RESULT_OK) { - OnStateReceived(hStateBag); - txReleaseObject(&hStateBag); - } -} - -/* - * Callback function invoked when the status of the connection to the EyeX Engine has changed. - */ -void TX_CALLCONVENTION OnEngineConnectionStateChanged(TX_CONNECTIONSTATE connectionState, TX_USERPARAM userParam) -{ - if (connectionState == TX_CONNECTIONSTATE_CONNECTED) { - printf("We're now connected to the EyeX Engine!\n"); - printf("Now that we're connected: get the current eye tracking device status, display size and screen bounds...\n\n"); - - // NOTE. A request for the TX_STATEPATH_EYETRACKING state path (which expands to - // "eyeTracking") will also query for all sub-paths ("eyeTracking.whatever") -- which - // explains why this request provides data for the eye tracking device status etc. - txGetStateAsync(g_hContext, TX_STATEPATH_EYETRACKING, OnEngineStateChanged, NULL); - } -} - -/* - * Application entry point. - */ -int main(int argc, char* argv[]) -{ - TX_TICKET hConnectionStateChangedTicket = TX_INVALID_TICKET; - TX_TICKET hPresenceStateChangedTicket = TX_INVALID_TICKET; - TX_TICKET hGazeTrackingStateChangedTicket = TX_INVALID_TICKET; - TX_BOOL success; - TX_EYEXAVAILABILITY availability; - - printf( - "===============================================================================\n\n" - "This sample illustrates two different ways of getting status information from\n" - "the EyeX Engine.\n\n" - "- First we try and connect to the EyeX Engine. When we get a connection we read\n" - " and print the current values of the eye tracking device status, the display\n" - " size and the screen bounds. This is done once per connection to the EyeX\n" - " Engine.\n\n" - "- When we have a connection to the Engine, we set up a listener for changes of\n" - " the user presence state. When the user's eyes are found the user is\n" - " considered present, when the eyes cannot be found, the user is considered not\n" - " present. Try blocking and unblocking the eye tracker's view of your eyes to\n" - " see the changes in the user presence state.\n\n" - "===============================================================================\n\n"); - - if (txGetEyeXAvailability(&availability) == TX_RESULT_OK) { - if (availability == TX_EYEXAVAILABILITY_NOTAVAILABLE) { - printf( - "This sample requires the EyeX Engine, but it isn't available.\n" - "Please install the EyeX Engine and try again.\n"); - exit(-1); - } - else if (availability == TX_EYEXAVAILABILITY_NOTRUNNING) { - printf( - "This sample requires the EyeX Engine, but it isn't running.\n" - "Please make sure that the EyeX Engine is started.\n"); - } - } - - // initialize and enable the context that is our link to the EyeX Engine. - // register observers on the connection state, TX_STATEPATH_USERPRESENCE and the TX_STATEPATH_GAZETRACKING engine state. - success = txInitializeEyeX(TX_EYEXCOMPONENTOVERRIDEFLAG_NONE, NULL, NULL, NULL, NULL) == TX_RESULT_OK; - success &= txCreateContext(&g_hContext, TX_FALSE) == TX_RESULT_OK; - success &= txRegisterConnectionStateChangedHandler(g_hContext, &hConnectionStateChangedTicket, OnEngineConnectionStateChanged, NULL) == TX_RESULT_OK; - success &= txRegisterStateChangedHandler(g_hContext, &hPresenceStateChangedTicket, TX_STATEPATH_USERPRESENCE, OnEngineStateChanged, NULL) == TX_RESULT_OK; - success &= txRegisterStateChangedHandler(g_hContext, &hGazeTrackingStateChangedTicket, TX_STATEPATH_GAZETRACKING, OnEngineStateChanged, NULL) == TX_RESULT_OK; - success &= txEnableConnection(g_hContext) == TX_RESULT_OK; - - // let the events flow until a key is pressed. - if (success) { - printf("Initialization was successful.\n"); - printf("We are waiting for a connection to the EyeX Engine...\n\n"); - } else { - printf("Initialization failed.\n\n"); - } - - printf("Press any key to exit...\n\n"); - _getch(); - printf("Exiting.\n"); - - // unregister handlers and delete the context. - txUnregisterConnectionStateChangedHandler(g_hContext, hConnectionStateChangedTicket); - txUnregisterStateChangedHandler(g_hContext, hPresenceStateChangedTicket); - txUnregisterStateChangedHandler(g_hContext, hGazeTrackingStateChangedTicket); - success = txShutdownContext(g_hContext, TX_CLEANUPTIMEOUT_DEFAULT, TX_FALSE) == TX_RESULT_OK; - success &= txReleaseContext(&g_hContext) == TX_RESULT_OK; - success &= txUninitializeEyeX() == TX_RESULT_OK; - if (!success) { - printf("EyeX could not be shut down cleanly. Did you remember to release all handles?\n"); - } - - return 0; -} diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/MinimalStatusNotifications.vcxproj b/Tobii EyeX/samples/MinimalStatusNotifications/MinimalStatusNotifications.vcxproj deleted file mode 100755 index 7dbcced..0000000 --- a/Tobii EyeX/samples/MinimalStatusNotifications/MinimalStatusNotifications.vcxproj +++ /dev/null @@ -1,156 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {30C25EF3-4FB1-425F-82FA-B4D3B3DAAD76} - Win32Proj - MinimalStatusNotifications - - - - Application - true - v140 - Unicode - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - Application - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\include - - - Console - true - ..\..\lib\x86 - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\include - - - Console - true - ..\..\lib\x64 - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\include - - - Console - true - true - true - ..\..\lib\x86 - - - - - Level3 - NotUsing - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - true - ..\..\include - - - Console - true - true - true - ..\..\lib\x64 - - - - - - - - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/MinimalStatusNotifications/MinimalStatusNotifications.vcxproj.filters b/Tobii EyeX/samples/MinimalStatusNotifications/MinimalStatusNotifications.vcxproj.filters deleted file mode 100755 index 9e567fb..0000000 --- a/Tobii EyeX/samples/MinimalStatusNotifications/MinimalStatusNotifications.vcxproj.filters +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.command.1.tlog b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.command.1.tlog deleted file mode 100755 index ca3124c..0000000 Binary files a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.read.1.tlog b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.read.1.tlog deleted file mode 100755 index b9b14b8..0000000 Binary files a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.write.1.tlog b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.write.1.tlog deleted file mode 100755 index c26f1a7..0000000 Binary files a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/MinimalUserProfiles.lastbuildstate b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/MinimalUserProfiles.lastbuildstate deleted file mode 100755 index 5cd4c3b..0000000 --- a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/MinimalUserProfiles.lastbuildstate +++ /dev/null @@ -1,2 +0,0 @@ -#TargetFrameworkVersion=v4.0:PlatformToolSet=v140:EnableManagedIncrementalBuild=false:VCToolArchitecture=Native32Bit:WindowsTargetPlatformVersion=8.1 -Debug|Win32|D:\dev\tobii\samples\| diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.command.1.tlog b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.command.1.tlog deleted file mode 100755 index 586a19e..0000000 Binary files a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.command.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.read.1.tlog b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.read.1.tlog deleted file mode 100755 index 1b2f2e9..0000000 Binary files a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.read.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.write.1.tlog b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.write.1.tlog deleted file mode 100755 index 4add4c6..0000000 Binary files a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.write.1.tlog and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalUserProfiles.log b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalUserProfiles.log deleted file mode 100755 index 2a34286..0000000 --- a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalUserProfiles.log +++ /dev/null @@ -1,4 +0,0 @@ - stdafx.cpp - MinimalUserProfiles.cpp - Generating Code... - MinimalUserProfiles.vcxproj -> D:\dev\tobii\samples\Debug\MinimalUserProfiles.exe diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalUserProfiles.obj b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalUserProfiles.obj deleted file mode 100755 index 1a00765..0000000 Binary files a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalUserProfiles.obj and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/stdafx.obj b/Tobii EyeX/samples/MinimalUserProfiles/Debug/stdafx.obj deleted file mode 100755 index ea32af6..0000000 Binary files a/Tobii EyeX/samples/MinimalUserProfiles/Debug/stdafx.obj and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.idb b/Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.idb deleted file mode 100755 index b32eb42..0000000 Binary files a/Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.idb and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.pdb b/Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.pdb deleted file mode 100755 index 3ce102d..0000000 Binary files a/Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.pdb and /dev/null differ diff --git a/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.cpp b/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.cpp deleted file mode 100755 index 022486b..0000000 --- a/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.cpp +++ /dev/null @@ -1,269 +0,0 @@ -/* - * MinimalUserProfiles sample: - * This is an example that demontrates how to retrieve and listen to changes to - * the states Current Profile Name and Profiles, and how to change the Current - * Profile. - * - * (It is written in mostly very C-style C++, to make it similar to the other - * minimal samples but still make use of std::vector and std::string. Using those - * makes the implementation more straightforward when handling the Profile state - * which is very dynamic in nature: an unknown number of profile name entries of - * unknown size.) - * - * Known limitation: this sample only works correctly for up to 10 profiles. It - * will list all profiles, but the input will only read one digit, so 9 will be - * the highest selectable index. - * - * Copyright 2015 Tobii AB (publ). All rights reserved. - */ - -#include -#include -#include -#include "stdafx.h" -#include "eyex\EyeX.h" - -#pragma comment (lib, "Tobii.EyeX.Client.lib") - -static const UINT32 MIN_SIZE = 1; -static const TX_STRING MIN_ENGINE_VERSION = "1.3.0"; - -// global variables -static TX_CONTEXTHANDLE g_hContext = TX_EMPTY_HANDLE; -static std::string g_currentProfileName = ""; -static std::vector g_profiles; - -/* - * Prints info about the current user profile, all available profiles and how - * to change to another profile. - */ -void PrintInfo() -{ - if (g_currentProfileName.length() < MIN_SIZE || g_profiles.size() < MIN_SIZE) { - return; - } - - printf("\n-------------------------------------------------------------------------\n"); - printf("\n Current user profile: %s\n", g_currentProfileName.c_str()); - printf("\n All user profiles:\n"); - int index = 0; - for (std::string profile : g_profiles) { - printf(" %i. %s\n", index++, profile.c_str()); - } - printf("\n-------------------------------------------------------------------------\n"); - printf("\nEnter the number of the profile you want to change to (or 'q' to quit): "); -} - -/* - * Tries to extract an array of strings for the given state bag and state path. - * Returns TX_TRUE if successful, TX_FALSE otherwise. - * If successful, the arrayOfStrings parameter will be populated with the strings. - * - * This can be used to "unpack" a state bag with a TX_STATEPATH_EYETRACKINGPROFILES - * state's multiple null-terminated string to a more manageable format. - */ -TX_BOOL GetStateValueAsArrayOfStrings(TX_CONSTHANDLE hStateBag, TX_CONSTSTRING valuePath, std::vector *arrayOfStrings) -{ - TX_SIZE stringSize = 0; - TX_BOOL success; - - success = (txGetStateValueAsString(hStateBag, valuePath, nullptr, &stringSize)) == TX_RESULT_OK; - if (!success) - { - return TX_FALSE; - } - - TX_STRING stringValue = new TX_CHAR[stringSize]; - success = (txGetStateValueAsString(hStateBag, valuePath, stringValue, &stringSize) == TX_RESULT_OK); - if (!success) - { - delete[] stringValue; - return TX_FALSE; - } - - TX_STRING stringPtr = stringValue; - while (*stringPtr != '\0') - { - TX_STRING startPoint = stringPtr; - while (*stringPtr != '\0') - { - stringPtr++; - } - - std::string str = std::string(startPoint, stringPtr - startPoint); - arrayOfStrings->push_back(str); - stringPtr++; - } - - return TX_TRUE; -} - -/* - * Handles a state-changed notification, or the response from a get-state operation. - */ -void OnStateReceived(TX_HANDLE hStateBag) -{ - TX_BOOL success; - TX_SIZE stringSize = 0; - TX_STRING engineVersion; - TX_STRING profileName; - std::vector profiles; - - success = (txGetStateValueAsString(hStateBag, TX_STATEPATH_ENGINEINFOVERSION, NULL, &stringSize) == TX_RESULT_OK); - if (success) { - engineVersion = (TX_STRING)malloc(stringSize*sizeof(char)); - if (txGetStateValueAsString(hStateBag, TX_STATEPATH_ENGINEINFOVERSION, engineVersion, &stringSize) == TX_RESULT_OK) { - printf("\nEyeX Engine version: %s. This sample requires EyeX Engine %s or higher.\n", engineVersion, MIN_ENGINE_VERSION); - } - free(engineVersion); - } - - success = (txGetStateValueAsString(hStateBag, TX_STATEPATH_EYETRACKINGCURRENTPROFILENAME, NULL, &stringSize) == TX_RESULT_OK); - if (success) { - profileName = (TX_STRING)malloc(stringSize*sizeof(char)); - if (txGetStateValueAsString(hStateBag, TX_STATEPATH_EYETRACKINGCURRENTPROFILENAME, profileName, &stringSize) == TX_RESULT_OK) { - g_currentProfileName = profileName; - } - free(profileName); - } - - success = GetStateValueAsArrayOfStrings(hStateBag, TX_STATEPATH_EYETRACKINGPROFILES, &profiles); - if (success) { - g_profiles = profiles; - } - - PrintInfo(); -} - -/* - * Handles engine state change notifications. - */ -void TX_CALLCONVENTION OnEngineStateChanged(TX_CONSTHANDLE hAsyncData, TX_USERPARAM userParam) -{ - TX_RESULT result = TX_RESULT_UNKNOWN; - TX_HANDLE hStateBag = TX_EMPTY_HANDLE; - - if (txGetAsyncDataResultCode(hAsyncData, &result) == TX_RESULT_OK && - txGetAsyncDataContent(hAsyncData, &hStateBag) == TX_RESULT_OK) { - OnStateReceived(hStateBag); - txReleaseObject(&hStateBag); - } -} - -/* - * Callback function invoked when the status of the connection to the EyeX Engine has changed. - */ -void TX_CALLCONVENTION OnEngineConnectionStateChanged(TX_CONNECTIONSTATE connectionState, TX_USERPARAM userParam) -{ - if (connectionState == TX_CONNECTIONSTATE_CONNECTED) { - printf("We're now connected to the EyeX Engine!\n"); - printf("Now that we're connected: get the user profiles...\n\n"); - - // the two states below requires EyeX Engine 1.3.0, so check engine version as well - txGetStateAsync(g_hContext, TX_STATEPATH_ENGINEINFOVERSION, OnEngineStateChanged, NULL); - txGetStateAsync(g_hContext, TX_STATEPATH_EYETRACKINGCURRENTPROFILENAME, OnEngineStateChanged, NULL); - txGetStateAsync(g_hContext, TX_STATEPATH_EYETRACKINGPROFILES, OnEngineStateChanged, NULL); - } -} - -/* - * Callback function invoked when the async call to set current profile is completed. - */ -void TX_CALLCONVENTION OnSetCurrentProfileCompleted(TX_CONSTHANDLE hAsyncData, TX_USERPARAM userParam) -{ - TX_BOOL success; - TX_RESULT result = TX_RESULT_UNKNOWN; - success = (txGetAsyncDataResultCode(hAsyncData, &result) == TX_RESULT_OK && result == TX_RESULT_OK); - if (success == TX_FALSE) { - printf("\nSomething went wrong when trying to change the current profile.\n"); - } -} - -/* - * Change profile to the profile with index profileIndex as listed by the application's PrintInfo function. - */ -void ChangeProfileTo(int profileIndex) -{ - TX_CONSTSTRING profileName = (TX_CONSTSTRING)g_profiles[profileIndex].c_str(); - if (profileName == g_currentProfileName) { - printf("\nYou selected the current profile. Try again: "); - } else { - printf("\nChanging user profile to '%s'.\n", profileName); - txSetCurrentProfile(g_hContext, profileName, OnSetCurrentProfileCompleted, NULL); - } -} - -int _tmain(int argc, _TCHAR* argv[]) -{ - printf("Press 'q' to quit the application.\n\n"); - - TX_TICKET hConnectionStateChangedTicket = TX_INVALID_TICKET; - TX_TICKET hCurrentProfileNameChangedTicket = TX_INVALID_TICKET; - TX_TICKET hEyeTrackingProfilesChangedTicket = TX_INVALID_TICKET; - TX_BOOL success; - TX_EYEXAVAILABILITY availability; - - if (txGetEyeXAvailability(&availability) == TX_RESULT_OK) { - if (availability == TX_EYEXAVAILABILITY_NOTAVAILABLE) { - printf( - "This sample requires the EyeX Engine, but it isn't available.\n" - "Please install the EyeX Engine and try again.\n"); - exit(-1); - } - else if (availability == TX_EYEXAVAILABILITY_NOTRUNNING) { - printf( - "This sample requires the EyeX Engine, but it isn't running.\n" - "Please make sure that the EyeX Engine is started.\n"); - } - } - - // initialize and enable the context that is our link to the EyeX Engine. - // register observers on the connection state, current profile name state, and profiles state. - success = txInitializeEyeX(TX_EYEXCOMPONENTOVERRIDEFLAG_NONE, NULL, NULL, NULL, NULL) == TX_RESULT_OK; - success &= txCreateContext(&g_hContext, TX_FALSE) == TX_RESULT_OK; - success &= txRegisterConnectionStateChangedHandler(g_hContext, &hConnectionStateChangedTicket, OnEngineConnectionStateChanged, NULL) == TX_RESULT_OK; - success &= txRegisterStateChangedHandler(g_hContext, &hCurrentProfileNameChangedTicket, TX_STATEPATH_EYETRACKINGCURRENTPROFILENAME, OnEngineStateChanged, NULL) == TX_RESULT_OK; - success &= txRegisterStateChangedHandler(g_hContext, &hEyeTrackingProfilesChangedTicket, TX_STATEPATH_EYETRACKINGPROFILES, OnEngineStateChanged, NULL) == TX_RESULT_OK; - success &= txEnableConnection(g_hContext) == TX_RESULT_OK; - - if (success) { - printf("Initialization was successful.\n"); - printf("We are waiting for a connection to the EyeX Engine...\n\n"); - } else { - printf("Initialization failed.\n\n"); - } - - // read profile index entered by user, if valid: change profile. - // keep reading input until 'q' is read and application should exit. - // known limitation: only reads one character, meaning 9 will be the highest - // selectable profile index. - auto keepRunning = true; - while(keepRunning) { - int input = _getch(); - char inputChar = input; - printf("%c\n", inputChar); - int profileIndex = input - '0'; - if (input == 'q') { - printf("\nExiting.\n"); - keepRunning = false; - } else if (isdigit(input) && ((unsigned int)profileIndex < g_profiles.size())) { - ChangeProfileTo(profileIndex); - } else { - printf("\nIllegal profile index: '%c'. Try again: ", inputChar); - } - } - - // unregister handlers and delete the context. - txUnregisterConnectionStateChangedHandler(g_hContext, hConnectionStateChangedTicket); - txUnregisterStateChangedHandler(g_hContext, hCurrentProfileNameChangedTicket); - txUnregisterStateChangedHandler(g_hContext, hEyeTrackingProfilesChangedTicket); - success = txShutdownContext(g_hContext, TX_CLEANUPTIMEOUT_DEFAULT, TX_FALSE) == TX_RESULT_OK; - success &= txReleaseContext(&g_hContext) == TX_RESULT_OK; - success &= txUninitializeEyeX() == TX_RESULT_OK; - if (!success) { - printf("EyeX could not be shut down cleanly. Did you remember to release all handles?\n"); - } - - return 0; -} - diff --git a/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.vcxproj b/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.vcxproj deleted file mode 100755 index 3481b69..0000000 --- a/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.vcxproj +++ /dev/null @@ -1,163 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {7644167B-708E-4D09-A523-FB0F59871D82} - Win32Proj - MinimalUserProfiles - - - - Application - true - v140 - Unicode - - - Application - true - v140 - Unicode - - - Application - false - v140 - true - Unicode - - - Application - false - v140 - true - Unicode - - - - - - - - - - - - - - - - - - - true - - - true - - - false - - - false - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\include - - - Console - true - ..\..\lib\x86 - - - - - - - Level3 - Disabled - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\include - - - Console - true - ..\..\lib\x64 - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\include - - - Console - true - true - true - ..\..\lib\x86 - - - - - Level3 - - - MaxSpeed - true - true - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) - ..\..\include - - - Console - true - true - true - ..\..\lib\x64 - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.vcxproj.filters b/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.vcxproj.filters deleted file mode 100755 index 614e5c9..0000000 --- a/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.vcxproj.filters +++ /dev/null @@ -1,36 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms - - - - - - - - Header Files - - - Header Files - - - - - Source Files - - - Source Files - - - \ No newline at end of file diff --git a/Tobii EyeX/samples/MinimalUserProfiles/ReadMe.txt b/Tobii EyeX/samples/MinimalUserProfiles/ReadMe.txt deleted file mode 100755 index 4171f7a..0000000 --- a/Tobii EyeX/samples/MinimalUserProfiles/ReadMe.txt +++ /dev/null @@ -1,40 +0,0 @@ -======================================================================== - CONSOLE APPLICATION : MinimalUserProfiles Project Overview -======================================================================== - -AppWizard has created this MinimalUserProfiles application for you. - -This file contains a summary of what you will find in each of the files that -make up your MinimalUserProfiles application. - - -MinimalUserProfiles.vcxproj - This is the main project file for VC++ projects generated using an Application Wizard. - It contains information about the version of Visual C++ that generated the file, and - information about the platforms, configurations, and project features selected with the - Application Wizard. - -MinimalUserProfiles.vcxproj.filters - This is the filters file for VC++ projects generated using an Application Wizard. - It contains information about the association between the files in your project - and the filters. This association is used in the IDE to show grouping of files with - similar extensions under a specific node (for e.g. ".cpp" files are associated with the - "Source Files" filter). - -MinimalUserProfiles.cpp - This is the main application source file. - -///////////////////////////////////////////////////////////////////////////// -Other standard files: - -StdAfx.h, StdAfx.cpp - These files are used to build a precompiled header (PCH) file - named MinimalUserProfiles.pch and a precompiled types file named StdAfx.obj. - -///////////////////////////////////////////////////////////////////////////// -Other notes: - -AppWizard uses "TODO:" comments to indicate parts of the source code you -should add to or customize. - -///////////////////////////////////////////////////////////////////////////// diff --git a/Tobii EyeX/samples/MinimalUserProfiles/stdafx.cpp b/Tobii EyeX/samples/MinimalUserProfiles/stdafx.cpp deleted file mode 100755 index 92e931f..0000000 --- a/Tobii EyeX/samples/MinimalUserProfiles/stdafx.cpp +++ /dev/null @@ -1,3 +0,0 @@ -// stdafx.cpp : source file that includes just the standard includes - -#include "stdafx.h" diff --git a/Tobii EyeX/samples/MinimalUserProfiles/stdafx.h b/Tobii EyeX/samples/MinimalUserProfiles/stdafx.h deleted file mode 100755 index cb987d8..0000000 --- a/Tobii EyeX/samples/MinimalUserProfiles/stdafx.h +++ /dev/null @@ -1,13 +0,0 @@ -// stdafx.h : include file for standard system include files, -// or project specific include files that are used frequently, but -// are changed infrequently -// - -#pragma once - -#include "targetver.h" - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers - -#include -#include diff --git a/Tobii EyeX/samples/MinimalUserProfiles/targetver.h b/Tobii EyeX/samples/MinimalUserProfiles/targetver.h deleted file mode 100755 index 90e767b..0000000 --- a/Tobii EyeX/samples/MinimalUserProfiles/targetver.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once - -// Including SDKDDKVer.h defines the highest available Windows platform. - -// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and -// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h. - -#include diff --git a/Tobii EyeX/samples/Samples.VC.db b/Tobii EyeX/samples/Samples.VC.db deleted file mode 100755 index 64613ae..0000000 Binary files a/Tobii EyeX/samples/Samples.VC.db and /dev/null differ diff --git a/Tobii EyeX/samples/Samples.sln b/Tobii EyeX/samples/Samples.sln deleted file mode 100755 index 58c7450..0000000 --- a/Tobii EyeX/samples/Samples.sln +++ /dev/null @@ -1,85 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ActivatableBoardGame", "ActivatableBoardGame\ActivatableBoardGame.vcxproj", "{2732E876-973B-4453-AA9F-D306EFB11922}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinimalStatusNotifications", "MinimalStatusNotifications\MinimalStatusNotifications.vcxproj", "{30C25EF3-4FB1-425F-82FA-B4D3B3DAAD76}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinimalGazeDataStream", "MinimalGazeDataStream\MinimalGazeDataStream.vcxproj", "{CB99F84F-43D5-4F18-A2A9-79E4669A300E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ActivatableButtons", "ActivatableButtons\ActivatableButtons.vcxproj", "{3E2A1867-D554-4655-8F03-B6A4C06D4967}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinimalFixationDataStream", "MinimalFixationDataStream\MinimalFixationDataStream.vcxproj", "{9345876F-09E3-4764-9B3C-6496152D523E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinimalEyePositionDataStream", "MinimalEyePositionDataStream\MinimalEyePositionDataStream.vcxproj", "{6D2CFFFE-00E9-41C8-B389-059DA9AABDFC}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MinimalUserProfiles", "MinimalUserProfiles\MinimalUserProfiles.vcxproj", "{7644167B-708E-4D09-A523-FB0F59871D82}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Debug|x64 = Debug|x64 - Release|Win32 = Release|Win32 - Release|x64 = Release|x64 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2732E876-973B-4453-AA9F-D306EFB11922}.Debug|Win32.ActiveCfg = Debug|Win32 - {2732E876-973B-4453-AA9F-D306EFB11922}.Debug|Win32.Build.0 = Debug|Win32 - {2732E876-973B-4453-AA9F-D306EFB11922}.Debug|x64.ActiveCfg = Debug|x64 - {2732E876-973B-4453-AA9F-D306EFB11922}.Debug|x64.Build.0 = Debug|x64 - {2732E876-973B-4453-AA9F-D306EFB11922}.Release|Win32.ActiveCfg = Release|Win32 - {2732E876-973B-4453-AA9F-D306EFB11922}.Release|Win32.Build.0 = Release|Win32 - {2732E876-973B-4453-AA9F-D306EFB11922}.Release|x64.ActiveCfg = Release|x64 - {2732E876-973B-4453-AA9F-D306EFB11922}.Release|x64.Build.0 = Release|x64 - {30C25EF3-4FB1-425F-82FA-B4D3B3DAAD76}.Debug|Win32.ActiveCfg = Debug|Win32 - {30C25EF3-4FB1-425F-82FA-B4D3B3DAAD76}.Debug|Win32.Build.0 = Debug|Win32 - {30C25EF3-4FB1-425F-82FA-B4D3B3DAAD76}.Debug|x64.ActiveCfg = Debug|x64 - {30C25EF3-4FB1-425F-82FA-B4D3B3DAAD76}.Debug|x64.Build.0 = Debug|x64 - {30C25EF3-4FB1-425F-82FA-B4D3B3DAAD76}.Release|Win32.ActiveCfg = Release|Win32 - {30C25EF3-4FB1-425F-82FA-B4D3B3DAAD76}.Release|Win32.Build.0 = Release|Win32 - {30C25EF3-4FB1-425F-82FA-B4D3B3DAAD76}.Release|x64.ActiveCfg = Release|x64 - {30C25EF3-4FB1-425F-82FA-B4D3B3DAAD76}.Release|x64.Build.0 = Release|x64 - {CB99F84F-43D5-4F18-A2A9-79E4669A300E}.Debug|Win32.ActiveCfg = Debug|Win32 - {CB99F84F-43D5-4F18-A2A9-79E4669A300E}.Debug|Win32.Build.0 = Debug|Win32 - {CB99F84F-43D5-4F18-A2A9-79E4669A300E}.Debug|x64.ActiveCfg = Debug|x64 - {CB99F84F-43D5-4F18-A2A9-79E4669A300E}.Debug|x64.Build.0 = Debug|x64 - {CB99F84F-43D5-4F18-A2A9-79E4669A300E}.Release|Win32.ActiveCfg = Release|Win32 - {CB99F84F-43D5-4F18-A2A9-79E4669A300E}.Release|Win32.Build.0 = Release|Win32 - {CB99F84F-43D5-4F18-A2A9-79E4669A300E}.Release|x64.ActiveCfg = Release|x64 - {CB99F84F-43D5-4F18-A2A9-79E4669A300E}.Release|x64.Build.0 = Release|x64 - {3E2A1867-D554-4655-8F03-B6A4C06D4967}.Debug|Win32.ActiveCfg = Debug|Win32 - {3E2A1867-D554-4655-8F03-B6A4C06D4967}.Debug|Win32.Build.0 = Debug|Win32 - {3E2A1867-D554-4655-8F03-B6A4C06D4967}.Debug|x64.ActiveCfg = Debug|x64 - {3E2A1867-D554-4655-8F03-B6A4C06D4967}.Debug|x64.Build.0 = Debug|x64 - {3E2A1867-D554-4655-8F03-B6A4C06D4967}.Release|Win32.ActiveCfg = Release|Win32 - {3E2A1867-D554-4655-8F03-B6A4C06D4967}.Release|Win32.Build.0 = Release|Win32 - {3E2A1867-D554-4655-8F03-B6A4C06D4967}.Release|x64.ActiveCfg = Release|x64 - {3E2A1867-D554-4655-8F03-B6A4C06D4967}.Release|x64.Build.0 = Release|x64 - {9345876F-09E3-4764-9B3C-6496152D523E}.Debug|Win32.ActiveCfg = Debug|Win32 - {9345876F-09E3-4764-9B3C-6496152D523E}.Debug|Win32.Build.0 = Debug|Win32 - {9345876F-09E3-4764-9B3C-6496152D523E}.Debug|x64.ActiveCfg = Debug|x64 - {9345876F-09E3-4764-9B3C-6496152D523E}.Debug|x64.Build.0 = Debug|x64 - {9345876F-09E3-4764-9B3C-6496152D523E}.Release|Win32.ActiveCfg = Release|Win32 - {9345876F-09E3-4764-9B3C-6496152D523E}.Release|Win32.Build.0 = Release|Win32 - {9345876F-09E3-4764-9B3C-6496152D523E}.Release|x64.ActiveCfg = Release|x64 - {9345876F-09E3-4764-9B3C-6496152D523E}.Release|x64.Build.0 = Release|x64 - {6D2CFFFE-00E9-41C8-B389-059DA9AABDFC}.Debug|Win32.ActiveCfg = Debug|Win32 - {6D2CFFFE-00E9-41C8-B389-059DA9AABDFC}.Debug|Win32.Build.0 = Debug|Win32 - {6D2CFFFE-00E9-41C8-B389-059DA9AABDFC}.Debug|x64.ActiveCfg = Debug|x64 - {6D2CFFFE-00E9-41C8-B389-059DA9AABDFC}.Debug|x64.Build.0 = Debug|x64 - {6D2CFFFE-00E9-41C8-B389-059DA9AABDFC}.Release|Win32.ActiveCfg = Release|Win32 - {6D2CFFFE-00E9-41C8-B389-059DA9AABDFC}.Release|Win32.Build.0 = Release|Win32 - {6D2CFFFE-00E9-41C8-B389-059DA9AABDFC}.Release|x64.ActiveCfg = Release|x64 - {6D2CFFFE-00E9-41C8-B389-059DA9AABDFC}.Release|x64.Build.0 = Release|x64 - {7644167B-708E-4D09-A523-FB0F59871D82}.Debug|Win32.ActiveCfg = Debug|Win32 - {7644167B-708E-4D09-A523-FB0F59871D82}.Debug|Win32.Build.0 = Debug|Win32 - {7644167B-708E-4D09-A523-FB0F59871D82}.Debug|x64.ActiveCfg = Debug|x64 - {7644167B-708E-4D09-A523-FB0F59871D82}.Debug|x64.Build.0 = Debug|x64 - {7644167B-708E-4D09-A523-FB0F59871D82}.Release|Win32.ActiveCfg = Release|Win32 - {7644167B-708E-4D09-A523-FB0F59871D82}.Release|Win32.Build.0 = Release|Win32 - {7644167B-708E-4D09-A523-FB0F59871D82}.Release|x64.ActiveCfg = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal -- cgit v1.2.3