1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
|
/*********************************************************************************************************************
* Copyright 2013-2014 Tobii Technology AB. All rights reserved.
* EyeXObject.h
*********************************************************************************************************************/
#if !defined(__TOBII_TX_OBJECT_API__H__)
#define __TOBII_TX_OBJECT_API__H__
/*********************************************************************************************************************/
/**
txGetContext
Gets the context to which a specified interaction object belongs.
Unlike interaction objects, this handle does not need to be released.
@param hObject [in]:
A TX_CONSTHANDLE to the interaction object for which the context should be retrieved.
Must not be TX_EMPTY_HANDLE.
@param phContext [out]:
A pointer to a TX_CONSTCONTEXTHANDLE which will be set to the context.
Must not be NULL.
@return
TX_RESULT_OK: The context was successfully retrieved.
TX_RESULT_EYEXNOTINITIALIZED: The EyeX client environment is not initialized.
TX_RESULT_INVALIDARGUMENT: An invalid argument was passed to the function.
*/
TX_C_BEGIN
TX_API TX_RESULT TX_CALLCONVENTION txGetContext(
TX_CONSTHANDLE hObject,
TX_CONTEXTHANDLE* phContext
);
TX_C_END
typedef TX_RESULT (TX_CALLCONVENTION *GetContextHook)(
TX_CONSTHANDLE hObject,
TX_CONTEXTHANDLE* phContext
);
/*********************************************************************************************************************/
/**
txGetObjectType
Gets the TX_INTERACTIONOBJECTTYPE of an interaction object.
@param hObject [in]:
A TX_CONSTHANDLE to the interaction object for which to get the TX_INTERACTIONOBJECTTYPE.
Must not be TX_EMPTY_HANDLE.
@param phObjectType [out]:
A pointer to a TX_INTERACTIONOBJECTTYPE which will be set to the type of the object.
Must not be NULL.
@return
TX_RESULT_OK: The TX_INTERACTIONOBJECTTYPE of the object was successfully retrieved.
TX_RESULT_EYEXNOTINITIALIZED: The EyeX client environment is not initialized.
TX_RESULT_INVALIDARGUMENT: An invalid argument was passed to the function.
*/
TX_C_BEGIN
TX_API TX_RESULT TX_CALLCONVENTION txGetObjectType(
TX_CONSTHANDLE hObject,
TX_INTERACTIONOBJECTTYPE* phObjectType
);
TX_C_END
typedef TX_RESULT (TX_CALLCONVENTION *GetObjectTypeHook)(
TX_CONSTHANDLE hObject,
TX_INTERACTIONOBJECTTYPE* phObjectType
);
/*********************************************************************************************************************/
/**
txGetObjectTypeName
Gets the type name of an interaction object.
@param hObject [in]:
A TX_CONSTHANDLE to the interaction object for which to get the type name.
Must not be TX_EMPTY_HANDLE.
@param pObjectTypeName [out]:
A TX_STRING to which the type name will be copied.
The string will be null terminated.
May be NULL to only retreive the size.
@param pObjectTypeNameSize [in,out]:
A pointer to a TX_SIZE which should contain the size of the pObjectTypeName string.
The size will be set to the current number of characters in the type name + 1.
Must not be NULL.
@return
TX_RESULT_OK: The type name of the object or size of the string was successfully retreived.
TX_RESULT_EYEXNOTINITIALIZED: The EyeX client environment is not initialized.
TX_RESULT_INVALIDARGUMENT: An invalid argument was passed to the function.
TX_RESULT_INVALIDBUFFERSIZE: The size of the pObjectTypeName was to small. (*pObjectTypeNameSize will be set to the required size.)
*/
TX_C_BEGIN
TX_API TX_RESULT TX_CALLCONVENTION txGetObjectTypeName(
TX_CONSTHANDLE hObject,
TX_STRING pObjectTypeName,
TX_SIZE* pObjectTypeNameSize
);
TX_C_END
typedef TX_RESULT (TX_CALLCONVENTION *GetObjectTypeNameHook)(
TX_CONSTHANDLE hObject,
TX_STRING pObjectTypeName,
TX_SIZE* pObjectTypeNameSize
);
/*********************************************************************************************************************/
/**
txReleaseObject
Releases an interaction object. The object reference count will be decreased by one.
If the reference count hits 0 the object will be destroyed.
The handle will be set to TX_EMPTY_HANDLE.
@param phObject [in,out]:
A pointer to a TX_HANDLE to the interaction object that should be released.
Must not be NULL.
The value of the pointer must not be TX_EMPTY_HANDLE.
@return
TX_RESULT_OK: The object was successfully released.
TX_RESULT_EYEXNOTINITIALIZED: The EyeX client environment is not initialized.
TX_RESULT_INVALIDARGUMENT: An invalid argument was passed to the function.
*/
TX_C_BEGIN
TX_API TX_RESULT TX_CALLCONVENTION txReleaseObject(
TX_HANDLE* phObject
);
TX_C_END
typedef TX_RESULT (TX_CALLCONVENTION *ReleaseObjectHook)(
TX_HANDLE* phObject
);
/*********************************************************************************************************************/
/**
txFormatObjectAsText
Formats an interaction object as text. (primarily for debugging purposes)
@param hObject [in]:
A TX_HANDLE to an object.
Must not be TX_EMPTY_HANDLE.
@param pText [out]:
A TX_STRING to which the formatted text will be copied.
Must be at least the size of the formatted text.
Can be NULL to only get the size of the formatted text.
@param pTextSize [in,out]:
A pointer to a TX_SIZE which will be set the size of the formatted text.
Must not be NULL.
The value must be 0 if pText is NULL.
@return
TX_RESULT_OK: The formatted text or required size of the string was successfully retreived.
TX_RESULT_EYEXNOTINITIALIZED: The EyeX client environment is not initialized.
TX_RESULT_INVALIDARGUMENT: An invalid argument was passed to the function.
TX_RESULT_INVALIDBUFFERSIZE: The size of the pText was to small. (*pTextSize will be set to the required size.)
*/
TX_C_BEGIN
TX_API TX_RESULT TX_CALLCONVENTION txFormatObjectAsText(
TX_CONSTHANDLE hObject,
TX_STRING pText,
TX_SIZE* pTextSize
);
TX_C_END
typedef TX_RESULT (TX_CALLCONVENTION *FormatObjectAsTextHook)(
TX_CONSTHANDLE hObject,
TX_STRING pText,
TX_SIZE* pTextSize
);
/*********************************************************************************************************************/
#endif /* !defined(__TOBII_TX_OBJECT_API__H__) */
/*********************************************************************************************************************/
|