diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2016-05-16 11:19:10 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2016-06-09 10:28:01 +0200 |
commit | be2926499af2e372c313d965533be3a7ee0dcf4d (patch) | |
tree | 34501ef650da4a2990912bd0b38ed7135696c164 /Tobii EyeX/samples/MinimalUserProfiles | |
parent | 6eb99f06be3ead3c898b400d7b9072583c7addf0 (diff) |
add tobii eyex sdk
Diffstat (limited to 'Tobii EyeX/samples/MinimalUserProfiles')
19 files changed, 538 insertions, 0 deletions
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 Binary files differnew file mode 100755 index 0000000..ca3124c --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.command.1.tlog 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 Binary files differnew file mode 100755 index 0000000..b9b14b8 --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.read.1.tlog 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 Binary files differnew file mode 100755 index 0000000..c26f1a7 --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/CL.write.1.tlog diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/MinimalUserProfiles.lastbuildstate b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/MinimalUserProfiles.lastbuildstate new file mode 100755 index 0000000..5cd4c3b --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/MinimalUserProfiles.lastbuildstate @@ -0,0 +1,2 @@ +#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 Binary files differnew file mode 100755 index 0000000..586a19e --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.command.1.tlog 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 Binary files differnew file mode 100755 index 0000000..1b2f2e9 --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.read.1.tlog 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 Binary files differnew file mode 100755 index 0000000..4add4c6 --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalU.7644167B.tlog/link.write.1.tlog diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalUserProfiles.log b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalUserProfiles.log new file mode 100755 index 0000000..2a34286 --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalUserProfiles.log @@ -0,0 +1,4 @@ + 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 Binary files differnew file mode 100755 index 0000000..1a00765 --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/Debug/MinimalUserProfiles.obj diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/stdafx.obj b/Tobii EyeX/samples/MinimalUserProfiles/Debug/stdafx.obj Binary files differnew file mode 100755 index 0000000..ea32af6 --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/Debug/stdafx.obj diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.idb b/Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.idb Binary files differnew file mode 100755 index 0000000..b32eb42 --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.idb diff --git a/Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.pdb b/Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.pdb Binary files differnew file mode 100755 index 0000000..3ce102d --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/Debug/vc140.pdb diff --git a/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.cpp b/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.cpp new file mode 100755 index 0000000..022486b --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.cpp @@ -0,0 +1,269 @@ +/*
+ * 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 <Windows.h>
+#include <stdio.h>
+#include <conio.h>
+#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<std::string> 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<std::string> *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<std::string> 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 new file mode 100755 index 0000000..3481b69 --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.vcxproj @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup Label="ProjectConfigurations">
+ <ProjectConfiguration Include="Debug|Win32">
+ <Configuration>Debug</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Debug|x64">
+ <Configuration>Debug</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|Win32">
+ <Configuration>Release</Configuration>
+ <Platform>Win32</Platform>
+ </ProjectConfiguration>
+ <ProjectConfiguration Include="Release|x64">
+ <Configuration>Release</Configuration>
+ <Platform>x64</Platform>
+ </ProjectConfiguration>
+ </ItemGroup>
+ <PropertyGroup Label="Globals">
+ <ProjectGuid>{7644167B-708E-4D09-A523-FB0F59871D82}</ProjectGuid>
+ <Keyword>Win32Proj</Keyword>
+ <RootNamespace>MinimalUserProfiles</RootNamespace>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>true</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
+ <ConfigurationType>Application</ConfigurationType>
+ <UseDebugLibraries>false</UseDebugLibraries>
+ <PlatformToolset>v140</PlatformToolset>
+ <WholeProgramOptimization>true</WholeProgramOptimization>
+ <CharacterSet>Unicode</CharacterSet>
+ </PropertyGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+ <ImportGroup Label="ExtensionSettings">
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
+ <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+ </ImportGroup>
+ <PropertyGroup Label="UserMacros" />
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <LinkIncremental>true</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <LinkIncremental>false</LinkIncremental>
+ </PropertyGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>..\..\lib\x86</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
+ <ClCompile>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <WarningLevel>Level3</WarningLevel>
+ <Optimization>Disabled</Optimization>
+ <PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <AdditionalLibraryDirectories>..\..\lib\x64</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalLibraryDirectories>..\..\lib\x86</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
+ <ClCompile>
+ <WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>
+ </PrecompiledHeader>
+ <Optimization>MaxSpeed</Optimization>
+ <FunctionLevelLinking>true</FunctionLevelLinking>
+ <IntrinsicFunctions>true</IntrinsicFunctions>
+ <PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+ <AdditionalIncludeDirectories>..\..\include</AdditionalIncludeDirectories>
+ </ClCompile>
+ <Link>
+ <SubSystem>Console</SubSystem>
+ <GenerateDebugInformation>true</GenerateDebugInformation>
+ <EnableCOMDATFolding>true</EnableCOMDATFolding>
+ <OptimizeReferences>true</OptimizeReferences>
+ <AdditionalLibraryDirectories>..\..\lib\x64</AdditionalLibraryDirectories>
+ </Link>
+ </ItemDefinitionGroup>
+ <ItemGroup>
+ <Text Include="ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="stdafx.h" />
+ <ClInclude Include="targetver.h" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="MinimalUserProfiles.cpp" />
+ <ClCompile Include="stdafx.cpp" />
+ </ItemGroup>
+ <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+ <ImportGroup Label="ExtensionTargets">
+ </ImportGroup>
+</Project>
\ No newline at end of file diff --git a/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.vcxproj.filters b/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.vcxproj.filters new file mode 100755 index 0000000..614e5c9 --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/MinimalUserProfiles.vcxproj.filters @@ -0,0 +1,36 @@ +<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <ItemGroup>
+ <Filter Include="Source Files">
+ <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+ <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+ </Filter>
+ <Filter Include="Header Files">
+ <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+ <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+ </Filter>
+ <Filter Include="Resource Files">
+ <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+ <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+ </Filter>
+ </ItemGroup>
+ <ItemGroup>
+ <Text Include="ReadMe.txt" />
+ </ItemGroup>
+ <ItemGroup>
+ <ClInclude Include="stdafx.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ <ClInclude Include="targetver.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
+ </ItemGroup>
+ <ItemGroup>
+ <ClCompile Include="stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="MinimalUserProfiles.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ </ItemGroup>
+</Project>
\ No newline at end of file diff --git a/Tobii EyeX/samples/MinimalUserProfiles/ReadMe.txt b/Tobii EyeX/samples/MinimalUserProfiles/ReadMe.txt new file mode 100755 index 0000000..4171f7a --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/ReadMe.txt @@ -0,0 +1,40 @@ +========================================================================
+ 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 new file mode 100755 index 0000000..92e931f --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/stdafx.cpp @@ -0,0 +1,3 @@ +// 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 new file mode 100755 index 0000000..cb987d8 --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/stdafx.h @@ -0,0 +1,13 @@ +// 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 <stdio.h>
+#include <tchar.h>
diff --git a/Tobii EyeX/samples/MinimalUserProfiles/targetver.h b/Tobii EyeX/samples/MinimalUserProfiles/targetver.h new file mode 100755 index 0000000..90e767b --- /dev/null +++ b/Tobii EyeX/samples/MinimalUserProfiles/targetver.h @@ -0,0 +1,8 @@ +#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 <SDKDDKVer.h>
|