InterfaceStateC.h (2375B)
1 /** @file 2 @brief Header 3 4 Must be c-safe! 5 6 @date 2014 7 8 @author 9 Sensics, Inc. 10 <http://sensics.com/osvr> 11 */ 12 13 /* 14 // Copyright 2014 Sensics, Inc. 15 // 16 // Licensed under the Apache License, Version 2.0 (the "License"); 17 // you may not use this file except in compliance with the License. 18 // You may obtain a copy of the License at 19 // 20 // http://www.apache.org/licenses/LICENSE-2.0 21 // 22 // Unless required by applicable law or agreed to in writing, software 23 // distributed under the License is distributed on an "AS IS" BASIS, 24 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 25 // See the License for the specific language governing permissions and 26 // limitations under the License. 27 */ 28 29 #ifndef INCLUDED_InterfaceStateC_h_GUID_8F85D178_74B9_4AA9_4E9E_243089411408 30 #define INCLUDED_InterfaceStateC_h_GUID_8F85D178_74B9_4AA9_4E9E_243089411408 31 32 /* Internal Includes */ 33 #include <osvr/ClientKit/Export.h> 34 #include <osvr/Util/APIBaseC.h> 35 #include <osvr/Util/ReturnCodesC.h> 36 #include <osvr/Util/AnnotationMacrosC.h> 37 #include <osvr/Util/ClientOpaqueTypesC.h> 38 #include <osvr/Util/ClientReportTypesC.h> 39 #include <osvr/Util/TimeValueC.h> 40 41 /* Library/third-party includes */ 42 /* none */ 43 44 /* Standard includes */ 45 /* none */ 46 47 OSVR_EXTERN_C_BEGIN 48 49 #define OSVR_CALLBACK_METHODS(TYPE) \ 50 /** @brief Get TYPE state from an interface, returning failure if none \ 51 * exists */ \ 52 OSVR_CLIENTKIT_EXPORT OSVR_ReturnCode osvrGet##TYPE##State( \ 53 OSVR_ClientInterface iface, struct OSVR_TimeValue* timestamp, \ 54 OSVR_##TYPE##State* state); 55 56 OSVR_CALLBACK_METHODS(Pose) 57 OSVR_CALLBACK_METHODS(Position) 58 OSVR_CALLBACK_METHODS(Orientation) 59 OSVR_CALLBACK_METHODS(Velocity) 60 OSVR_CALLBACK_METHODS(LinearVelocity) 61 OSVR_CALLBACK_METHODS(AngularVelocity) 62 OSVR_CALLBACK_METHODS(Acceleration) 63 OSVR_CALLBACK_METHODS(LinearAcceleration) 64 OSVR_CALLBACK_METHODS(AngularAcceleration) 65 OSVR_CALLBACK_METHODS(Button) 66 OSVR_CALLBACK_METHODS(Analog) 67 OSVR_CALLBACK_METHODS(Location2D) 68 OSVR_CALLBACK_METHODS(Direction) 69 OSVR_CALLBACK_METHODS(EyeTracker2D) 70 OSVR_CALLBACK_METHODS(EyeTracker3D) 71 OSVR_CALLBACK_METHODS(EyeTrackerBlink) 72 OSVR_CALLBACK_METHODS(NaviVelocity) 73 OSVR_CALLBACK_METHODS(NaviPosition) 74 75 #undef OSVR_CALLBACK_METHODS 76 77 OSVR_EXTERN_C_END 78 79 #endif