Changed to namespace
This commit is contained in:
parent
bf9f59d3e3
commit
34b6323929
@ -32,16 +32,13 @@
|
|||||||
#include <SFML/System/Vector3.hpp>
|
#include <SFML/System/Vector3.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace sf
|
|
||||||
{
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief The audio listener is the point in the scene
|
/// \brief The audio listener is the point in the scene
|
||||||
/// from where all the sounds are heard
|
/// from where all the sounds are heard
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
class SFML_AUDIO_API Listener
|
namespace sf::Listener
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Change the global volume of all the sounds and musics
|
/// \brief Change the global volume of all the sounds and musics
|
||||||
///
|
///
|
||||||
@ -54,7 +51,7 @@ public:
|
|||||||
/// \see getGlobalVolume
|
/// \see getGlobalVolume
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void setGlobalVolume(float volume);
|
SFML_AUDIO_API void setGlobalVolume(float volume);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the current value of the global volume
|
/// \brief Get the current value of the global volume
|
||||||
@ -64,7 +61,7 @@ public:
|
|||||||
/// \see setGlobalVolume
|
/// \see setGlobalVolume
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static float getGlobalVolume();
|
SFML_AUDIO_API float getGlobalVolume();
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Set the position of the listener in the scene
|
/// \brief Set the position of the listener in the scene
|
||||||
@ -76,7 +73,7 @@ public:
|
|||||||
/// \see getPosition, setDirection
|
/// \see getPosition, setDirection
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void setPosition(const Vector3f& position);
|
SFML_AUDIO_API void setPosition(const Vector3f& position);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the current position of the listener in the scene
|
/// \brief Get the current position of the listener in the scene
|
||||||
@ -86,7 +83,7 @@ public:
|
|||||||
/// \see setPosition
|
/// \see setPosition
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static Vector3f getPosition();
|
SFML_AUDIO_API Vector3f getPosition();
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Set the forward vector of the listener in the scene
|
/// \brief Set the forward vector of the listener in the scene
|
||||||
@ -103,7 +100,7 @@ public:
|
|||||||
/// \see getDirection, setUpVector, setPosition
|
/// \see getDirection, setUpVector, setPosition
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void setDirection(const Vector3f& direction);
|
SFML_AUDIO_API void setDirection(const Vector3f& direction);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the current forward vector of the listener in the scene
|
/// \brief Get the current forward vector of the listener in the scene
|
||||||
@ -113,7 +110,7 @@ public:
|
|||||||
/// \see setDirection
|
/// \see setDirection
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static Vector3f getDirection();
|
SFML_AUDIO_API Vector3f getDirection();
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Set the upward vector of the listener in the scene
|
/// \brief Set the upward vector of the listener in the scene
|
||||||
@ -130,7 +127,7 @@ public:
|
|||||||
/// \see getUpVector, setDirection, setPosition
|
/// \see getUpVector, setDirection, setPosition
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void setUpVector(const Vector3f& upVector);
|
SFML_AUDIO_API void setUpVector(const Vector3f& upVector);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the current upward vector of the listener in the scene
|
/// \brief Get the current upward vector of the listener in the scene
|
||||||
@ -140,14 +137,12 @@ public:
|
|||||||
/// \see setUpVector
|
/// \see setUpVector
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static Vector3f getUpVector();
|
SFML_AUDIO_API Vector3f getUpVector();
|
||||||
};
|
} // namespace sf::Listener
|
||||||
|
|
||||||
} // namespace sf
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \class sf::Listener
|
/// \namespace sf::Listener
|
||||||
/// \ingroup audio
|
/// \ingroup audio
|
||||||
///
|
///
|
||||||
/// The audio listener defines the global properties of the
|
/// The audio listener defines the global properties of the
|
||||||
@ -160,9 +155,6 @@ public:
|
|||||||
/// listener in the 3D audio environment (position, direction and
|
/// listener in the 3D audio environment (position, direction and
|
||||||
/// up vector), and to adjust the global volume.
|
/// up vector), and to adjust the global volume.
|
||||||
///
|
///
|
||||||
/// Because the listener is unique in the scene, sf::Listener only
|
|
||||||
/// contains static functions and doesn't have to be instantiated.
|
|
||||||
///
|
|
||||||
/// Usage example:
|
/// Usage example:
|
||||||
/// \code
|
/// \code
|
||||||
/// // Move the listener to the position (1, 0, -5)
|
/// // Move the listener to the position (1, 0, -5)
|
||||||
|
@ -38,9 +38,8 @@ class String;
|
|||||||
/// \brief Give access to the system clipboard
|
/// \brief Give access to the system clipboard
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
class SFML_WINDOW_API Clipboard
|
namespace Clipboard
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the content of the clipboard as string data
|
/// \brief Get the content of the clipboard as string data
|
||||||
///
|
///
|
||||||
@ -51,7 +50,7 @@ public:
|
|||||||
/// \return Clipboard contents as sf::String object
|
/// \return Clipboard contents as sf::String object
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static String getString();
|
SFML_WINDOW_API String getString();
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Set the content of the clipboard as string data
|
/// \brief Set the content of the clipboard as string data
|
||||||
@ -68,14 +67,14 @@ public:
|
|||||||
/// to the clipboard
|
/// to the clipboard
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void setString(const String& text);
|
SFML_WINDOW_API void setString(const String& text);
|
||||||
};
|
} // namespace Clipboard
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \class sf::Clipboard
|
/// \namespace sf::Clipboard
|
||||||
/// \ingroup window
|
/// \ingroup window
|
||||||
///
|
///
|
||||||
/// sf::Clipboard provides an interface for getting and
|
/// sf::Clipboard provides an interface for getting and
|
||||||
|
@ -31,16 +31,12 @@
|
|||||||
|
|
||||||
#include <SFML/System/String.hpp>
|
#include <SFML/System/String.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace sf
|
|
||||||
{
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Give access to the real-time state of the joysticks
|
/// \brief Give access to the real-time state of the joysticks
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
class SFML_WINDOW_API Joystick
|
namespace sf::Joystick
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Constants related to joysticks capabilities
|
/// \brief Constants related to joysticks capabilities
|
||||||
///
|
///
|
||||||
@ -87,7 +83,7 @@ public:
|
|||||||
/// \return True if the joystick is connected, false otherwise
|
/// \return True if the joystick is connected, false otherwise
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static bool isConnected(unsigned int joystick);
|
SFML_WINDOW_API bool isConnected(unsigned int joystick);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Return the number of buttons supported by a joystick
|
/// \brief Return the number of buttons supported by a joystick
|
||||||
@ -99,7 +95,7 @@ public:
|
|||||||
/// \return Number of buttons supported by the joystick
|
/// \return Number of buttons supported by the joystick
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static unsigned int getButtonCount(unsigned int joystick);
|
SFML_WINDOW_API unsigned int getButtonCount(unsigned int joystick);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Check if a joystick supports a given axis
|
/// \brief Check if a joystick supports a given axis
|
||||||
@ -112,7 +108,7 @@ public:
|
|||||||
/// \return True if the joystick supports the axis, false otherwise
|
/// \return True if the joystick supports the axis, false otherwise
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static bool hasAxis(unsigned int joystick, Axis axis);
|
SFML_WINDOW_API bool hasAxis(unsigned int joystick, Axis axis);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Check if a joystick button is pressed
|
/// \brief Check if a joystick button is pressed
|
||||||
@ -125,7 +121,7 @@ public:
|
|||||||
/// \return True if the button is pressed, false otherwise
|
/// \return True if the button is pressed, false otherwise
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static bool isButtonPressed(unsigned int joystick, unsigned int button);
|
SFML_WINDOW_API bool isButtonPressed(unsigned int joystick, unsigned int button);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the current position of a joystick axis
|
/// \brief Get the current position of a joystick axis
|
||||||
@ -138,7 +134,7 @@ public:
|
|||||||
/// \return Current position of the axis, in range [-100 .. 100]
|
/// \return Current position of the axis, in range [-100 .. 100]
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static float getAxisPosition(unsigned int joystick, Axis axis);
|
SFML_WINDOW_API float getAxisPosition(unsigned int joystick, Axis axis);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the joystick information
|
/// \brief Get the joystick information
|
||||||
@ -148,7 +144,7 @@ public:
|
|||||||
/// \return Structure containing joystick information.
|
/// \return Structure containing joystick information.
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static Identification getIdentification(unsigned int joystick);
|
SFML_WINDOW_API Identification getIdentification(unsigned int joystick);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Update the states of all joysticks
|
/// \brief Update the states of all joysticks
|
||||||
@ -159,22 +155,19 @@ public:
|
|||||||
/// in this case the joystick states are not updated automatically.
|
/// in this case the joystick states are not updated automatically.
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void update();
|
SFML_WINDOW_API void update();
|
||||||
};
|
} // namespace sf::Joystick
|
||||||
|
|
||||||
} // namespace sf
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \class sf::Joystick
|
/// \namespace sf::Joystick
|
||||||
/// \ingroup window
|
/// \ingroup window
|
||||||
///
|
///
|
||||||
/// sf::Joystick provides an interface to the state of the
|
/// sf::Joystick provides an interface to the state of the
|
||||||
/// joysticks. It only contains static functions, so it's not
|
/// joysticks. Each joystick is identified by an index that
|
||||||
/// meant to be instantiated. Instead, each joystick is identified
|
/// is passed to the functions in this namespace.
|
||||||
/// by an index that is passed to the functions of this class.
|
|
||||||
///
|
///
|
||||||
/// This class allows users to query the state of joysticks at any
|
/// This namespace allows users to query the state of joysticks at any
|
||||||
/// time and directly, without having to deal with a window and
|
/// time and directly, without having to deal with a window and
|
||||||
/// its events. Compared to the JoystickMoved, JoystickButtonPressed
|
/// its events. Compared to the JoystickMoved, JoystickButtonPressed
|
||||||
/// and JoystickButtonReleased events, sf::Joystick can retrieve the
|
/// and JoystickButtonReleased events, sf::Joystick can retrieve the
|
||||||
|
@ -30,15 +30,12 @@
|
|||||||
#include <SFML/Window/Export.hpp>
|
#include <SFML/Window/Export.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace sf
|
|
||||||
{
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Give access to the real-time state of the keyboard
|
/// \brief Give access to the real-time state of the keyboard
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
class SFML_WINDOW_API Keyboard
|
namespace sf::Keyboard
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Key codes
|
/// \brief Key codes
|
||||||
///
|
///
|
||||||
@ -159,7 +156,7 @@ public:
|
|||||||
/// \return True if the key is pressed, false otherwise
|
/// \return True if the key is pressed, false otherwise
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static bool isKeyPressed(Key key);
|
SFML_WINDOW_API bool isKeyPressed(Key key);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Show or hide the virtual keyboard
|
/// \brief Show or hide the virtual keyboard
|
||||||
@ -174,21 +171,18 @@ public:
|
|||||||
/// \param visible True to show, false to hide
|
/// \param visible True to show, false to hide
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void setVirtualKeyboardVisible(bool visible);
|
SFML_WINDOW_API void setVirtualKeyboardVisible(bool visible);
|
||||||
};
|
} // namespace sf::Keyboard
|
||||||
|
|
||||||
} // namespace sf
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \class sf::Keyboard
|
/// \namespace sf::Keyboard
|
||||||
/// \ingroup window
|
/// \ingroup window
|
||||||
///
|
///
|
||||||
/// sf::Keyboard provides an interface to the state of the
|
/// sf::Keyboard provides an interface to the state of the
|
||||||
/// keyboard. It only contains static functions (a single
|
/// keyboard.
|
||||||
/// keyboard is assumed), so it's not meant to be instantiated.
|
|
||||||
///
|
///
|
||||||
/// This class allows users to query the keyboard state at any
|
/// This namespace allows users to query the keyboard state at any
|
||||||
/// time and directly, without having to deal with a window and
|
/// time and directly, without having to deal with a window and
|
||||||
/// its events. Compared to the KeyPressed and KeyReleased events,
|
/// its events. Compared to the KeyPressed and KeyReleased events,
|
||||||
/// sf::Keyboard can retrieve the state of a key at any time
|
/// sf::Keyboard can retrieve the state of a key at any time
|
||||||
|
@ -40,9 +40,8 @@ class WindowBase;
|
|||||||
/// \brief Give access to the real-time state of the mouse
|
/// \brief Give access to the real-time state of the mouse
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
class SFML_WINDOW_API Mouse
|
namespace Mouse
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Mouse buttons
|
/// \brief Mouse buttons
|
||||||
///
|
///
|
||||||
@ -79,7 +78,7 @@ public:
|
|||||||
/// \return True if the button is pressed, false otherwise
|
/// \return True if the button is pressed, false otherwise
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static bool isButtonPressed(Button button);
|
SFML_WINDOW_API bool isButtonPressed(Button button);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the current position of the mouse in desktop coordinates
|
/// \brief Get the current position of the mouse in desktop coordinates
|
||||||
@ -90,7 +89,7 @@ public:
|
|||||||
/// \return Current position of the mouse
|
/// \return Current position of the mouse
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static Vector2i getPosition();
|
SFML_WINDOW_API Vector2i getPosition();
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the current position of the mouse in window coordinates
|
/// \brief Get the current position of the mouse in window coordinates
|
||||||
@ -103,7 +102,7 @@ public:
|
|||||||
/// \return Current position of the mouse
|
/// \return Current position of the mouse
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static Vector2i getPosition(const WindowBase& relativeTo);
|
SFML_WINDOW_API Vector2i getPosition(const WindowBase& relativeTo);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Set the current position of the mouse in desktop coordinates
|
/// \brief Set the current position of the mouse in desktop coordinates
|
||||||
@ -114,7 +113,7 @@ public:
|
|||||||
/// \param position New position of the mouse
|
/// \param position New position of the mouse
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void setPosition(const Vector2i& position);
|
SFML_WINDOW_API void setPosition(const Vector2i& position);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Set the current position of the mouse in window coordinates
|
/// \brief Set the current position of the mouse in window coordinates
|
||||||
@ -126,21 +125,20 @@ public:
|
|||||||
/// \param relativeTo Reference window
|
/// \param relativeTo Reference window
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void setPosition(const Vector2i& position, const WindowBase& relativeTo);
|
SFML_WINDOW_API void setPosition(const Vector2i& position, const WindowBase& relativeTo);
|
||||||
};
|
} // namespace Mouse
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \class sf::Mouse
|
/// \namespace sf::Mouse
|
||||||
/// \ingroup window
|
/// \ingroup window
|
||||||
///
|
///
|
||||||
/// sf::Mouse provides an interface to the state of the
|
/// sf::Mouse provides an interface to the state of the
|
||||||
/// mouse. It only contains static functions (a single
|
/// mouse. A single mouse is assumed.
|
||||||
/// mouse is assumed), so it's not meant to be instantiated.
|
|
||||||
///
|
///
|
||||||
/// This class allows users to query the mouse state at any
|
/// This namespace allows users to query the mouse state at any
|
||||||
/// time and directly, without having to deal with a window and
|
/// time and directly, without having to deal with a window and
|
||||||
/// its events. Compared to the MouseMoved, MouseButtonPressed
|
/// its events. Compared to the MouseMoved, MouseButtonPressed
|
||||||
/// and MouseButtonReleased events, sf::Mouse can retrieve the
|
/// and MouseButtonReleased events, sf::Mouse can retrieve the
|
||||||
|
@ -31,16 +31,12 @@
|
|||||||
|
|
||||||
#include <SFML/System/Vector3.hpp>
|
#include <SFML/System/Vector3.hpp>
|
||||||
|
|
||||||
|
|
||||||
namespace sf
|
|
||||||
{
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Give access to the real-time state of the sensors
|
/// \brief Give access to the real-time state of the sensors
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
class SFML_WINDOW_API Sensor
|
namespace sf::Sensor
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Sensor type
|
/// \brief Sensor type
|
||||||
///
|
///
|
||||||
@ -65,7 +61,7 @@ public:
|
|||||||
/// \return True if the sensor is available, false otherwise
|
/// \return True if the sensor is available, false otherwise
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static bool isAvailable(Type sensor);
|
SFML_WINDOW_API bool isAvailable(Type sensor);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Enable or disable a sensor
|
/// \brief Enable or disable a sensor
|
||||||
@ -80,7 +76,7 @@ public:
|
|||||||
/// \param enabled True to enable, false to disable
|
/// \param enabled True to enable, false to disable
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static void setEnabled(Type sensor, bool enabled);
|
SFML_WINDOW_API void setEnabled(Type sensor, bool enabled);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the current sensor value
|
/// \brief Get the current sensor value
|
||||||
@ -90,21 +86,18 @@ public:
|
|||||||
/// \return The current sensor value
|
/// \return The current sensor value
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static Vector3f getValue(Type sensor);
|
SFML_WINDOW_API Vector3f getValue(Type sensor);
|
||||||
};
|
} // namespace sf::Sensor
|
||||||
|
|
||||||
} // namespace sf
|
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \class sf::Sensor
|
/// \namespace sf::Sensor
|
||||||
/// \ingroup window
|
/// \ingroup window
|
||||||
///
|
///
|
||||||
/// sf::Sensor provides an interface to the state of the
|
/// sf::Sensor provides an interface to the state of the
|
||||||
/// various sensors that a device provides. It only contains static
|
/// various sensors that a device provides.
|
||||||
/// functions, so it's not meant to be instantiated.
|
|
||||||
///
|
///
|
||||||
/// This class allows users to query the sensors values at any
|
/// This namespace allows users to query the sensors values at any
|
||||||
/// time and directly, without having to deal with a window and
|
/// time and directly, without having to deal with a window and
|
||||||
/// its events. Compared to the SensorChanged event, sf::Sensor
|
/// its events. Compared to the SensorChanged event, sf::Sensor
|
||||||
/// can retrieve the state of a sensor at any time (you don't need to
|
/// can retrieve the state of a sensor at any time (you don't need to
|
||||||
|
@ -40,9 +40,8 @@ class WindowBase;
|
|||||||
/// \brief Give access to the real-time state of the touches
|
/// \brief Give access to the real-time state of the touches
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
class SFML_WINDOW_API Touch
|
namespace Touch
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Check if a touch event is currently down
|
/// \brief Check if a touch event is currently down
|
||||||
///
|
///
|
||||||
@ -51,7 +50,7 @@ public:
|
|||||||
/// \return True if \a finger is currently touching the screen, false otherwise
|
/// \return True if \a finger is currently touching the screen, false otherwise
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static bool isDown(unsigned int finger);
|
SFML_WINDOW_API bool isDown(unsigned int finger);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the current position of a touch in desktop coordinates
|
/// \brief Get the current position of a touch in desktop coordinates
|
||||||
@ -64,7 +63,7 @@ public:
|
|||||||
/// \return Current position of \a finger, or undefined if it's not down
|
/// \return Current position of \a finger, or undefined if it's not down
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static Vector2i getPosition(unsigned int finger);
|
SFML_WINDOW_API Vector2i getPosition(unsigned int finger);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the current position of a touch in window coordinates
|
/// \brief Get the current position of a touch in window coordinates
|
||||||
@ -78,21 +77,20 @@ public:
|
|||||||
/// \return Current position of \a finger, or undefined if it's not down
|
/// \return Current position of \a finger, or undefined if it's not down
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static Vector2i getPosition(unsigned int finger, const WindowBase& relativeTo);
|
SFML_WINDOW_API Vector2i getPosition(unsigned int finger, const WindowBase& relativeTo);
|
||||||
};
|
} // namespace Touch
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \class sf::Touch
|
/// \namespace sf::Touch
|
||||||
/// \ingroup window
|
/// \ingroup window
|
||||||
///
|
///
|
||||||
/// sf::Touch provides an interface to the state of the
|
/// sf::Touch provides an interface to the state of the
|
||||||
/// touches. It only contains static functions, so it's not
|
/// touches.
|
||||||
/// meant to be instantiated.
|
|
||||||
///
|
///
|
||||||
/// This class allows users to query the touches state at any
|
/// This namespace allows users to query the touches state at any
|
||||||
/// time and directly, without having to deal with a window and
|
/// time and directly, without having to deal with a window and
|
||||||
/// its events. Compared to the TouchBegan, TouchMoved
|
/// its events. Compared to the TouchBegan, TouchMoved
|
||||||
/// and TouchEnded events, sf::Touch can retrieve the
|
/// and TouchEnded events, sf::Touch can retrieve the
|
||||||
|
@ -58,9 +58,8 @@ using VulkanFunctionPointer = void (*)();
|
|||||||
/// \brief Vulkan helper functions
|
/// \brief Vulkan helper functions
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
class SFML_WINDOW_API Vulkan
|
namespace Vulkan
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Tell whether or not the system supports Vulkan
|
/// \brief Tell whether or not the system supports Vulkan
|
||||||
///
|
///
|
||||||
@ -77,7 +76,7 @@ public:
|
|||||||
/// \return True if Vulkan is supported, false otherwise
|
/// \return True if Vulkan is supported, false otherwise
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static bool isAvailable(bool requireGraphics = true);
|
SFML_WINDOW_API bool isAvailable(bool requireGraphics = true);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get the address of a Vulkan function
|
/// \brief Get the address of a Vulkan function
|
||||||
@ -87,7 +86,7 @@ public:
|
|||||||
/// \return Address of the Vulkan function, 0 on failure
|
/// \return Address of the Vulkan function, 0 on failure
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static VulkanFunctionPointer getFunction(const char* name);
|
SFML_WINDOW_API VulkanFunctionPointer getFunction(const char* name);
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \brief Get Vulkan instance extensions required for graphics
|
/// \brief Get Vulkan instance extensions required for graphics
|
||||||
@ -95,16 +94,17 @@ public:
|
|||||||
/// \return Vulkan instance extensions required for graphics
|
/// \return Vulkan instance extensions required for graphics
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
static const std::vector<const char*>& getGraphicsRequiredInstanceExtensions();
|
SFML_WINDOW_API const std::vector<const char*>& getGraphicsRequiredInstanceExtensions();
|
||||||
};
|
} // namespace Vulkan
|
||||||
|
|
||||||
} // namespace sf
|
} // namespace sf
|
||||||
|
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
/// \class sf::Vulkan
|
/// \namespace sf::Vulkan
|
||||||
/// \ingroup window
|
/// \ingroup window
|
||||||
///
|
///
|
||||||
///
|
/// This namespace contains functions to help you use SFML
|
||||||
|
/// for windowing and write your own Vulkan code for graphics
|
||||||
///
|
///
|
||||||
////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////
|
||||||
|
@ -7,7 +7,7 @@ int main()
|
|||||||
{
|
{
|
||||||
// Audio
|
// Audio
|
||||||
[[maybe_unused]] sf::InputSoundFile inputSoundFile;
|
[[maybe_unused]] sf::InputSoundFile inputSoundFile;
|
||||||
[[maybe_unused]] sf::Listener listener;
|
[[maybe_unused]] sf::SoundBufferRecorder soundBufferRecorder;
|
||||||
[[maybe_unused]] sf::Music music;
|
[[maybe_unused]] sf::Music music;
|
||||||
[[maybe_unused]] sf::Sound sound;
|
[[maybe_unused]] sf::Sound sound;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user