1b877906bSopenharmony_ci//======================================================================== 2b877906bSopenharmony_ci// GLFW 3.5 Cocoa - www.glfw.org 3b877906bSopenharmony_ci//------------------------------------------------------------------------ 4b877906bSopenharmony_ci// Copyright (c) 2006-2017 Camilla Löwy <elmindreda@glfw.org> 5b877906bSopenharmony_ci// 6b877906bSopenharmony_ci// This software is provided 'as-is', without any express or implied 7b877906bSopenharmony_ci// warranty. In no event will the authors be held liable for any damages 8b877906bSopenharmony_ci// arising from the use of this software. 9b877906bSopenharmony_ci// 10b877906bSopenharmony_ci// Permission is granted to anyone to use this software for any purpose, 11b877906bSopenharmony_ci// including commercial applications, and to alter it and redistribute it 12b877906bSopenharmony_ci// freely, subject to the following restrictions: 13b877906bSopenharmony_ci// 14b877906bSopenharmony_ci// 1. The origin of this software must not be misrepresented; you must not 15b877906bSopenharmony_ci// claim that you wrote the original software. If you use this software 16b877906bSopenharmony_ci// in a product, an acknowledgment in the product documentation would 17b877906bSopenharmony_ci// be appreciated but is not required. 18b877906bSopenharmony_ci// 19b877906bSopenharmony_ci// 2. Altered source versions must be plainly marked as such, and must not 20b877906bSopenharmony_ci// be misrepresented as being the original software. 21b877906bSopenharmony_ci// 22b877906bSopenharmony_ci// 3. This notice may not be removed or altered from any source 23b877906bSopenharmony_ci// distribution. 24b877906bSopenharmony_ci// 25b877906bSopenharmony_ci//======================================================================== 26b877906bSopenharmony_ci 27b877906bSopenharmony_ci#include <IOKit/IOKitLib.h> 28b877906bSopenharmony_ci#include <IOKit/IOCFPlugIn.h> 29b877906bSopenharmony_ci#include <IOKit/hid/IOHIDKeys.h> 30b877906bSopenharmony_ci 31b877906bSopenharmony_ci#define GLFW_COCOA_JOYSTICK_STATE _GLFWjoystickNS ns; 32b877906bSopenharmony_ci#define GLFW_COCOA_LIBRARY_JOYSTICK_STATE 33b877906bSopenharmony_ci 34b877906bSopenharmony_ci// Cocoa-specific per-joystick data 35b877906bSopenharmony_ci// 36b877906bSopenharmony_citypedef struct _GLFWjoystickNS 37b877906bSopenharmony_ci{ 38b877906bSopenharmony_ci IOHIDDeviceRef device; 39b877906bSopenharmony_ci CFMutableArrayRef axes; 40b877906bSopenharmony_ci CFMutableArrayRef buttons; 41b877906bSopenharmony_ci CFMutableArrayRef hats; 42b877906bSopenharmony_ci} _GLFWjoystickNS; 43b877906bSopenharmony_ci 44b877906bSopenharmony_ciGLFWbool _glfwInitJoysticksCocoa(void); 45b877906bSopenharmony_civoid _glfwTerminateJoysticksCocoa(void); 46b877906bSopenharmony_ciGLFWbool _glfwPollJoystickCocoa(_GLFWjoystick* js, int mode); 47b877906bSopenharmony_ciconst char* _glfwGetMappingNameCocoa(void); 48b877906bSopenharmony_civoid _glfwUpdateGamepadGUIDCocoa(char* guid); 49b877906bSopenharmony_ci 50