#pragma region CPL License
/*
Nuclex Native Framework
Copyright (C) 2002-2013 Nuclex Development Labs
This library is free software; you can redistribute it and/or
modify it under the terms of the IBM Common Public License as
published by the IBM Corporation; either version 1.0 of the
License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
IBM Common Public License for more details.
You should have received a copy of the IBM Common Public
License along with this library
*/
#pragma endregion // CPL License
#ifndef NUCLEX_INPUT_CONFIG_H
#define NUCLEX_INPUT_CONFIG_H
// --------------------------------------------------------------------------------------------- //
/// \mainpage
///
/// This library unifies and simplifies your game's handling of input devices. It does so
/// by completely isolating you from any API-specific hassles and giving you an intuitive
/// and refined interface to input devices that stays the same on all platforms. It's very
/// convenient to use, too!
///
///
/// -
///
/// You are guaranteed 1 keyboard, 1 mouse, 1 touch panel and 4 game pads. If any of those
/// devices is amiss, a dummy will take its place that returns a neutral state. This
/// greatly simplifies porting and you don't ever have to worry about stupid players
/// switching their game pads mid-game again. Of course, you can still check if
/// a device is attached or not for performance reasons.
///
///
/// -
///
/// It generates change notifications. In many cases, the library has direct access
/// to a device's state changes, so instead of wasting cycles comparing a device's
/// current state with its previous state field-by-field, you can subscribe to be
/// notified!
///
///
/// -
///
/// Input can be independent of the frame rate. If the frame rate goes down, games often
/// become hard to control because input is only processed once per frame. You can take
/// snapshots of the input devices' states in regular intervals using a thread. These
/// snapshots can then be replayed when your game gets back to its update loop. If
/// you don't need it, it won't get in your way and there's zero overhead
///
///
/// -
///
/// You can mock all input devices. That means instead of a querying the real input
/// devices, you can simulate input to your game. That's pretty nice for unit testing,
/// demo recording and other things. All you need to do is use the MockInputManager
/// instead of the real one.
///
///
/// -
///
/// Complete abstraction and unification of all APIs. The library's public interface is
/// designer to not depend on anything that's not part of ISO C++. All input devices are
/// represented in nice, clean and refined C++ classes with no dependencies on any
/// platform-specific headers or types.
///
///
///
// --------------------------------------------------------------------------------------------- //
// Platform recognition
#if defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP)
#define NUCLEX_INPUT_WINRT 1
#elif defined(WIN32) || defined(_WIN32)
#define NUCLEX_INPUT_WIN32 1
#else
#define NUCLEX_INPUT_LINUX 1
#endif
// --------------------------------------------------------------------------------------------- //
// Decides whether symbols are imported from a dll (client app) or exported to
// a dll (Nuclex.Input.Native library). The NUCLEX_INPUT_SOURCE symbol is defined by
// all source files of the library, so you don't have to worry about a thing.
#if defined(_MSC_VER)
#if defined(NUCLEX_INPUT_STATICLIB)
#define NUCLEX_INPUT_API
#else
#if defined(NUCLEX_INPUT_SOURCE)
// If we are building the DLL, export the symbols tagged like this
#define NUCLEX_INPUT_API __declspec(dllexport)
#else
// If we are consuming the DLL, import the symbols tagged like this
#define NUCLEX_INPUT_API __declspec(dllimport)
#endif
#endif
#elif defined(__GNUC__)
#if defined(NUCLEX_INPUT_STATICLIB)
#define NUCLEX_INPUT_API
#else
#if defined(NUCLEX_INPUT_SOURCE)
#define NUCLEX_INPUT_API __attribute__ ((visibility ("default")))
// Make hidden the default visibility so only tagged symbols are exported
// This only applies when compiling Nuclex.Storage.Native, so we don't infect
// any code merely using the library with this line.
#pragma GCC visibility push(hidden)
#else
// If you use -fvisibility=hidden or the same pragma as above anywhere in GCC,
// exception handling and RTTI would break because GCC would immediately forget
// all type infos encountered without this. See http://gcc.gnu.org/wiki/Visibility
#define NUCLEX_INPUT_API __attribute__ ((visibility ("default")))
#endif
#endif
#endif
// --------------------------------------------------------------------------------------------- //
#endif // NUCLEX_INPUT_CONFIG_H