Home › Forums › Software Development › Declaration of txInteractionContext
- This topic has 2 replies, 2 voices, and was last updated 10 years, 5 months ago by Michael Mauderer.
- AuthorPosts
- 12/05/2014 at 13:50 #833Michael MaudererParticipant
I was hoping to integrate the EyeX SDK into a (existing) experimental Python application. Using ctypes it is no problem to access C functions from a external library, however it is necessary to know the declaration of a struct in order to use it from the Python side (e.g., to create a new instance).
In order to create an interaction context I need to call
txCreateContext
with anTX_CONTEXTHANDLE
which is astruct txInteractionContext*
(which I now need to create on the Python side).Maybe I have been missing something, but I can’t seem to find the declaration of
struct txInteractionContext
. Is this a hidden implementation detail?12/05/2014 at 15:09 #835Robert [Tobii]ParticipantHi,
You are right, the implementation of the InteractionContext class (which extends an empty struct) is only accessible on the server side (i.e. inside the EyeX Engine). As a client application, you should not need to care about creating new instances of this, just call txCreateContext, keep track of the pointer and make sure to release it when shutting down. Please check out one of the C samples, for example MinimalGazeDataStream.c
12/05/2014 at 15:52 #838Michael MaudererParticipantAh sorry, my bad. I got confused by all the macro magic.
The function actually takes a
struct txInteractionContext**
, which of course doesn’t need an existingstruct txInteractionContext
to be created by me.Thanks for your quick help!
- AuthorPosts
- You must be logged in to reply to this topic.