mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 13:36:12 +01:00
Each module now has its own export macro
This commit is contained in:
1 parent
7615382a68
commit
0c5afa3483
70 files changed
+1010
-719
No files matched your search
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/System/Export.h>
|
||||
#include <SFML/System/Time.h>
|
||||
#include <SFML/System/Types.h>
|
||||
|
||||
@@ -39,7 +39,7 @@
|
||||
/// \return A new sfClock object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfClock* sfClock_Create(void);
|
||||
CSFML_SYSTEM_API sfClock* sfClock_Create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new clock by copying an existing one
|
||||
@@ -49,7 +49,7 @@ CSFML_API sfClock* sfClock_Create(void);
|
||||
/// \return A new sfClock object which is a copy of \a clock
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfClock* sfClock_Copy(sfClock* clock);
|
||||
CSFML_SYSTEM_API sfClock* sfClock_Copy(sfClock* clock);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a clock
|
||||
@@ -57,7 +57,7 @@ CSFML_API sfClock* sfClock_Copy(sfClock* clock);
|
||||
/// \param clock Clock to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfClock_Destroy(sfClock* clock);
|
||||
CSFML_SYSTEM_API void sfClock_Destroy(sfClock* clock);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the time elapsed in a clock
|
||||
@@ -71,7 +71,7 @@ CSFML_API void sfClock_Destroy(sfClock* clock);
|
||||
/// \return Time elapsed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTime sfClock_GetElapsedTime(const sfClock* clock);
|
||||
CSFML_SYSTEM_API sfTime sfClock_GetElapsedTime(const sfClock* clock);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Restart a clock
|
||||
@@ -84,7 +84,7 @@ CSFML_API sfTime sfClock_GetElapsedTime(const sfClock* clock);
|
||||
/// \return Time elapsed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTime sfClock_Restart(sfClock* clock);
|
||||
CSFML_SYSTEM_API sfTime sfClock_Restart(sfClock* clock);
|
||||
|
||||
|
||||
#endif // SFML_CLOCK_H
|
||||
@@ -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_H
|
||||
#define SFML_SYSTEM_EXPORT_H
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Define portable import / export macros
|
||||
////////////////////////////////////////////////////////////
|
||||
#if defined(CSFML_SYSTEM_EXPORTS)
|
||||
|
||||
#define CSFML_SYSTEM_API CSFML_API_EXPORT
|
||||
|
||||
#else
|
||||
|
||||
#define CSFML_SYSTEM_API CSFML_API_IMPORT
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#endif // SFML_SYSTEM_EXPORT_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/System/Export.h>
|
||||
|
||||
|
||||
typedef sfInt64 (*sfInputStreamReadFunc)(char* data, sfInt64 size, void* userData);
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/System/Export.h>
|
||||
#include <SFML/System/Types.h>
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
/// \return A new sfMutex object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfMutex* sfMutex_Create(void);
|
||||
CSFML_SYSTEM_API sfMutex* sfMutex_Create(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a mutex
|
||||
@@ -46,7 +46,7 @@ CSFML_API sfMutex* sfMutex_Create(void);
|
||||
/// \param mutex Mutex to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMutex_Destroy(sfMutex* mutex);
|
||||
CSFML_SYSTEM_API void sfMutex_Destroy(sfMutex* mutex);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Lock a mutex
|
||||
@@ -54,7 +54,7 @@ CSFML_API void sfMutex_Destroy(sfMutex* mutex);
|
||||
/// \param mutex Mutex object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMutex_Lock(sfMutex* mutex);
|
||||
CSFML_SYSTEM_API void sfMutex_Lock(sfMutex* mutex);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Unlock a mutex
|
||||
@@ -62,7 +62,7 @@ CSFML_API void sfMutex_Lock(sfMutex* mutex);
|
||||
/// \param mutex Mutex object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMutex_Unlock(sfMutex* mutex);
|
||||
CSFML_SYSTEM_API void sfMutex_Unlock(sfMutex* mutex);
|
||||
|
||||
|
||||
#endif // SFML_MUTEX_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/System/Export.h>
|
||||
#include <SFML/System/Time.h>
|
||||
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
/// \param duration Time to sleep
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSleep(sfTime duration);
|
||||
CSFML_SYSTEM_API void sfSleep(sfTime duration);
|
||||
|
||||
|
||||
#endif // SFML_SLEEP_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/System/Export.h>
|
||||
#include <SFML/System/Types.h>
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
/// \return A new sfThread object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfThread* sfThread_Create(void (*function)(void*), void* userData);
|
||||
CSFML_SYSTEM_API sfThread* sfThread_Create(void (*function)(void*), void* userData);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Destroy a thread
|
||||
@@ -54,7 +54,7 @@ CSFML_API sfThread* sfThread_Create(void (*function)(void*), void* userData);
|
||||
/// \param thread Thread to destroy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfThread_Destroy(sfThread* thread);
|
||||
CSFML_SYSTEM_API void sfThread_Destroy(sfThread* thread);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Run a thread
|
||||
@@ -67,7 +67,7 @@ CSFML_API void sfThread_Destroy(sfThread* thread);
|
||||
/// \param thread Thread object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfThread_Launch(sfThread* thread);
|
||||
CSFML_SYSTEM_API void sfThread_Launch(sfThread* thread);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Wait until a thread finishes
|
||||
@@ -82,7 +82,7 @@ CSFML_API void sfThread_Launch(sfThread* thread);
|
||||
/// \param thread Thread object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfThread_Wait(sfThread* thread);
|
||||
CSFML_SYSTEM_API void sfThread_Wait(sfThread* thread);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Terminate a thread
|
||||
@@ -97,7 +97,7 @@ CSFML_API void sfThread_Wait(sfThread* thread);
|
||||
/// \param thread Thread object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfThread_Terminate(sfThread* thread);
|
||||
CSFML_SYSTEM_API void sfThread_Terminate(sfThread* thread);
|
||||
|
||||
|
||||
#endif // SFML_THREAD_H
|
||||
@@ -28,7 +28,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
#include <SFML/Config.h>
|
||||
#include <SFML/System/Export.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -44,7 +44,7 @@ typedef struct
|
||||
/// \brief Predefined "zero" time value
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTime sfTimeZero;
|
||||
CSFML_SYSTEM_API sfTime sfTimeZero;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return a time value as a number of seconds
|
||||
@@ -54,7 +54,7 @@ CSFML_API sfTime sfTimeZero;
|
||||
/// \return Time in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfTime_AsSeconds(sfTime time);
|
||||
CSFML_SYSTEM_API float sfTime_AsSeconds(sfTime time);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return a time value as a number of milliseconds
|
||||
@@ -64,7 +64,7 @@ CSFML_API float sfTime_AsSeconds(sfTime time);
|
||||
/// \return Time in milliseconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfInt32 sfTime_AsMilliseconds(sfTime time);
|
||||
CSFML_SYSTEM_API sfInt32 sfTime_AsMilliseconds(sfTime time);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return a time value as a number of microseconds
|
||||
@@ -74,7 +74,7 @@ CSFML_API sfInt32 sfTime_AsMilliseconds(sfTime time);
|
||||
/// \return Time in microseconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfInt64 sfTime_AsMicroseconds(sfTime time);
|
||||
CSFML_SYSTEM_API sfInt64 sfTime_AsMicroseconds(sfTime time);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a time value from a number of seconds
|
||||
@@ -84,7 +84,7 @@ CSFML_API sfInt64 sfTime_AsMicroseconds(sfTime time);
|
||||
/// \return Time value constructed from the amount of seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTime sfSeconds(float amount);
|
||||
CSFML_SYSTEM_API sfTime sfSeconds(float amount);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a time value from a number of milliseconds
|
||||
@@ -94,7 +94,7 @@ CSFML_API sfTime sfSeconds(float amount);
|
||||
/// \return Time value constructed from the amount of milliseconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTime sfMilliseconds(sfInt32 amount);
|
||||
CSFML_SYSTEM_API sfTime sfMilliseconds(sfInt32 amount);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a time value from a number of microseconds
|
||||
@@ -104,7 +104,7 @@ CSFML_API sfTime sfMilliseconds(sfInt32 amount);
|
||||
/// \return Time value constructed from the amount of microseconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfTime sfMicroseconds(sfInt64 amount);
|
||||
CSFML_SYSTEM_API sfTime sfMicroseconds(sfInt64 amount);
|
||||
|
||||
|
||||
#endif // SFML_TIME_H
|
||||
Reference in new issue
Block a user