From 040b99f6a0d5c7b3557caf49e76ea1c412bb8835 Mon Sep 17 00:00:00 2001 From: kaetemi Date: Sat, 12 Jul 2014 18:31:30 +0200 Subject: [PATCH] HID: Add NLHID library placeholder --HG-- branch : game-device --- code/CMakeModules/nel.cmake | 3 ++- code/nel/include/nel/hid/hid.h | 33 +++++++++++++++++++++++++++++++ code/nel/src/CMakeLists.txt | 4 ++++ code/nel/src/hid/CMakeLists.txt | 27 +++++++++++++++++++++++++ code/nel/src/hid/hid.cpp | 32 ++++++++++++++++++++++++++++++ code/nel/src/hid/stdhid.cpp | 31 +++++++++++++++++++++++++++++ code/nel/src/hid/stdhid.h | 35 +++++++++++++++++++++++++++++++++ 7 files changed, 164 insertions(+), 1 deletion(-) create mode 100644 code/nel/include/nel/hid/hid.h create mode 100644 code/nel/src/hid/CMakeLists.txt create mode 100644 code/nel/src/hid/hid.cpp create mode 100644 code/nel/src/hid/stdhid.cpp create mode 100644 code/nel/src/hid/stdhid.h diff --git a/code/CMakeModules/nel.cmake b/code/CMakeModules/nel.cmake index dd8dee49f..50964278d 100644 --- a/code/CMakeModules/nel.cmake +++ b/code/CMakeModules/nel.cmake @@ -294,12 +294,13 @@ MACRO(NL_SETUP_NEL_DEFAULT_OPTIONS) ### OPTION(WITH_NET "Build NLNET" ON ) OPTION(WITH_3D "Build NL3D" ON ) - OPTION(WITH_GUI "Build GUI" ON ) + OPTION(WITH_GUI "Build NLGUI" ON ) OPTION(WITH_PACS "Build NLPACS" ON ) OPTION(WITH_GEORGES "Build NLGEORGES" ON ) OPTION(WITH_LIGO "Build NLLIGO" ON ) OPTION(WITH_LOGIC "Build NLLOGIC" ON ) OPTION(WITH_SOUND "Build NLSOUND" ON ) + OPTION(WITH_HID "Build NLHID" ON ) ### # Drivers Support diff --git a/code/nel/include/nel/hid/hid.h b/code/nel/include/nel/hid/hid.h new file mode 100644 index 000000000..b4cda8a05 --- /dev/null +++ b/code/nel/include/nel/hid/hid.h @@ -0,0 +1,33 @@ +/* + +Copyright (c) 2014, Jan BOON +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +/* Master header file to include all necessary NLHID headers at once. */ + +#include + +/* end of file */ diff --git a/code/nel/src/CMakeLists.txt b/code/nel/src/CMakeLists.txt index 06faa5251..ef2d3345b 100644 --- a/code/nel/src/CMakeLists.txt +++ b/code/nel/src/CMakeLists.txt @@ -35,3 +35,7 @@ ENDIF(WITH_NEL_CEGUI) IF(WITH_PACS) ADD_SUBDIRECTORY(pacs) ENDIF(WITH_PACS) + +IF(WITH_HID) + ADD_SUBDIRECTORY(hid) +ENDIF(WITH_HID) diff --git a/code/nel/src/hid/CMakeLists.txt b/code/nel/src/hid/CMakeLists.txt new file mode 100644 index 000000000..d6db7531a --- /dev/null +++ b/code/nel/src/hid/CMakeLists.txt @@ -0,0 +1,27 @@ +FILE(GLOB SRC *.cpp *.h) +FILE(GLOB HEADERS ../../include/nel/hid/*.h) + +SOURCE_GROUP("" FILES ${SRC} ${HEADERS}) + +NL_TARGET_LIB(nelhid ${SRC} ${HEADERS}) + +# INCLUDE_DIRECTORIES() + +TARGET_LINK_LIBRARIES(nelhid + nelmisc) + +SET_TARGET_PROPERTIES(nelhid PROPERTIES LINK_INTERFACE_LIBRARIES "") +NL_DEFAULT_PROPS(nelhid "NeL, Library: NeL HID") +NL_ADD_RUNTIME_FLAGS(nelhid) + +NL_ADD_LIB_SUFFIX(nelhid) + +# ADD_DEFINITIONS() + +IF(WITH_PCH) + ADD_NATIVE_PRECOMPILED_HEADER(nelhid ${CMAKE_CURRENT_SOURCE_DIR}/stdhid.h ${CMAKE_CURRENT_SOURCE_DIR}/stdhid.cpp) +ENDIF(WITH_PCH) + +IF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) + INSTALL(TARGETS nelhid LIBRARY DESTINATION ${NL_LIB_PREFIX} ARCHIVE DESTINATION ${NL_LIB_PREFIX} COMPONENT libraries) +ENDIF((WITH_INSTALL_LIBRARIES AND WITH_STATIC) OR NOT WITH_STATIC) diff --git a/code/nel/src/hid/hid.cpp b/code/nel/src/hid/hid.cpp new file mode 100644 index 000000000..fc268c967 --- /dev/null +++ b/code/nel/src/hid/hid.cpp @@ -0,0 +1,32 @@ +/* + +Copyright (c) 2014, Jan BOON +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "stdhid.h" +#include + +/* end of file */ diff --git a/code/nel/src/hid/stdhid.cpp b/code/nel/src/hid/stdhid.cpp new file mode 100644 index 000000000..40988f9a7 --- /dev/null +++ b/code/nel/src/hid/stdhid.cpp @@ -0,0 +1,31 @@ +/* + +Copyright (c) 2014, Jan BOON +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +#include "stdhid.h" + +/* end of file */ diff --git a/code/nel/src/hid/stdhid.h b/code/nel/src/hid/stdhid.h new file mode 100644 index 000000000..201b31cab --- /dev/null +++ b/code/nel/src/hid/stdhid.h @@ -0,0 +1,35 @@ +/* + +Copyright (c) 2014, Jan BOON +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*/ + +/* Precompiled header. */ + +#include +#include +#include + +/* end of file */