Each module now has its own export macro, which solves the "unresolved symbol" error with sf::Time::Zero

This commit is contained in:
Laurent Gomila 2012-01-21 10:34:17 +01:00
parent bb7cf47d69
commit 906a62df0f
69 changed files with 450 additions and 180 deletions

View File

@ -102,6 +102,11 @@ macro(sfml_add_library target)
# create the target # create the target
add_library(${target} ${THIS_SOURCES}) add_library(${target} ${THIS_SOURCES})
# define the export symbol of the module
string(REPLACE "-" "_" NAME_UPPER "${target}")
string(TOUPPER "${NAME_UPPER}" NAME_UPPER)
set_target_properties(${target} PROPERTIES DEFINE_SYMBOL ${NAME_UPPER}_EXPORTS)
# adjust the output file prefix/suffix to match our conventions # adjust the output file prefix/suffix to match our conventions
if(BUILD_SHARED_LIBS) if(BUILD_SHARED_LIBS)
if(WINDOWS) if(WINDOWS)

View File

@ -0,0 +1,48 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////
#ifndef SFML_AUDIO_EXPORT_HPP
#define SFML_AUDIO_EXPORT_HPP
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(SFML_AUDIO_EXPORTS)
#define SFML_AUDIO_API SFML_API_EXPORT
#else
#define SFML_AUDIO_API SFML_API_IMPORT
#endif
#endif // SFML_AUDIO_EXPORT_HPP

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Audio/Export.hpp>
#include <SFML/System/Vector3.hpp> #include <SFML/System/Vector3.hpp>
@ -39,7 +39,7 @@ namespace sf
/// from where all the sounds are heard /// from where all the sounds are heard
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Listener class SFML_AUDIO_API Listener
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp>
#include <SFML/Audio/SoundStream.hpp> #include <SFML/Audio/SoundStream.hpp>
#include <SFML/System/Mutex.hpp> #include <SFML/System/Mutex.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
@ -48,7 +49,7 @@ class InputStream;
/// \brief Streamed music played from an audio file /// \brief Streamed music played from an audio file
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Music : public SoundStream class SFML_AUDIO_API Music : public SoundStream
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp>
#include <SFML/Audio/SoundSource.hpp> #include <SFML/Audio/SoundSource.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
#include <cstdlib> #include <cstdlib>
@ -41,7 +42,7 @@ class SoundBuffer;
/// \brief Regular sound that can be played in the audio environment /// \brief Regular sound that can be played in the audio environment
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Sound : public SoundSource class SFML_AUDIO_API Sound : public SoundSource
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Audio/Export.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
#include <string> #include <string>
#include <vector> #include <vector>
@ -49,7 +49,7 @@ class InputStream;
/// \brief Storage for audio samples defining a sound /// \brief Storage for audio samples defining a sound
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API SoundBuffer class SFML_AUDIO_API SoundBuffer
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp>
#include <SFML/Audio/SoundBuffer.hpp> #include <SFML/Audio/SoundBuffer.hpp>
#include <SFML/Audio/SoundRecorder.hpp> #include <SFML/Audio/SoundRecorder.hpp>
#include <vector> #include <vector>
@ -40,7 +41,7 @@ namespace sf
/// audio data into a sound buffer /// audio data into a sound buffer
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API SoundBufferRecorder : public SoundRecorder class SFML_AUDIO_API SoundBufferRecorder : public SoundRecorder
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp>
#include <SFML/System/Thread.hpp> #include <SFML/System/Thread.hpp>
#include <vector> #include <vector>
@ -38,7 +39,7 @@ namespace sf
/// \brief Abstract base class for capturing sound data /// \brief Abstract base class for capturing sound data
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API SoundRecorder class SFML_AUDIO_API SoundRecorder
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Audio/Export.hpp>
#include <SFML/System/Vector3.hpp> #include <SFML/System/Vector3.hpp>
@ -38,7 +38,7 @@ namespace sf
/// \brief Base class defining a sound's properties /// \brief Base class defining a sound's properties
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API SoundSource class SFML_AUDIO_API SoundSource
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Audio/Export.hpp>
#include <SFML/Audio/SoundSource.hpp> #include <SFML/Audio/SoundSource.hpp>
#include <SFML/System/Thread.hpp> #include <SFML/System/Thread.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
@ -40,7 +41,7 @@ namespace sf
/// \brief Abstract base class for streamed audio sources /// \brief Abstract base class for streamed audio sources
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API SoundStream : public SoundSource class SFML_AUDIO_API SoundStream : public SoundSource
{ {
public : public :

View File

@ -68,7 +68,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Identify the endianess // Identify the endianness
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#if defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || (defined(__MIPS__) && defined(__MISPEB__)) || \ #if defined(__m68k__) || defined(mc68000) || defined(_M_M68K) || (defined(__MIPS__) && defined(__MISPEB__)) || \
defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || defined(__sparc__) || defined(__hppa__) defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) || defined(__sparc__) || defined(__hppa__)
@ -95,27 +95,17 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Define portable import / export macros // Define helpers to create portable import / export macros for each module
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#if !defined(SFML_STATIC) #if !defined(SFML_STATIC)
#if defined(SFML_SYSTEM_WINDOWS) #if defined(SFML_SYSTEM_WINDOWS)
#ifdef SFML_EXPORTS // Windows compilers need specific (and different) keywords for export and import
#define SFML_API_EXPORT __declspec(dllexport)
#define SFML_API_IMPORT __declspec(dllimport)
// From DLL side, we must export // For Visual C++ compilers, we also need to turn off this annoying C4251 warning
#define SFML_API __declspec(dllexport)
#else
// From client application side, we must import
#define SFML_API __declspec(dllimport)
#endif
// For Visual C++ compilers, we also need to turn off this annoying C4251 warning.
// You can read lots ot different things about it, but the point is the code will
// just work fine, and so the simplest way to get rid of this warning is to disable it
#ifdef _MSC_VER #ifdef _MSC_VER
#pragma warning(disable : 4251) #pragma warning(disable : 4251)
@ -126,13 +116,16 @@
#if __GNUC__ >= 4 #if __GNUC__ >= 4
// gcc 4 has special keywords for showing/hidding symbols // GCC 4 has special keywords for showing/hidding symbols,
#define SFML_API __attribute__ ((__visibility__ ("default"))) // the same keyword is used for both importing and exporting
#define SFML_API_EXPORT __attribute__ ((__visibility__ ("default")))
#define SFML_API_IMPORT __attribute__ ((__visibility__ ("default")))
#else #else
// gcc < 4 has no mechanism to explicitely hide symbols, everything's exported // GCC < 4 has no mechanism to explicitely hide symbols, everything's exported
#define SFML_API #define SFML_API_EXPORT
#define SFML_API_IMPORT
#endif #endif
@ -140,8 +133,9 @@
#else #else
// Static build doesn't need these export macros // Static build doesn't need import/export macros
#define SFML_API #define SFML_API_EXPORT
#define SFML_API_IMPORT
#endif #endif

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Shape.hpp> #include <SFML/Graphics/Shape.hpp>
@ -37,7 +38,7 @@ namespace sf
/// \brief Specialized shape representing a circle /// \brief Specialized shape representing a circle
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API CircleShape : public Shape class SFML_GRAPHICS_API CircleShape : public Shape
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Graphics/Export.hpp>
namespace sf namespace sf
@ -37,7 +37,7 @@ namespace sf
/// \brief Utility class for manpulating RGBA colors /// \brief Utility class for manpulating RGBA colors
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Color class SFML_GRAPHICS_API Color
{ {
public : public :
@ -95,7 +95,7 @@ public :
/// \return True if colors are equal, false if they are different /// \return True if colors are equal, false if they are different
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator ==(const Color& left, const Color& right); SFML_GRAPHICS_API bool operator ==(const Color& left, const Color& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Color /// \relates Color
@ -109,7 +109,7 @@ SFML_API bool operator ==(const Color& left, const Color& right);
/// \return True if colors are different, false if they are equal /// \return True if colors are different, false if they are equal
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator !=(const Color& left, const Color& right); SFML_GRAPHICS_API bool operator !=(const Color& left, const Color& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Color /// \relates Color
@ -124,7 +124,7 @@ SFML_API bool operator !=(const Color& left, const Color& right);
/// \return Result of \a left + \a right /// \return Result of \a left + \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Color operator +(const Color& left, const Color& right); SFML_GRAPHICS_API Color operator +(const Color& left, const Color& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Color /// \relates Color
@ -141,7 +141,7 @@ SFML_API Color operator +(const Color& left, const Color& right);
/// \return Result of \a left * \a right /// \return Result of \a left * \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Color operator *(const Color& left, const Color& right); SFML_GRAPHICS_API Color operator *(const Color& left, const Color& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Color /// \relates Color
@ -157,7 +157,7 @@ SFML_API Color operator *(const Color& left, const Color& right);
/// \return Reference to \a left /// \return Reference to \a left
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Color& operator +=(Color& left, const Color& right); SFML_GRAPHICS_API Color& operator +=(Color& left, const Color& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Color /// \relates Color
@ -175,7 +175,7 @@ SFML_API Color& operator +=(Color& left, const Color& right);
/// \return Reference to \a left /// \return Reference to \a left
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Color& operator *=(Color& left, const Color& right); SFML_GRAPHICS_API Color& operator *=(Color& left, const Color& right);
} // namespace sf } // namespace sf

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Shape.hpp> #include <SFML/Graphics/Shape.hpp>
#include <vector> #include <vector>
@ -38,7 +39,7 @@ namespace sf
/// \brief Specialized shape representing a convex polygon /// \brief Specialized shape representing a convex polygon
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API ConvexShape : public Shape class SFML_GRAPHICS_API ConvexShape : public Shape
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/RenderStates.hpp> #include <SFML/Graphics/RenderStates.hpp>
@ -41,7 +41,7 @@ class RenderTarget;
/// to a render target /// to a render target
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Drawable class SFML_GRAPHICS_API Drawable
{ {
public : public :

View File

@ -0,0 +1,48 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////
#ifndef SFML_GRAPHICS_EXPORT_HPP
#define SFML_GRAPHICS_EXPORT_HPP
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(SFML_GRAPHICS_EXPORTS)
#define SFML_GRAPHICS_API SFML_API_EXPORT
#else
#define SFML_GRAPHICS_API SFML_API_IMPORT
#endif
#endif // SFML_GRAPHICS_EXPORT_HPP

View File

@ -28,11 +28,12 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/Vector2.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/System/String.hpp>
#include <SFML/Graphics/Glyph.hpp> #include <SFML/Graphics/Glyph.hpp>
#include <SFML/Graphics/Texture.hpp> #include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <SFML/System/Vector2.hpp>
#include <SFML/System/String.hpp>
#include <map> #include <map>
#include <string> #include <string>
#include <vector> #include <vector>
@ -46,7 +47,7 @@ class InputStream;
/// \brief Class for loading and manipulating character fonts /// \brief Class for loading and manipulating character fonts
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Font class SFML_GRAPHICS_API Font
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
@ -38,7 +38,7 @@ namespace sf
/// \brief Structure describing a glyph /// \brief Structure describing a glyph
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Glyph class SFML_GRAPHICS_API Glyph
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Color.hpp> #include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <string> #include <string>
@ -42,7 +43,7 @@ class InputStream;
/// \brief Class for loading, manipulating and saving images /// \brief Class for loading, manipulating and saving images
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Image class SFML_GRAPHICS_API Image
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Shape.hpp> #include <SFML/Graphics/Shape.hpp>
@ -37,7 +38,7 @@ namespace sf
/// \brief Specialized shape representing a rectangle /// \brief Specialized shape representing a rectangle
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API RectangleShape : public Shape class SFML_GRAPHICS_API RectangleShape : public Shape
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/BlendMode.hpp> #include <SFML/Graphics/BlendMode.hpp>
#include <SFML/Graphics/Transform.hpp> #include <SFML/Graphics/Transform.hpp>
@ -41,7 +42,7 @@ class Texture;
/// \brief Define the states used for drawing to a RenderTarget /// \brief Define the states used for drawing to a RenderTarget
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API RenderStates class SFML_GRAPHICS_API RenderStates
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/NonCopyable.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Color.hpp> #include <SFML/Graphics/Color.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/View.hpp> #include <SFML/Graphics/View.hpp>
@ -37,6 +37,7 @@
#include <SFML/Graphics/RenderStates.hpp> #include <SFML/Graphics/RenderStates.hpp>
#include <SFML/Graphics/PrimitiveType.hpp> #include <SFML/Graphics/PrimitiveType.hpp>
#include <SFML/Graphics/Vertex.hpp> #include <SFML/Graphics/Vertex.hpp>
#include <SFML/System/NonCopyable.hpp>
namespace sf namespace sf
@ -47,7 +48,7 @@ class Drawable;
/// \brief Base class for all render targets (window, texture, ...) /// \brief Base class for all render targets (window, texture, ...)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API RenderTarget : NonCopyable class SFML_GRAPHICS_API RenderTarget : NonCopyable
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Texture.hpp> #include <SFML/Graphics/Texture.hpp>
#include <SFML/Graphics/RenderTarget.hpp> #include <SFML/Graphics/RenderTarget.hpp>
@ -43,7 +44,7 @@ namespace priv
/// \brief Target for off-screen 2D rendering into an texture /// \brief Target for off-screen 2D rendering into an texture
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API RenderTexture : public RenderTarget class SFML_GRAPHICS_API RenderTexture : public RenderTarget
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/RenderTarget.hpp> #include <SFML/Graphics/RenderTarget.hpp>
#include <SFML/Graphics/Image.hpp> #include <SFML/Graphics/Image.hpp>
#include <SFML/Window/Window.hpp> #include <SFML/Window/Window.hpp>
@ -40,7 +41,7 @@ namespace sf
/// \brief Window that can serve as a target for 2D drawing /// \brief Window that can serve as a target for 2D drawing
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API RenderWindow : public Window, public RenderTarget class SFML_GRAPHICS_API RenderWindow : public Window, public RenderTarget
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Transform.hpp> #include <SFML/Graphics/Transform.hpp>
#include <SFML/Graphics/Color.hpp> #include <SFML/Graphics/Color.hpp>
#include <SFML/Window/GlResource.hpp> #include <SFML/Window/GlResource.hpp>
@ -48,7 +48,7 @@ class Texture;
/// \brief Shader class (vertex and fragment) /// \brief Shader class (vertex and fragment)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Shader : GlResource, NonCopyable class SFML_GRAPHICS_API Shader : GlResource, NonCopyable
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Drawable.hpp> #include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Transformable.hpp> #include <SFML/Graphics/Transformable.hpp>
#include <SFML/Graphics/VertexArray.hpp> #include <SFML/Graphics/VertexArray.hpp>
@ -40,7 +41,7 @@ namespace sf
/// \brief Base class for textured shapes with outline /// \brief Base class for textured shapes with outline
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Shape : public Drawable, public Transformable class SFML_GRAPHICS_API Shape : public Drawable, public Transformable
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Drawable.hpp> #include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Transformable.hpp> #include <SFML/Graphics/Transformable.hpp>
#include <SFML/Graphics/Vertex.hpp> #include <SFML/Graphics/Vertex.hpp>
@ -43,7 +44,7 @@ class Texture;
/// own transformations, color, etc. /// own transformations, color, etc.
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Sprite : public Drawable, public Transformable class SFML_GRAPHICS_API Sprite : public Drawable, public Transformable
{ {
public : public :

View File

@ -28,12 +28,13 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/String.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Drawable.hpp> #include <SFML/Graphics/Drawable.hpp>
#include <SFML/Graphics/Transformable.hpp> #include <SFML/Graphics/Transformable.hpp>
#include <SFML/Graphics/Font.hpp> #include <SFML/Graphics/Font.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/VertexArray.hpp> #include <SFML/Graphics/VertexArray.hpp>
#include <SFML/System/String.hpp>
#include <string> #include <string>
#include <vector> #include <vector>
@ -44,7 +45,7 @@ namespace sf
/// \brief Graphical text that can be drawn to a render target /// \brief Graphical text that can be drawn to a render target
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Text : public Drawable, public Transformable class SFML_GRAPHICS_API Text : public Drawable, public Transformable
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Image.hpp> #include <SFML/Graphics/Image.hpp>
#include <SFML/Window/GlResource.hpp> #include <SFML/Window/GlResource.hpp>
@ -43,7 +44,7 @@ class InputStream;
/// \brief Image living on the graphics card that can be used for drawing /// \brief Image living on the graphics card that can be used for drawing
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Texture : GlResource class SFML_GRAPHICS_API Texture : GlResource
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <SFML/System/Vector2.hpp> #include <SFML/System/Vector2.hpp>
@ -39,7 +39,7 @@ namespace sf
/// \brief Define a 3x3 transform matrix /// \brief Define a 3x3 transform matrix
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Transform class SFML_GRAPHICS_API Transform
{ {
public : public :
@ -373,7 +373,7 @@ private:
/// \return New combined transform /// \return New combined transform
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Transform operator *(const Transform& left, const Transform& right); SFML_GRAPHICS_API Transform operator *(const Transform& left, const Transform& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates sf::Transform /// \relates sf::Transform
@ -387,7 +387,7 @@ SFML_API Transform operator *(const Transform& left, const Transform& right);
/// \return The combined transform /// \return The combined transform
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Transform& operator *=(Transform& left, const Transform& right); SFML_GRAPHICS_API Transform& operator *=(Transform& left, const Transform& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates sf::Transform /// \relates sf::Transform
@ -401,7 +401,7 @@ SFML_API Transform& operator *=(Transform& left, const Transform& right);
/// \return New transformed point /// \return New transformed point
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Vector2f operator *(const Transform& left, const Vector2f& right); SFML_GRAPHICS_API Vector2f operator *(const Transform& left, const Vector2f& right);
} // namespace sf } // namespace sf

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Transform.hpp> #include <SFML/Graphics/Transform.hpp>
@ -37,7 +38,7 @@ namespace sf
/// \brief Decomposed transform defined by a position, a rotation and a scale /// \brief Decomposed transform defined by a position, a rotation and a scale
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Transformable class SFML_GRAPHICS_API Transformable
{ {
public : public :

View File

@ -28,8 +28,9 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/Vector2.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Color.hpp> #include <SFML/Graphics/Color.hpp>
#include <SFML/System/Vector2.hpp>
namespace sf namespace sf
@ -38,7 +39,7 @@ namespace sf
/// \brief Define a point with color and texture coordinates /// \brief Define a point with color and texture coordinates
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Vertex class SFML_GRAPHICS_API Vertex
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Vertex.hpp> #include <SFML/Graphics/Vertex.hpp>
#include <SFML/Graphics/PrimitiveType.hpp> #include <SFML/Graphics/PrimitiveType.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
@ -41,7 +42,7 @@ namespace sf
/// \brief Define a set of one or more 2D primitives /// \brief Define a set of one or more 2D primitives
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API VertexArray : public Drawable class SFML_GRAPHICS_API VertexArray : public Drawable
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Graphics/Export.hpp>
#include <SFML/Graphics/Rect.hpp> #include <SFML/Graphics/Rect.hpp>
#include <SFML/Graphics/Transform.hpp> #include <SFML/Graphics/Transform.hpp>
#include <SFML/System/Vector2.hpp> #include <SFML/System/Vector2.hpp>
@ -40,7 +40,7 @@ namespace sf
/// \brief 2D camera that defines what region is shown on screen /// \brief 2D camera that defines what region is shown on screen
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API View class SFML_GRAPHICS_API View
{ {
public : public :

View File

@ -0,0 +1,48 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////
#ifndef SFML_NETWORK_EXPORT_HPP
#define SFML_NETWORK_EXPORT_HPP
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(SFML_NETWORK_EXPORTS)
#define SFML_NETWORK_API SFML_API_EXPORT
#else
#define SFML_NETWORK_API SFML_API_IMPORT
#endif
#endif // SFML_NETWORK_EXPORT_HPP

View File

@ -28,9 +28,10 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Network/Export.hpp>
#include <SFML/Network/TcpSocket.hpp>
#include <SFML/System/NonCopyable.hpp> #include <SFML/System/NonCopyable.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
#include <SFML/Network/TcpSocket.hpp>
#include <string> #include <string>
#include <vector> #include <vector>
@ -43,7 +44,7 @@ class IpAddress;
/// \brief A FTP client /// \brief A FTP client
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Ftp : NonCopyable class SFML_NETWORK_API Ftp : NonCopyable
{ {
public : public :
@ -62,7 +63,7 @@ public :
/// \brief Define a FTP response /// \brief Define a FTP response
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Response class SFML_NETWORK_API Response
{ {
public : public :
@ -184,7 +185,7 @@ public :
/// \brief Specialization of FTP response returning a directory /// \brief Specialization of FTP response returning a directory
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API DirectoryResponse : public Response class SFML_NETWORK_API DirectoryResponse : public Response
{ {
public : public :
@ -217,7 +218,7 @@ public :
/// \brief Specialization of FTP response returning a /// \brief Specialization of FTP response returning a
/// filename lisiting /// filename lisiting
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API ListingResponse : public Response class SFML_NETWORK_API ListingResponse : public Response
{ {
public : public :

View File

@ -28,10 +28,11 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/NonCopyable.hpp> #include <SFML/Network/Export.hpp>
#include <SFML/System/Time.hpp>
#include <SFML/Network/IpAddress.hpp> #include <SFML/Network/IpAddress.hpp>
#include <SFML/Network/TcpSocket.hpp> #include <SFML/Network/TcpSocket.hpp>
#include <SFML/System/NonCopyable.hpp>
#include <SFML/System/Time.hpp>
#include <map> #include <map>
#include <string> #include <string>
@ -42,7 +43,7 @@ namespace sf
/// \brief A HTTP client /// \brief A HTTP client
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Http : NonCopyable class SFML_NETWORK_API Http : NonCopyable
{ {
public : public :
@ -50,7 +51,7 @@ public :
/// \brief Define a HTTP request /// \brief Define a HTTP request
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Request class SFML_NETWORK_API Request
{ {
public : public :
@ -187,7 +188,7 @@ public :
/// \brief Define a HTTP response /// \brief Define a HTTP response
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Response class SFML_NETWORK_API Response
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Network/Export.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
#include <istream> #include <istream>
#include <ostream> #include <ostream>
@ -41,7 +41,7 @@ namespace sf
/// \brief Encapsulate an IPv4 network address /// \brief Encapsulate an IPv4 network address
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API IpAddress class SFML_NETWORK_API IpAddress
{ {
public : public :
@ -201,7 +201,7 @@ private :
/// \return True if both addresses are equal /// \return True if both addresses are equal
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator ==(const IpAddress& left, const IpAddress& right); SFML_NETWORK_API bool operator ==(const IpAddress& left, const IpAddress& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Overload of != operator to compare two IP addresses /// \brief Overload of != operator to compare two IP addresses
@ -212,7 +212,7 @@ SFML_API bool operator ==(const IpAddress& left, const IpAddress& right);
/// \return True if both addresses are different /// \return True if both addresses are different
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator !=(const IpAddress& left, const IpAddress& right); SFML_NETWORK_API bool operator !=(const IpAddress& left, const IpAddress& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Overload of < operator to compare two IP addresses /// \brief Overload of < operator to compare two IP addresses
@ -223,7 +223,7 @@ SFML_API bool operator !=(const IpAddress& left, const IpAddress& right);
/// \return True if \a left is lesser than \a right /// \return True if \a left is lesser than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator <(const IpAddress& left, const IpAddress& right); SFML_NETWORK_API bool operator <(const IpAddress& left, const IpAddress& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Overload of > operator to compare two IP addresses /// \brief Overload of > operator to compare two IP addresses
@ -234,7 +234,7 @@ SFML_API bool operator <(const IpAddress& left, const IpAddress& right);
/// \return True if \a left is greater than \a right /// \return True if \a left is greater than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator >(const IpAddress& left, const IpAddress& right); SFML_NETWORK_API bool operator >(const IpAddress& left, const IpAddress& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Overload of <= operator to compare two IP addresses /// \brief Overload of <= operator to compare two IP addresses
@ -245,7 +245,7 @@ SFML_API bool operator >(const IpAddress& left, const IpAddress& right);
/// \return True if \a left is lesser or equal than \a right /// \return True if \a left is lesser or equal than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator <=(const IpAddress& left, const IpAddress& right); SFML_NETWORK_API bool operator <=(const IpAddress& left, const IpAddress& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Overload of >= operator to compare two IP addresses /// \brief Overload of >= operator to compare two IP addresses
@ -256,7 +256,7 @@ SFML_API bool operator <=(const IpAddress& left, const IpAddress& right);
/// \return True if \a left is greater or equal than \a right /// \return True if \a left is greater or equal than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator >=(const IpAddress& left, const IpAddress& right); SFML_NETWORK_API bool operator >=(const IpAddress& left, const IpAddress& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Overload of >> operator to extract an IP address from an input stream /// \brief Overload of >> operator to extract an IP address from an input stream
@ -267,7 +267,7 @@ SFML_API bool operator >=(const IpAddress& left, const IpAddress& right);
/// \return Reference to the input stream /// \return Reference to the input stream
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API std::istream& operator >>(std::istream& stream, IpAddress& address); SFML_NETWORK_API std::istream& operator >>(std::istream& stream, IpAddress& address);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Overload of << operator to print an IP address to an output stream /// \brief Overload of << operator to print an IP address to an output stream
@ -278,7 +278,7 @@ SFML_API std::istream& operator >>(std::istream& stream, IpAddress& address);
/// \return Reference to the output stream /// \return Reference to the output stream
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API std::ostream& operator <<(std::ostream& stream, const IpAddress& address); SFML_NETWORK_API std::ostream& operator <<(std::ostream& stream, const IpAddress& address);
} // namespace sf } // namespace sf

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Network/Export.hpp>
#include <string> #include <string>
#include <vector> #include <vector>
@ -44,7 +44,7 @@ class UdpSocket;
/// over the network /// over the network
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Packet class SFML_NETWORK_API Packet
{ {
// A bool-like type that cannot be converted to integer or pointer types // A bool-like type that cannot be converted to integer or pointer types
typedef bool (Packet::*BoolType)(std::size_t); typedef bool (Packet::*BoolType)(std::size_t);

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Network/Export.hpp>
#include <SFML/Network/SocketHandle.hpp> #include <SFML/Network/SocketHandle.hpp>
#include <SFML/System/NonCopyable.hpp> #include <SFML/System/NonCopyable.hpp>
#include <vector> #include <vector>
@ -41,7 +42,7 @@ class SocketSelector;
/// \brief Base class for all the socket types /// \brief Base class for all the socket types
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Socket : NonCopyable class SFML_NETWORK_API Socket : NonCopyable
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Network/Export.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
@ -40,7 +40,7 @@ class Socket;
/// \brief Multiplexer that allows to read from multiple sockets /// \brief Multiplexer that allows to read from multiple sockets
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API SocketSelector class SFML_NETWORK_API SocketSelector
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Network/Export.hpp>
#include <SFML/Network/Socket.hpp> #include <SFML/Network/Socket.hpp>
@ -39,7 +40,7 @@ class TcpSocket;
/// \brief Socket that listens to new TCP connections /// \brief Socket that listens to new TCP connections
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API TcpListener : public Socket class SFML_NETWORK_API TcpListener : public Socket
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Network/Export.hpp>
#include <SFML/Network/Socket.hpp> #include <SFML/Network/Socket.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
@ -42,7 +43,7 @@ class Packet;
/// \brief Specialized socket using the TCP protocol /// \brief Specialized socket using the TCP protocol
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API TcpSocket : public Socket class SFML_NETWORK_API TcpSocket : public Socket
{ {
public : public :

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Network/Export.hpp>
#include <SFML/Network/Socket.hpp> #include <SFML/Network/Socket.hpp>
#include <vector> #include <vector>
@ -41,7 +42,7 @@ class Packet;
/// \brief Specialized socket using the UDP protocol /// \brief Specialized socket using the UDP protocol
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API UdpSocket : public Socket class SFML_NETWORK_API UdpSocket : public Socket
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/System/Export.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
@ -38,7 +38,7 @@ namespace sf
/// \brief Utility class that measures the elapsed time /// \brief Utility class that measures the elapsed time
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Clock class SFML_SYSTEM_API Clock
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/System/Export.hpp>
#include <ostream> #include <ostream>
@ -38,7 +38,7 @@ namespace sf
/// \brief Standard stream used by SFML to output warnings and errors /// \brief Standard stream used by SFML to output warnings and errors
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API std::ostream& Err(); SFML_SYSTEM_API std::ostream& Err();
} // namespace sf } // namespace sf

View File

@ -0,0 +1,48 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////
#ifndef SFML_SYSTEM_EXPORT_HPP
#define SFML_SYSTEM_EXPORT_HPP
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(SFML_SYSTEM_EXPORTS)
#define SFML_SYSTEM_API SFML_API_EXPORT
#else
#define SFML_SYSTEM_API SFML_API_IMPORT
#endif
#endif // SFML_SYSTEM_EXPORT_HPP

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/System/Export.hpp>
#include <SFML/System/NonCopyable.hpp> #include <SFML/System/NonCopyable.hpp>
@ -39,7 +40,7 @@ class Mutex;
/// \brief Automatic wrapper for locking and unlocking mutexes /// \brief Automatic wrapper for locking and unlocking mutexes
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Lock : NonCopyable class SFML_SYSTEM_API Lock : NonCopyable
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/System/Export.hpp>
#include <SFML/System/NonCopyable.hpp> #include <SFML/System/NonCopyable.hpp>
@ -44,7 +44,7 @@ namespace priv
/// from multiple threads /// from multiple threads
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Mutex : NonCopyable class SFML_SYSTEM_API Mutex : NonCopyable
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/System/Export.hpp>
namespace sf namespace sf
@ -38,7 +38,7 @@ namespace sf
/// class non-copyable /// class non-copyable
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API NonCopyable class SFML_SYSTEM_API NonCopyable
{ {
protected : protected :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/System/Export.hpp>
#include <SFML/System/Time.hpp> #include <SFML/System/Time.hpp>
@ -44,7 +44,7 @@ namespace sf
/// \param duration Time to sleep /// \param duration Time to sleep
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
void SFML_API Sleep(Time duration); void SFML_SYSTEM_API Sleep(Time duration);
} // namespace sf } // namespace sf

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/System/Export.hpp>
#include <locale> #include <locale>
#include <string> #include <string>
@ -40,7 +40,7 @@ namespace sf
/// conversions between types and encodings /// conversions between types and encodings
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API String class SFML_SYSTEM_API String
{ {
public : public :
@ -394,8 +394,8 @@ public :
private : private :
friend SFML_API bool operator ==(const String& left, const String& right); friend SFML_SYSTEM_API bool operator ==(const String& left, const String& right);
friend SFML_API bool operator <(const String& left, const String& right); friend SFML_SYSTEM_API bool operator <(const String& left, const String& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Member data // Member data
@ -413,7 +413,7 @@ private :
/// \return True if both strings are equal /// \return True if both strings are equal
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator ==(const String& left, const String& right); SFML_SYSTEM_API bool operator ==(const String& left, const String& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates String /// \relates String
@ -425,7 +425,7 @@ SFML_API bool operator ==(const String& left, const String& right);
/// \return True if both strings are different /// \return True if both strings are different
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator !=(const String& left, const String& right); SFML_SYSTEM_API bool operator !=(const String& left, const String& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates String /// \relates String
@ -437,7 +437,7 @@ SFML_API bool operator !=(const String& left, const String& right);
/// \return True if \a left is alphabetically lesser than \a right /// \return True if \a left is alphabetically lesser than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator <(const String& left, const String& right); SFML_SYSTEM_API bool operator <(const String& left, const String& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates String /// \relates String
@ -449,7 +449,7 @@ SFML_API bool operator <(const String& left, const String& right);
/// \return True if \a left is alphabetically greater than \a right /// \return True if \a left is alphabetically greater than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator >(const String& left, const String& right); SFML_SYSTEM_API bool operator >(const String& left, const String& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates String /// \relates String
@ -461,7 +461,7 @@ SFML_API bool operator >(const String& left, const String& right);
/// \return True if \a left is alphabetically lesser or equal than \a right /// \return True if \a left is alphabetically lesser or equal than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator <=(const String& left, const String& right); SFML_SYSTEM_API bool operator <=(const String& left, const String& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates String /// \relates String
@ -473,7 +473,7 @@ SFML_API bool operator <=(const String& left, const String& right);
/// \return True if \a left is alphabetically greater or equal than \a right /// \return True if \a left is alphabetically greater or equal than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator >=(const String& left, const String& right); SFML_SYSTEM_API bool operator >=(const String& left, const String& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates String /// \relates String
@ -485,7 +485,7 @@ SFML_API bool operator >=(const String& left, const String& right);
/// \return Concatenated string /// \return Concatenated string
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API String operator +(const String& left, const String& right); SFML_SYSTEM_API String operator +(const String& left, const String& right);
} // namespace sf } // namespace sf

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/System/Export.hpp>
#include <SFML/System/NonCopyable.hpp> #include <SFML/System/NonCopyable.hpp>
#include <cstdlib> #include <cstdlib>
@ -45,7 +45,7 @@ namespace priv
/// \brief Utility class to manipulate threads /// \brief Utility class to manipulate threads
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Thread : NonCopyable class SFML_SYSTEM_API Thread : NonCopyable
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/System/Export.hpp>
#include <SFML/System/NonCopyable.hpp> #include <SFML/System/NonCopyable.hpp>
#include <cstdlib> #include <cstdlib>
@ -44,7 +44,7 @@ namespace priv
/// \brief Defines variables with thread-local storage /// \brief Defines variables with thread-local storage
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API ThreadLocal : NonCopyable class SFML_SYSTEM_API ThreadLocal : NonCopyable
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/System/Export.hpp>
namespace sf namespace sf
@ -37,7 +37,7 @@ namespace sf
/// \brief Represents a time value /// \brief Represents a time value
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Time class SFML_SYSTEM_API Time
{ {
public : public :
@ -86,9 +86,9 @@ public :
private : private :
friend SFML_API Time Seconds(float); friend SFML_SYSTEM_API Time Seconds(float);
friend SFML_API Time Milliseconds(Int32); friend SFML_SYSTEM_API Time Milliseconds(Int32);
friend SFML_API Time Microseconds(Int64); friend SFML_SYSTEM_API Time Microseconds(Int64);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \brief Construct from a number of microseconds /// \brief Construct from a number of microseconds
@ -120,7 +120,7 @@ private :
/// \see Milliseconds, Microseconds /// \see Milliseconds, Microseconds
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time Seconds(float amount); SFML_SYSTEM_API Time Seconds(float amount);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -133,7 +133,7 @@ SFML_API Time Seconds(float amount);
/// \see Seconds, Microseconds /// \see Seconds, Microseconds
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time Milliseconds(Int32 amount); SFML_SYSTEM_API Time Milliseconds(Int32 amount);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -146,7 +146,7 @@ SFML_API Time Milliseconds(Int32 amount);
/// \see Seconds, Milliseconds /// \see Seconds, Milliseconds
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time Microseconds(Int64 amount); SFML_SYSTEM_API Time Microseconds(Int64 amount);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -158,7 +158,7 @@ SFML_API Time Microseconds(Int64 amount);
/// \return True if both time values are equal /// \return True if both time values are equal
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator ==(const Time& left, const Time& right); SFML_SYSTEM_API bool operator ==(const Time& left, const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -170,7 +170,7 @@ SFML_API bool operator ==(const Time& left, const Time& right);
/// \return True if both time values are different /// \return True if both time values are different
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator !=(const Time& left, const Time& right); SFML_SYSTEM_API bool operator !=(const Time& left, const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -182,7 +182,7 @@ SFML_API bool operator !=(const Time& left, const Time& right);
/// \return True if \a left is lesser than \a right /// \return True if \a left is lesser than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator <(const Time& left, const Time& right); SFML_SYSTEM_API bool operator <(const Time& left, const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -194,7 +194,7 @@ SFML_API bool operator <(const Time& left, const Time& right);
/// \return True if \a left is greater than \a right /// \return True if \a left is greater than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator >(const Time& left, const Time& right); SFML_SYSTEM_API bool operator >(const Time& left, const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -206,7 +206,7 @@ SFML_API bool operator >(const Time& left, const Time& right);
/// \return True if \a left is lesser or equal than \a right /// \return True if \a left is lesser or equal than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator <=(const Time& left, const Time& right); SFML_SYSTEM_API bool operator <=(const Time& left, const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -218,7 +218,7 @@ SFML_API bool operator <=(const Time& left, const Time& right);
/// \return True if \a left is greater or equal than \a right /// \return True if \a left is greater or equal than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator >=(const Time& left, const Time& right); SFML_SYSTEM_API bool operator >=(const Time& left, const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -229,7 +229,7 @@ SFML_API bool operator >=(const Time& left, const Time& right);
/// \return Opposite of the time value /// \return Opposite of the time value
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time operator -(const Time& right); SFML_SYSTEM_API Time operator -(const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -241,7 +241,7 @@ SFML_API Time operator -(const Time& right);
/// \return Sum of the two times values /// \return Sum of the two times values
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time operator +(const Time& left, const Time& right); SFML_SYSTEM_API Time operator +(const Time& left, const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -253,7 +253,7 @@ SFML_API Time operator +(const Time& left, const Time& right);
/// \return Sum of the two times values /// \return Sum of the two times values
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time& operator +=(Time& left, const Time& right); SFML_SYSTEM_API Time& operator +=(Time& left, const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -265,7 +265,7 @@ SFML_API Time& operator +=(Time& left, const Time& right);
/// \return Difference of the two times values /// \return Difference of the two times values
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time operator -(const Time& left, const Time& right); SFML_SYSTEM_API Time operator -(const Time& left, const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -277,7 +277,7 @@ SFML_API Time operator -(const Time& left, const Time& right);
/// \return Difference of the two times values /// \return Difference of the two times values
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time& operator -=(Time& left, const Time& right); SFML_SYSTEM_API Time& operator -=(Time& left, const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -289,7 +289,7 @@ SFML_API Time& operator -=(Time& left, const Time& right);
/// \return \left multiplied by \right /// \return \left multiplied by \right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time operator *(const Time& left, float right); SFML_SYSTEM_API Time operator *(const Time& left, float right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -301,7 +301,7 @@ SFML_API Time operator *(const Time& left, float right);
/// \return \left multiplied by \right /// \return \left multiplied by \right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time operator *(const Time& left, Int64 right); SFML_SYSTEM_API Time operator *(const Time& left, Int64 right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -313,7 +313,7 @@ SFML_API Time operator *(const Time& left, Int64 right);
/// \return \left multiplied by \right /// \return \left multiplied by \right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time operator *(float left, const Time& right); SFML_SYSTEM_API Time operator *(float left, const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -325,7 +325,7 @@ SFML_API Time operator *(float left, const Time& right);
/// \return \left multiplied by \right /// \return \left multiplied by \right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time operator *(Int64 left, const Time& right); SFML_SYSTEM_API Time operator *(Int64 left, const Time& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -337,7 +337,7 @@ SFML_API Time operator *(Int64 left, const Time& right);
/// \return \left multiplied by \right /// \return \left multiplied by \right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time& operator *=(Time& left, float right); SFML_SYSTEM_API Time& operator *=(Time& left, float right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -349,7 +349,7 @@ SFML_API Time& operator *=(Time& left, float right);
/// \return \left multiplied by \right /// \return \left multiplied by \right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time& operator *=(Time& left, Int64 right); SFML_SYSTEM_API Time& operator *=(Time& left, Int64 right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -361,7 +361,7 @@ SFML_API Time& operator *=(Time& left, Int64 right);
/// \return \left divided by \right /// \return \left divided by \right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time operator /(const Time& left, float right); SFML_SYSTEM_API Time operator /(const Time& left, float right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -373,7 +373,7 @@ SFML_API Time operator /(const Time& left, float right);
/// \return \left divided by \right /// \return \left divided by \right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time operator /(const Time& left, Int64 right); SFML_SYSTEM_API Time operator /(const Time& left, Int64 right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -385,7 +385,7 @@ SFML_API Time operator /(const Time& left, Int64 right);
/// \return \left divided by \right /// \return \left divided by \right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time& operator /=(Time& left, float right); SFML_SYSTEM_API Time& operator /=(Time& left, float right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates Time /// \relates Time
@ -397,7 +397,7 @@ SFML_API Time& operator /=(Time& left, float right);
/// \return \left divided by \right /// \return \left divided by \right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API Time& operator /=(Time& left, Int64 right); SFML_SYSTEM_API Time& operator /=(Time& left, Int64 right);
} // namespace sf } // namespace sf

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Window/Export.hpp>
#include <SFML/Window/GlResource.hpp> #include <SFML/Window/GlResource.hpp>
#include <SFML/Window/ContextSettings.hpp> #include <SFML/Window/ContextSettings.hpp>
#include <SFML/System/NonCopyable.hpp> #include <SFML/System/NonCopyable.hpp>
@ -45,7 +45,7 @@ namespace priv
/// \brief Class holding a valid drawing context /// \brief Class holding a valid drawing context
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Context : GlResource, NonCopyable class SFML_WINDOW_API Context : GlResource, NonCopyable
{ {
public : public :

View File

@ -0,0 +1,48 @@
////////////////////////////////////////////////////////////
//
// SFML - Simple and Fast Multimedia Library
// Copyright (C) 2007-2009 Laurent Gomila (laurent.gom@gmail.com)
//
// This software is provided 'as-is', without any express or implied warranty.
// In no event will the authors be held liable for any damages arising from the use of this software.
//
// Permission is granted to anyone to use this software for any purpose,
// including commercial applications, and to alter it and redistribute it freely,
// subject to the following restrictions:
//
// 1. The origin of this software must not be misrepresented;
// you must not claim that you wrote the original software.
// If you use this software in a product, an acknowledgment
// in the product documentation would be appreciated but is not required.
//
// 2. Altered source versions must be plainly marked as such,
// and must not be misrepresented as being the original software.
//
// 3. This notice may not be removed or altered from any source distribution.
//
////////////////////////////////////////////////////////////
#ifndef SFML_WINDOW_EXPORT_HPP
#define SFML_WINDOW_EXPORT_HPP
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.hpp>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(SFML_WINDOW_EXPORTS)
#define SFML_WINDOW_API SFML_API_EXPORT
#else
#define SFML_WINDOW_API SFML_API_IMPORT
#endif
#endif // SFML_WINDOW_EXPORT_HPP

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Window/Export.hpp>
namespace sf namespace sf
@ -37,7 +37,7 @@ namespace sf
/// \brief Base class for classes that require an OpenGL context /// \brief Base class for classes that require an OpenGL context
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API GlResource class SFML_WINDOW_API GlResource
{ {
protected : protected :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Window/Export.hpp>
namespace sf namespace sf
@ -37,7 +37,7 @@ 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_API Joystick class SFML_WINDOW_API Joystick
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Window/Export.hpp>
namespace sf namespace sf
@ -37,7 +37,7 @@ 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_API Keyboard class SFML_WINDOW_API Keyboard
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Window/Export.hpp>
#include <SFML/System/Vector2.hpp> #include <SFML/System/Vector2.hpp>
@ -40,7 +40,7 @@ class Window;
/// \brief Give access to the real-time state of the mouse /// \brief Give access to the real-time state of the mouse
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Mouse class SFML_WINDOW_API Mouse
{ {
public : public :

View File

@ -28,7 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Config.hpp> #include <SFML/Window/Export.hpp>
#include <vector> #include <vector>
@ -38,7 +38,7 @@ namespace sf
/// \brief VideoMode defines a video mode (width, height, bpp) /// \brief VideoMode defines a video mode (width, height, bpp)
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API VideoMode class SFML_WINDOW_API VideoMode
{ {
public : public :
@ -114,7 +114,7 @@ public :
/// \return True if modes are equal /// \return True if modes are equal
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator ==(const VideoMode& left, const VideoMode& right); SFML_WINDOW_API bool operator ==(const VideoMode& left, const VideoMode& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates VideoMode /// \relates VideoMode
@ -126,7 +126,7 @@ SFML_API bool operator ==(const VideoMode& left, const VideoMode& right);
/// \return True if modes are different /// \return True if modes are different
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator !=(const VideoMode& left, const VideoMode& right); SFML_WINDOW_API bool operator !=(const VideoMode& left, const VideoMode& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates VideoMode /// \relates VideoMode
@ -138,7 +138,7 @@ SFML_API bool operator !=(const VideoMode& left, const VideoMode& right);
/// \return True if \a left is lesser than \a right /// \return True if \a left is lesser than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator <(const VideoMode& left, const VideoMode& right); SFML_WINDOW_API bool operator <(const VideoMode& left, const VideoMode& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates VideoMode /// \relates VideoMode
@ -150,7 +150,7 @@ SFML_API bool operator <(const VideoMode& left, const VideoMode& right);
/// \return True if \a left is greater than \a right /// \return True if \a left is greater than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator >(const VideoMode& left, const VideoMode& right); SFML_WINDOW_API bool operator >(const VideoMode& left, const VideoMode& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates VideoMode /// \relates VideoMode
@ -162,7 +162,7 @@ SFML_API bool operator >(const VideoMode& left, const VideoMode& right);
/// \return True if \a left is lesser or equal than \a right /// \return True if \a left is lesser or equal than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator <=(const VideoMode& left, const VideoMode& right); SFML_WINDOW_API bool operator <=(const VideoMode& left, const VideoMode& right);
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
/// \relates VideoMode /// \relates VideoMode
@ -174,7 +174,7 @@ SFML_API bool operator <=(const VideoMode& left, const VideoMode& right);
/// \return True if \a left is greater or equal than \a right /// \return True if \a left is greater or equal than \a right
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
SFML_API bool operator >=(const VideoMode& left, const VideoMode& right); SFML_WINDOW_API bool operator >=(const VideoMode& left, const VideoMode& right);
} // namespace sf } // namespace sf

View File

@ -28,6 +28,7 @@
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
// Headers // Headers
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
#include <SFML/Window/Export.hpp>
#include <SFML/Window/ContextSettings.hpp> #include <SFML/Window/ContextSettings.hpp>
#include <SFML/Window/VideoMode.hpp> #include <SFML/Window/VideoMode.hpp>
#include <SFML/Window/WindowHandle.hpp> #include <SFML/Window/WindowHandle.hpp>
@ -53,7 +54,7 @@ class Event;
/// \brief Window that serves as a target for OpenGL rendering /// \brief Window that serves as a target for OpenGL rendering
/// ///
//////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////
class SFML_API Window : GlResource, NonCopyable class SFML_WINDOW_API Window : GlResource, NonCopyable
{ {
public : public :

View File

@ -8,6 +8,7 @@ set(SRC
${SRCROOT}/ALCheck.hpp ${SRCROOT}/ALCheck.hpp
${SRCROOT}/AudioDevice.cpp ${SRCROOT}/AudioDevice.cpp
${SRCROOT}/AudioDevice.hpp ${SRCROOT}/AudioDevice.hpp
${INCROOT}/Export.hpp
${SRCROOT}/Listener.cpp ${SRCROOT}/Listener.cpp
${INCROOT}/Listener.hpp ${INCROOT}/Listener.hpp
${SRCROOT}/Music.cpp ${SRCROOT}/Music.cpp

View File

@ -33,9 +33,6 @@ set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/Modules/")
# set the output directory for SFML libraries # set the output directory for SFML libraries
set(LIBRARY_OUTPUT_PATH "${PROJECT_BINARY_DIR}/lib") set(LIBRARY_OUTPUT_PATH "${PROJECT_BINARY_DIR}/lib")
# define the export symbol
add_definitions(-DSFML_EXPORTS)
# add the modules subdirectories # add the modules subdirectories
add_subdirectory(System) add_subdirectory(System)
add_subdirectory(Window) add_subdirectory(Window)

View File

@ -9,6 +9,7 @@ set(SRC
${SRCROOT}/Color.cpp ${SRCROOT}/Color.cpp
${INCROOT}/Color.hpp ${INCROOT}/Color.hpp
${INCROOT}/Drawable.hpp ${INCROOT}/Drawable.hpp
${INCROOT}/Export.hpp
${SRCROOT}/Font.cpp ${SRCROOT}/Font.cpp
${INCROOT}/Font.hpp ${INCROOT}/Font.hpp
${INCROOT}/Glyph.hpp ${INCROOT}/Glyph.hpp

View File

@ -4,6 +4,7 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/src/SFML/Network)
# all source files # all source files
set(SRC set(SRC
${INCROOT}/Export.hpp
${SRCROOT}/Ftp.cpp ${SRCROOT}/Ftp.cpp
${INCROOT}/Ftp.hpp ${INCROOT}/Ftp.hpp
${SRCROOT}/Http.cpp ${SRCROOT}/Http.cpp

View File

@ -8,6 +8,7 @@ set(SRC
${INCROOT}/Clock.hpp ${INCROOT}/Clock.hpp
${SRCROOT}/Err.cpp ${SRCROOT}/Err.cpp
${INCROOT}/Err.hpp ${INCROOT}/Err.hpp
${INCROOT}/Export.hpp
${SRCROOT}/Lock.cpp ${SRCROOT}/Lock.cpp
${INCROOT}/Lock.hpp ${INCROOT}/Lock.hpp
${SRCROOT}/Mutex.cpp ${SRCROOT}/Mutex.cpp

View File

@ -6,6 +6,7 @@ set(SRCROOT ${PROJECT_SOURCE_DIR}/src/SFML/Window)
set(SRC set(SRC
${SRCROOT}/Context.cpp ${SRCROOT}/Context.cpp
${INCROOT}/Context.hpp ${INCROOT}/Context.hpp
${INCROOT}/Export.hpp
${SRCROOT}/GlContext.cpp ${SRCROOT}/GlContext.cpp
${SRCROOT}/GlContext.hpp ${SRCROOT}/GlContext.hpp
${SRCROOT}/GlResource.cpp ${SRCROOT}/GlResource.cpp