Each module now has its own export macro

This commit is contained in:
Laurent Gomila committed 2012-02-02 22:02:39 +01:00
1 parent 7615382a68
commit 0c5afa3483
70 files changed
+1010 -719

No files matched your search

+48
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_H
#define SFML_AUDIO_EXPORT_H
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(CSFML_AUDIO_EXPORTS)
#define CSFML_AUDIO_API CSFML_API_EXPORT
#else
#define CSFML_AUDIO_API CSFML_API_IMPORT
#endif
#endif // SFML_AUDIO_EXPORT_H
+7 -7
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Audio/Export.h>
////////////////////////////////////////////////////////////
@@ -41,7 +41,7 @@
/// \param volume New global volume, in the range [0, 100]
///
////////////////////////////////////////////////////////////
CSFML_API void sfListener_SetGlobalVolume(float volume);
CSFML_AUDIO_API void sfListener_SetGlobalVolume(float volume);
////////////////////////////////////////////////////////////
/// \brief Get the current value of the global volume
@@ -49,7 +49,7 @@ CSFML_API void sfListener_SetGlobalVolume(float volume);
/// \return Current global volume, in the range [0, 100]
///
////////////////////////////////////////////////////////////
CSFML_API float sfListener_GetGlobalVolume(void);
CSFML_AUDIO_API float sfListener_GetGlobalVolume(void);
////////////////////////////////////////////////////////////
/// \brief Set the position of the listener in the scene
@@ -61,7 +61,7 @@ CSFML_API float sfListener_GetGlobalVolume(void);
/// \param z Z coordinate of the listener's position
///
////////////////////////////////////////////////////////////
CSFML_API void sfListener_SetPosition(float x, float y, float z);
CSFML_AUDIO_API void sfListener_SetPosition(float x, float y, float z);
////////////////////////////////////////////////////////////
/// \brief Get the current position of the listener in the scene
@@ -71,7 +71,7 @@ CSFML_API void sfListener_SetPosition(float x, float y, float z);
/// \param z Z coordinate of the listener's position
///
////////////////////////////////////////////////////////////
CSFML_API void sfListener_GetPosition(float* x, float* y, float* z);
CSFML_AUDIO_API void sfListener_GetPosition(float* x, float* y, float* z);
////////////////////////////////////////////////////////////
/// \brief Set the orientation of the listener in the scene
@@ -86,7 +86,7 @@ CSFML_API void sfListener_GetPosition(float* x, float* y, float* z);
/// \param z Z coordinate of the listener's orientation
///
////////////////////////////////////////////////////////////
CSFML_API void sfListener_SetDirection(float x, float y, float z);
CSFML_AUDIO_API void sfListener_SetDirection(float x, float y, float z);
////////////////////////////////////////////////////////////
/// \brief Get the current orientation of the listener in the scene
@@ -96,7 +96,7 @@ CSFML_API void sfListener_SetDirection(float x, float y, float z);
/// \param z Z coordinate of the listener's orientation
///
////////////////////////////////////////////////////////////
CSFML_API void sfListener_GetDirection(float* x, float* y, float* z);
CSFML_AUDIO_API void sfListener_GetDirection(float* x, float* y, float* z);
#endif // SFML_LISTENER_H
+28 -28
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Audio/Export.h>
#include <SFML/Audio/SoundStatus.h>
#include <SFML/Audio/Types.h>
#include <SFML/System/InputStream.h>
@@ -50,7 +50,7 @@
/// \return A new sfMusic object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_API sfMusic* sfMusic_CreateFromFile(const char* filename);
CSFML_AUDIO_API sfMusic* sfMusic_CreateFromFile(const char* filename);
////////////////////////////////////////////////////////////
/// \brief Create a new music and load it from a file in memory
@@ -67,7 +67,7 @@ CSFML_API sfMusic* sfMusic_CreateFromFile(const char* filename);
/// \return A new sfMusic object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_API sfMusic* sfMusic_CreateFromMemory(const void* data, size_t sizeInBytes);
CSFML_AUDIO_API sfMusic* sfMusic_CreateFromMemory(const void* data, size_t sizeInBytes);
////////////////////////////////////////////////////////////
/// \brief Create a new music and load it from a custom stream
@@ -83,7 +83,7 @@ CSFML_API sfMusic* sfMusic_CreateFromMemory(const void* data, size_t sizeInBytes
/// \return A new sfMusic object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_API sfMusic* sfMusic_CreateFromStream(sfInputStream* stream);
CSFML_AUDIO_API sfMusic* sfMusic_CreateFromStream(sfInputStream* stream);
////////////////////////////////////////////////////////////
/// \brief Destroy a music
@@ -91,7 +91,7 @@ CSFML_API sfMusic* sfMusic_CreateFromStream(sfInputStream* stream);
/// \param music Music to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_Destroy(sfMusic* music);
CSFML_AUDIO_API void sfMusic_Destroy(sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Set whether or not a music should loop after reaching the end
@@ -105,7 +105,7 @@ CSFML_API void sfMusic_Destroy(sfMusic* music);
/// \param loop sfTrue to play in loop, sfFalse to play once
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetLoop(sfMusic* music, sfBool loop);
CSFML_AUDIO_API void sfMusic_SetLoop(sfMusic* music, sfBool loop);
////////////////////////////////////////////////////////////
/// \brief Tell whether or not a music is in loop mode
@@ -115,7 +115,7 @@ CSFML_API void sfMusic_SetLoop(sfMusic* music, sfBool loop);
/// \return sfTrue if the music is looping, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfMusic_GetLoop(const sfMusic* music);
CSFML_AUDIO_API sfBool sfMusic_GetLoop(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the total duration of a music
@@ -125,7 +125,7 @@ CSFML_API sfBool sfMusic_GetLoop(const sfMusic* music);
/// \return Music duration
///
////////////////////////////////////////////////////////////
CSFML_API sfTime sfMusic_GetDuration(const sfMusic* music);
CSFML_AUDIO_API sfTime sfMusic_GetDuration(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Start or resume playing a music
@@ -139,7 +139,7 @@ CSFML_API sfTime sfMusic_GetDuration(const sfMusic* music);
/// \param music Music object
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_Play(sfMusic* music);
CSFML_AUDIO_API void sfMusic_Play(sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Pause a music
@@ -150,7 +150,7 @@ CSFML_API void sfMusic_Play(sfMusic* music);
/// \param music Music object
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_Pause(sfMusic* music);
CSFML_AUDIO_API void sfMusic_Pause(sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Stop playing a music
@@ -162,7 +162,7 @@ CSFML_API void sfMusic_Pause(sfMusic* music);
/// \param music Music object
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_Stop(sfMusic* music);
CSFML_AUDIO_API void sfMusic_Stop(sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Return the number of channels of a music
@@ -174,7 +174,7 @@ CSFML_API void sfMusic_Stop(sfMusic* music);
/// \return Number of channels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfMusic_GetChannelCount(const sfMusic* music);
CSFML_AUDIO_API unsigned int sfMusic_GetChannelCount(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the sample rate of a music
@@ -187,7 +187,7 @@ CSFML_API unsigned int sfMusic_GetChannelCount(const sfMusic* music);
/// \return Sample rate, in number of samples per second
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfMusic_GetSampleRate(const sfMusic* music);
CSFML_AUDIO_API unsigned int sfMusic_GetSampleRate(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the current status of a music (stopped, paused, playing)
@@ -197,7 +197,7 @@ CSFML_API unsigned int sfMusic_GetSampleRate(const sfMusic* music);
/// \return Current status
///
////////////////////////////////////////////////////////////
CSFML_API sfSoundStatus sfMusic_GetStatus(const sfMusic* music);
CSFML_AUDIO_API sfSoundStatus sfMusic_GetStatus(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the current playing position of a music
@@ -207,7 +207,7 @@ CSFML_API sfSoundStatus sfMusic_GetStatus(const sfMusic* music);
/// \return Current playing position
///
////////////////////////////////////////////////////////////
CSFML_API sfTime sfMusic_GetPlayingOffset(const sfMusic* music);
CSFML_AUDIO_API sfTime sfMusic_GetPlayingOffset(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Set the pitch of a music
@@ -222,7 +222,7 @@ CSFML_API sfTime sfMusic_GetPlayingOffset(const sfMusic* music);
/// \param pitch New pitch to apply to the music
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetPitch(sfMusic* music, float pitch);
CSFML_AUDIO_API void sfMusic_SetPitch(sfMusic* music, float pitch);
////////////////////////////////////////////////////////////
/// \brief Set the volume of a music
@@ -234,7 +234,7 @@ CSFML_API void sfMusic_SetPitch(sfMusic* music, float pitch);
/// \param volume Volume of the music
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetVolume(sfMusic* music, float volume);
CSFML_AUDIO_API void sfMusic_SetVolume(sfMusic* music, float volume);
////////////////////////////////////////////////////////////
/// \brief Set the 3D position of a music in the audio scene
@@ -249,7 +249,7 @@ CSFML_API void sfMusic_SetVolume(sfMusic* music, float volume);
/// \param z Z coordinate of the position of the music in the scene
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetPosition(sfMusic* music, float x, float y, float z);
CSFML_AUDIO_API void sfMusic_SetPosition(sfMusic* music, float x, float y, float z);
////////////////////////////////////////////////////////////
/// \brief Make a musics's position relative to the listener or absolute
@@ -264,7 +264,7 @@ CSFML_API void sfMusic_SetPosition(sfMusic* music, float x, float y, float z);
/// \param relative sfTrue to set the position relative, sfFalse to set it absolute
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetRelativeToListener(sfMusic* music, sfBool relative);
CSFML_AUDIO_API void sfMusic_SetRelativeToListener(sfMusic* music, sfBool relative);
////////////////////////////////////////////////////////////
/// \brief Set the minimum distance of a music
@@ -280,7 +280,7 @@ CSFML_API void sfMusic_SetRelativeToListener(sfMusic* music, sfBool relative);
/// \param distance New minimum distance of the music
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetMinDistance(sfMusic* music, float distance);
CSFML_AUDIO_API void sfMusic_SetMinDistance(sfMusic* music, float distance);
////////////////////////////////////////////////////////////
/// \brief Set the attenuation factor of a music
@@ -298,7 +298,7 @@ CSFML_API void sfMusic_SetMinDistance(sfMusic* music, float distance);
/// \param attenuation New attenuation factor of the music
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetAttenuation(sfMusic* music, float attenuation);
CSFML_AUDIO_API void sfMusic_SetAttenuation(sfMusic* music, float attenuation);
////////////////////////////////////////////////////////////
/// \brief Change the current playing position of a music
@@ -310,7 +310,7 @@ CSFML_API void sfMusic_SetAttenuation(sfMusic* music, float attenuation);
/// \param timeOffset New playing position, in milliseconds
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_SetPlayingOffset(sfMusic* music, sfUint32 timeOffset);
CSFML_AUDIO_API void sfMusic_SetPlayingOffset(sfMusic* music, sfUint32 timeOffset);
////////////////////////////////////////////////////////////
/// \brief Get the pitch of a music
@@ -320,7 +320,7 @@ CSFML_API void sfMusic_SetPlayingOffset(sfMusic* music, sfUint32 timeOffset);
/// \return Pitch of the music
///
////////////////////////////////////////////////////////////
CSFML_API float sfMusic_GetPitch(const sfMusic* music);
CSFML_AUDIO_API float sfMusic_GetPitch(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the volume of a music
@@ -330,7 +330,7 @@ CSFML_API float sfMusic_GetPitch(const sfMusic* music);
/// \return Volume of the music, in the range [0, 100]
///
////////////////////////////////////////////////////////////
CSFML_API float sfMusic_GetVolume(const sfMusic* music);
CSFML_AUDIO_API float sfMusic_GetVolume(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the 3D position of a music in the audio scene
@@ -341,7 +341,7 @@ CSFML_API float sfMusic_GetVolume(const sfMusic* music);
/// \param z Z position of the music in the world
///
////////////////////////////////////////////////////////////
CSFML_API void sfMusic_GetPosition(const sfMusic* music, float* x, float* y, float* z);
CSFML_AUDIO_API void sfMusic_GetPosition(const sfMusic* music, float* x, float* y, float* z);
////////////////////////////////////////////////////////////
/// \brief Tell whether a music's position is relative to the
@@ -352,7 +352,7 @@ CSFML_API void sfMusic_GetPosition(const sfMusic* music, float* x, float* y, flo
/// \return sfTrue if the position is relative, sfFalse if it's absolute
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfMusic_IsRelativeToListener(const sfMusic* music);
CSFML_AUDIO_API sfBool sfMusic_IsRelativeToListener(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the minimum distance of a music
@@ -362,7 +362,7 @@ CSFML_API sfBool sfMusic_IsRelativeToListener(const sfMusic* music);
/// \return Minimum distance of the music
///
////////////////////////////////////////////////////////////
CSFML_API float sfMusic_GetMinDistance(const sfMusic* music);
CSFML_AUDIO_API float sfMusic_GetMinDistance(const sfMusic* music);
////////////////////////////////////////////////////////////
/// \brief Get the attenuation factor of a music
@@ -372,7 +372,7 @@ CSFML_API float sfMusic_GetMinDistance(const sfMusic* music);
/// \return Attenuation factor of the music
///
////////////////////////////////////////////////////////////
CSFML_API float sfMusic_GetAttenuation(const sfMusic* music);
CSFML_AUDIO_API float sfMusic_GetAttenuation(const sfMusic* music);
#endif // SFML_MUSIC_H
+26 -26
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Audio/Export.h>
#include <SFML/Audio/SoundStatus.h>
#include <SFML/Audio/Types.h>
#include <SFML/System/Time.h>
@@ -40,7 +40,7 @@
/// \return A new sfSound object
///
////////////////////////////////////////////////////////////
CSFML_API sfSound* sfSound_Create(void);
CSFML_AUDIO_API sfSound* sfSound_Create(void);
////////////////////////////////////////////////////////////
/// \brief Create a new sound by copying an existing one
@@ -50,7 +50,7 @@ CSFML_API sfSound* sfSound_Create(void);
/// \return A new sfSound object which is a copy of \a sound
///
////////////////////////////////////////////////////////////
CSFML_API sfSound* sfSound_Copy(sfSound* sound);
CSFML_AUDIO_API sfSound* sfSound_Copy(sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Destroy a sound
@@ -58,7 +58,7 @@ CSFML_API sfSound* sfSound_Copy(sfSound* sound);
/// \param sound Sound to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_Destroy(sfSound* sound);
CSFML_AUDIO_API void sfSound_Destroy(sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Start or resume playing a sound
@@ -72,7 +72,7 @@ CSFML_API void sfSound_Destroy(sfSound* sound);
/// \param sound Sound object
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_Play(sfSound* sound);
CSFML_AUDIO_API void sfSound_Play(sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Pause a sound
@@ -83,7 +83,7 @@ CSFML_API void sfSound_Play(sfSound* sound);
/// \param sound Sound object
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_Pause(sfSound* sound);
CSFML_AUDIO_API void sfSound_Pause(sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Stop playing a sound
@@ -95,7 +95,7 @@ CSFML_API void sfSound_Pause(sfSound* sound);
/// \param sound Sound object
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_Stop(sfSound* sound);
CSFML_AUDIO_API void sfSound_Stop(sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Set the source buffer containing the audio data to play
@@ -108,7 +108,7 @@ CSFML_API void sfSound_Stop(sfSound* sound);
/// \param buffer Sound buffer to attach to the sound
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_SetBuffer(sfSound* sound, const sfSoundBuffer* buffer);
CSFML_AUDIO_API void sfSound_SetBuffer(sfSound* sound, const sfSoundBuffer* buffer);
////////////////////////////////////////////////////////////
/// \brief Get the audio buffer attached to a sound
@@ -118,7 +118,7 @@ CSFML_API void sfSound_SetBuffer(sfSound* sound, const sfSoundBuffer* buffer);
/// \return Sound buffer attached to the sound (can be NULL)
///
////////////////////////////////////////////////////////////
CSFML_API const sfSoundBuffer* sfSound_GetBuffer(const sfSound* sound);
CSFML_AUDIO_API const sfSoundBuffer* sfSound_GetBuffer(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Set whether or not a sound should loop after reaching the end
@@ -132,7 +132,7 @@ CSFML_API const sfSoundBuffer* sfSound_GetBuffer(const sfSound* sound);
/// \param loop sfTrue to play in loop, sfFalse to play once
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_SetLoop(sfSound* sound, sfBool loop);
CSFML_AUDIO_API void sfSound_SetLoop(sfSound* sound, sfBool loop);
////////////////////////////////////////////////////////////
/// \brief Tell whether or not a soud is in loop mode
@@ -142,7 +142,7 @@ CSFML_API void sfSound_SetLoop(sfSound* sound, sfBool loop);
/// \return sfTrue if the sound is looping, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfSound_GetLoop(const sfSound* sound);
CSFML_AUDIO_API sfBool sfSound_GetLoop(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Get the current status of a sound (stopped, paused, playing)
@@ -152,7 +152,7 @@ CSFML_API sfBool sfSound_GetLoop(const sfSound* sound);
/// \return Current status
///
////////////////////////////////////////////////////////////
CSFML_API sfSoundStatus sfSound_GetStatus(const sfSound* sound);
CSFML_AUDIO_API sfSoundStatus sfSound_GetStatus(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Set the pitch of a sound
@@ -167,7 +167,7 @@ CSFML_API sfSoundStatus sfSound_GetStatus(const sfSound* sound);
/// \param pitch New pitch to apply to the sound
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_SetPitch(sfSound* sound, float pitch);
CSFML_AUDIO_API void sfSound_SetPitch(sfSound* sound, float pitch);
////////////////////////////////////////////////////////////
/// \brief Set the volume of a sound
@@ -179,7 +179,7 @@ CSFML_API void sfSound_SetPitch(sfSound* sound, float pitch);
/// \param volume Volume of the sound
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_SetVolume(sfSound* sound, float volume);
CSFML_AUDIO_API void sfSound_SetVolume(sfSound* sound, float volume);
////////////////////////////////////////////////////////////
/// \brief Set the 3D position of a sound in the audio scene
@@ -194,7 +194,7 @@ CSFML_API void sfSound_SetVolume(sfSound* sound, float volume);
/// \param z Z coordinate of the position of the sound in the scene
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_SetPosition(sfSound* sound, float x, float y, float z);
CSFML_AUDIO_API void sfSound_SetPosition(sfSound* sound, float x, float y, float z);
////////////////////////////////////////////////////////////
/// \brief Make the sound's position relative to the listener or absolute
@@ -209,7 +209,7 @@ CSFML_API void sfSound_SetPosition(sfSound* sound, float x, float y, float z);
/// \param relative sfTrue to set the position relative, sfFalse to set it absolute
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_SetRelativeToListener(sfSound* sound, sfBool relative);
CSFML_AUDIO_API void sfSound_SetRelativeToListener(sfSound* sound, sfBool relative);
////////////////////////////////////////////////////////////
/// \brief Set the minimum distance of a sound
@@ -225,7 +225,7 @@ CSFML_API void sfSound_SetRelativeToListener(sfSound* sound, sfBool relative);
/// \param distance New minimum distance of the sound
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_SetMinDistance(sfSound* sound, float distance);
CSFML_AUDIO_API void sfSound_SetMinDistance(sfSound* sound, float distance);
////////////////////////////////////////////////////////////
/// \brief Set the attenuation factor of a sound
@@ -243,7 +243,7 @@ CSFML_API void sfSound_SetMinDistance(sfSound* sound, float distance);
/// \param attenuation New attenuation factor of the sound
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_SetAttenuation(sfSound* sound, float attenuation);
CSFML_AUDIO_API void sfSound_SetAttenuation(sfSound* sound, float attenuation);
////////////////////////////////////////////////////////////
/// \brief Change the current playing position of a sound
@@ -255,7 +255,7 @@ CSFML_API void sfSound_SetAttenuation(sfSound* sound, float attenuation);
/// \param timeOffset New playing position
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_SetPlayingOffset(sfSound* sound, sfTime timeOffset);
CSFML_AUDIO_API void sfSound_SetPlayingOffset(sfSound* sound, sfTime timeOffset);
////////////////////////////////////////////////////////////
/// \brief Get the pitch of a sound
@@ -265,7 +265,7 @@ CSFML_API void sfSound_SetPlayingOffset(sfSound* sound, sfTime timeOffset);
/// \return Pitch of the sound
///
////////////////////////////////////////////////////////////
CSFML_API float sfSound_GetPitch(const sfSound* sound);
CSFML_AUDIO_API float sfSound_GetPitch(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Get the volume of a sound
@@ -275,7 +275,7 @@ CSFML_API float sfSound_GetPitch(const sfSound* sound);
/// \return Volume of the sound, in the range [0, 100]
///
////////////////////////////////////////////////////////////
CSFML_API float sfSound_GetVolume(const sfSound* sound);
CSFML_AUDIO_API float sfSound_GetVolume(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Get the 3D position of a sound in the audio scene
@@ -286,7 +286,7 @@ CSFML_API float sfSound_GetVolume(const sfSound* sound);
/// \param z Z position of the sound in the world
///
////////////////////////////////////////////////////////////
CSFML_API void sfSound_GetPosition(const sfSound* sound, float* x, float* y, float* z);
CSFML_AUDIO_API void sfSound_GetPosition(const sfSound* sound, float* x, float* y, float* z);
////////////////////////////////////////////////////////////
/// \brief Tell whether a sound's position is relative to the
@@ -297,7 +297,7 @@ CSFML_API void sfSound_GetPosition(const sfSound* sound, float* x, float* y, flo
/// \return sfTrue if the position is relative, sfFalse if it's absolute
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfSound_IsRelativeToListener(const sfSound* sound);
CSFML_AUDIO_API sfBool sfSound_IsRelativeToListener(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Get the minimum distance of a sound
@@ -307,7 +307,7 @@ CSFML_API sfBool sfSound_IsRelativeToListener(const sfSound* sound);
/// \return Minimum distance of the sound
///
////////////////////////////////////////////////////////////
CSFML_API float sfSound_GetMinDistance(const sfSound* sound);
CSFML_AUDIO_API float sfSound_GetMinDistance(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Get the attenuation factor of a sound
@@ -317,7 +317,7 @@ CSFML_API float sfSound_GetMinDistance(const sfSound* sound);
/// \return Attenuation factor of the sound
///
////////////////////////////////////////////////////////////
CSFML_API float sfSound_GetAttenuation(const sfSound* sound);
CSFML_AUDIO_API float sfSound_GetAttenuation(const sfSound* sound);
////////////////////////////////////////////////////////////
/// \brief Get the current playing position of a sound
@@ -327,7 +327,7 @@ CSFML_API float sfSound_GetAttenuation(const sfSound* sound);
/// \return Current playing position
///
////////////////////////////////////////////////////////////
CSFML_API sfTime sfSound_GetPlayingOffset(const sfSound* sound);
CSFML_AUDIO_API sfTime sfSound_GetPlayingOffset(const sfSound* sound);
#endif // SFML_SOUND_H
+13 -13
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Audio/Export.h>
#include <SFML/Audio/Types.h>
#include <SFML/System/InputStream.h>
#include <SFML/System/Time.h>
@@ -47,7 +47,7 @@
/// \return A new sfSoundBuffer object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromFile(const char* filename);
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromFile(const char* filename);
////////////////////////////////////////////////////////////
/// \brief Create a new sound buffer and load it from a file in memory
@@ -62,7 +62,7 @@ CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromFile(const char* filename);
/// \return A new sfSoundBuffer object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromMemory(const void* data, size_t sizeInBytes);
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromMemory(const void* data, size_t sizeInBytes);
////////////////////////////////////////////////////////////
/// \brief Create a new sound buffer and load it from a custom stream
@@ -76,7 +76,7 @@ CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromMemory(const void* data, size_t
/// \return A new sfSoundBuffer object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromStream(sfInputStream* stream);
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromStream(sfInputStream* stream);
////////////////////////////////////////////////////////////
/// \brief Create a new sound buffer and load it from an array of samples in memory
@@ -92,7 +92,7 @@ CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromStream(sfInputStream* stream);
/// \return A new sfSoundBuffer object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromSamples(const sfInt16* samples, size_t sampleCount, unsigned int channelsCount, unsigned int sampleRate);
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_CreateFromSamples(const sfInt16* samples, size_t sampleCount, unsigned int channelsCount, unsigned int sampleRate);
////////////////////////////////////////////////////////////
/// \brief Create a new sound buffer by copying an existing one
@@ -102,7 +102,7 @@ CSFML_API sfSoundBuffer* sfSoundBuffer_CreateFromSamples(const sfInt16* samples,
/// \return A new sfSoundBuffer object which is a copy of \a soundBuffer
///
////////////////////////////////////////////////////////////
CSFML_API sfSoundBuffer* sfSoundBuffer_Copy(sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_Copy(sfSoundBuffer* soundBuffer);
////////////////////////////////////////////////////////////
/// \brief Destroy a sound buffer
@@ -110,7 +110,7 @@ CSFML_API sfSoundBuffer* sfSoundBuffer_Copy(sfSoundBuffer* soundBuffer);
/// \param soundBuffer Sound buffer to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundBuffer_Destroy(sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API void sfSoundBuffer_Destroy(sfSoundBuffer* soundBuffer);
////////////////////////////////////////////////////////////
/// \brief Save a sound buffer to an audio file
@@ -125,7 +125,7 @@ CSFML_API void sfSoundBuffer_Destroy(sfSoundBuffer* soundBuffer);
/// \return sfTrue if saving succeeded, sfFalse if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfSoundBuffer_SaveToFile(const sfSoundBuffer* soundBuffer, const char* filename);
CSFML_AUDIO_API sfBool sfSoundBuffer_SaveToFile(const sfSoundBuffer* soundBuffer, const char* filename);
////////////////////////////////////////////////////////////
/// \brief Get the array of audio samples stored in a sound buffer
@@ -139,7 +139,7 @@ CSFML_API sfBool sfSoundBuffer_SaveToFile(const sfSoundBuffer* soundBuffer, cons
/// \return Read-only pointer to the array of sound samples
///
////////////////////////////////////////////////////////////
CSFML_API const sfInt16* sfSoundBuffer_GetSamples(const sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API const sfInt16* sfSoundBuffer_GetSamples(const sfSoundBuffer* soundBuffer);
////////////////////////////////////////////////////////////
/// \brief Get the number of samples stored in a sound buffer
@@ -152,7 +152,7 @@ CSFML_API const sfInt16* sfSoundBuffer_GetSamples(const sfSoundBuffer* soundBuff
/// \return Number of samples
///
////////////////////////////////////////////////////////////
CSFML_API size_t sfSoundBuffer_GetSampleCount(const sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API size_t sfSoundBuffer_GetSampleCount(const sfSoundBuffer* soundBuffer);
////////////////////////////////////////////////////////////
/// \brief Get the sample rate of a sound buffer
@@ -166,7 +166,7 @@ CSFML_API size_t sfSoundBuffer_GetSampleCount(const sfSoundBuffer* soundBuffer);
/// \return Sample rate (number of samples per second)
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfSoundBuffer_GetSampleRate(const sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API unsigned int sfSoundBuffer_GetSampleRate(const sfSoundBuffer* soundBuffer);
////////////////////////////////////////////////////////////
/// \brief Get the number of channels used by a sound buffer
@@ -179,7 +179,7 @@ CSFML_API unsigned int sfSoundBuffer_GetSampleRate(const sfSoundBuffer* soundBuf
/// \return Number of channels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfSoundBuffer_GetChannelCount(const sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API unsigned int sfSoundBuffer_GetChannelCount(const sfSoundBuffer* soundBuffer);
////////////////////////////////////////////////////////////
/// \brief Get the total duration of a sound buffer
@@ -189,7 +189,7 @@ CSFML_API unsigned int sfSoundBuffer_GetChannelCount(const sfSoundBuffer* soundB
/// \return Sound duration
///
////////////////////////////////////////////////////////////
CSFML_API sfTime sfSoundBuffer_GetDuration(const sfSoundBuffer* soundBuffer);
CSFML_AUDIO_API sfTime sfSoundBuffer_GetDuration(const sfSoundBuffer* soundBuffer);
#endif // SFML_SOUNDBUFFER_H
+7 -7
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Audio/Export.h>
#include <SFML/Audio/Types.h>
@@ -38,7 +38,7 @@
/// \return A new sfSoundBufferRecorder object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_API sfSoundBufferRecorder* sfSoundBufferRecorder_Create(void);
CSFML_AUDIO_API sfSoundBufferRecorder* sfSoundBufferRecorder_Create(void);
////////////////////////////////////////////////////////////
/// \brief Destroy a sound buffer recorder
@@ -46,7 +46,7 @@ CSFML_API sfSoundBufferRecorder* sfSoundBufferRecorder_Create(void);
/// \param soundBufferRecorder Sound buffer recorder to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundBufferRecorder_Destroy(sfSoundBufferRecorder* soundBufferRecorder);
CSFML_AUDIO_API void sfSoundBufferRecorder_Destroy(sfSoundBufferRecorder* soundBufferRecorder);
////////////////////////////////////////////////////////////
/// \brief Start the capture of a sound recorder recorder
@@ -62,7 +62,7 @@ CSFML_API void sfSoundBufferRecorder_Destroy(sfSoundBufferRecorder* soundBufferR
/// \param sampleRate Desired capture rate, in number of samples per second
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundBufferRecorder_Start(sfSoundBufferRecorder* soundBufferRecorder, unsigned int sampleRate);
CSFML_AUDIO_API void sfSoundBufferRecorder_Start(sfSoundBufferRecorder* soundBufferRecorder, unsigned int sampleRate);
////////////////////////////////////////////////////////////
/// \brief Stop the capture of a sound recorder
@@ -70,7 +70,7 @@ CSFML_API void sfSoundBufferRecorder_Start(sfSoundBufferRecorder* soundBufferRec
/// \param soundBufferRecorder Sound buffer recorder object
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundBufferRecorder_Stop(sfSoundBufferRecorder* soundBufferRecorder);
CSFML_AUDIO_API void sfSoundBufferRecorder_Stop(sfSoundBufferRecorder* soundBufferRecorder);
////////////////////////////////////////////////////////////
/// \brief Get the sample rate of a sound buffer recorder
@@ -84,7 +84,7 @@ CSFML_API void sfSoundBufferRecorder_Stop(sfSoundBufferRecorder* soundBufferReco
/// \return Sample rate, in samples per second
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfSoundBufferRecorder_GetSampleRate(const sfSoundBufferRecorder* soundBufferRecorder);
CSFML_AUDIO_API unsigned int sfSoundBufferRecorder_GetSampleRate(const sfSoundBufferRecorder* soundBufferRecorder);
////////////////////////////////////////////////////////////
/// \brief Get the sound buffer containing the captured audio data
@@ -99,7 +99,7 @@ CSFML_API unsigned int sfSoundBufferRecorder_GetSampleRate(const sfSoundBufferRe
/// \return Read-only access to the sound buffer
///
////////////////////////////////////////////////////////////
CSFML_API const sfSoundBuffer* sfSoundBufferRecorder_GetBuffer(const sfSoundBufferRecorder* soundBufferRecorder);
CSFML_AUDIO_API const sfSoundBuffer* sfSoundBufferRecorder_GetBuffer(const sfSoundBufferRecorder* soundBufferRecorder);
#endif // SFML_SOUNDBUFFERRECORDER_H
+7 -7
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Audio/Export.h>
#include <SFML/Audio/Types.h>
#include <stddef.h>
@@ -49,7 +49,7 @@ typedef void (*sfSoundRecorderStopCallback)(void*);
/// \return A new sfSoundRecorder object (NULL if failed)
///
////////////////////////////////////////////////////////////
CSFML_API sfSoundRecorder* sfSoundRecorder_Create(sfSoundRecorderStartCallback onStart,
CSFML_AUDIO_API sfSoundRecorder* sfSoundRecorder_Create(sfSoundRecorderStartCallback onStart,
sfSoundRecorderProcessCallback onProcess,
sfSoundRecorderStopCallback onStop,
void* userData);
@@ -60,7 +60,7 @@ CSFML_API sfSoundRecorder* sfSoundRecorder_Create(sfSoundRecorderStartCallback
/// \param soundRecorder Sound recorder to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundRecorder_Destroy(sfSoundRecorder* soundRecorder);
CSFML_AUDIO_API void sfSoundRecorder_Destroy(sfSoundRecorder* soundRecorder);
////////////////////////////////////////////////////////////
/// \brief Start the capture of a sound recorder
@@ -76,7 +76,7 @@ CSFML_API void sfSoundRecorder_Destroy(sfSoundRecorder* soundRecorder);
/// \param sampleRate Desired capture rate, in number of samples per second
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundRecorder_Start(sfSoundRecorder* soundRecorder, unsigned int sampleRate);
CSFML_AUDIO_API void sfSoundRecorder_Start(sfSoundRecorder* soundRecorder, unsigned int sampleRate);
////////////////////////////////////////////////////////////
/// \brief Stop the capture of a sound recorder
@@ -84,7 +84,7 @@ CSFML_API void sfSoundRecorder_Start(sfSoundRecorder* soundRecorder, unsigned in
/// \param soundRecorder Sound recorder object
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundRecorder_Stop(sfSoundRecorder* soundRecorder);
CSFML_AUDIO_API void sfSoundRecorder_Stop(sfSoundRecorder* soundRecorder);
////////////////////////////////////////////////////////////
/// \brief Get the sample rate of a sound recorder
@@ -98,7 +98,7 @@ CSFML_API void sfSoundRecorder_Stop(sfSoundRecorder* soundRecorder);
/// \return Sample rate, in samples per second
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfSoundRecorder_GetSampleRate(const sfSoundRecorder* soundRecorder);
CSFML_AUDIO_API unsigned int sfSoundRecorder_GetSampleRate(const sfSoundRecorder* soundRecorder);
////////////////////////////////////////////////////////////
/// \brief Check if the system supports audio capture
@@ -110,7 +110,7 @@ CSFML_API unsigned int sfSoundRecorder_GetSampleRate(const sfSoundRecorder* soun
/// \return sfTrue if audio capture is supported, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfSoundRecorder_IsAvailable(void);
CSFML_AUDIO_API sfBool sfSoundRecorder_IsAvailable(void);
#endif // SFML_SOUNDRECORDER_H
+1 -1
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Audio/Export.h>
////////////////////////////////////////////////////////////
+25 -25
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Audio/Export.h>
#include <SFML/Audio/SoundStatus.h>
#include <SFML/Audio/Types.h>
#include <SFML/System/Time.h>
@@ -60,7 +60,7 @@ typedef void (*sfSoundStreamSeekCallback)(sfTime, void*); ///<
/// \return A new sfSoundStream object
///
////////////////////////////////////////////////////////////
CSFML_API sfSoundStream* sfSoundStream_Create(sfSoundStreamGetDataCallback onGetData,
CSFML_AUDIO_API sfSoundStream* sfSoundStream_Create(sfSoundStreamGetDataCallback onGetData,
sfSoundStreamSeekCallback onSeek,
unsigned int channelCount,
unsigned int sampleRate,
@@ -72,7 +72,7 @@ CSFML_API sfSoundStream* sfSoundStream_Create(sfSoundStreamGetDataCallback onGet
/// \param soundStream Sound stream to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_Destroy(sfSoundStream* soundStream);
CSFML_AUDIO_API void sfSoundStream_Destroy(sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Start or resume playing a sound stream
@@ -86,7 +86,7 @@ CSFML_API void sfSoundStream_Destroy(sfSoundStream* soundStream);
/// \param soundStream Sound stream object
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_Play(sfSoundStream* soundStream);
CSFML_AUDIO_API void sfSoundStream_Play(sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Pause a sound stream
@@ -97,7 +97,7 @@ CSFML_API void sfSoundStream_Play(sfSoundStream* soundStream);
/// \param soundStream Sound stream object
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_Pause(sfSoundStream* soundStream);
CSFML_AUDIO_API void sfSoundStream_Pause(sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Stop playing a sound stream
@@ -109,7 +109,7 @@ CSFML_API void sfSoundStream_Pause(sfSoundStream* soundStream);
/// \param soundStream Sound stream object
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_Stop(sfSoundStream* soundStream);
CSFML_AUDIO_API void sfSoundStream_Stop(sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Get the current status of a sound stream (stopped, paused, playing)
@@ -119,7 +119,7 @@ CSFML_API void sfSoundStream_Stop(sfSoundStream* soundStream);
/// \return Current status
///
////////////////////////////////////////////////////////////
CSFML_API sfSoundStatus sfSoundStream_GetStatus(const sfSoundStream* soundStream);
CSFML_AUDIO_API sfSoundStatus sfSoundStream_GetStatus(const sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Return the number of channels of a sound stream
@@ -131,7 +131,7 @@ CSFML_API sfSoundStatus sfSoundStream_GetStatus(const sfSoundStream* soundStream
/// \return Number of channels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfSoundStream_GetChannelCount(const sfSoundStream* soundStream);
CSFML_AUDIO_API unsigned int sfSoundStream_GetChannelCount(const sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Get the sample rate of a sound stream
@@ -144,7 +144,7 @@ CSFML_API unsigned int sfSoundStream_GetChannelCount(const sfSoundStream* soundS
/// \return Sample rate, in number of samples per second
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfSoundStream_GetSampleRate(const sfSoundStream* soundStream);
CSFML_AUDIO_API unsigned int sfSoundStream_GetSampleRate(const sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Set the pitch of a sound stream
@@ -159,7 +159,7 @@ CSFML_API unsigned int sfSoundStream_GetSampleRate(const sfSoundStream* soundStr
/// \param pitch New pitch to apply to the stream
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_SetPitch(sfSoundStream* soundStream, float pitch);
CSFML_AUDIO_API void sfSoundStream_SetPitch(sfSoundStream* soundStream, float pitch);
////////////////////////////////////////////////////////////
/// \brief Set the volume of a sound stream
@@ -171,7 +171,7 @@ CSFML_API void sfSoundStream_SetPitch(sfSoundStream* soundStream, float pitch);
/// \param volume Volume of the stream
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_SetVolume(sfSoundStream* soundStream, float volume);
CSFML_AUDIO_API void sfSoundStream_SetVolume(sfSoundStream* soundStream, float volume);
////////////////////////////////////////////////////////////
/// \brief Set the 3D position of a sound stream in the audio scene
@@ -186,7 +186,7 @@ CSFML_API void sfSoundStream_SetVolume(sfSoundStream* soundStream, float volume)
/// \param z Z coordinate of the position of the stream in the scene
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_SetPosition(sfSoundStream* soundStream, float x, float y, float z);
CSFML_AUDIO_API void sfSoundStream_SetPosition(sfSoundStream* soundStream, float x, float y, float z);
////////////////////////////////////////////////////////////
/// \brief Make a sound stream's position relative to the listener or absolute
@@ -201,7 +201,7 @@ CSFML_API void sfSoundStream_SetPosition(sfSoundStream* soundStream, float x, fl
/// \param relative sfTrue to set the position relative, sfFalse to set it absolute
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_SetRelativeToListener(sfSoundStream* soundStream, sfBool relative);
CSFML_AUDIO_API void sfSoundStream_SetRelativeToListener(sfSoundStream* soundStream, sfBool relative);
////////////////////////////////////////////////////////////
/// \brief Set the minimum distance of a sound stream
@@ -217,7 +217,7 @@ CSFML_API void sfSoundStream_SetRelativeToListener(sfSoundStream* soundStream, s
/// \param distance New minimum distance of the stream
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_SetMinDistance(sfSoundStream* soundStream, float distance);
CSFML_AUDIO_API void sfSoundStream_SetMinDistance(sfSoundStream* soundStream, float distance);
////////////////////////////////////////////////////////////
/// \brief Set the attenuation factor of a sound stream
@@ -235,7 +235,7 @@ CSFML_API void sfSoundStream_SetMinDistance(sfSoundStream* soundStream, float di
/// \param attenuation New attenuation factor of the stream
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_SetAttenuation(sfSoundStream* soundStream, float attenuation);
CSFML_AUDIO_API void sfSoundStream_SetAttenuation(sfSoundStream* soundStream, float attenuation);
////////////////////////////////////////////////////////////
/// \brief Change the current playing position of a sound stream
@@ -247,7 +247,7 @@ CSFML_API void sfSoundStream_SetAttenuation(sfSoundStream* soundStream, float at
/// \param timeOffset New playing position
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_SetPlayingOffset(sfSoundStream* soundStream, sfTime timeOffset);
CSFML_AUDIO_API void sfSoundStream_SetPlayingOffset(sfSoundStream* soundStream, sfTime timeOffset);
////////////////////////////////////////////////////////////
/// \brief Set whether or not a sound stream should loop after reaching the end
@@ -261,7 +261,7 @@ CSFML_API void sfSoundStream_SetPlayingOffset(sfSoundStream* soundStream, sfTime
/// \param loop sfTrue to play in loop, sfFalse to play once
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_SetLoop(sfSoundStream* soundStream, sfBool loop);
CSFML_AUDIO_API void sfSoundStream_SetLoop(sfSoundStream* soundStream, sfBool loop);
////////////////////////////////////////////////////////////
/// \brief Get the pitch of a sound stream
@@ -271,7 +271,7 @@ CSFML_API void sfSoundStream_SetLoop(sfSoundStream* soundStream, sfBool loop);
/// \return Pitch of the stream
///
////////////////////////////////////////////////////////////
CSFML_API float sfSoundStream_GetPitch(const sfSoundStream* soundStream);
CSFML_AUDIO_API float sfSoundStream_GetPitch(const sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Get the volume of a sound stream
@@ -281,7 +281,7 @@ CSFML_API float sfSoundStream_GetPitch(const sfSoundStream* soundStream);
/// \return Volume of the stream, in the range [0, 100]
///
////////////////////////////////////////////////////////////
CSFML_API float sfSoundStream_GetVolume(const sfSoundStream* soundStream);
CSFML_AUDIO_API float sfSoundStream_GetVolume(const sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Get the 3D position of a sound stream in the audio scene
@@ -292,7 +292,7 @@ CSFML_API float sfSoundStream_GetVolume(const sfSoundStream* soundStream);
/// \param z Z position of the stream in the world
///
////////////////////////////////////////////////////////////
CSFML_API void sfSoundStream_GetPosition(const sfSoundStream* soundStream, float* x, float* y, float* z);
CSFML_AUDIO_API void sfSoundStream_GetPosition(const sfSoundStream* soundStream, float* x, float* y, float* z);
////////////////////////////////////////////////////////////
/// \brief Tell whether a sound stream's position is relative to the
@@ -303,7 +303,7 @@ CSFML_API void sfSoundStream_GetPosition(const sfSoundStream* soundStream, float
/// \return sfTrue if the position is relative, sfFalse if it's absolute
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfSoundStream_IsRelativeToListener(const sfSoundStream* soundStream);
CSFML_AUDIO_API sfBool sfSoundStream_IsRelativeToListener(const sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Get the minimum distance of a sound stream
@@ -313,7 +313,7 @@ CSFML_API sfBool sfSoundStream_IsRelativeToListener(const sfSoundStream* soundSt
/// \return Minimum distance of the stream
///
////////////////////////////////////////////////////////////
CSFML_API float sfSoundStream_GetMinDistance(const sfSoundStream* soundStream);
CSFML_AUDIO_API float sfSoundStream_GetMinDistance(const sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Get the attenuation factor of a sound stream
@@ -323,7 +323,7 @@ CSFML_API float sfSoundStream_GetMinDistance(const sfSoundStream* soundStream);
/// \return Attenuation factor of the stream
///
////////////////////////////////////////////////////////////
CSFML_API float sfSoundStream_GetAttenuation(const sfSoundStream* soundStream);
CSFML_AUDIO_API float sfSoundStream_GetAttenuation(const sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Tell whether or not a sound stream is in loop mode
@@ -333,7 +333,7 @@ CSFML_API float sfSoundStream_GetAttenuation(const sfSoundStream* soundStream);
/// \return sfTrue if the music is looping, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfSoundStream_GetLoop(const sfSoundStream* soundStream);
CSFML_AUDIO_API sfBool sfSoundStream_GetLoop(const sfSoundStream* soundStream);
////////////////////////////////////////////////////////////
/// \brief Get the current playing position of a sound stream
@@ -343,7 +343,7 @@ CSFML_API sfBool sfSoundStream_GetLoop(const sfSoundStream* soundStream);
/// \return Current playing position
///
////////////////////////////////////////////////////////////
CSFML_API sfTime sfSoundStream_GetPlayingOffset(const sfSoundStream* soundStream);
CSFML_AUDIO_API sfTime sfSoundStream_GetPlayingOffset(const sfSoundStream* soundStream);
#endif // SFML_SOUNDSTREAM_H
+16 -12
View File
@@ -65,31 +65,35 @@
////////////////////////////////////////////////////////////
// Define portable import / export macros
// Define helpers to create portable import / export macros for each module
////////////////////////////////////////////////////////////
#if defined(CSFML_SYSTEM_WINDOWS)
#ifdef CSFML_EXPORTS
// Windows compilers need specific (and different) keywords for export and import
#define CSFML_API_EXPORT extern "C" __declspec(dllexport)
#define CSFML_API_IMPORT extern __declspec(dllimport)
// From DLL side, we must export
#define CSFML_API extern "C" __declspec(dllexport)
// For Visual C++ compilers, we also need to turn off this annoying C4251 warning
#ifdef _MSC_VER
#else
// From client application side, we must import
#define CSFML_API extern __declspec(dllimport)
#pragma warning(disable : 4251)
#endif
#else
#else // Linux, FreeBSD, Mac OS X
#ifdef CSFML_EXPORTS
#if __GNUC__ >= 4
#define CSFML_API extern "C"
// GCC 4 has special keywords for showing/hidding symbols,
// the same keyword is used for both importing and exporting
#define CSFML_API_EXPORT extern "C" __attribute__ ((__visibility__ ("default")))
#define CSFML_API_IMPORT extern __attribute__ ((__visibility__ ("default")))
#else
#define CSFML_API extern
// GCC < 4 has no mechanism to explicitely hide symbols, everything's exported
#define CSFML_API_EXPORT extern "C"
#define CSFML_API_IMPORT extern
#endif
+1 -1
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
////////////////////////////////////////////////////////////
+32 -32
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Color.h>
#include <SFML/Graphics/Rect.h>
#include <SFML/Graphics/Types.h>
@@ -40,7 +40,7 @@
/// \return A new sfCircleShape object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfCircleShape* sfCircleShape_Create(void);
CSFML_GRAPHICS_API sfCircleShape* sfCircleShape_Create(void);
////////////////////////////////////////////////////////////
/// \brief Copy an existing circle shape
@@ -50,7 +50,7 @@ CSFML_API sfCircleShape* sfCircleShape_Create(void);
/// \return Copied object
///
////////////////////////////////////////////////////////////
CSFML_API sfCircleShape* sfCircleShape_Copy(sfCircleShape* shape);
CSFML_GRAPHICS_API sfCircleShape* sfCircleShape_Copy(sfCircleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing circle Shape
@@ -58,7 +58,7 @@ CSFML_API sfCircleShape* sfCircleShape_Copy(sfCircleShape* shape);
/// \param Shape Shape to delete
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_Destroy(sfCircleShape* shape);
CSFML_GRAPHICS_API void sfCircleShape_Destroy(sfCircleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Set the position of a circle shape
@@ -72,7 +72,7 @@ CSFML_API void sfCircleShape_Destroy(sfCircleShape* shape);
/// \param y Y coordinate of the new position
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_SetPosition(sfCircleShape* shape, float x, float y);
CSFML_GRAPHICS_API void sfCircleShape_SetPosition(sfCircleShape* shape, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Set the orientation of a circle shape
@@ -85,7 +85,7 @@ CSFML_API void sfCircleShape_SetPosition(sfCircleShape* shape, float x, float y)
/// \param angle New rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_SetRotation(sfCircleShape* shape, float angle);
CSFML_GRAPHICS_API void sfCircleShape_SetRotation(sfCircleShape* shape, float angle);
////////////////////////////////////////////////////////////
/// \brief Set the scale factors of a circle shape
@@ -99,7 +99,7 @@ CSFML_API void sfCircleShape_SetRotation(sfCircleShape* shape, float angle);
/// \param factorY New vertical scale factor
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_SetScale(sfCircleShape* shape, float factorX, float factorY);
CSFML_GRAPHICS_API void sfCircleShape_SetScale(sfCircleShape* shape, float factorX, float factorY);
////////////////////////////////////////////////////////////
/// \brief Set the local origin of a circle shape
@@ -116,7 +116,7 @@ CSFML_API void sfCircleShape_SetScale(sfCircleShape* shape, float factorX, float
/// \param y Y coordinate of the new origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_SetOrigin(sfCircleShape* shape, float x, float y);
CSFML_GRAPHICS_API void sfCircleShape_SetOrigin(sfCircleShape* shape, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Get the position of a circle shape
@@ -126,7 +126,7 @@ CSFML_API void sfCircleShape_SetOrigin(sfCircleShape* shape, float x, float y);
/// \return Current position
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_GetPosition(const sfCircleShape* shape, float* x, float* y);
CSFML_GRAPHICS_API void sfCircleShape_GetPosition(const sfCircleShape* shape, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Get the orientation of a circle shape
@@ -138,7 +138,7 @@ CSFML_API void sfCircleShape_GetPosition(const sfCircleShape* shape, float* x, f
/// \return Current rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API float sfCircleShape_GetRotation(const sfCircleShape* shape);
CSFML_GRAPHICS_API float sfCircleShape_GetRotation(const sfCircleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the current scale of a circle shape
@@ -148,7 +148,7 @@ CSFML_API float sfCircleShape_GetRotation(const sfCircleShape* shape);
/// \return Current scale factors
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_GetScale(const sfCircleShape* shape, float* x, float* y);
CSFML_GRAPHICS_API void sfCircleShape_GetScale(const sfCircleShape* shape, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Get the local origin of a circle shape
@@ -158,7 +158,7 @@ CSFML_API void sfCircleShape_GetScale(const sfCircleShape* shape, float* x, floa
/// \return Current origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_GetOrigin(const sfCircleShape* shape, float* x, float* y);
CSFML_GRAPHICS_API void sfCircleShape_GetOrigin(const sfCircleShape* shape, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Move a circle shape by a given offset
@@ -171,7 +171,7 @@ CSFML_API void sfCircleShape_GetOrigin(const sfCircleShape* shape, float* x, flo
/// \param offsetY Y offset
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_Move(sfCircleShape* shape, float offsetX, float offsetY);
CSFML_GRAPHICS_API void sfCircleShape_Move(sfCircleShape* shape, float offsetX, float offsetY);
////////////////////////////////////////////////////////////
/// \brief Rotate a circle shape
@@ -183,7 +183,7 @@ CSFML_API void sfCircleShape_Move(sfCircleShape* shape, float offsetX, float off
/// \param angle Angle of rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_Rotate(sfCircleShape* shape, float angle);
CSFML_GRAPHICS_API void sfCircleShape_Rotate(sfCircleShape* shape, float angle);
////////////////////////////////////////////////////////////
/// \brief Scale a circle shape
@@ -196,7 +196,7 @@ CSFML_API void sfCircleShape_Rotate(sfCircleShape* shape, float angle);
/// \param factorY Vertical scale factor
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_Scale(sfCircleShape* shape, float factorX, float factorY);
CSFML_GRAPHICS_API void sfCircleShape_Scale(sfCircleShape* shape, float factorX, float factorY);
////////////////////////////////////////////////////////////
/// \brief Get the combined transform of a circle shape
@@ -206,7 +206,7 @@ CSFML_API void sfCircleShape_Scale(sfCircleShape* shape, float factorX, float fa
/// \return Transform combining the position/rotation/scale/origin of the object
///
////////////////////////////////////////////////////////////
CSFML_API const sfTransform* sfCircleShape_GetTransform(const sfCircleShape* shape);
CSFML_GRAPHICS_API const sfTransform* sfCircleShape_GetTransform(const sfCircleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the inverse of the combined transform of a circle shape
@@ -216,7 +216,7 @@ CSFML_API const sfTransform* sfCircleShape_GetTransform(const sfCircleShape* sha
/// \return Inverse of the combined transformations applied to the object
///
////////////////////////////////////////////////////////////
CSFML_API const sfTransform* sfCircleShape_GetInverseTransform(const sfCircleShape* shape);
CSFML_GRAPHICS_API const sfTransform* sfCircleShape_GetInverseTransform(const sfCircleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Change the source texture of a circle shape
@@ -237,7 +237,7 @@ CSFML_API const sfTransform* sfCircleShape_GetInverseTransform(const sfCircleSha
/// \param resetRect Should the texture rect be reset to the size of the new texture?
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_SetTexture(sfCircleShape* shape, const sfTexture* texture, sfBool resetRect);
CSFML_GRAPHICS_API void sfCircleShape_SetTexture(sfCircleShape* shape, const sfTexture* texture, sfBool resetRect);
////////////////////////////////////////////////////////////
/// \brief Set the sub-rectangle of the texture that a circle shape will display
@@ -250,7 +250,7 @@ CSFML_API void sfCircleShape_SetTexture(sfCircleShape* shape, const sfTexture* t
/// \param rect Rectangle defining the region of the texture to display
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_SetTextureRect(sfCircleShape* shape, sfIntRect rect);
CSFML_GRAPHICS_API void sfCircleShape_SetTextureRect(sfCircleShape* shape, sfIntRect rect);
////////////////////////////////////////////////////////////
/// \brief Set the fill color of a circle shape
@@ -266,7 +266,7 @@ CSFML_API void sfCircleShape_SetTextureRect(sfCircleShape* shape, sfIntRect rect
/// \param color New color of the shape
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_SetFillColor(sfCircleShape* shape, sfColor color);
CSFML_GRAPHICS_API void sfCircleShape_SetFillColor(sfCircleShape* shape, sfColor color);
////////////////////////////////////////////////////////////
/// \brief Set the outline color of a circle shape
@@ -278,7 +278,7 @@ CSFML_API void sfCircleShape_SetFillColor(sfCircleShape* shape, sfColor color);
/// \param color New outline color of the shape
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_SetOutlineColor(sfCircleShape* shape, sfColor color);
CSFML_GRAPHICS_API void sfCircleShape_SetOutlineColor(sfCircleShape* shape, sfColor color);
////////////////////////////////////////////////////////////
/// \brief Set the thickness of a circle shape's outline
@@ -291,7 +291,7 @@ CSFML_API void sfCircleShape_SetOutlineColor(sfCircleShape* shape, sfColor color
/// \param thickness New outline thickness
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_SetOutlineThickness(sfCircleShape* shape, float thickness);
CSFML_GRAPHICS_API void sfCircleShape_SetOutlineThickness(sfCircleShape* shape, float thickness);
////////////////////////////////////////////////////////////
/// \brief Get the source texture of a circle shape
@@ -305,7 +305,7 @@ CSFML_API void sfCircleShape_SetOutlineThickness(sfCircleShape* shape, float thi
/// \return Pointer to the shape's texture
///
////////////////////////////////////////////////////////////
CSFML_API const sfTexture* sfCircleShape_GetTexture(const sfCircleShape* shape);
CSFML_GRAPHICS_API const sfTexture* sfCircleShape_GetTexture(const sfCircleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the sub-rectangle of the texture displayed by a circle shape
@@ -315,7 +315,7 @@ CSFML_API const sfTexture* sfCircleShape_GetTexture(const sfCircleShape* shape);
/// \return Texture rectangle of the shape
///
////////////////////////////////////////////////////////////
CSFML_API sfIntRect sfCircleShape_GetTextureRect(const sfCircleShape* shape);
CSFML_GRAPHICS_API sfIntRect sfCircleShape_GetTextureRect(const sfCircleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the fill color of a circle shape
@@ -325,7 +325,7 @@ CSFML_API sfIntRect sfCircleShape_GetTextureRect(const sfCircleShape* shape);
/// \return Fill color of the shape
///
////////////////////////////////////////////////////////////
CSFML_API sfColor sfCircleShape_GetFillColor(const sfCircleShape* shape);
CSFML_GRAPHICS_API sfColor sfCircleShape_GetFillColor(const sfCircleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the outline color of a circle shape
@@ -335,7 +335,7 @@ CSFML_API sfColor sfCircleShape_GetFillColor(const sfCircleShape* shape);
/// \return Outline color of the shape
///
////////////////////////////////////////////////////////////
CSFML_API sfColor sfCircleShape_GetOutlineColor(const sfCircleShape* shape);
CSFML_GRAPHICS_API sfColor sfCircleShape_GetOutlineColor(const sfCircleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the outline thickness of a circle shape
@@ -345,7 +345,7 @@ CSFML_API sfColor sfCircleShape_GetOutlineColor(const sfCircleShape* shape);
/// \return Outline thickness of the shape
///
////////////////////////////////////////////////////////////
CSFML_API float sfCircleShape_GetOutlineThickness(const sfCircleShape* shape);
CSFML_GRAPHICS_API float sfCircleShape_GetOutlineThickness(const sfCircleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the total number of points of a circle shape
@@ -355,7 +355,7 @@ CSFML_API float sfCircleShape_GetOutlineThickness(const sfCircleShape* shape);
/// \return Number of points of the shape
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfCircleShape_GetPointCount(const sfCircleShape* shape);
CSFML_GRAPHICS_API unsigned int sfCircleShape_GetPointCount(const sfCircleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get a point of a circle shape
@@ -368,7 +368,7 @@ CSFML_API unsigned int sfCircleShape_GetPointCount(const sfCircleShape* shape);
/// \return Index-th point of the shape
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_GetPoint(const sfCircleShape* shape, unsigned int index, float* x, float* y);
CSFML_GRAPHICS_API void sfCircleShape_GetPoint(const sfCircleShape* shape, unsigned int index, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Set the radius of a circle
@@ -377,7 +377,7 @@ CSFML_API void sfCircleShape_GetPoint(const sfCircleShape* shape, unsigned int i
/// \param radius New radius of the circle
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_SetRadius(sfCircleShape* shape, float radius);
CSFML_GRAPHICS_API void sfCircleShape_SetRadius(sfCircleShape* shape, float radius);
////////////////////////////////////////////////////////////
/// \brief Get the radius of a circle
@@ -387,7 +387,7 @@ CSFML_API void sfCircleShape_SetRadius(sfCircleShape* shape, float radius);
/// \return Radius of the circle
///
////////////////////////////////////////////////////////////
CSFML_API float sfCircleShape_GetRadius(const sfCircleShape* shape);
CSFML_GRAPHICS_API float sfCircleShape_GetRadius(const sfCircleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Set the number of points of a circle
@@ -396,7 +396,7 @@ CSFML_API float sfCircleShape_GetRadius(const sfCircleShape* shape);
/// \param count New number of points of the circle
///
////////////////////////////////////////////////////////////
CSFML_API void sfCircleShape_SetPointCount(sfCircleShape* shape, unsigned int count);
CSFML_GRAPHICS_API void sfCircleShape_SetPointCount(sfCircleShape* shape, unsigned int count);
#endif // SFML_CIRCLESHAPE_H
+14 -14
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
////////////////////////////////////////////////////////////
@@ -44,15 +44,15 @@ typedef struct
} sfColor;
CSFML_API sfColor sfBlack; ///< Black predefined color
CSFML_API sfColor sfWhite; ///< White predefined color
CSFML_API sfColor sfRed; ///< Red predefined color
CSFML_API sfColor sfGreen; ///< Green predefined color
CSFML_API sfColor sfBlue; ///< Blue predefined color
CSFML_API sfColor sfYellow; ///< Yellow predefined color
CSFML_API sfColor sfMagenta; ///< Magenta predefined color
CSFML_API sfColor sfCyan; ///< Cyan predefined color
CSFML_API sfColor sfTransparent; ///< Transparent (black) predefined color
CSFML_GRAPHICS_API sfColor sfBlack; ///< Black predefined color
CSFML_GRAPHICS_API sfColor sfWhite; ///< White predefined color
CSFML_GRAPHICS_API sfColor sfRed; ///< Red predefined color
CSFML_GRAPHICS_API sfColor sfGreen; ///< Green predefined color
CSFML_GRAPHICS_API sfColor sfBlue; ///< Blue predefined color
CSFML_GRAPHICS_API sfColor sfYellow; ///< Yellow predefined color
CSFML_GRAPHICS_API sfColor sfMagenta; ///< Magenta predefined color
CSFML_GRAPHICS_API sfColor sfCyan; ///< Cyan predefined color
CSFML_GRAPHICS_API sfColor sfTransparent; ///< Transparent (black) predefined color
////////////////////////////////////////////////////////////
@@ -65,7 +65,7 @@ CSFML_API sfColor sfTransparent; ///< Transparent (black) predefined color
/// \return sfColor constructed from the components
///
////////////////////////////////////////////////////////////
CSFML_API sfColor sfColor_FromRGB(sfUint8 red, sfUint8 green, sfUint8 blue);
CSFML_GRAPHICS_API sfColor sfColor_FromRGB(sfUint8 red, sfUint8 green, sfUint8 blue);
////////////////////////////////////////////////////////////
/// \brief Construct a color from its 4 RGBA components
@@ -78,7 +78,7 @@ CSFML_API sfColor sfColor_FromRGB(sfUint8 red, sfUint8 green, sfUint8 blue);
/// \return sfColor constructed from the components
///
////////////////////////////////////////////////////////////
CSFML_API sfColor sfColor_FromRGBA(sfUint8 red, sfUint8 green, sfUint8 blue, sfUint8 alpha);
CSFML_GRAPHICS_API sfColor sfColor_FromRGBA(sfUint8 red, sfUint8 green, sfUint8 blue, sfUint8 alpha);
////////////////////////////////////////////////////////////
/// \brief Add two colors
@@ -89,7 +89,7 @@ CSFML_API sfColor sfColor_FromRGBA(sfUint8 red, sfUint8 green, sfUint8 blue, sfU
/// \return Component-wise saturated addition of the two colors
///
////////////////////////////////////////////////////////////
CSFML_API sfColor sfColor_Add(sfColor color1, sfColor color2);
CSFML_GRAPHICS_API sfColor sfColor_Add(sfColor color1, sfColor color2);
////////////////////////////////////////////////////////////
/// \brief Modulate two colors
@@ -100,7 +100,7 @@ CSFML_API sfColor sfColor_Add(sfColor color1, sfColor color2);
/// \return Component-wise multiplication of the two colors
///
////////////////////////////////////////////////////////////
CSFML_API sfColor sfColor_Modulate(sfColor color1, sfColor color2);
CSFML_GRAPHICS_API sfColor sfColor_Modulate(sfColor color1, sfColor color2);
#endif // SFML_COLOR_H
+31 -31
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Color.h>
#include <SFML/Graphics/Rect.h>
#include <SFML/Graphics/Types.h>
@@ -40,7 +40,7 @@
/// \return A new sfConvexShape object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfConvexShape* sfConvexShape_Create(void);
CSFML_GRAPHICS_API sfConvexShape* sfConvexShape_Create(void);
////////////////////////////////////////////////////////////
/// \brief Copy an existing convex shape
@@ -50,7 +50,7 @@ CSFML_API sfConvexShape* sfConvexShape_Create(void);
/// \return Copied object
///
////////////////////////////////////////////////////////////
CSFML_API sfConvexShape* sfConvexShape_Copy(sfConvexShape* shape);
CSFML_GRAPHICS_API sfConvexShape* sfConvexShape_Copy(sfConvexShape* shape);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing convex Shape
@@ -58,7 +58,7 @@ CSFML_API sfConvexShape* sfConvexShape_Copy(sfConvexShape* shape);
/// \param Shape Shape to delete
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_Destroy(sfConvexShape* shape);
CSFML_GRAPHICS_API void sfConvexShape_Destroy(sfConvexShape* shape);
////////////////////////////////////////////////////////////
/// \brief Set the position of a convex shape
@@ -72,7 +72,7 @@ CSFML_API void sfConvexShape_Destroy(sfConvexShape* shape);
/// \param y Y coordinate of the new position
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_SetPosition(sfConvexShape* shape, float x, float y);
CSFML_GRAPHICS_API void sfConvexShape_SetPosition(sfConvexShape* shape, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Set the orientation of a convex shape
@@ -85,7 +85,7 @@ CSFML_API void sfConvexShape_SetPosition(sfConvexShape* shape, float x, float y)
/// \param angle New rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_SetRotation(sfConvexShape* shape, float angle);
CSFML_GRAPHICS_API void sfConvexShape_SetRotation(sfConvexShape* shape, float angle);
////////////////////////////////////////////////////////////
/// \brief Set the scale factors of a convex shape
@@ -99,7 +99,7 @@ CSFML_API void sfConvexShape_SetRotation(sfConvexShape* shape, float angle);
/// \param factorY New vertical scale factor
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_SetScale(sfConvexShape* shape, float factorX, float factorY);
CSFML_GRAPHICS_API void sfConvexShape_SetScale(sfConvexShape* shape, float factorX, float factorY);
////////////////////////////////////////////////////////////
/// \brief Set the local origin of a convex shape
@@ -116,7 +116,7 @@ CSFML_API void sfConvexShape_SetScale(sfConvexShape* shape, float factorX, float
/// \param y Y coordinate of the new origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_SetOrigin(sfConvexShape* shape, float x, float y);
CSFML_GRAPHICS_API void sfConvexShape_SetOrigin(sfConvexShape* shape, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Get the position of a convex shape
@@ -126,7 +126,7 @@ CSFML_API void sfConvexShape_SetOrigin(sfConvexShape* shape, float x, float y);
/// \return Current position
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_GetPosition(const sfConvexShape* shape, float* x, float* y);
CSFML_GRAPHICS_API void sfConvexShape_GetPosition(const sfConvexShape* shape, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Get the orientation of a convex shape
@@ -138,7 +138,7 @@ CSFML_API void sfConvexShape_GetPosition(const sfConvexShape* shape, float* x, f
/// \return Current rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API float sfConvexShape_GetRotation(const sfConvexShape* shape);
CSFML_GRAPHICS_API float sfConvexShape_GetRotation(const sfConvexShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the current scale of a convex shape
@@ -148,7 +148,7 @@ CSFML_API float sfConvexShape_GetRotation(const sfConvexShape* shape);
/// \return Current scale factors
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_GetScale(const sfConvexShape* shape, float* x, float* y);
CSFML_GRAPHICS_API void sfConvexShape_GetScale(const sfConvexShape* shape, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Get the local origin of a convex shape
@@ -158,7 +158,7 @@ CSFML_API void sfConvexShape_GetScale(const sfConvexShape* shape, float* x, floa
/// \return Current origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_GetOrigin(const sfConvexShape* shape, float* x, float* y);
CSFML_GRAPHICS_API void sfConvexShape_GetOrigin(const sfConvexShape* shape, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Move a convex shape by a given offset
@@ -171,7 +171,7 @@ CSFML_API void sfConvexShape_GetOrigin(const sfConvexShape* shape, float* x, flo
/// \param offsetY Y offset
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_Move(sfConvexShape* shape, float offsetX, float offsetY);
CSFML_GRAPHICS_API void sfConvexShape_Move(sfConvexShape* shape, float offsetX, float offsetY);
////////////////////////////////////////////////////////////
/// \brief Rotate a convex shape
@@ -183,7 +183,7 @@ CSFML_API void sfConvexShape_Move(sfConvexShape* shape, float offsetX, float off
/// \param angle Angle of rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_Rotate(sfConvexShape* shape, float angle);
CSFML_GRAPHICS_API void sfConvexShape_Rotate(sfConvexShape* shape, float angle);
////////////////////////////////////////////////////////////
/// \brief Scale a convex shape
@@ -196,7 +196,7 @@ CSFML_API void sfConvexShape_Rotate(sfConvexShape* shape, float angle);
/// \param factorY Vertical scale factor
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_Scale(sfConvexShape* shape, float factorX, float factorY);
CSFML_GRAPHICS_API void sfConvexShape_Scale(sfConvexShape* shape, float factorX, float factorY);
////////////////////////////////////////////////////////////
/// \brief Get the combined transform of a convex shape
@@ -206,7 +206,7 @@ CSFML_API void sfConvexShape_Scale(sfConvexShape* shape, float factorX, float fa
/// \return Transform combining the position/rotation/scale/origin of the object
///
////////////////////////////////////////////////////////////
CSFML_API const sfTransform* sfConvexShape_GetTransform(const sfConvexShape* shape);
CSFML_GRAPHICS_API const sfTransform* sfConvexShape_GetTransform(const sfConvexShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the inverse of the combined transform of a convex shape
@@ -216,7 +216,7 @@ CSFML_API const sfTransform* sfConvexShape_GetTransform(const sfConvexShape* sha
/// \return Inverse of the combined transformations applied to the object
///
////////////////////////////////////////////////////////////
CSFML_API const sfTransform* sfConvexShape_GetInverseTransform(const sfConvexShape* shape);
CSFML_GRAPHICS_API const sfTransform* sfConvexShape_GetInverseTransform(const sfConvexShape* shape);
////////////////////////////////////////////////////////////
/// \brief Change the source texture of a convex shape
@@ -237,7 +237,7 @@ CSFML_API const sfTransform* sfConvexShape_GetInverseTransform(const sfConvexSha
/// \param resetRect Should the texture rect be reset to the size of the new texture?
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_SetTexture(sfConvexShape* shape, const sfTexture* texture, sfBool resetRect);
CSFML_GRAPHICS_API void sfConvexShape_SetTexture(sfConvexShape* shape, const sfTexture* texture, sfBool resetRect);
////////////////////////////////////////////////////////////
/// \brief Set the sub-rectangle of the texture that a convex shape will display
@@ -250,7 +250,7 @@ CSFML_API void sfConvexShape_SetTexture(sfConvexShape* shape, const sfTexture* t
/// \param rect Rectangle defining the region of the texture to display
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_SetTextureRect(sfConvexShape* shape, sfIntRect rect);
CSFML_GRAPHICS_API void sfConvexShape_SetTextureRect(sfConvexShape* shape, sfIntRect rect);
////////////////////////////////////////////////////////////
/// \brief Set the fill color of a convex shape
@@ -266,7 +266,7 @@ CSFML_API void sfConvexShape_SetTextureRect(sfConvexShape* shape, sfIntRect rect
/// \param color New color of the shape
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_SetFillColor(sfConvexShape* shape, sfColor color);
CSFML_GRAPHICS_API void sfConvexShape_SetFillColor(sfConvexShape* shape, sfColor color);
////////////////////////////////////////////////////////////
/// \brief Set the outline color of a convex shape
@@ -278,7 +278,7 @@ CSFML_API void sfConvexShape_SetFillColor(sfConvexShape* shape, sfColor color);
/// \param color New outline color of the shape
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_SetOutlineColor(sfConvexShape* shape, sfColor color);
CSFML_GRAPHICS_API void sfConvexShape_SetOutlineColor(sfConvexShape* shape, sfColor color);
////////////////////////////////////////////////////////////
/// \brief Set the thickness of a convex shape's outline
@@ -291,7 +291,7 @@ CSFML_API void sfConvexShape_SetOutlineColor(sfConvexShape* shape, sfColor color
/// \param thickness New outline thickness
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_SetOutlineThickness(sfConvexShape* shape, float thickness);
CSFML_GRAPHICS_API void sfConvexShape_SetOutlineThickness(sfConvexShape* shape, float thickness);
////////////////////////////////////////////////////////////
/// \brief Get the source texture of a convex shape
@@ -305,7 +305,7 @@ CSFML_API void sfConvexShape_SetOutlineThickness(sfConvexShape* shape, float thi
/// \return Pointer to the shape's texture
///
////////////////////////////////////////////////////////////
CSFML_API const sfTexture* sfConvexShape_GetTexture(const sfConvexShape* shape);
CSFML_GRAPHICS_API const sfTexture* sfConvexShape_GetTexture(const sfConvexShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the sub-rectangle of the texture displayed by a convex shape
@@ -315,7 +315,7 @@ CSFML_API const sfTexture* sfConvexShape_GetTexture(const sfConvexShape* shape);
/// \return Texture rectangle of the shape
///
////////////////////////////////////////////////////////////
CSFML_API sfIntRect sfConvexShape_GetTextureRect(const sfConvexShape* shape);
CSFML_GRAPHICS_API sfIntRect sfConvexShape_GetTextureRect(const sfConvexShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the fill color of a convex shape
@@ -325,7 +325,7 @@ CSFML_API sfIntRect sfConvexShape_GetTextureRect(const sfConvexShape* shape);
/// \return Fill color of the shape
///
////////////////////////////////////////////////////////////
CSFML_API sfColor sfConvexShape_GetFillColor(const sfConvexShape* shape);
CSFML_GRAPHICS_API sfColor sfConvexShape_GetFillColor(const sfConvexShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the outline color of a convex shape
@@ -335,7 +335,7 @@ CSFML_API sfColor sfConvexShape_GetFillColor(const sfConvexShape* shape);
/// \return Outline color of the shape
///
////////////////////////////////////////////////////////////
CSFML_API sfColor sfConvexShape_GetOutlineColor(const sfConvexShape* shape);
CSFML_GRAPHICS_API sfColor sfConvexShape_GetOutlineColor(const sfConvexShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the outline thickness of a convex shape
@@ -345,7 +345,7 @@ CSFML_API sfColor sfConvexShape_GetOutlineColor(const sfConvexShape* shape);
/// \return Outline thickness of the shape
///
////////////////////////////////////////////////////////////
CSFML_API float sfConvexShape_GetOutlineThickness(const sfConvexShape* shape);
CSFML_GRAPHICS_API float sfConvexShape_GetOutlineThickness(const sfConvexShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the total number of points of a convex shape
@@ -355,7 +355,7 @@ CSFML_API float sfConvexShape_GetOutlineThickness(const sfConvexShape* shape);
/// \return Number of points of the shape
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfConvexShape_GetPointCount(const sfConvexShape* shape);
CSFML_GRAPHICS_API unsigned int sfConvexShape_GetPointCount(const sfConvexShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get a point of a convex shape
@@ -368,7 +368,7 @@ CSFML_API unsigned int sfConvexShape_GetPointCount(const sfConvexShape* shape);
/// \return Index-th point of the shape
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_GetPoint(const sfConvexShape* shape, unsigned int index, float* x, float* y);
CSFML_GRAPHICS_API void sfConvexShape_GetPoint(const sfConvexShape* shape, unsigned int index, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Set the number of points of a convex shap
@@ -379,7 +379,7 @@ CSFML_API void sfConvexShape_GetPoint(const sfConvexShape* shape, unsigned int i
/// \param count New number of points of the shape
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_SetPointCount(sfConvexShape* shape, unsigned int count);
CSFML_GRAPHICS_API void sfConvexShape_SetPointCount(sfConvexShape* shape, unsigned int count);
////////////////////////////////////////////////////////////
/// \brief Set the position of a point in a convex shape
@@ -396,7 +396,7 @@ CSFML_API void sfConvexShape_SetPointCount(sfConvexShape* shape, unsigned int co
/// \param y New Y coordinate of the point
///
////////////////////////////////////////////////////////////
CSFML_API void sfConvexShape_SetPoint(sfConvexShape* shape, unsigned int index, float x, float y);
CSFML_GRAPHICS_API void sfConvexShape_SetPoint(sfConvexShape* shape, unsigned int index, float x, float y);
#endif // SFML_CONVEXSHAPE_H
+48
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_H
#define SFML_GRAPHICS_EXPORT_H
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(CSFML_GRAPHICS_EXPORTS)
#define CSFML_GRAPHICS_API CSFML_API_EXPORT
#else
#define CSFML_GRAPHICS_API CSFML_API_IMPORT
#endif
#endif // SFML_GRAPHICS_EXPORT_H
+11 -10
View File
@@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Glyph.h>
#include <SFML/Graphics/Types.h>
#include <SFML/System/InputStream.h>
@@ -42,7 +43,7 @@
/// \return A new sfFont object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfFont* sfFont_CreateFromFile(const char* filename);
CSFML_GRAPHICS_API sfFont* sfFont_CreateFromFile(const char* filename);
////////////////////////////////////////////////////////////
/// \brief Create a new image font a file in memory
@@ -53,7 +54,7 @@ CSFML_API sfFont* sfFont_CreateFromFile(const char* filename);
/// \return A new sfFont object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfFont* sfFont_CreateFromMemory(const void* data, size_t sizeInBytes);
CSFML_GRAPHICS_API sfFont* sfFont_CreateFromMemory(const void* data, size_t sizeInBytes);
////////////////////////////////////////////////////////////
/// \brief Create a new image font a custom stream
@@ -63,7 +64,7 @@ CSFML_API sfFont* sfFont_CreateFromMemory(const void* data, size_t sizeInBytes);
/// \return A new sfFont object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfFont* sfFont_CreateFromStream(sfInputStream* stream);
CSFML_GRAPHICS_API sfFont* sfFont_CreateFromStream(sfInputStream* stream);
////////////////////////////////////////////////////////////
/// \brief Copy an existing font
@@ -73,7 +74,7 @@ CSFML_API sfFont* sfFont_CreateFromStream(sfInputStream* stream);
/// \return Copied object
///
////////////////////////////////////////////////////////////
CSFML_API sfFont* sfFont_Copy(sfFont* font);
CSFML_GRAPHICS_API sfFont* sfFont_Copy(sfFont* font);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing font
@@ -81,7 +82,7 @@ CSFML_API sfFont* sfFont_Copy(sfFont* font);
/// \param font Font to delete
///
////////////////////////////////////////////////////////////
CSFML_API void sfFont_Destroy(sfFont* font);
CSFML_GRAPHICS_API void sfFont_Destroy(sfFont* font);
////////////////////////////////////////////////////////////
/// \brief Get a glyph in a font
@@ -94,7 +95,7 @@ CSFML_API void sfFont_Destroy(sfFont* font);
/// \return The corresponding glyph
///
////////////////////////////////////////////////////////////
CSFML_API sfGlyph sfFont_GetGlyph(sfFont* font, sfUint32 codePoint, unsigned int characterSize, sfBool bold);
CSFML_GRAPHICS_API sfGlyph sfFont_GetGlyph(sfFont* font, sfUint32 codePoint, unsigned int characterSize, sfBool bold);
////////////////////////////////////////////////////////////
/// \brief Get the kerning value corresponding to a given pair of characters in a font
@@ -107,7 +108,7 @@ CSFML_API sfGlyph sfFont_GetGlyph(sfFont* font, sfUint32 codePoint, unsigned int
/// \return Kerning offset, in pixels
///
////////////////////////////////////////////////////////////
CSFML_API int sfFont_GetKerning(sfFont* font, sfUint32 first, sfUint32 second, unsigned int characterSize);
CSFML_GRAPHICS_API int sfFont_GetKerning(sfFont* font, sfUint32 first, sfUint32 second, unsigned int characterSize);
////////////////////////////////////////////////////////////
/// \brief Get the line spacing value
@@ -119,7 +120,7 @@ CSFML_API int sfFont_GetKerning(sfFont* font, sfUint32 first, sfUint32 second, u
/// \return Line spacing, in pixels
///
////////////////////////////////////////////////////////////
CSFML_API int sfFont_GetLineSpacing(sfFont* font, unsigned int characterSize);
CSFML_GRAPHICS_API int sfFont_GetLineSpacing(sfFont* font, unsigned int characterSize);
////////////////////////////////////////////////////////////
/// \brief Get the texture containing the glyphs of a given size in a font
@@ -130,7 +131,7 @@ CSFML_API int sfFont_GetLineSpacing(sfFont* font, unsigned int characterSize);
/// \return Read-only pointer to the texture
///
////////////////////////////////////////////////////////////
CSFML_API const sfTexture* sfFont_GetTexture(sfFont* font, unsigned int characterSize);
CSFML_GRAPHICS_API const sfTexture* sfFont_GetTexture(sfFont* font, unsigned int characterSize);
////////////////////////////////////////////////////////////
/// \brief Get the built-in default font (Arial)
@@ -138,7 +139,7 @@ CSFML_API const sfTexture* sfFont_GetTexture(sfFont* font, unsigned int characte
/// \return Pointer to the default font
///
////////////////////////////////////////////////////////////
CSFML_API const sfFont* sfFont_GetDefaultFont(void);
CSFML_GRAPHICS_API const sfFont* sfFont_GetDefaultFont(void);
#endif // SFML_IMAGE_H
+3 -3
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Color.h>
#include <SFML/Graphics/Rect.h>
#include <SFML/Graphics/Types.h>
@@ -132,7 +132,7 @@ sfImage* sfImage_CreateFromStream(sfInputStream* stream);
/// \return Copied object
///
////////////////////////////////////////////////////////////
CSFML_API sfImage* sfImage_Copy(sfImage* image);
CSFML_GRAPHICS_API sfImage* sfImage_Copy(sfImage* image);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing image
@@ -140,7 +140,7 @@ CSFML_API sfImage* sfImage_Copy(sfImage* image);
/// \param image Image to delete
///
////////////////////////////////////////////////////////////
CSFML_API void sfImage_Destroy(sfImage* image);
CSFML_GRAPHICS_API void sfImage_Destroy(sfImage* image);
////////////////////////////////////////////////////////////
/// \brief Save an image to a file on disk
+1 -1
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
////////////////////////////////////////////////////////////
+5 -5
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
////////////////////////////////////////////////////////////
@@ -61,8 +61,8 @@ typedef struct
/// \return sfTrue if the point is inside
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfFloatRect_Contains(const sfFloatRect* rect, float x, float y);
CSFML_API sfBool sfIntRect_Contains(const sfIntRect* rect, int x, int y);
CSFML_GRAPHICS_API sfBool sfFloatRect_Contains(const sfFloatRect* rect, float x, float y);
CSFML_GRAPHICS_API sfBool sfIntRect_Contains(const sfIntRect* rect, int x, int y);
////////////////////////////////////////////////////////////
/// \brief Check intersection between two rectangles
@@ -74,8 +74,8 @@ CSFML_API sfBool sfIntRect_Contains(const sfIntRect* rect, int x, int y);
/// \return sfTrue if rectangles overlap
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfFloatRect_Intersects(const sfFloatRect* rect1, const sfFloatRect* rect2, sfFloatRect* intersection);
CSFML_API sfBool sfIntRect_Intersects(const sfIntRect* rect1, const sfIntRect* rect2, sfIntRect* intersection);
CSFML_GRAPHICS_API sfBool sfFloatRect_Intersects(const sfFloatRect* rect1, const sfFloatRect* rect2, sfFloatRect* intersection);
CSFML_GRAPHICS_API sfBool sfIntRect_Intersects(const sfIntRect* rect1, const sfIntRect* rect2, sfIntRect* intersection);
#endif // SFML_RECT_H
+31 -31
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Color.h>
#include <SFML/Graphics/Rect.h>
#include <SFML/Graphics/Types.h>
@@ -40,7 +40,7 @@
/// \return A new sfRectangleShape object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfRectangleShape* sfRectangleShape_Create(void);
CSFML_GRAPHICS_API sfRectangleShape* sfRectangleShape_Create(void);
////////////////////////////////////////////////////////////
/// \brief Copy an existing rectangle shape
@@ -50,7 +50,7 @@ CSFML_API sfRectangleShape* sfRectangleShape_Create(void);
/// \return Copied object
///
////////////////////////////////////////////////////////////
CSFML_API sfRectangleShape* sfRectangleShape_Copy(sfRectangleShape* shape);
CSFML_GRAPHICS_API sfRectangleShape* sfRectangleShape_Copy(sfRectangleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing rectangle Shape
@@ -58,7 +58,7 @@ CSFML_API sfRectangleShape* sfRectangleShape_Copy(sfRectangleShape* shape);
/// \param Shape Shape to delete
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_Destroy(sfRectangleShape* shape);
CSFML_GRAPHICS_API void sfRectangleShape_Destroy(sfRectangleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Set the position of a rectangle shape
@@ -72,7 +72,7 @@ CSFML_API void sfRectangleShape_Destroy(sfRectangleShape* shape);
/// \param y Y coordinate of the new position
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_SetPosition(sfRectangleShape* shape, float x, float y);
CSFML_GRAPHICS_API void sfRectangleShape_SetPosition(sfRectangleShape* shape, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Set the orientation of a rectangle shape
@@ -85,7 +85,7 @@ CSFML_API void sfRectangleShape_SetPosition(sfRectangleShape* shape, float x, fl
/// \param angle New rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_SetRotation(sfRectangleShape* shape, float angle);
CSFML_GRAPHICS_API void sfRectangleShape_SetRotation(sfRectangleShape* shape, float angle);
////////////////////////////////////////////////////////////
/// \brief Set the scale factors of a rectangle shape
@@ -99,7 +99,7 @@ CSFML_API void sfRectangleShape_SetRotation(sfRectangleShape* shape, float angle
/// \param factorY New vertical scale factor
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_SetScale(sfRectangleShape* shape, float factorX, float factorY);
CSFML_GRAPHICS_API void sfRectangleShape_SetScale(sfRectangleShape* shape, float factorX, float factorY);
////////////////////////////////////////////////////////////
/// \brief Set the local origin of a rectangle shape
@@ -116,7 +116,7 @@ CSFML_API void sfRectangleShape_SetScale(sfRectangleShape* shape, float factorX,
/// \param y Y coordinate of the new origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_SetOrigin(sfRectangleShape* shape, float x, float y);
CSFML_GRAPHICS_API void sfRectangleShape_SetOrigin(sfRectangleShape* shape, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Get the position of a rectangle shape
@@ -126,7 +126,7 @@ CSFML_API void sfRectangleShape_SetOrigin(sfRectangleShape* shape, float x, floa
/// \return Current position
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_GetPosition(const sfRectangleShape* shape, float* x, float* y);
CSFML_GRAPHICS_API void sfRectangleShape_GetPosition(const sfRectangleShape* shape, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Get the orientation of a rectangle shape
@@ -138,7 +138,7 @@ CSFML_API void sfRectangleShape_GetPosition(const sfRectangleShape* shape, float
/// \return Current rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API float sfRectangleShape_GetRotation(const sfRectangleShape* shape);
CSFML_GRAPHICS_API float sfRectangleShape_GetRotation(const sfRectangleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the current scale of a rectangle shape
@@ -148,7 +148,7 @@ CSFML_API float sfRectangleShape_GetRotation(const sfRectangleShape* shape);
/// \return Current scale factors
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_GetScale(const sfRectangleShape* shape, float* x, float* y);
CSFML_GRAPHICS_API void sfRectangleShape_GetScale(const sfRectangleShape* shape, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Get the local origin of a rectangle shape
@@ -158,7 +158,7 @@ CSFML_API void sfRectangleShape_GetScale(const sfRectangleShape* shape, float* x
/// \return Current origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_GetOrigin(const sfRectangleShape* shape, float* x, float* y);
CSFML_GRAPHICS_API void sfRectangleShape_GetOrigin(const sfRectangleShape* shape, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Move a rectangle shape by a given offset
@@ -171,7 +171,7 @@ CSFML_API void sfRectangleShape_GetOrigin(const sfRectangleShape* shape, float*
/// \param offsetY Y offset
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_Move(sfRectangleShape* shape, float offsetX, float offsetY);
CSFML_GRAPHICS_API void sfRectangleShape_Move(sfRectangleShape* shape, float offsetX, float offsetY);
////////////////////////////////////////////////////////////
/// \brief Rotate a rectangle shape
@@ -183,7 +183,7 @@ CSFML_API void sfRectangleShape_Move(sfRectangleShape* shape, float offsetX, flo
/// \param angle Angle of rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_Rotate(sfRectangleShape* shape, float angle);
CSFML_GRAPHICS_API void sfRectangleShape_Rotate(sfRectangleShape* shape, float angle);
////////////////////////////////////////////////////////////
/// \brief Scale a rectangle shape
@@ -196,7 +196,7 @@ CSFML_API void sfRectangleShape_Rotate(sfRectangleShape* shape, float angle);
/// \param factorY Vertical scale factor
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_Scale(sfRectangleShape* shape, float factorX, float factorY);
CSFML_GRAPHICS_API void sfRectangleShape_Scale(sfRectangleShape* shape, float factorX, float factorY);
////////////////////////////////////////////////////////////
/// \brief Get the combined transform of a rectangle shape
@@ -206,7 +206,7 @@ CSFML_API void sfRectangleShape_Scale(sfRectangleShape* shape, float factorX, fl
/// \return Transform combining the position/rotation/scale/origin of the object
///
////////////////////////////////////////////////////////////
CSFML_API const sfTransform* sfRectangleShape_GetTransform(const sfRectangleShape* shape);
CSFML_GRAPHICS_API const sfTransform* sfRectangleShape_GetTransform(const sfRectangleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the inverse of the combined transform of a rectangle shape
@@ -216,7 +216,7 @@ CSFML_API const sfTransform* sfRectangleShape_GetTransform(const sfRectangleShap
/// \return Inverse of the combined transformations applied to the object
///
////////////////////////////////////////////////////////////
CSFML_API const sfTransform* sfRectangleShape_GetInverseTransform(const sfRectangleShape* shape);
CSFML_GRAPHICS_API const sfTransform* sfRectangleShape_GetInverseTransform(const sfRectangleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Change the source texture of a rectangle shape
@@ -237,7 +237,7 @@ CSFML_API const sfTransform* sfRectangleShape_GetInverseTransform(const sfRectan
/// \param resetRect Should the texture rect be reset to the size of the new texture?
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_SetTexture(sfRectangleShape* shape, const sfTexture* texture, sfBool resetRect);
CSFML_GRAPHICS_API void sfRectangleShape_SetTexture(sfRectangleShape* shape, const sfTexture* texture, sfBool resetRect);
////////////////////////////////////////////////////////////
/// \brief Set the sub-rectangle of the texture that a rectangle shape will display
@@ -250,7 +250,7 @@ CSFML_API void sfRectangleShape_SetTexture(sfRectangleShape* shape, const sfText
/// \param rect Rectangle defining the region of the texture to display
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_SetTextureRect(sfRectangleShape* shape, sfIntRect rect);
CSFML_GRAPHICS_API void sfRectangleShape_SetTextureRect(sfRectangleShape* shape, sfIntRect rect);
////////////////////////////////////////////////////////////
/// \brief Set the fill color of a rectangle shape
@@ -266,7 +266,7 @@ CSFML_API void sfRectangleShape_SetTextureRect(sfRectangleShape* shape, sfIntRec
/// \param color New color of the shape
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_SetFillColor(sfRectangleShape* shape, sfColor color);
CSFML_GRAPHICS_API void sfRectangleShape_SetFillColor(sfRectangleShape* shape, sfColor color);
////////////////////////////////////////////////////////////
/// \brief Set the outline color of a rectangle shape
@@ -278,7 +278,7 @@ CSFML_API void sfRectangleShape_SetFillColor(sfRectangleShape* shape, sfColor co
/// \param color New outline color of the shape
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_SetOutlineColor(sfRectangleShape* shape, sfColor color);
CSFML_GRAPHICS_API void sfRectangleShape_SetOutlineColor(sfRectangleShape* shape, sfColor color);
////////////////////////////////////////////////////////////
/// \brief Set the thickness of a rectangle shape's outline
@@ -291,7 +291,7 @@ CSFML_API void sfRectangleShape_SetOutlineColor(sfRectangleShape* shape, sfColor
/// \param thickness New outline thickness
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_SetOutlineThickness(sfRectangleShape* shape, float thickness);
CSFML_GRAPHICS_API void sfRectangleShape_SetOutlineThickness(sfRectangleShape* shape, float thickness);
////////////////////////////////////////////////////////////
/// \brief Get the source texture of a rectangle shape
@@ -305,7 +305,7 @@ CSFML_API void sfRectangleShape_SetOutlineThickness(sfRectangleShape* shape, flo
/// \return Pointer to the shape's texture
///
////////////////////////////////////////////////////////////
CSFML_API const sfTexture* sfRectangleShape_GetTexture(const sfRectangleShape* shape);
CSFML_GRAPHICS_API const sfTexture* sfRectangleShape_GetTexture(const sfRectangleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the sub-rectangle of the texture displayed by a rectangle shape
@@ -315,7 +315,7 @@ CSFML_API const sfTexture* sfRectangleShape_GetTexture(const sfRectangleShape* s
/// \return Texture rectangle of the shape
///
////////////////////////////////////////////////////////////
CSFML_API sfIntRect sfRectangleShape_GetTextureRect(const sfRectangleShape* shape);
CSFML_GRAPHICS_API sfIntRect sfRectangleShape_GetTextureRect(const sfRectangleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the fill color of a rectangle shape
@@ -325,7 +325,7 @@ CSFML_API sfIntRect sfRectangleShape_GetTextureRect(const sfRectangleShape* shap
/// \return Fill color of the shape
///
////////////////////////////////////////////////////////////
CSFML_API sfColor sfRectangleShape_GetFillColor(const sfRectangleShape* shape);
CSFML_GRAPHICS_API sfColor sfRectangleShape_GetFillColor(const sfRectangleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the outline color of a rectangle shape
@@ -335,7 +335,7 @@ CSFML_API sfColor sfRectangleShape_GetFillColor(const sfRectangleShape* shape);
/// \return Outline color of the shape
///
////////////////////////////////////////////////////////////
CSFML_API sfColor sfRectangleShape_GetOutlineColor(const sfRectangleShape* shape);
CSFML_GRAPHICS_API sfColor sfRectangleShape_GetOutlineColor(const sfRectangleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the outline thickness of a rectangle shape
@@ -345,7 +345,7 @@ CSFML_API sfColor sfRectangleShape_GetOutlineColor(const sfRectangleShape* shape
/// \return Outline thickness of the shape
///
////////////////////////////////////////////////////////////
CSFML_API float sfRectangleShape_GetOutlineThickness(const sfRectangleShape* shape);
CSFML_GRAPHICS_API float sfRectangleShape_GetOutlineThickness(const sfRectangleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get the total number of points of a rectangle shape
@@ -355,7 +355,7 @@ CSFML_API float sfRectangleShape_GetOutlineThickness(const sfRectangleShape* sha
/// \return Number of points of the shape
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfRectangleShape_GetPointCount(const sfRectangleShape* shape);
CSFML_GRAPHICS_API unsigned int sfRectangleShape_GetPointCount(const sfRectangleShape* shape);
////////////////////////////////////////////////////////////
/// \brief Get a point of a rectangle shape
@@ -368,7 +368,7 @@ CSFML_API unsigned int sfRectangleShape_GetPointCount(const sfRectangleShape* sh
/// \return Index-th point of the shape
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_GetPoint(const sfRectangleShape* shape, unsigned int index, float* x, float* y);
CSFML_GRAPHICS_API void sfRectangleShape_GetPoint(const sfRectangleShape* shape, unsigned int index, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Set the size of a rectangle shape
@@ -378,7 +378,7 @@ CSFML_API void sfRectangleShape_GetPoint(const sfRectangleShape* shape, unsigned
/// \param height New height of the rectangle
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_SetSize(sfRectangleShape* shape, float width, float height);
CSFML_GRAPHICS_API void sfRectangleShape_SetSize(sfRectangleShape* shape, float width, float height);
////////////////////////////////////////////////////////////
/// \brief Get the size of a rectangle shape
@@ -388,7 +388,7 @@ CSFML_API void sfRectangleShape_SetSize(sfRectangleShape* shape, float width, fl
/// \param height Returned height of the rectangle
///
////////////////////////////////////////////////////////////
CSFML_API void sfRectangleShape_GetSize(const sfRectangleShape* shape, float* width, float* height);
CSFML_GRAPHICS_API void sfRectangleShape_GetSize(const sfRectangleShape* shape, float* width, float* height);
#endif // SFML_RECTANGLESHAPE_H
+1
View File
@@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/BlendMode.h>
#include <SFML/Graphics/Types.h>
+24 -24
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Color.h>
#include <SFML/Graphics/Rect.h>
#include <SFML/Graphics/Types.h>
@@ -47,7 +47,7 @@
/// \return A new sfRenderTexture object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfRenderTexture* sfRenderTexture_Create(unsigned int width, unsigned int height, sfBool depthBuffer);
CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_Create(unsigned int width, unsigned int height, sfBool depthBuffer);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing render texture
@@ -55,7 +55,7 @@ CSFML_API sfRenderTexture* sfRenderTexture_Create(unsigned int width, unsigned i
/// \param renderTexture Render texture to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderTexture_Destroy(sfRenderTexture* renderTexture);
CSFML_GRAPHICS_API void sfRenderTexture_Destroy(sfRenderTexture* renderTexture);
////////////////////////////////////////////////////////////
/// \brief Get the width of the rendering region of a render texture
@@ -65,7 +65,7 @@ CSFML_API void sfRenderTexture_Destroy(sfRenderTexture* renderTexture);
/// \return Width in pixels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfRenderTexture_GetWidth(const sfRenderTexture* renderTexture);
CSFML_GRAPHICS_API unsigned int sfRenderTexture_GetWidth(const sfRenderTexture* renderTexture);
////////////////////////////////////////////////////////////
/// \brief Get the height of the rendering region of a render texture
@@ -75,7 +75,7 @@ CSFML_API unsigned int sfRenderTexture_GetWidth(const sfRenderTexture* renderTex
/// \return Height in pixels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfRenderTexture_GetHeight(const sfRenderTexture* renderTexture);
CSFML_GRAPHICS_API unsigned int sfRenderTexture_GetHeight(const sfRenderTexture* renderTexture);
////////////////////////////////////////////////////////////
/// \brief Activate or deactivate a render texture as the current target for rendering
@@ -86,7 +86,7 @@ CSFML_API unsigned int sfRenderTexture_GetHeight(const sfRenderTexture* renderTe
/// \return True if operation was successful, false otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfRenderTexture_SetActive(sfRenderTexture* renderTexture, sfBool active);
CSFML_GRAPHICS_API sfBool sfRenderTexture_SetActive(sfRenderTexture* renderTexture, sfBool active);
////////////////////////////////////////////////////////////
/// \brief Update the contents of the target texture
@@ -94,7 +94,7 @@ CSFML_API sfBool sfRenderTexture_SetActive(sfRenderTexture* renderTexture, sfBoo
/// \param renderTexture Render texture object
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderTexture_Display(sfRenderTexture* renderTexture);
CSFML_GRAPHICS_API void sfRenderTexture_Display(sfRenderTexture* renderTexture);
////////////////////////////////////////////////////////////
/// \brief Clear the rendertexture with the given color
@@ -103,7 +103,7 @@ CSFML_API void sfRenderTexture_Display(sfRenderTexture* renderTexture);
/// \param color Fill color
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderTexture_Clear(sfRenderTexture* renderTexture, sfColor color);
CSFML_GRAPHICS_API void sfRenderTexture_Clear(sfRenderTexture* renderTexture, sfColor color);
////////////////////////////////////////////////////////////
/// \brief Change the current active view of a render texture
@@ -112,7 +112,7 @@ CSFML_API void sfRenderTexture_Clear(sfRenderTexture* renderTexture, sfColor col
/// \param view Pointer to the new view
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderTexture_SetView(sfRenderTexture* renderTexture, const sfView* view);
CSFML_GRAPHICS_API void sfRenderTexture_SetView(sfRenderTexture* renderTexture, const sfView* view);
////////////////////////////////////////////////////////////
/// \brief Get the current active view of a render texture
@@ -122,7 +122,7 @@ CSFML_API void sfRenderTexture_SetView(sfRenderTexture* renderTexture, const sfV
/// \return Current active view
///
////////////////////////////////////////////////////////////
CSFML_API const sfView* sfRenderTexture_GetView(const sfRenderTexture* renderTexture);
CSFML_GRAPHICS_API const sfView* sfRenderTexture_GetView(const sfRenderTexture* renderTexture);
////////////////////////////////////////////////////////////
/// \brief Get the default view of a render texture
@@ -132,7 +132,7 @@ CSFML_API const sfView* sfRenderTexture_GetView(const sfRenderTexture* renderTex
/// \return Default view of the rendertexture
///
////////////////////////////////////////////////////////////
CSFML_API const sfView* sfRenderTexture_GetDefaultView(const sfRenderTexture* renderTexture);
CSFML_GRAPHICS_API const sfView* sfRenderTexture_GetDefaultView(const sfRenderTexture* renderTexture);
////////////////////////////////////////////////////////////
/// \brief Get the viewport of a view applied to this target
@@ -143,7 +143,7 @@ CSFML_API const sfView* sfRenderTexture_GetDefaultView(const sfRenderTexture* re
/// \return Viewport rectangle, expressed in pixels in the current target
///
////////////////////////////////////////////////////////////
CSFML_API sfIntRect sfRenderTexture_GetViewport(const sfRenderTexture* renderTexture, const sfView* view);
CSFML_GRAPHICS_API sfIntRect sfRenderTexture_GetViewport(const sfRenderTexture* renderTexture, const sfView* view);
////////////////////////////////////////////////////////////
/// \brief Convert a point in texture coordinates into view coordinates
@@ -156,7 +156,7 @@ CSFML_API sfIntRect sfRenderTexture_GetViewport(const sfRenderTexture* renderTex
/// \param targetView Target view to convert the point to (pass NULL to use the current view)
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderTexture_ConvertCoords(const sfRenderTexture* renderTexture, unsigned int windowX, unsigned int windowY, float* viewX, float* viewY, const sfView* targetView);
CSFML_GRAPHICS_API void sfRenderTexture_ConvertCoords(const sfRenderTexture* renderTexture, unsigned int windowX, unsigned int windowY, float* viewX, float* viewY, const sfView* targetView);
////////////////////////////////////////////////////////////
/// \brief Draw a drawable object to the render-target
@@ -166,12 +166,12 @@ CSFML_API void sfRenderTexture_ConvertCoords(const sfRenderTexture* renderTextur
/// \param states Render states to use for drawing (NULL to use the default states)
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderTexture_DrawSprite(sfRenderTexture* renderTexture, const sfSprite* object, const sfRenderStates* states);
CSFML_API void sfRenderTexture_DrawText(sfRenderTexture* renderTexture, const sfText* object, const sfRenderStates* states);
CSFML_API void sfRenderTexture_DrawCircleShape(sfRenderTexture* renderTexture, const sfCircleShape* object, const sfRenderStates* states);
CSFML_API void sfRenderTexture_DrawConvexShape(sfRenderTexture* renderTexture, const sfConvexShape* object, const sfRenderStates* states);
CSFML_API void sfRenderTexture_DrawRectangleShape(sfRenderTexture* renderTexture, const sfRectangleShape* object, const sfRenderStates* states);
CSFML_API void sfRenderTexture_DrawVertexArray(sfRenderTexture* renderTexture, const sfVertexArray* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_DrawSprite(sfRenderTexture* renderTexture, const sfSprite* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_DrawText(sfRenderTexture* renderTexture, const sfText* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_DrawCircleShape(sfRenderTexture* renderTexture, const sfCircleShape* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_DrawConvexShape(sfRenderTexture* renderTexture, const sfConvexShape* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_DrawRectangleShape(sfRenderTexture* renderTexture, const sfRectangleShape* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderTexture_DrawVertexArray(sfRenderTexture* renderTexture, const sfVertexArray* object, const sfRenderStates* states);
////////////////////////////////////////////////////////////
/// \brief Draw primitives defined by an array of vertices to a render texture
@@ -183,7 +183,7 @@ CSFML_API void sfRenderTexture_DrawVertexArray(sfRenderTexture* renderTexture, c
/// \param states Render states to use for drawing (NULL to use the default states)
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderTexture_DrawPrimitives(sfRenderTexture* renderTexture,
CSFML_GRAPHICS_API void sfRenderTexture_DrawPrimitives(sfRenderTexture* renderTexture,
const sfVertex* vertices, unsigned int vertexCount,
sfPrimitiveType type, const sfRenderStates* states);
@@ -208,7 +208,7 @@ CSFML_API void sfRenderTexture_DrawPrimitives(sfRenderTexture* renderTexture,
/// \param renderTexture Render texture object
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderTexture_PushGLStates(sfRenderTexture* renderTexture);
CSFML_GRAPHICS_API void sfRenderTexture_PushGLStates(sfRenderTexture* renderTexture);
////////////////////////////////////////////////////////////
/// \brief Restore the previously saved OpenGL render states and matrices
@@ -219,7 +219,7 @@ CSFML_API void sfRenderTexture_PushGLStates(sfRenderTexture* renderTexture);
/// \param renderTexture Render texture object
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderTexture_PopGLStates(sfRenderTexture* renderTexture);
CSFML_GRAPHICS_API void sfRenderTexture_PopGLStates(sfRenderTexture* renderTexture);
////////////////////////////////////////////////////////////
/// \brief Reset the internal OpenGL states so that the target is ready for drawing
@@ -233,7 +233,7 @@ CSFML_API void sfRenderTexture_PopGLStates(sfRenderTexture* renderTexture);
/// \param renderTexture Render texture object
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderTexture_ResetGLStates(sfRenderTexture* renderTexture);
CSFML_GRAPHICS_API void sfRenderTexture_ResetGLStates(sfRenderTexture* renderTexture);
////////////////////////////////////////////////////////////
/// \brief Get the target texture of a render texture
@@ -243,7 +243,7 @@ CSFML_API void sfRenderTexture_ResetGLStates(sfRenderTexture* renderTexture);
/// \return Pointer to the target texture
///
////////////////////////////////////////////////////////////
CSFML_API const sfTexture* sfRenderTexture_GetTexture(const sfRenderTexture* renderTexture);
CSFML_GRAPHICS_API const sfTexture* sfRenderTexture_GetTexture(const sfRenderTexture* renderTexture);
#endif // SFML_RENDERTEXTURE_H
+41 -41
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Color.h>
#include <SFML/Graphics/Rect.h>
#include <SFML/Graphics/Types.h>
@@ -50,7 +50,7 @@
/// \param settings Creation settings (pass NULL to use default values)
///
////////////////////////////////////////////////////////////
CSFML_API sfRenderWindow* sfRenderWindow_Create(sfVideoMode mode, const char* title, sfUint32 style, const sfContextSettings* settings);
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_Create(sfVideoMode mode, const char* title, sfUint32 style, const sfContextSettings* settings);
////////////////////////////////////////////////////////////
/// \brief Construct a render window from an existing control
@@ -59,7 +59,7 @@ CSFML_API sfRenderWindow* sfRenderWindow_Create(sfVideoMode mode, const char* ti
/// \param settings Creation settings (pass NULL to use default values)
///
////////////////////////////////////////////////////////////
CSFML_API sfRenderWindow* sfRenderWindow_CreateFromHandle(sfWindowHandle handle, const sfContextSettings* settings);
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_CreateFromHandle(sfWindowHandle handle, const sfContextSettings* settings);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing render window
@@ -67,7 +67,7 @@ CSFML_API sfRenderWindow* sfRenderWindow_CreateFromHandle(sfWindowHandle handle,
/// \param renderWindow Render window to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_Destroy(sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API void sfRenderWindow_Destroy(sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Close a render window (but doesn't destroy the internal data)
@@ -75,7 +75,7 @@ CSFML_API void sfRenderWindow_Destroy(sfRenderWindow* renderWindow);
/// \param renderWindow Render window to close
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_Close(sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API void sfRenderWindow_Close(sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Tell whether or not a render window is opened
@@ -83,7 +83,7 @@ CSFML_API void sfRenderWindow_Close(sfRenderWindow* renderWindow);
/// \param renderWindow Render window object
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfRenderWindow_IsOpen(const sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API sfBool sfRenderWindow_IsOpen(const sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Get the width of the rendering region of a render window
@@ -93,7 +93,7 @@ CSFML_API sfBool sfRenderWindow_IsOpen(const sfRenderWindow* renderWindow);
/// \return Width in pixels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfRenderWindow_GetWidth(const sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API unsigned int sfRenderWindow_GetWidth(const sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Get the height of the rendering region of a render window
@@ -103,7 +103,7 @@ CSFML_API unsigned int sfRenderWindow_GetWidth(const sfRenderWindow* renderWindo
/// \return Height in pixels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfRenderWindow_GetHeight(const sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API unsigned int sfRenderWindow_GetHeight(const sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Get the creation settings of a render window
@@ -113,7 +113,7 @@ CSFML_API unsigned int sfRenderWindow_GetHeight(const sfRenderWindow* renderWind
/// \return Settings used to create the window
///
////////////////////////////////////////////////////////////
CSFML_API sfContextSettings sfRenderWindow_GetSettings(const sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API sfContextSettings sfRenderWindow_GetSettings(const sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Get the event on top of events stack of a render window, if any, and pop it
@@ -124,7 +124,7 @@ CSFML_API sfContextSettings sfRenderWindow_GetSettings(const sfRenderWindow* ren
/// \return sfTrue if an event was returned, sfFalse if events stack was empty
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfRenderWindow_PollEvent(sfRenderWindow* renderWindow, sfEvent* event);
CSFML_GRAPHICS_API sfBool sfRenderWindow_PollEvent(sfRenderWindow* renderWindow, sfEvent* event);
////////////////////////////////////////////////////////////
/// \brief Wait for an event and return it
@@ -135,7 +135,7 @@ CSFML_API sfBool sfRenderWindow_PollEvent(sfRenderWindow* renderWindow, sfEvent*
/// \return sfFalse if an error occured
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfRenderWindow_WaitEvent(sfRenderWindow* renderWindow, sfEvent* event);
CSFML_GRAPHICS_API sfBool sfRenderWindow_WaitEvent(sfRenderWindow* renderWindow, sfEvent* event);
////////////////////////////////////////////////////////////
/// \brief Enable / disable vertical synchronization on a render window
@@ -144,7 +144,7 @@ CSFML_API sfBool sfRenderWindow_WaitEvent(sfRenderWindow* renderWindow, sfEvent*
/// \param enabled sfTrue to enable v-sync, sfFalse to deactivate
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_EnableVerticalSync(sfRenderWindow* renderWindow, sfBool enabled);
CSFML_GRAPHICS_API void sfRenderWindow_EnableVerticalSync(sfRenderWindow* renderWindow, sfBool enabled);
////////////////////////////////////////////////////////////
/// \brief Show or hide the mouse cursor on a render window
@@ -153,7 +153,7 @@ CSFML_API void sfRenderWindow_EnableVerticalSync(sfRenderWindow* renderWindow, s
/// \param show sfTrue to show, sfFalse to hide
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_ShowMouseCursor(sfRenderWindow* renderWindow, sfBool show);
CSFML_GRAPHICS_API void sfRenderWindow_ShowMouseCursor(sfRenderWindow* renderWindow, sfBool show);
////////////////////////////////////////////////////////////
/// \brief Change the position of a render window on screen
@@ -165,7 +165,7 @@ CSFML_API void sfRenderWindow_ShowMouseCursor(sfRenderWindow* renderWindow, sfBo
/// \param top Top position
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_SetPosition(sfRenderWindow* renderWindow, int left, int top);
CSFML_GRAPHICS_API void sfRenderWindow_SetPosition(sfRenderWindow* renderWindow, int left, int top);
////////////////////////////////////////////////////////////
/// \brief Change the size of the rendering region of a render window
@@ -175,7 +175,7 @@ CSFML_API void sfRenderWindow_SetPosition(sfRenderWindow* renderWindow, int left
/// \param height New Height
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_SetSize(sfRenderWindow* renderWindow, unsigned int width, unsigned int height);
CSFML_GRAPHICS_API void sfRenderWindow_SetSize(sfRenderWindow* renderWindow, unsigned int width, unsigned int height);
////////////////////////////////////////////////////////////
/// \brief Change the title of a render window
@@ -184,7 +184,7 @@ CSFML_API void sfRenderWindow_SetSize(sfRenderWindow* renderWindow, unsigned int
/// \param title New title
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_SetTitle(sfRenderWindow* renderWindow, const char* title);
CSFML_GRAPHICS_API void sfRenderWindow_SetTitle(sfRenderWindow* renderWindow, const char* title);
////////////////////////////////////////////////////////////
/// \brief Show or hide a render window
@@ -193,7 +193,7 @@ CSFML_API void sfRenderWindow_SetTitle(sfRenderWindow* renderWindow, const char*
/// \param show sfTrue to show, sfFalse to hide
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_Show(sfRenderWindow* renderWindow, sfBool show);
CSFML_GRAPHICS_API void sfRenderWindow_Show(sfRenderWindow* renderWindow, sfBool show);
////////////////////////////////////////////////////////////
/// \brief Enable or disable automatic key-repeat for keydown events
@@ -204,7 +204,7 @@ CSFML_API void sfRenderWindow_Show(sfRenderWindow* renderWindow, sfBool show);
/// \param enabled sfTrue to enable, sfFalse to disable
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_EnableKeyRepeat(sfRenderWindow* renderWindow, sfBool enabled);
CSFML_GRAPHICS_API void sfRenderWindow_EnableKeyRepeat(sfRenderWindow* renderWindow, sfBool enabled);
////////////////////////////////////////////////////////////
/// \brief Change a render window's icon
@@ -215,7 +215,7 @@ CSFML_API void sfRenderWindow_EnableKeyRepeat(sfRenderWindow* renderWindow, sfBo
/// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_SetIcon(sfRenderWindow* renderWindow, unsigned int width, unsigned int height, const sfUint8* pixels);
CSFML_GRAPHICS_API void sfRenderWindow_SetIcon(sfRenderWindow* renderWindow, unsigned int width, unsigned int height, const sfUint8* pixels);
////////////////////////////////////////////////////////////
/// \brief Activate or deactivate a render window as the current target for rendering
@@ -226,7 +226,7 @@ CSFML_API void sfRenderWindow_SetIcon(sfRenderWindow* renderWindow, unsigned int
/// \return True if operation was successful, false otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfRenderWindow_SetActive(sfRenderWindow* renderWindow, sfBool active);
CSFML_GRAPHICS_API sfBool sfRenderWindow_SetActive(sfRenderWindow* renderWindow, sfBool active);
////////////////////////////////////////////////////////////
/// \brief Display a render window on screen
@@ -234,7 +234,7 @@ CSFML_API sfBool sfRenderWindow_SetActive(sfRenderWindow* renderWindow, sfBool a
/// \param renderWindow Render window object
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_Display(sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API void sfRenderWindow_Display(sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Limit the framerate to a maximum fixed frequency for a render window
@@ -243,7 +243,7 @@ CSFML_API void sfRenderWindow_Display(sfRenderWindow* renderWindow);
/// \param limit Framerate limit, in frames per seconds (use 0 to disable limit)
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_SetFramerateLimit(sfRenderWindow* renderWindow, unsigned int limit);
CSFML_GRAPHICS_API void sfRenderWindow_SetFramerateLimit(sfRenderWindow* renderWindow, unsigned int limit);
////////////////////////////////////////////////////////////
/// \brief Change the joystick threshold, ie. the value below which no move event will be generated
@@ -252,7 +252,7 @@ CSFML_API void sfRenderWindow_SetFramerateLimit(sfRenderWindow* renderWindow, un
/// \param threshold New threshold, in range [0, 100]
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_SetJoystickThreshold(sfRenderWindow* renderWindow, float threshold);
CSFML_GRAPHICS_API void sfRenderWindow_SetJoystickThreshold(sfRenderWindow* renderWindow, float threshold);
////////////////////////////////////////////////////////////
/// \brief Retrieve the OS-specific handle of a render window
@@ -262,7 +262,7 @@ CSFML_API void sfRenderWindow_SetJoystickThreshold(sfRenderWindow* renderWindow,
/// \return Window handle
///
////////////////////////////////////////////////////////////
CSFML_API sfWindowHandle sfRenderWindow_GetSystemHandle(const sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API sfWindowHandle sfRenderWindow_GetSystemHandle(const sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Clear a render window with the given color
@@ -271,7 +271,7 @@ CSFML_API sfWindowHandle sfRenderWindow_GetSystemHandle(const sfRenderWindow* re
/// \param color Fill color
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_Clear(sfRenderWindow* renderWindow, sfColor color);
CSFML_GRAPHICS_API void sfRenderWindow_Clear(sfRenderWindow* renderWindow, sfColor color);
////////////////////////////////////////////////////////////
/// \brief Change the current active view of a render window
@@ -280,7 +280,7 @@ CSFML_API void sfRenderWindow_Clear(sfRenderWindow* renderWindow, sfColor color)
/// \param view Pointer to the new view
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_SetView(sfRenderWindow* renderWindow, const sfView* view);
CSFML_GRAPHICS_API void sfRenderWindow_SetView(sfRenderWindow* renderWindow, const sfView* view);
////////////////////////////////////////////////////////////
/// \brief Get the current active view of a render window
@@ -290,7 +290,7 @@ CSFML_API void sfRenderWindow_SetView(sfRenderWindow* renderWindow, const sfView
/// \return Current active view
///
////////////////////////////////////////////////////////////
CSFML_API const sfView* sfRenderWindow_GetView(const sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API const sfView* sfRenderWindow_GetView(const sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Get the default view of a render window
@@ -300,7 +300,7 @@ CSFML_API const sfView* sfRenderWindow_GetView(const sfRenderWindow* renderWindo
/// \return Default view of the render window
///
////////////////////////////////////////////////////////////
CSFML_API const sfView* sfRenderWindow_GetDefaultView(const sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API const sfView* sfRenderWindow_GetDefaultView(const sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Get the viewport of a view applied to this target
@@ -311,7 +311,7 @@ CSFML_API const sfView* sfRenderWindow_GetDefaultView(const sfRenderWindow* rend
/// \return Viewport rectangle, expressed in pixels in the current target
///
////////////////////////////////////////////////////////////
CSFML_API sfIntRect sfRenderWindow_GetViewport(const sfRenderWindow* renderWindow, const sfView* view);
CSFML_GRAPHICS_API sfIntRect sfRenderWindow_GetViewport(const sfRenderWindow* renderWindow, const sfView* view);
////////////////////////////////////////////////////////////
/// \brief Convert a point in window coordinates into view coordinates
@@ -324,7 +324,7 @@ CSFML_API sfIntRect sfRenderWindow_GetViewport(const sfRenderWindow* renderWindo
/// \param targetView Target view to convert the point to (pass NULL to use the current view)
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_ConvertCoords(const sfRenderWindow* renderWindow, unsigned int windowX, unsigned int windowY, float* viewX, float* viewY, const sfView* targetView);
CSFML_GRAPHICS_API void sfRenderWindow_ConvertCoords(const sfRenderWindow* renderWindow, unsigned int windowX, unsigned int windowY, float* viewX, float* viewY, const sfView* targetView);
////////////////////////////////////////////////////////////
/// \brief Draw a drawable object to the render-target
@@ -334,12 +334,12 @@ CSFML_API void sfRenderWindow_ConvertCoords(const sfRenderWindow* renderWindow,
/// \param states Render states to use for drawing (NULL to use the default states)
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_DrawSprite(sfRenderWindow* renderWindow, const sfSprite* object, const sfRenderStates* states);
CSFML_API void sfRenderWindow_DrawText(sfRenderWindow* renderWindow, const sfText* object, const sfRenderStates* states);
CSFML_API void sfRenderWindow_DrawCircleShape(sfRenderWindow* renderWindow, const sfCircleShape* object, const sfRenderStates* states);
CSFML_API void sfRenderWindow_DrawConvexShape(sfRenderWindow* renderWindow, const sfConvexShape* object, const sfRenderStates* states);
CSFML_API void sfRenderWindow_DrawRectangleShape(sfRenderWindow* renderWindow, const sfRectangleShape* object, const sfRenderStates* states);
CSFML_API void sfRenderWindow_DrawVertexArray(sfRenderWindow* renderWindow, const sfVertexArray* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_DrawSprite(sfRenderWindow* renderWindow, const sfSprite* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_DrawText(sfRenderWindow* renderWindow, const sfText* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_DrawCircleShape(sfRenderWindow* renderWindow, const sfCircleShape* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_DrawConvexShape(sfRenderWindow* renderWindow, const sfConvexShape* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_DrawRectangleShape(sfRenderWindow* renderWindow, const sfRectangleShape* object, const sfRenderStates* states);
CSFML_GRAPHICS_API void sfRenderWindow_DrawVertexArray(sfRenderWindow* renderWindow, const sfVertexArray* object, const sfRenderStates* states);
////////////////////////////////////////////////////////////
/// \brief Draw primitives defined by an array of vertices to a render window
@@ -351,7 +351,7 @@ CSFML_API void sfRenderWindow_DrawVertexArray(sfRenderWindow* renderWindow, cons
/// \param states Render states to use for drawing (NULL to use the default states)
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_DrawPrimitives(sfRenderWindow* renderWindow,
CSFML_GRAPHICS_API void sfRenderWindow_DrawPrimitives(sfRenderWindow* renderWindow,
const sfVertex* vertices, unsigned int vertexCount,
sfPrimitiveType type, const sfRenderStates* states);
@@ -376,7 +376,7 @@ CSFML_API void sfRenderWindow_DrawPrimitives(sfRenderWindow* renderWindow,
/// \param renderWindow render window object
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_PushGLStates(sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API void sfRenderWindow_PushGLStates(sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Restore the previously saved OpenGL render states and matrices
@@ -387,7 +387,7 @@ CSFML_API void sfRenderWindow_PushGLStates(sfRenderWindow* renderWindow);
/// \param renderWindow render window object
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_PopGLStates(sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API void sfRenderWindow_PopGLStates(sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Reset the internal OpenGL states so that the target is ready for drawing
@@ -401,7 +401,7 @@ CSFML_API void sfRenderWindow_PopGLStates(sfRenderWindow* renderWindow);
/// \param renderWindow render window object
///
////////////////////////////////////////////////////////////
CSFML_API void sfRenderWindow_ResetGLStates(sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API void sfRenderWindow_ResetGLStates(sfRenderWindow* renderWindow);
////////////////////////////////////////////////////////////
/// \brief Copy the current contents of a render window to an image
@@ -419,7 +419,7 @@ CSFML_API void sfRenderWindow_ResetGLStates(sfRenderWindow* renderWindow);
/// \return New image containing the captured contents
///
////////////////////////////////////////////////////////////
CSFML_API sfImage* sfRenderWindow_Capture(const sfRenderWindow* renderWindow);
CSFML_GRAPHICS_API sfImage* sfRenderWindow_Capture(const sfRenderWindow* renderWindow);
#endif // SFML_RENDERWINDOW_H
+16 -16
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Color.h>
#include <SFML/Graphics/Types.h>
#include <SFML/System/InputStream.h>
@@ -51,7 +51,7 @@
/// \return A new sfShader object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfShader* sfShader_CreateFromFile(const char* vertexShaderFilename, const char* fragmentShaderFilename);
CSFML_GRAPHICS_API sfShader* sfShader_CreateFromFile(const char* vertexShaderFilename, const char* fragmentShaderFilename);
////////////////////////////////////////////////////////////
/// \brief Load both the vertex and fragment shaders from source codes in memory
@@ -70,7 +70,7 @@ CSFML_API sfShader* sfShader_CreateFromFile(const char* vertexShaderFilename, co
/// \return A new sfShader object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfShader* sfShader_CreateFromMemory(const char* vertexShader, const char* fragmentShader);
CSFML_GRAPHICS_API sfShader* sfShader_CreateFromMemory(const char* vertexShader, const char* fragmentShader);
////////////////////////////////////////////////////////////
/// \brief Load both the vertex and fragment shaders from custom streams
@@ -89,7 +89,7 @@ CSFML_API sfShader* sfShader_CreateFromMemory(const char* vertexShader, const ch
/// \return A new sfShader object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfShader* sfShader_CreateFromStream(sfInputStream* vertexShaderStream, sfInputStream* fragmentShaderStream);
CSFML_GRAPHICS_API sfShader* sfShader_CreateFromStream(sfInputStream* vertexShaderStream, sfInputStream* fragmentShaderStream);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing shader
@@ -97,7 +97,7 @@ CSFML_API sfShader* sfShader_CreateFromStream(sfInputStream* vertexShaderStream,
/// \param shader Shader to delete
///
////////////////////////////////////////////////////////////
CSFML_API void sfShader_Destroy(sfShader* shader);
CSFML_GRAPHICS_API void sfShader_Destroy(sfShader* shader);
////////////////////////////////////////////////////////////
/// \brief Change a float parameter of a shader
@@ -119,7 +119,7 @@ CSFML_API void sfShader_Destroy(sfShader* shader);
/// \param x Value to assign
///
////////////////////////////////////////////////////////////
CSFML_API void sfShader_SetFloatParameter(sfShader* shader, const char* name, float x);
CSFML_GRAPHICS_API void sfShader_SetFloatParameter(sfShader* shader, const char* name, float x);
////////////////////////////////////////////////////////////
/// \brief Change a 2-components vector parameter of a shader
@@ -142,7 +142,7 @@ CSFML_API void sfShader_SetFloatParameter(sfShader* shader, const char* name, fl
/// \param y Second component of the value to assign
///
////////////////////////////////////////////////////////////
CSFML_API void sfShader_SetFloat2Parameter(sfShader* shader, const char* name, float x, float y);
CSFML_GRAPHICS_API void sfShader_SetFloat2Parameter(sfShader* shader, const char* name, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Change a 3-components vector parameter of a shader
@@ -166,7 +166,7 @@ CSFML_API void sfShader_SetFloat2Parameter(sfShader* shader, const char* name, f
/// \param z Third component of the value to assign
///
////////////////////////////////////////////////////////////
CSFML_API void sfShader_SetFloat3Parameter(sfShader* shader, const char* name, float x, float y, float z);
CSFML_GRAPHICS_API void sfShader_SetFloat3Parameter(sfShader* shader, const char* name, float x, float y, float z);
////////////////////////////////////////////////////////////
/// \brief Change a 4-components vector parameter of a shader
@@ -191,7 +191,7 @@ CSFML_API void sfShader_SetFloat3Parameter(sfShader* shader, const char* name, f
/// \param w Fourth component of the value to assign
///
////////////////////////////////////////////////////////////
CSFML_API void sfShader_SetFloat4Parameter(sfShader* shader, const char* name, float x, float y, float z, float w);
CSFML_GRAPHICS_API void sfShader_SetFloat4Parameter(sfShader* shader, const char* name, float x, float y, float z, float w);
////////////////////////////////////////////////////////////
/// \brief Change a color parameter of a shader
@@ -219,7 +219,7 @@ CSFML_API void sfShader_SetFloat4Parameter(sfShader* shader, const char* name, f
/// \param color Color to assign
///
////////////////////////////////////////////////////////////
CSFML_API void sfShader_SetColorParameter(sfShader* shader, const char* name, sfColor color);
CSFML_GRAPHICS_API void sfShader_SetColorParameter(sfShader* shader, const char* name, sfColor color);
////////////////////////////////////////////////////////////
/// \brief Change a matrix parameter of a shader
@@ -242,7 +242,7 @@ CSFML_API void sfShader_SetColorParameter(sfShader* shader, const char* name, sf
/// \param transform Transform to assign
///
////////////////////////////////////////////////////////////
CSFML_API void sfShader_SetTransformParameter(sfShader* shader, const char* name, const sfTransform* transform);
CSFML_GRAPHICS_API void sfShader_SetTransformParameter(sfShader* shader, const char* name, const sfTransform* transform);
////////////////////////////////////////////////////////////
/// \brief Change a texture parameter of a shader
@@ -275,7 +275,7 @@ CSFML_API void sfShader_SetTransformParameter(sfShader* shader, const char* name
/// \param texture Texture to assign
///
////////////////////////////////////////////////////////////
CSFML_API void sfShader_SetTextureParameter(sfShader* shader, const char* name, const sfTexture* texture);
CSFML_GRAPHICS_API void sfShader_SetTextureParameter(sfShader* shader, const char* name, const sfTexture* texture);
////////////////////////////////////////////////////////////
/// \brief Change a texture parameter of a shader
@@ -298,7 +298,7 @@ CSFML_API void sfShader_SetTextureParameter(sfShader* shader, const char* name,
/// \param name Name of the texture in the shader
///
////////////////////////////////////////////////////////////
CSFML_API void sfShader_SetCurrentTextureParameter(sfShader* shader, const char* name);
CSFML_GRAPHICS_API void sfShader_SetCurrentTextureParameter(sfShader* shader, const char* name);
////////////////////////////////////////////////////////////
/// \brief Bind a shader for rendering (activate it)
@@ -316,7 +316,7 @@ CSFML_API void sfShader_SetCurrentTextureParameter(sfShader* shader, const char*
/// \param shader Shader to bind
///
////////////////////////////////////////////////////////////
CSFML_API void sfShader_Bind(const sfShader* shader);
CSFML_GRAPHICS_API void sfShader_Bind(const sfShader* shader);
////////////////////////////////////////////////////////////
/// \brief Unbind a shader (deactivate it)
@@ -328,7 +328,7 @@ CSFML_API void sfShader_Bind(const sfShader* shader);
/// \param shader Shader to unbind
///
////////////////////////////////////////////////////////////
CSFML_API void sfShader_Unbind(const sfShader* shader);
CSFML_GRAPHICS_API void sfShader_Unbind(const sfShader* shader);
////////////////////////////////////////////////////////////
/// \brief Tell whether or not the system supports shaders
@@ -340,7 +340,7 @@ CSFML_API void sfShader_Unbind(const sfShader* shader);
/// \return sfTrue if the system can use shaders, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfShader_IsAvailable(void);
CSFML_GRAPHICS_API sfBool sfShader_IsAvailable(void);
#endif // SFML_SHADER_H
+23 -23
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/BlendMode.h>
#include <SFML/Graphics/Color.h>
#include <SFML/Graphics/Rect.h>
@@ -41,7 +41,7 @@
/// \return A new sfSprite object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfSprite* sfSprite_Create(void);
CSFML_GRAPHICS_API sfSprite* sfSprite_Create(void);
////////////////////////////////////////////////////////////
/// \brief Copy an existing sprite
@@ -51,7 +51,7 @@ CSFML_API sfSprite* sfSprite_Create(void);
/// \return Copied object
///
////////////////////////////////////////////////////////////
CSFML_API sfSprite* sfSprite_Copy(sfSprite* sprite);
CSFML_GRAPHICS_API sfSprite* sfSprite_Copy(sfSprite* sprite);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing sprite
@@ -59,7 +59,7 @@ CSFML_API sfSprite* sfSprite_Copy(sfSprite* sprite);
/// \param sprite Sprite to delete
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_Destroy(sfSprite* sprite);
CSFML_GRAPHICS_API void sfSprite_Destroy(sfSprite* sprite);
////////////////////////////////////////////////////////////
/// \brief Set the position of a sprite
@@ -73,7 +73,7 @@ CSFML_API void sfSprite_Destroy(sfSprite* sprite);
/// \param y Y coordinate of the new position
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_SetPosition(sfSprite* sprite, float x, float y);
CSFML_GRAPHICS_API void sfSprite_SetPosition(sfSprite* sprite, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Set the orientation of a sprite
@@ -86,7 +86,7 @@ CSFML_API void sfSprite_SetPosition(sfSprite* sprite, float x, float y);
/// \param angle New rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_SetRotation(sfSprite* sprite, float angle);
CSFML_GRAPHICS_API void sfSprite_SetRotation(sfSprite* sprite, float angle);
////////////////////////////////////////////////////////////
/// \brief Set the scale factors of a sprite
@@ -100,7 +100,7 @@ CSFML_API void sfSprite_SetRotation(sfSprite* sprite, float angle);
/// \param factorY New vertical scale factor
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_SetScale(sfSprite* sprite, float factorX, float factorY);
CSFML_GRAPHICS_API void sfSprite_SetScale(sfSprite* sprite, float factorX, float factorY);
////////////////////////////////////////////////////////////
/// \brief Set the local origin of a sprite
@@ -117,7 +117,7 @@ CSFML_API void sfSprite_SetScale(sfSprite* sprite, float factorX, float factorY)
/// \param y Y coordinate of the new origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_SetOrigin(sfSprite* sprite, float x, float y);
CSFML_GRAPHICS_API void sfSprite_SetOrigin(sfSprite* sprite, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Get the position of a sprite
@@ -127,7 +127,7 @@ CSFML_API void sfSprite_SetOrigin(sfSprite* sprite, float x, float y);
/// \return Current position
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_GetPosition(const sfSprite* sprite, float* x, float* y);
CSFML_GRAPHICS_API void sfSprite_GetPosition(const sfSprite* sprite, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Get the orientation of a sprite
@@ -139,7 +139,7 @@ CSFML_API void sfSprite_GetPosition(const sfSprite* sprite, float* x, float* y);
/// \return Current rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API float sfSprite_GetRotation(const sfSprite* sprite);
CSFML_GRAPHICS_API float sfSprite_GetRotation(const sfSprite* sprite);
////////////////////////////////////////////////////////////
/// \brief Get the current scale of a sprite
@@ -149,7 +149,7 @@ CSFML_API float sfSprite_GetRotation(const sfSprite* sprite);
/// \return Current scale factors
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_GetScale(const sfSprite* sprite, float* x, float* y);
CSFML_GRAPHICS_API void sfSprite_GetScale(const sfSprite* sprite, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Get the local origin of a sprite
@@ -159,7 +159,7 @@ CSFML_API void sfSprite_GetScale(const sfSprite* sprite, float* x, float* y);
/// \return Current origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_GetOrigin(const sfSprite* sprite, float* x, float* y);
CSFML_GRAPHICS_API void sfSprite_GetOrigin(const sfSprite* sprite, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Move a sprite by a given offset
@@ -172,7 +172,7 @@ CSFML_API void sfSprite_GetOrigin(const sfSprite* sprite, float* x, float* y);
/// \param offsetY Y offset
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_Move(sfSprite* sprite, float offsetX, float offsetY);
CSFML_GRAPHICS_API void sfSprite_Move(sfSprite* sprite, float offsetX, float offsetY);
////////////////////////////////////////////////////////////
/// \brief Rotate a sprite
@@ -184,7 +184,7 @@ CSFML_API void sfSprite_Move(sfSprite* sprite, float offsetX, float offsetY);
/// \param angle Angle of rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_Rotate(sfSprite* sprite, float angle);
CSFML_GRAPHICS_API void sfSprite_Rotate(sfSprite* sprite, float angle);
////////////////////////////////////////////////////////////
/// \brief Scale a sprite
@@ -197,7 +197,7 @@ CSFML_API void sfSprite_Rotate(sfSprite* sprite, float angle);
/// \param factorY Vertical scale factor
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_Scale(sfSprite* sprite, float factorX, float factorY);
CSFML_GRAPHICS_API void sfSprite_Scale(sfSprite* sprite, float factorX, float factorY);
////////////////////////////////////////////////////////////
/// \brief Get the combined transform of a sprite
@@ -207,7 +207,7 @@ CSFML_API void sfSprite_Scale(sfSprite* sprite, float factorX, float factorY);
/// \return Transform combining the position/rotation/scale/origin of the object
///
////////////////////////////////////////////////////////////
CSFML_API const sfTransform* sfSprite_GetTransform(const sfSprite* sprite);
CSFML_GRAPHICS_API const sfTransform* sfSprite_GetTransform(const sfSprite* sprite);
////////////////////////////////////////////////////////////
/// \brief Get the inverse of the combined transform of a sprite
@@ -217,7 +217,7 @@ CSFML_API const sfTransform* sfSprite_GetTransform(const sfSprite* sprite);
/// \return Inverse of the combined transformations applied to the object
///
////////////////////////////////////////////////////////////
CSFML_API const sfTransform* sfSprite_GetInverseTransform(const sfSprite* sprite);
CSFML_GRAPHICS_API const sfTransform* sfSprite_GetInverseTransform(const sfSprite* sprite);
////////////////////////////////////////////////////////////
/// \brief Change the source texture of a sprite
@@ -237,7 +237,7 @@ CSFML_API const sfTransform* sfSprite_GetInverseTransform(const sfSprite* sprite
/// \param resetRect Should the texture rect be reset to the size of the new texture?
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_SetTexture(sfSprite* sprite, const sfTexture* texture, sfBool resetRect);
CSFML_GRAPHICS_API void sfSprite_SetTexture(sfSprite* sprite, const sfTexture* texture, sfBool resetRect);
////////////////////////////////////////////////////////////
/// \brief Set the sub-rectangle of the texture that a sprite will display
@@ -250,7 +250,7 @@ CSFML_API void sfSprite_SetTexture(sfSprite* sprite, const sfTexture* texture, s
/// \param rectangle Rectangle defining the region of the texture to display
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_SetTextureRect(sfSprite* sprite, sfIntRect rectangle);
CSFML_GRAPHICS_API void sfSprite_SetTextureRect(sfSprite* sprite, sfIntRect rectangle);
////////////////////////////////////////////////////////////
/// \brief Set the global color of a sprite
@@ -264,7 +264,7 @@ CSFML_API void sfSprite_SetTextureRect(sfSprite* sprite, sfIntRect rectangle);
/// \param color New color of the sprite
///
////////////////////////////////////////////////////////////
CSFML_API void sfSprite_SetColor(sfSprite* sprite, sfColor color);
CSFML_GRAPHICS_API void sfSprite_SetColor(sfSprite* sprite, sfColor color);
////////////////////////////////////////////////////////////
/// \brief Get the source texture of a sprite
@@ -278,7 +278,7 @@ CSFML_API void sfSprite_SetColor(sfSprite* sprite, sfColor color);
/// \return Pointer to the sprite's texture
///
////////////////////////////////////////////////////////////
CSFML_API const sfTexture* sfSprite_GetTexture(const sfSprite* sprite);
CSFML_GRAPHICS_API const sfTexture* sfSprite_GetTexture(const sfSprite* sprite);
////////////////////////////////////////////////////////////
/// \brief Get the sub-rectangle of the texture displayed by a sprite
@@ -288,7 +288,7 @@ CSFML_API const sfTexture* sfSprite_GetTexture(const sfSprite* sprite);
/// \return Texture rectangle of the sprite
///
////////////////////////////////////////////////////////////
CSFML_API sfIntRect sfSprite_GetTextureRect(const sfSprite* sprite);
CSFML_GRAPHICS_API sfIntRect sfSprite_GetTextureRect(const sfSprite* sprite);
////////////////////////////////////////////////////////////
/// \brief Get the global color of a sprite
@@ -298,7 +298,7 @@ CSFML_API sfIntRect sfSprite_GetTextureRect(const sfSprite* sprite);
/// \return Global color of the sprite
///
////////////////////////////////////////////////////////////
CSFML_API sfColor sfSprite_GetColor(const sfSprite* sprite);
CSFML_GRAPHICS_API sfColor sfSprite_GetColor(const sfSprite* sprite);
#endif // SFML_SPRITE_H
+30 -30
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Color.h>
#include <SFML/Graphics/Rect.h>
#include <SFML/Graphics/Types.h>
@@ -53,7 +53,7 @@ typedef enum
/// \return A new sfText object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfText* sfText_Create(void);
CSFML_GRAPHICS_API sfText* sfText_Create(void);
////////////////////////////////////////////////////////////
/// \brief Copy an existing text
@@ -63,7 +63,7 @@ CSFML_API sfText* sfText_Create(void);
/// \return Copied object
///
////////////////////////////////////////////////////////////
CSFML_API sfText* sfText_Copy(sfText* text);
CSFML_GRAPHICS_API sfText* sfText_Copy(sfText* text);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing text
@@ -71,7 +71,7 @@ CSFML_API sfText* sfText_Copy(sfText* text);
/// \param text Text to delete
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_Destroy(sfText* text);
CSFML_GRAPHICS_API void sfText_Destroy(sfText* text);
////////////////////////////////////////////////////////////
/// \brief Set the position of a text
@@ -85,7 +85,7 @@ CSFML_API void sfText_Destroy(sfText* text);
/// \param y Y coordinate of the new position
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_SetPosition(sfText* text, float x, float y);
CSFML_GRAPHICS_API void sfText_SetPosition(sfText* text, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Set the orientation of a text
@@ -98,7 +98,7 @@ CSFML_API void sfText_SetPosition(sfText* text, float x, float y);
/// \param angle New rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_SetRotation(sfText* text, float angle);
CSFML_GRAPHICS_API void sfText_SetRotation(sfText* text, float angle);
////////////////////////////////////////////////////////////
/// \brief Set the scale factors of a text
@@ -112,7 +112,7 @@ CSFML_API void sfText_SetRotation(sfText* text, float angle);
/// \param factorY New vertical scale factor
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_SetScale(sfText* text, float factorX, float factorY);
CSFML_GRAPHICS_API void sfText_SetScale(sfText* text, float factorX, float factorY);
////////////////////////////////////////////////////////////
/// \brief Set the local origin of a text
@@ -129,7 +129,7 @@ CSFML_API void sfText_SetScale(sfText* text, float factorX, float factorY);
/// \param y Y coordinate of the new origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_SetOrigin(sfText* text, float x, float y);
CSFML_GRAPHICS_API void sfText_SetOrigin(sfText* text, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Get the position of a text
@@ -139,7 +139,7 @@ CSFML_API void sfText_SetOrigin(sfText* text, float x, float y);
/// \return Current position
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_GetPosition(const sfText* text, float* x, float* y);
CSFML_GRAPHICS_API void sfText_GetPosition(const sfText* text, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Get the orientation of a text
@@ -151,7 +151,7 @@ CSFML_API void sfText_GetPosition(const sfText* text, float* x, float* y);
/// \return Current rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API float sfText_GetRotation(const sfText* text);
CSFML_GRAPHICS_API float sfText_GetRotation(const sfText* text);
////////////////////////////////////////////////////////////
/// \brief Get the current scale of a text
@@ -161,7 +161,7 @@ CSFML_API float sfText_GetRotation(const sfText* text);
/// \return Current scale factors
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_GetScale(const sfText* text, float* x, float* y);
CSFML_GRAPHICS_API void sfText_GetScale(const sfText* text, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Get the local origin of a text
@@ -171,7 +171,7 @@ CSFML_API void sfText_GetScale(const sfText* text, float* x, float* y);
/// \return Current origin
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_GetOrigin(const sfText* text, float* x, float* y);
CSFML_GRAPHICS_API void sfText_GetOrigin(const sfText* text, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Move a text by a given offset
@@ -184,7 +184,7 @@ CSFML_API void sfText_GetOrigin(const sfText* text, float* x, float* y);
/// \param offsetY Y offset
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_Move(sfText* text, float offsetX, float offsetY);
CSFML_GRAPHICS_API void sfText_Move(sfText* text, float offsetX, float offsetY);
////////////////////////////////////////////////////////////
/// \brief Rotate a text
@@ -196,7 +196,7 @@ CSFML_API void sfText_Move(sfText* text, float offsetX, float offsetY);
/// \param angle Angle of rotation, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_Rotate(sfText* text, float angle);
CSFML_GRAPHICS_API void sfText_Rotate(sfText* text, float angle);
////////////////////////////////////////////////////////////
/// \brief Scale a text
@@ -209,7 +209,7 @@ CSFML_API void sfText_Rotate(sfText* text, float angle);
/// \param factorY Vertical scale factor
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_Scale(sfText* text, float factorX, float factorY);
CSFML_GRAPHICS_API void sfText_Scale(sfText* text, float factorX, float factorY);
////////////////////////////////////////////////////////////
/// \brief Get the combined transform of a text
@@ -219,7 +219,7 @@ CSFML_API void sfText_Scale(sfText* text, float factorX, float factorY);
/// \return Transform combining the position/rotation/scale/origin of the object
///
////////////////////////////////////////////////////////////
CSFML_API const sfTransform* sfText_GetTransform(const sfText* text);
CSFML_GRAPHICS_API const sfTransform* sfText_GetTransform(const sfText* text);
////////////////////////////////////////////////////////////
/// \brief Get the inverse of the combined transform of a text
@@ -229,7 +229,7 @@ CSFML_API const sfTransform* sfText_GetTransform(const sfText* text);
/// \return Inverse of the combined transformations applied to the object
///
////////////////////////////////////////////////////////////
CSFML_API const sfTransform* sfText_GetInverseTransform(const sfText* text);
CSFML_GRAPHICS_API const sfTransform* sfText_GetInverseTransform(const sfText* text);
////////////////////////////////////////////////////////////
/// \brief Set the string of a text (from an ANSI string)
@@ -240,7 +240,7 @@ CSFML_API const sfTransform* sfText_GetInverseTransform(const sfText* text);
/// \param string New string
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_SetString(sfText* text, const char* string);
CSFML_GRAPHICS_API void sfText_SetString(sfText* text, const char* string);
////////////////////////////////////////////////////////////
/// \brief Set the string of a text (from a unicode string)
@@ -249,7 +249,7 @@ CSFML_API void sfText_SetString(sfText* text, const char* string);
/// \param string New string
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_SetUnicodeString(sfText* text, const sfUint32* string);
CSFML_GRAPHICS_API void sfText_SetUnicodeString(sfText* text, const sfUint32* string);
////////////////////////////////////////////////////////////
/// \brief Set the font of a text
@@ -267,7 +267,7 @@ CSFML_API void sfText_SetUnicodeString(sfText* text, const sfUint32* string);
/// \param font New font
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_SetFont(sfText* text, const sfFont* font);
CSFML_GRAPHICS_API void sfText_SetFont(sfText* text, const sfFont* font);
////////////////////////////////////////////////////////////
/// \brief Set the character size of a text
@@ -278,7 +278,7 @@ CSFML_API void sfText_SetFont(sfText* text, const sfFont* font);
/// \param size New character size, in pixels
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_SetCharacterSize(sfText* text, unsigned int size);
CSFML_GRAPHICS_API void sfText_SetCharacterSize(sfText* text, unsigned int size);
////////////////////////////////////////////////////////////
/// \brief Set the style of a text
@@ -291,7 +291,7 @@ CSFML_API void sfText_SetCharacterSize(sfText* text, unsigned int size);
/// \param style New style
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_SetStyle(sfText* text, sfUint32 style);
CSFML_GRAPHICS_API void sfText_SetStyle(sfText* text, sfUint32 style);
////////////////////////////////////////////////////////////
/// \brief Set the global color of a text
@@ -302,7 +302,7 @@ CSFML_API void sfText_SetStyle(sfText* text, sfUint32 style);
/// \param color New color of the text
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_SetColor(sfText* text, sfColor color);
CSFML_GRAPHICS_API void sfText_SetColor(sfText* text, sfColor color);
////////////////////////////////////////////////////////////
/// \brief Get the text of a text (returns an ANSI string)
@@ -312,7 +312,7 @@ CSFML_API void sfText_SetColor(sfText* text, sfColor color);
/// \return String an a locale-dependant ANSI string
///
////////////////////////////////////////////////////////////
CSFML_API const char* sfText_GetString(const sfText* text);
CSFML_GRAPHICS_API const char* sfText_GetString(const sfText* text);
////////////////////////////////////////////////////////////
/// \brief Get the string of a text (returns a unicode string)
@@ -322,7 +322,7 @@ CSFML_API const char* sfText_GetString(const sfText* text);
/// \return String as UTF-32
///
////////////////////////////////////////////////////////////
CSFML_API const sfUint32* sfText_GetUnicodeString(const sfText* text);
CSFML_GRAPHICS_API const sfUint32* sfText_GetUnicodeString(const sfText* text);
////////////////////////////////////////////////////////////
/// \brief Get the font used by a text
@@ -332,7 +332,7 @@ CSFML_API const sfUint32* sfText_GetUnicodeString(const sfText* text);
/// \return Pointer to the font
///
////////////////////////////////////////////////////////////
CSFML_API const sfFont* sfText_GetFont(const sfText* text);
CSFML_GRAPHICS_API const sfFont* sfText_GetFont(const sfText* text);
////////////////////////////////////////////////////////////
/// \brief Get the size of the characters of a text
@@ -342,7 +342,7 @@ CSFML_API const sfFont* sfText_GetFont(const sfText* text);
/// \return Size of the characters
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfText_GetCharacterSize(const sfText* text);
CSFML_GRAPHICS_API unsigned int sfText_GetCharacterSize(const sfText* text);
////////////////////////////////////////////////////////////
/// \brief Get the style of a text
@@ -352,7 +352,7 @@ CSFML_API unsigned int sfText_GetCharacterSize(const sfText* text);
/// \return Current string style (see sfTextStyle enum)
///
////////////////////////////////////////////////////////////
CSFML_API sfUint32 sfText_GetStyle(const sfText* text);
CSFML_GRAPHICS_API sfUint32 sfText_GetStyle(const sfText* text);
////////////////////////////////////////////////////////////
/// \brief Get the global color of a text
@@ -362,7 +362,7 @@ CSFML_API sfUint32 sfText_GetStyle(const sfText* text);
/// \return Global color of the text
///
////////////////////////////////////////////////////////////
CSFML_API sfColor sfText_GetColor(const sfText* text);
CSFML_GRAPHICS_API sfColor sfText_GetColor(const sfText* text);
////////////////////////////////////////////////////////////
/// \brief Return the position of the \a index-th character in a text
@@ -380,7 +380,7 @@ CSFML_API sfColor sfText_GetColor(const sfText* text);
/// \param y The returned y position of the character
///
////////////////////////////////////////////////////////////
CSFML_API void sfText_FindCharacterPos(const sfText* text, size_t index, float* x, float* y);
CSFML_GRAPHICS_API void sfText_FindCharacterPos(const sfText* text, size_t index, float* x, float* y);
#endif // SFML_TEXT_H
+21 -21
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Rect.h>
#include <SFML/Graphics/Types.h>
#include <SFML/Window/Types.h>
@@ -45,7 +45,7 @@
/// \return A new sfTexture object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfTexture* sfTexture_Create(unsigned int width, unsigned int height);
CSFML_GRAPHICS_API sfTexture* sfTexture_Create(unsigned int width, unsigned int height);
////////////////////////////////////////////////////////////
/// \brief Create a new texture from a file
@@ -56,7 +56,7 @@ CSFML_API sfTexture* sfTexture_Create(unsigned int width, unsigned int height);
/// \return A new sfTexture object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfTexture* sfTexture_CreateFromFile(const char* filename, const sfIntRect* area);
CSFML_GRAPHICS_API sfTexture* sfTexture_CreateFromFile(const char* filename, const sfIntRect* area);
////////////////////////////////////////////////////////////
/// \brief Create a new texture from a file in memory
@@ -68,7 +68,7 @@ CSFML_API sfTexture* sfTexture_CreateFromFile(const char* filename, const sfIntR
/// \return A new sfTexture object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfTexture* sfTexture_CreateFromMemory(const void* data, size_t sizeInBytes, const sfIntRect* area);
CSFML_GRAPHICS_API sfTexture* sfTexture_CreateFromMemory(const void* data, size_t sizeInBytes, const sfIntRect* area);
////////////////////////////////////////////////////////////
/// \brief Create a new texture from a custom stream
@@ -79,7 +79,7 @@ CSFML_API sfTexture* sfTexture_CreateFromMemory(const void* data, size_t sizeInB
/// \return A new sfTexture object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfTexture* sfTexture_CreateFromStream(sfInputStream* stream, const sfIntRect* area);
CSFML_GRAPHICS_API sfTexture* sfTexture_CreateFromStream(sfInputStream* stream, const sfIntRect* area);
////////////////////////////////////////////////////////////
/// \brief Create a new texture from an image
@@ -90,7 +90,7 @@ CSFML_API sfTexture* sfTexture_CreateFromStream(sfInputStream* stream, const sfI
/// \return A new sfTexture object, or NULL if it failed
///
////////////////////////////////////////////////////////////
CSFML_API sfTexture* sfTexture_CreateFromImage(const sfImage* image, const sfIntRect* area);
CSFML_GRAPHICS_API sfTexture* sfTexture_CreateFromImage(const sfImage* image, const sfIntRect* area);
////////////////////////////////////////////////////////////
/// \brief Copy an existing texture
@@ -100,7 +100,7 @@ CSFML_API sfTexture* sfTexture_CreateFromImage(const sfImage* image, const sfInt
/// \return Copied object
///
////////////////////////////////////////////////////////////
CSFML_API sfTexture* sfTexture_Copy(sfTexture* texture);
CSFML_GRAPHICS_API sfTexture* sfTexture_Copy(sfTexture* texture);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing texture
@@ -108,7 +108,7 @@ CSFML_API sfTexture* sfTexture_Copy(sfTexture* texture);
/// \param texture Texture to delete
///
////////////////////////////////////////////////////////////
CSFML_API void sfTexture_Destroy(sfTexture* texture);
CSFML_GRAPHICS_API void sfTexture_Destroy(sfTexture* texture);
////////////////////////////////////////////////////////////
/// \brief Return the width of the texture
@@ -118,7 +118,7 @@ CSFML_API void sfTexture_Destroy(sfTexture* texture);
/// \return Width in pixels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfTexture_GetWidth(const sfTexture* texture);
CSFML_GRAPHICS_API unsigned int sfTexture_GetWidth(const sfTexture* texture);
////////////////////////////////////////////////////////////
/// \brief Return the height of the texture
@@ -128,7 +128,7 @@ CSFML_API unsigned int sfTexture_GetWidth(const sfTexture* texture);
/// \return Height in pixels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfTexture_GetHeight(const sfTexture* texture);
CSFML_GRAPHICS_API unsigned int sfTexture_GetHeight(const sfTexture* texture);
////////////////////////////////////////////////////////////
/// \brief Copy a texture's pixels to an image
@@ -138,7 +138,7 @@ CSFML_API unsigned int sfTexture_GetHeight(const sfTexture* texture);
/// \return Image containing the texture's pixels
///
////////////////////////////////////////////////////////////
CSFML_API sfImage* sfTexture_CopyToImage(const sfTexture* texture);
CSFML_GRAPHICS_API sfImage* sfTexture_CopyToImage(const sfTexture* texture);
////////////////////////////////////////////////////////////
/// \brief Update a texture from an array of pixels
@@ -151,7 +151,7 @@ CSFML_API sfImage* sfTexture_CopyToImage(const sfTexture* texture);
/// \param y Y offset in the texture where to copy the source pixels
///
////////////////////////////////////////////////////////////
CSFML_API void sfTexture_UpdateFromPixels(sfTexture* texture, const sfUint8* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y);
CSFML_GRAPHICS_API void sfTexture_UpdateFromPixels(sfTexture* texture, const sfUint8* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y);
////////////////////////////////////////////////////////////
/// \brief Update a texture from an image
@@ -162,7 +162,7 @@ CSFML_API void sfTexture_UpdateFromPixels(sfTexture* texture, const sfUint8* pix
/// \param y Y offset in the texture where to copy the source pixels
///
////////////////////////////////////////////////////////////
CSFML_API void sfTexture_UpdateFromImage(sfTexture* texture, const sfImage* image, unsigned int x, unsigned int y);
CSFML_GRAPHICS_API void sfTexture_UpdateFromImage(sfTexture* texture, const sfImage* image, unsigned int x, unsigned int y);
////////////////////////////////////////////////////////////
/// \brief Update a texture from the contents of a window
@@ -173,7 +173,7 @@ CSFML_API void sfTexture_UpdateFromImage(sfTexture* texture, const sfImage* imag
/// \param y Y offset in the texture where to copy the source pixels
///
////////////////////////////////////////////////////////////
CSFML_API void sfTexture_UpdateFromWindow(sfTexture* texture, const sfWindow* window, unsigned int x, unsigned int y);
CSFML_GRAPHICS_API void sfTexture_UpdateFromWindow(sfTexture* texture, const sfWindow* window, unsigned int x, unsigned int y);
////////////////////////////////////////////////////////////
/// \brief Update a texture from the contents of a render-window
@@ -184,7 +184,7 @@ CSFML_API void sfTexture_UpdateFromWindow(sfTexture* texture, const sfWindow* wi
/// \param y Y offset in the texture where to copy the source pixels
///
////////////////////////////////////////////////////////////
CSFML_API void sfTexture_UpdateFromRenderWindow(sfTexture* texture, const sfRenderWindow* renderWindow, unsigned int x, unsigned int y);
CSFML_GRAPHICS_API void sfTexture_UpdateFromRenderWindow(sfTexture* texture, const sfRenderWindow* renderWindow, unsigned int x, unsigned int y);
////////////////////////////////////////////////////////////
/// \brief Activate a texture for rendering
@@ -192,7 +192,7 @@ CSFML_API void sfTexture_UpdateFromRenderWindow(sfTexture* texture, const sfRend
/// \param texture Texture to bind
///
////////////////////////////////////////////////////////////
CSFML_API void sfTexture_Bind(const sfTexture* texture);
CSFML_GRAPHICS_API void sfTexture_Bind(const sfTexture* texture);
////////////////////////////////////////////////////////////
/// \brief Enable or disable the smooth filter on a texture
@@ -201,7 +201,7 @@ CSFML_API void sfTexture_Bind(const sfTexture* texture);
/// \param smooth sfTrue to enable smoothing, sfFalse to disable it
///
////////////////////////////////////////////////////////////
CSFML_API void sfTexture_SetSmooth(sfTexture* texture, sfBool smooth);
CSFML_GRAPHICS_API void sfTexture_SetSmooth(sfTexture* texture, sfBool smooth);
////////////////////////////////////////////////////////////
/// \brief Tell whether the smooth filter is enabled or not for a texture
@@ -211,7 +211,7 @@ CSFML_API void sfTexture_SetSmooth(sfTexture* texture, sfBool smooth);
/// \return sfTrue if smoothing is enabled, sfFalse if it is disabled
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfTexture_IsSmooth(const sfTexture* texture);
CSFML_GRAPHICS_API sfBool sfTexture_IsSmooth(const sfTexture* texture);
////////////////////////////////////////////////////////////
/// \brief Enable or disable repeating for a texture
@@ -234,7 +234,7 @@ CSFML_API sfBool sfTexture_IsSmooth(const sfTexture* texture);
/// \param repeated True to repeat the texture, false to disable repeating
///
////////////////////////////////////////////////////////////
CSFML_API void sfTexture_SetRepeated(sfTexture* texture, sfBool repeated);
CSFML_GRAPHICS_API void sfTexture_SetRepeated(sfTexture* texture, sfBool repeated);
////////////////////////////////////////////////////////////
/// \brief Tell whether a texture is repeated or not
@@ -244,7 +244,7 @@ CSFML_API void sfTexture_SetRepeated(sfTexture* texture, sfBool repeated);
/// \return sfTrue if repeat mode is enabled, sfFalse if it is disabled
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfTexture_IsRepeated(const sfTexture* texture);
CSFML_GRAPHICS_API sfBool sfTexture_IsRepeated(const sfTexture* texture);
////////////////////////////////////////////////////////////
/// \brief Get the maximum texture size allowed
@@ -252,7 +252,7 @@ CSFML_API sfBool sfTexture_IsRepeated(const sfTexture* texture);
/// \return Maximum size allowed for textures, in pixels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfTexture_GetMaximumSize();
CSFML_GRAPHICS_API unsigned int sfTexture_GetMaximumSize();
#endif // SFML_TEXTURE_H
+10 -10
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Rect.h>
#include <SFML/Graphics/Types.h>
@@ -41,7 +41,7 @@
/// \return A new sfTransform object
///
////////////////////////////////////////////////////////////
CSFML_API sfTransform* sfTransform_Create(void);
CSFML_GRAPHICS_API sfTransform* sfTransform_Create(void);
////////////////////////////////////////////////////////////
/// \brief Create a new transform from a matrix
@@ -60,7 +60,7 @@ CSFML_API sfTransform* sfTransform_Create(void);
/// \return A new sfTransform object
///
////////////////////////////////////////////////////////////
CSFML_API sfTransform* sfTransform_CreateFromMatrix(float a00, float a01, float a02,
CSFML_GRAPHICS_API sfTransform* sfTransform_CreateFromMatrix(float a00, float a01, float a02,
float a10, float a11, float a12,
float a20, float a21, float a22);
@@ -72,7 +72,7 @@ CSFML_API sfTransform* sfTransform_CreateFromMatrix(float a00, float a01, float
/// \return Copied object
///
////////////////////////////////////////////////////////////
CSFML_API sfTransform* sfTransform_Copy(sfTransform* transform);
CSFML_GRAPHICS_API sfTransform* sfTransform_Copy(sfTransform* transform);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing transform
@@ -80,7 +80,7 @@ CSFML_API sfTransform* sfTransform_Copy(sfTransform* transform);
/// \param transform Transform to delete
///
////////////////////////////////////////////////////////////
CSFML_API void sfTransform_Destroy(sfTransform* transform);
CSFML_GRAPHICS_API void sfTransform_Destroy(sfTransform* transform);
////////////////////////////////////////////////////////////
/// \brief Return the 4x4 matrix of a transform
@@ -164,7 +164,7 @@ void sfTransform_Combine(const sfTransform* left, const sfTransform* right, sfTr
/// \param y Offset to apply on Y axis
///
////////////////////////////////////////////////////////////
CSFML_API void sfTransform_Translate(sfTransform* transform, float x, float y);
CSFML_GRAPHICS_API void sfTransform_Translate(sfTransform* transform, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Combine the current transform with a rotation
@@ -173,7 +173,7 @@ CSFML_API void sfTransform_Translate(sfTransform* transform, float x, float y);
/// \param angle Rotation angle, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfTransform_Rotate(sfTransform* transform, float angle);
CSFML_GRAPHICS_API void sfTransform_Rotate(sfTransform* transform, float angle);
////////////////////////////////////////////////////////////
/// \brief Combine the current transform with a rotation
@@ -189,7 +189,7 @@ CSFML_API void sfTransform_Rotate(sfTransform* transform, float angle);
/// \param centerY Y coordinate of the center of rotation
///
////////////////////////////////////////////////////////////
CSFML_API void sfTransform_RotateWithCenter(sfTransform* transform, float angle, float centerX, float centerY);
CSFML_GRAPHICS_API void sfTransform_RotateWithCenter(sfTransform* transform, float angle, float centerX, float centerY);
////////////////////////////////////////////////////////////
/// \brief Combine the current transform with a scaling
@@ -199,7 +199,7 @@ CSFML_API void sfTransform_RotateWithCenter(sfTransform* transform, float angle,
/// \param scaleY Scaling factor on the Y axis
///
////////////////////////////////////////////////////////////
CSFML_API void sfTransform_Scale(sfTransform* transform, float scaleX, float scaleY);
CSFML_GRAPHICS_API void sfTransform_Scale(sfTransform* transform, float scaleX, float scaleY);
////////////////////////////////////////////////////////////
/// \brief Combine the current transform with a scaling
@@ -216,7 +216,7 @@ CSFML_API void sfTransform_Scale(sfTransform* transform, float scaleX, float sca
/// \param centerY Y coordinate of the center of scaling
///
////////////////////////////////////////////////////////////
CSFML_API void sfTransform_ScaleWithCenter(sfTransform* transform, float scaleX, float scaleY, float centerX, float centerY);
CSFML_GRAPHICS_API void sfTransform_ScaleWithCenter(sfTransform* transform, float scaleX, float scaleY, float centerX, float centerY);
#endif // SFML_TEXTURE_H
+1
View File
@@ -28,6 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Color.h>
+12 -12
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/PrimitiveType.h>
#include <SFML/Graphics/Rect.h>
#include <SFML/Graphics/Types.h>
@@ -41,7 +41,7 @@
/// \return A new sfVertexArray object
///
////////////////////////////////////////////////////////////
CSFML_API sfVertexArray* sfVertexArray_Create(void);
CSFML_GRAPHICS_API sfVertexArray* sfVertexArray_Create(void);
////////////////////////////////////////////////////////////
/// \brief Copy an existing vertex array
@@ -51,7 +51,7 @@ CSFML_API sfVertexArray* sfVertexArray_Create(void);
/// \return Copied object
///
////////////////////////////////////////////////////////////
CSFML_API sfVertexArray* sfTransform_Copy(sfVertexArray* vertexArray);
CSFML_GRAPHICS_API sfVertexArray* sfTransform_Copy(sfVertexArray* vertexArray);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing vertex array
@@ -59,7 +59,7 @@ CSFML_API sfVertexArray* sfTransform_Copy(sfVertexArray* vertexArray);
/// \param vertexArray Vertex array to delete
///
////////////////////////////////////////////////////////////
CSFML_API void sfVertexArray_Destroy(sfVertexArray* vertexArray);
CSFML_GRAPHICS_API void sfVertexArray_Destroy(sfVertexArray* vertexArray);
////////////////////////////////////////////////////////////
/// \brief Return the vertex count of a vertex array
@@ -69,7 +69,7 @@ CSFML_API void sfVertexArray_Destroy(sfVertexArray* vertexArray);
/// \return Number of vertices in the array
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfVertexArray_GetVertexCount(const sfVertexArray* vertexArray);
CSFML_GRAPHICS_API unsigned int sfVertexArray_GetVertexCount(const sfVertexArray* vertexArray);
////////////////////////////////////////////////////////////
/// \brief Get access to a vertex by its index
@@ -84,7 +84,7 @@ CSFML_API unsigned int sfVertexArray_GetVertexCount(const sfVertexArray* vertexA
/// \return Pointer to the index-th vertex
///
////////////////////////////////////////////////////////////
CSFML_API sfVertex* sfVertexArray_At(sfVertexArray* vertexArray, unsigned int index);
CSFML_GRAPHICS_API sfVertex* sfVertexArray_At(sfVertexArray* vertexArray, unsigned int index);
////////////////////////////////////////////////////////////
/// \brief Clear a vertex array
@@ -97,7 +97,7 @@ CSFML_API sfVertex* sfVertexArray_At(sfVertexArray* vertexArray, unsigned int in
/// \param vertexArray Vertex array object
///
////////////////////////////////////////////////////////////
CSFML_API void sfVertexArray_Clear(sfVertexArray* vertexArray);
CSFML_GRAPHICS_API void sfVertexArray_Clear(sfVertexArray* vertexArray);
////////////////////////////////////////////////////////////
/// \brief Resize the vertex array
@@ -112,7 +112,7 @@ CSFML_API void sfVertexArray_Clear(sfVertexArray* vertexArray);
/// \param vertexCount New size of the array (number of vertices)
///
////////////////////////////////////////////////////////////
CSFML_API void sfVertexArray_Resize(sfVertexArray* vertexArray, unsigned int vertexCount);
CSFML_GRAPHICS_API void sfVertexArray_Resize(sfVertexArray* vertexArray, unsigned int vertexCount);
////////////////////////////////////////////////////////////
/// \brief Add a vertex to a vertex array array
@@ -121,7 +121,7 @@ CSFML_API void sfVertexArray_Resize(sfVertexArray* vertexArray, unsigned int ver
/// \param vertex Vertex to add
///
////////////////////////////////////////////////////////////
CSFML_API void sfVertexArray_Append(sfVertexArray* vertexArray, sfVertex vertex);
CSFML_GRAPHICS_API void sfVertexArray_Append(sfVertexArray* vertexArray, sfVertex vertex);
////////////////////////////////////////////////////////////
/// \brief Set the type of primitives of a vertex array
@@ -138,7 +138,7 @@ CSFML_API void sfVertexArray_Append(sfVertexArray* vertexArray, sfVertex vertex)
/// \param type Type of primitive
///
////////////////////////////////////////////////////////////
CSFML_API void sfVertexArray_SetPrimitiveType(sfVertexArray* vertexArray, sfPrimitiveType type);
CSFML_GRAPHICS_API void sfVertexArray_SetPrimitiveType(sfVertexArray* vertexArray, sfPrimitiveType type);
////////////////////////////////////////////////////////////
/// \brief Get the type of primitives drawn by a vertex array
@@ -148,7 +148,7 @@ CSFML_API void sfVertexArray_SetPrimitiveType(sfVertexArray* vertexArray, sfPrim
/// \return Primitive type
///
////////////////////////////////////////////////////////////
CSFML_API sfPrimitiveType sfVertexArray_GetPrimitiveType(sfVertexArray* vertexArray);
CSFML_GRAPHICS_API sfPrimitiveType sfVertexArray_GetPrimitiveType(sfVertexArray* vertexArray);
////////////////////////////////////////////////////////////
/// \brief Compute the bounding rectangle of a vertex array
@@ -161,7 +161,7 @@ CSFML_API sfPrimitiveType sfVertexArray_GetPrimitiveType(sfVertexArray* vertexAr
/// \return Bounding rectangle of the vertex array
///
////////////////////////////////////////////////////////////
CSFML_API sfFloatRect sfVertexArray_GetBounds(sfVertexArray* vertexArray);
CSFML_GRAPHICS_API sfFloatRect sfVertexArray_GetBounds(sfVertexArray* vertexArray);
#endif // SFML_VERTEXARRAY_H
+17 -17
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Graphics/Export.h>
#include <SFML/Graphics/Rect.h>
#include <SFML/Graphics/Types.h>
@@ -41,7 +41,7 @@
/// \return A new sfView object
///
////////////////////////////////////////////////////////////
CSFML_API sfView* sfView_Create(void);
CSFML_GRAPHICS_API sfView* sfView_Create(void);
////////////////////////////////////////////////////////////
/// \brief Construct a view from a rectangle
@@ -51,7 +51,7 @@ CSFML_API sfView* sfView_Create(void);
/// \return A new sfView object
///
////////////////////////////////////////////////////////////
CSFML_API sfView* sfView_CreateFromRect(sfFloatRect rectangle);
CSFML_GRAPHICS_API sfView* sfView_CreateFromRect(sfFloatRect rectangle);
////////////////////////////////////////////////////////////
/// \brief Copy an existing view
@@ -61,7 +61,7 @@ CSFML_API sfView* sfView_CreateFromRect(sfFloatRect rectangle);
/// \return Copied object
///
////////////////////////////////////////////////////////////
CSFML_API sfView* sfView_Copy(sfView* view);
CSFML_GRAPHICS_API sfView* sfView_Copy(sfView* view);
////////////////////////////////////////////////////////////
/// \brief Destroy an existing view
@@ -69,7 +69,7 @@ CSFML_API sfView* sfView_Copy(sfView* view);
/// \param view View to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfView_Destroy(sfView* view);
CSFML_GRAPHICS_API void sfView_Destroy(sfView* view);
////////////////////////////////////////////////////////////
/// \brief Set the center of a view
@@ -79,7 +79,7 @@ CSFML_API void sfView_Destroy(sfView* view);
/// \param y Y coordinate of the new center
///
////////////////////////////////////////////////////////////
CSFML_API void sfView_SetCenter(sfView* view, float x, float y);
CSFML_GRAPHICS_API void sfView_SetCenter(sfView* view, float x, float y);
////////////////////////////////////////////////////////////
/// \brief Set the size of a view
@@ -89,7 +89,7 @@ CSFML_API void sfView_SetCenter(sfView* view, float x, float y);
/// \param height New height of the view
///
////////////////////////////////////////////////////////////
CSFML_API void sfView_SetSize(sfView* view, float width, float height);
CSFML_GRAPHICS_API void sfView_SetSize(sfView* view, float width, float height);
////////////////////////////////////////////////////////////
/// \brief Set the orientation of a view
@@ -100,7 +100,7 @@ CSFML_API void sfView_SetSize(sfView* view, float width, float height);
/// \param angle New angle, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfView_SetRotation(sfView* view, float angle);
CSFML_GRAPHICS_API void sfView_SetRotation(sfView* view, float angle);
////////////////////////////////////////////////////////////
/// \brief Set the target viewport of a view
@@ -116,7 +116,7 @@ CSFML_API void sfView_SetRotation(sfView* view, float angle);
/// \param viewport New viewport rectangle
///
////////////////////////////////////////////////////////////
CSFML_API void sfView_SetViewport(sfView* view, sfFloatRect viewport);
CSFML_GRAPHICS_API void sfView_SetViewport(sfView* view, sfFloatRect viewport);
////////////////////////////////////////////////////////////
/// \brief Reset a view to the given rectangle
@@ -127,7 +127,7 @@ CSFML_API void sfView_SetViewport(sfView* view, sfFloatRect viewport);
/// \param rectangle Rectangle defining the zone to display
///
////////////////////////////////////////////////////////////
CSFML_API void sfView_Reset(sfView* view, sfFloatRect rectangle);
CSFML_GRAPHICS_API void sfView_Reset(sfView* view, sfFloatRect rectangle);
////////////////////////////////////////////////////////////
/// \brief Get the center of a view
@@ -137,7 +137,7 @@ CSFML_API void sfView_Reset(sfView* view, sfFloatRect rectangle);
/// \param y Returned Y coordinate of the center
///
////////////////////////////////////////////////////////////
CSFML_API void sfView_GetCenter(const sfView* view, float* x, float* y);
CSFML_GRAPHICS_API void sfView_GetCenter(const sfView* view, float* x, float* y);
////////////////////////////////////////////////////////////
/// \brief Get the size of a view
@@ -147,7 +147,7 @@ CSFML_API void sfView_GetCenter(const sfView* view, float* x, float* y);
/// \param height Returned height
///
////////////////////////////////////////////////////////////
CSFML_API void sfView_GetSize(const sfView* view, float* width, float* height);
CSFML_GRAPHICS_API void sfView_GetSize(const sfView* view, float* width, float* height);
////////////////////////////////////////////////////////////
/// \brief Get the current orientation of a view
@@ -157,7 +157,7 @@ CSFML_API void sfView_GetSize(const sfView* view, float* width, float* height);
/// \return Rotation angle of the view, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API float sfView_GetRotation(const sfView* view);
CSFML_GRAPHICS_API float sfView_GetRotation(const sfView* view);
////////////////////////////////////////////////////////////
/// \brief Get the target viewport rectangle of a view
@@ -167,7 +167,7 @@ CSFML_API float sfView_GetRotation(const sfView* view);
/// \return Viewport rectangle, expressed as a factor of the target size
///
////////////////////////////////////////////////////////////
CSFML_API sfFloatRect sfView_GetViewport(const sfView* view);
CSFML_GRAPHICS_API sfFloatRect sfView_GetViewport(const sfView* view);
////////////////////////////////////////////////////////////
/// \brief Move a view relatively to its current position
@@ -177,7 +177,7 @@ CSFML_API sfFloatRect sfView_GetViewport(const sfView* view);
/// \param offsetY Y coordinate of the move offset
///
////////////////////////////////////////////////////////////
CSFML_API void sfView_Move(sfView* view, float offsetX, float offsetY);
CSFML_GRAPHICS_API void sfView_Move(sfView* view, float offsetX, float offsetY);
////////////////////////////////////////////////////////////
/// \brief Rotate a view relatively to its current orientation
@@ -186,7 +186,7 @@ CSFML_API void sfView_Move(sfView* view, float offsetX, float offsetY);
/// \param angle Angle to rotate, in degrees
///
////////////////////////////////////////////////////////////
CSFML_API void sfView_Rotate(sfView* view, float angle);
CSFML_GRAPHICS_API void sfView_Rotate(sfView* view, float angle);
////////////////////////////////////////////////////////////
/// \brief Resize a view rectangle relatively to its current size
@@ -202,7 +202,7 @@ CSFML_API void sfView_Rotate(sfView* view, float angle);
/// \param factor Zoom factor to apply
///
////////////////////////////////////////////////////////////
CSFML_API void sfView_Zoom(sfView* view, float factor);
CSFML_GRAPHICS_API void sfView_Zoom(sfView* view, float factor);
#endif // SFML_VIEW_H
+48
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_H
#define SFML_NETWORK_EXPORT_H
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(CSFML_NETWORK_EXPORTS)
#define CSFML_NETWORK_API CSFML_API_EXPORT
#else
#define CSFML_NETWORK_API CSFML_API_IMPORT
#endif
#endif // SFML_NETWORK_EXPORT_H
+33 -33
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Network/Export.h>
#include <SFML/Network/IpAddress.h>
#include <SFML/Network/Types.h>
#include <stddef.h>
@@ -119,7 +119,7 @@ enum sfFtpStatus
/// \param ftpListingResponse Ftp listing response to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfFtpListingResponse_Destroy(sfFtpListingResponse* ftpListingResponse);
CSFML_NETWORK_API void sfFtpListingResponse_Destroy(sfFtpListingResponse* ftpListingResponse);
////////////////////////////////////////////////////////////
/// \brief Check if a FTP listing response status code means a success
@@ -132,7 +132,7 @@ CSFML_API void sfFtpListingResponse_Destroy(sfFtpListingResponse* ftpListingResp
/// \return sfTrue if the status is a success, sfFalse if it is a failure
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfFtpListingResponse_IsOk(const sfFtpListingResponse* ftpListingResponse);
CSFML_NETWORK_API sfBool sfFtpListingResponse_IsOk(const sfFtpListingResponse* ftpListingResponse);
////////////////////////////////////////////////////////////
/// \brief Get the status code of a FTP listing response
@@ -142,7 +142,7 @@ CSFML_API sfBool sfFtpListingResponse_IsOk(const sfFtpListingResponse* ftpListin
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpStatus sfFtpListingResponse_GetStatus(const sfFtpListingResponse* ftpListingResponse);
CSFML_NETWORK_API sfFtpStatus sfFtpListingResponse_GetStatus(const sfFtpListingResponse* ftpListingResponse);
////////////////////////////////////////////////////////////
/// \brief Get the full message contained in a FTP listing response
@@ -152,7 +152,7 @@ CSFML_API sfFtpStatus sfFtpListingResponse_GetStatus(const sfFtpListingResponse*
/// \return The response message
///
////////////////////////////////////////////////////////////
CSFML_API const char* sfFtpListingResponse_GetMessage(const sfFtpListingResponse* ftpListingResponse);
CSFML_NETWORK_API const char* sfFtpListingResponse_GetMessage(const sfFtpListingResponse* ftpListingResponse);
////////////////////////////////////////////////////////////
/// \brief Return the number of filenames contained in a FTP listing response
@@ -162,7 +162,7 @@ CSFML_API const char* sfFtpListingResponse_GetMessage(const sfFtpListingResponse
/// \return Total number of filenames available
///
////////////////////////////////////////////////////////////
CSFML_API size_t sfFtpListingResponse_GetCount(const sfFtpListingResponse* ftpListingResponse);
CSFML_NETWORK_API size_t sfFtpListingResponse_GetCount(const sfFtpListingResponse* ftpListingResponse);
////////////////////////////////////////////////////////////
/// \brief Return a filename contained in a FTP listing response
@@ -173,7 +173,7 @@ CSFML_API size_t sfFtpListingResponse_GetCount(const sfFtpListingResponse* ftpLi
/// \return Array containing the requested filenames
///
////////////////////////////////////////////////////////////
CSFML_API const char* sfFtpListingResponse_GetFilename(const sfFtpListingResponse* ftpListingResponse, size_t index);
CSFML_NETWORK_API const char* sfFtpListingResponse_GetFilename(const sfFtpListingResponse* ftpListingResponse, size_t index);
////////////////////////////////////////////////////////////
/// \brief Destroy a FTP directory response
@@ -181,7 +181,7 @@ CSFML_API const char* sfFtpListingResponse_GetFilename(const sfFtpListingRespons
/// \param ftpDirectoryResponse Ftp directory response to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfFtpDirectoryResponse_Destroy(sfFtpDirectoryResponse* ftpDirectoryResponse);
CSFML_NETWORK_API void sfFtpDirectoryResponse_Destroy(sfFtpDirectoryResponse* ftpDirectoryResponse);
////////////////////////////////////////////////////////////
/// \brief Check if a FTP directory response status code means a success
@@ -194,7 +194,7 @@ CSFML_API void sfFtpDirectoryResponse_Destroy(sfFtpDirectoryResponse* ftpDirecto
/// \return sfTrue if the status is a success, sfFalse if it is a failure
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfFtpDirectoryResponse_IsOk(const sfFtpDirectoryResponse* ftpDirectoryResponse);
CSFML_NETWORK_API sfBool sfFtpDirectoryResponse_IsOk(const sfFtpDirectoryResponse* ftpDirectoryResponse);
////////////////////////////////////////////////////////////
/// \brief Get the status code of a FTP directory response
@@ -204,7 +204,7 @@ CSFML_API sfBool sfFtpDirectoryResponse_IsOk(const sfFtpDirectoryResponse* ftpDi
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(const sfFtpDirectoryResponse* ftpDirectoryResponse);
CSFML_NETWORK_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(const sfFtpDirectoryResponse* ftpDirectoryResponse);
////////////////////////////////////////////////////////////
/// \brief Get the full message contained in a FTP directory response
@@ -214,7 +214,7 @@ CSFML_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(const sfFtpDirectoryRespo
/// \return The response message
///
////////////////////////////////////////////////////////////
CSFML_API const char* sfFtpDirectoryResponse_GetMessage(const sfFtpDirectoryResponse* ftpDirectoryResponse);
CSFML_NETWORK_API const char* sfFtpDirectoryResponse_GetMessage(const sfFtpDirectoryResponse* ftpDirectoryResponse);
////////////////////////////////////////////////////////////
/// \brief Get the directory returned in a FTP directory response
@@ -224,7 +224,7 @@ CSFML_API const char* sfFtpDirectoryResponse_GetMessage(const sfFtpDirectoryResp
/// \return Directory name
///
////////////////////////////////////////////////////////////
CSFML_API const char* sfFtpDirectoryResponse_GetDirectory(const sfFtpDirectoryResponse* ftpDirectoryResponse);
CSFML_NETWORK_API const char* sfFtpDirectoryResponse_GetDirectory(const sfFtpDirectoryResponse* ftpDirectoryResponse);
////////////////////////////////////////////////////////////
@@ -233,7 +233,7 @@ CSFML_API const char* sfFtpDirectoryResponse_GetDirectory(const sfFtpDirectoryRe
/// \param ftpResponse Ftp response to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfFtpResponse_Destroy(sfFtpResponse* ftpResponse);
CSFML_NETWORK_API void sfFtpResponse_Destroy(sfFtpResponse* ftpResponse);
////////////////////////////////////////////////////////////
/// \brief Check if a FTP response status code means a success
@@ -246,7 +246,7 @@ CSFML_API void sfFtpResponse_Destroy(sfFtpResponse* ftpResponse);
/// \return sfTrue if the status is a success, sfFalse if it is a failure
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfFtpResponse_IsOk(const sfFtpResponse* ftpResponse);
CSFML_NETWORK_API sfBool sfFtpResponse_IsOk(const sfFtpResponse* ftpResponse);
////////////////////////////////////////////////////////////
/// \brief Get the status code of a FTP response
@@ -256,7 +256,7 @@ CSFML_API sfBool sfFtpResponse_IsOk(const sfFtpResponse* ftpResponse);
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpStatus sfFtpResponse_GetStatus(const sfFtpResponse* ftpResponse);
CSFML_NETWORK_API sfFtpStatus sfFtpResponse_GetStatus(const sfFtpResponse* ftpResponse);
////////////////////////////////////////////////////////////
/// \brief Get the full message contained in a FTP response
@@ -266,7 +266,7 @@ CSFML_API sfFtpStatus sfFtpResponse_GetStatus(const sfFtpResponse* ftpResponse);
/// \return The response message
///
////////////////////////////////////////////////////////////
CSFML_API const char* sfFtpResponse_GetMessage(const sfFtpResponse* ftpResponse);
CSFML_NETWORK_API const char* sfFtpResponse_GetMessage(const sfFtpResponse* ftpResponse);
////////////////////////////////////////////////////////////
/// \brief Create a new Ftp object
@@ -274,7 +274,7 @@ CSFML_API const char* sfFtpResponse_GetMessage(const sfFtpResponse* ftpResponse)
/// \return A new sfFtp object
///
////////////////////////////////////////////////////////////
CSFML_API sfFtp* sfFtp_Create(void);
CSFML_NETWORK_API sfFtp* sfFtp_Create(void);
////////////////////////////////////////////////////////////
/// \brief Destroy a Ftp object
@@ -282,7 +282,7 @@ CSFML_API sfFtp* sfFtp_Create(void);
/// \param ftp Ftp object to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfFtp_Destroy(sfFtp* ftp);
CSFML_NETWORK_API void sfFtp_Destroy(sfFtp* ftp);
////////////////////////////////////////////////////////////
/// \brief Connect to the specified FTP server
@@ -304,7 +304,7 @@ CSFML_API void sfFtp_Destroy(sfFtp* ftp);
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_Connect(sfFtp* ftp, sfIpAddress server, unsigned short port, sfUint32 timeout);
CSFML_NETWORK_API sfFtpResponse* sfFtp_Connect(sfFtp* ftp, sfIpAddress server, unsigned short port, sfUint32 timeout);
////////////////////////////////////////////////////////////
/// \brief Log in using an anonymous account
@@ -317,7 +317,7 @@ CSFML_API sfFtpResponse* sfFtp_Connect(sfFtp* ftp, sfIpAddress server, unsigned
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_LoginAnonymous(sfFtp* ftp);
CSFML_NETWORK_API sfFtpResponse* sfFtp_LoginAnonymous(sfFtp* ftp);
////////////////////////////////////////////////////////////
/// \brief Log in using a username and a password
@@ -332,7 +332,7 @@ CSFML_API sfFtpResponse* sfFtp_LoginAnonymous(sfFtp* ftp);
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_Login(sfFtp* ftp, const char* userName, const char* password);
CSFML_NETWORK_API sfFtpResponse* sfFtp_Login(sfFtp* ftp, const char* userName, const char* password);
////////////////////////////////////////////////////////////
/// \brief Close the connection with the server
@@ -342,7 +342,7 @@ CSFML_API sfFtpResponse* sfFtp_Login(sfFtp* ftp, const char* userName, const cha
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_Disconnect(sfFtp* ftp);
CSFML_NETWORK_API sfFtpResponse* sfFtp_Disconnect(sfFtp* ftp);
////////////////////////////////////////////////////////////
/// \brief Send a null command to keep the connection alive
@@ -355,7 +355,7 @@ CSFML_API sfFtpResponse* sfFtp_Disconnect(sfFtp* ftp);
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_KeepAlive(sfFtp* ftp);
CSFML_NETWORK_API sfFtpResponse* sfFtp_KeepAlive(sfFtp* ftp);
////////////////////////////////////////////////////////////
/// \brief Get the current working directory
@@ -368,7 +368,7 @@ CSFML_API sfFtpResponse* sfFtp_KeepAlive(sfFtp* ftp);
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpDirectoryResponse* sfFtp_GetWorkingDirectory(sfFtp* ftp);
CSFML_NETWORK_API sfFtpDirectoryResponse* sfFtp_GetWorkingDirectory(sfFtp* ftp);
////////////////////////////////////////////////////////////
/// \brief Get the contents of the given directory
@@ -384,7 +384,7 @@ CSFML_API sfFtpDirectoryResponse* sfFtp_GetWorkingDirectory(sfFtp* ftp);
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpListingResponse* sfFtp_GetDirectoryListing(sfFtp* ftp, const char* directory);
CSFML_NETWORK_API sfFtpListingResponse* sfFtp_GetDirectoryListing(sfFtp* ftp, const char* directory);
////////////////////////////////////////////////////////////
/// \brief Change the current working directory
@@ -397,7 +397,7 @@ CSFML_API sfFtpListingResponse* sfFtp_GetDirectoryListing(sfFtp* ftp, const char
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_ChangeDirectory(sfFtp* ftp, const char* directory);
CSFML_NETWORK_API sfFtpResponse* sfFtp_ChangeDirectory(sfFtp* ftp, const char* directory);
////////////////////////////////////////////////////////////
/// \brief Go to the parent directory of the current one
@@ -407,7 +407,7 @@ CSFML_API sfFtpResponse* sfFtp_ChangeDirectory(sfFtp* ftp, const char* directory
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_ParentDirectory(sfFtp* ftp);
CSFML_NETWORK_API sfFtpResponse* sfFtp_ParentDirectory(sfFtp* ftp);
////////////////////////////////////////////////////////////
/// \brief Create a new directory
@@ -421,7 +421,7 @@ CSFML_API sfFtpResponse* sfFtp_ParentDirectory(sfFtp* ftp);
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_CreateDirectory(sfFtp* ftp, const char* name);
CSFML_NETWORK_API sfFtpResponse* sfFtp_CreateDirectory(sfFtp* ftp, const char* name);
////////////////////////////////////////////////////////////
/// \brief Remove an existing directory
@@ -437,7 +437,7 @@ CSFML_API sfFtpResponse* sfFtp_CreateDirectory(sfFtp* ftp, const char* name);
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_DeleteDirectory(sfFtp* ftp, const char* name);
CSFML_NETWORK_API sfFtpResponse* sfFtp_DeleteDirectory(sfFtp* ftp, const char* name);
////////////////////////////////////////////////////////////
/// \brief Rename an existing file
@@ -452,7 +452,7 @@ CSFML_API sfFtpResponse* sfFtp_DeleteDirectory(sfFtp* ftp, const char* name);
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_RenameFile(sfFtp* ftp, const char* file, const char* newName);
CSFML_NETWORK_API sfFtpResponse* sfFtp_RenameFile(sfFtp* ftp, const char* file, const char* newName);
////////////////////////////////////////////////////////////
/// \brief Remove an existing file
@@ -468,7 +468,7 @@ CSFML_API sfFtpResponse* sfFtp_RenameFile(sfFtp* ftp, const char* file, const ch
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_DeleteFile(sfFtp* ftp, const char* name);
CSFML_NETWORK_API sfFtpResponse* sfFtp_DeleteFile(sfFtp* ftp, const char* name);
////////////////////////////////////////////////////////////
/// \brief Download a file from a FTP server
@@ -486,7 +486,7 @@ CSFML_API sfFtpResponse* sfFtp_DeleteFile(sfFtp* ftp, const char* name);
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_Download(sfFtp* ftp, const char* distantFile, const char* destPath, sfFtpTransferMode mode);
CSFML_NETWORK_API sfFtpResponse* sfFtp_Download(sfFtp* ftp, const char* distantFile, const char* destPath, sfFtpTransferMode mode);
////////////////////////////////////////////////////////////
/// \brief Upload a file to a FTP server
@@ -504,7 +504,7 @@ CSFML_API sfFtpResponse* sfFtp_Download(sfFtp* ftp, const char* distantFile, con
/// \return Server response to the request
///
////////////////////////////////////////////////////////////
CSFML_API sfFtpResponse* sfFtp_Upload(sfFtp* ftp, const char* localFile, const char* destPath, sfFtpTransferMode mode);
CSFML_NETWORK_API sfFtpResponse* sfFtp_Upload(sfFtp* ftp, const char* localFile, const char* destPath, sfFtpTransferMode mode);
#endif // SFML_FTP_H
+18 -18
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Network/Export.h>
#include <SFML/Network/Types.h>
#include <SFML/System/Time.h>
@@ -87,7 +87,7 @@ enum sfHttpStatus
/// \return A new sfHttpRequest object
///
////////////////////////////////////////////////////////////
CSFML_API sfHttpRequest* sfHttpRequest_Create(void);
CSFML_NETWORK_API sfHttpRequest* sfHttpRequest_Create(void);
////////////////////////////////////////////////////////////
/// \brief Destroy a HTTP request
@@ -95,7 +95,7 @@ CSFML_API sfHttpRequest* sfHttpRequest_Create(void);
/// \param httpRequest HTTP request to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfHttpRequest_Destroy(sfHttpRequest* httpRequest);
CSFML_NETWORK_API void sfHttpRequest_Destroy(sfHttpRequest* httpRequest);
////////////////////////////////////////////////////////////
/// \brief Set the value of a header field of a HTTP request
@@ -111,7 +111,7 @@ CSFML_API void sfHttpRequest_Destroy(sfHttpRequest* httpRequest);
/// \param value Value of the field
///
////////////////////////////////////////////////////////////
CSFML_API void sfHttpRequest_SetField(sfHttpRequest* httpRequest, const char* field, const char* value);
CSFML_NETWORK_API void sfHttpRequest_SetField(sfHttpRequest* httpRequest, const char* field, const char* value);
////////////////////////////////////////////////////////////
/// \brief Set a HTTP request method
@@ -124,7 +124,7 @@ CSFML_API void sfHttpRequest_SetField(sfHttpRequest* httpRequest, const char* fi
/// \param method Method to use for the request
///
////////////////////////////////////////////////////////////
CSFML_API void sfHttpRequest_SetMethod(sfHttpRequest* httpRequest, sfHttpMethod method);
CSFML_NETWORK_API void sfHttpRequest_SetMethod(sfHttpRequest* httpRequest, sfHttpMethod method);
////////////////////////////////////////////////////////////
/// \brief Set a HTTP request URI
@@ -137,7 +137,7 @@ CSFML_API void sfHttpRequest_SetMethod(sfHttpRequest* httpRequest, sfHttpMethod
/// \param uri URI to request, relative to the host
///
////////////////////////////////////////////////////////////
CSFML_API void sfHttpRequest_SetUri(sfHttpRequest* httpRequest, const char* uri);
CSFML_NETWORK_API void sfHttpRequest_SetUri(sfHttpRequest* httpRequest, const char* uri);
////////////////////////////////////////////////////////////
/// \brief Set the HTTP version of a HTTP request
@@ -149,7 +149,7 @@ CSFML_API void sfHttpRequest_SetUri(sfHttpRequest* httpRequest, const char* uri)
/// \param minor Minor HTTP version number
///
////////////////////////////////////////////////////////////
CSFML_API void sfHttpRequest_SetHttpVersion(sfHttpRequest* httpRequest, unsigned int major, unsigned int minor);
CSFML_NETWORK_API void sfHttpRequest_SetHttpVersion(sfHttpRequest* httpRequest, unsigned int major, unsigned int minor);
////////////////////////////////////////////////////////////
/// \brief Set the body of a HTTP request
@@ -162,7 +162,7 @@ CSFML_API void sfHttpRequest_SetHttpVersion(sfHttpRequest* httpRequest, unsigned
/// \param body Content of the body
///
////////////////////////////////////////////////////////////
CSFML_API void sfHttpRequest_SetBody(sfHttpRequest* httpRequest, const char* body);
CSFML_NETWORK_API void sfHttpRequest_SetBody(sfHttpRequest* httpRequest, const char* body);
////////////////////////////////////////////////////////////
/// \brief Destroy a HTTP response
@@ -170,7 +170,7 @@ CSFML_API void sfHttpRequest_SetBody(sfHttpRequest* httpRequest, const char* bod
/// \param httpResponse HTTP response to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfHttpResponse_Destroy(sfHttpResponse* httpResponse);
CSFML_NETWORK_API void sfHttpResponse_Destroy(sfHttpResponse* httpResponse);
////////////////////////////////////////////////////////////
/// \brief Get the value of a field of a HTTP response
@@ -185,7 +185,7 @@ CSFML_API void sfHttpResponse_Destroy(sfHttpResponse* httpResponse);
/// \return Value of the field, or empty string if not found
///
////////////////////////////////////////////////////////////
CSFML_API const char* sfHttpResponse_GetField(const sfHttpResponse* httpResponse, const char* field);
CSFML_NETWORK_API const char* sfHttpResponse_GetField(const sfHttpResponse* httpResponse, const char* field);
////////////////////////////////////////////////////////////
/// \brief Get the status code of a HTTP reponse
@@ -200,7 +200,7 @@ CSFML_API const char* sfHttpResponse_GetField(const sfHttpResponse* httpResponse
/// \return Status code of the response
///
////////////////////////////////////////////////////////////
CSFML_API sfHttpStatus sfHttpResponse_GetStatus(const sfHttpResponse* httpResponse);
CSFML_NETWORK_API sfHttpStatus sfHttpResponse_GetStatus(const sfHttpResponse* httpResponse);
////////////////////////////////////////////////////////////
/// \brief Get the major HTTP version number of a HTTP response
@@ -210,7 +210,7 @@ CSFML_API sfHttpStatus sfHttpResponse_GetStatus(const sfHttpResponse* httpRespon
/// \return Major HTTP version number
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfHttpResponse_GetMajorVersion(const sfHttpResponse* httpResponse);
CSFML_NETWORK_API unsigned int sfHttpResponse_GetMajorVersion(const sfHttpResponse* httpResponse);
////////////////////////////////////////////////////////////
/// \brief Get the minor HTTP version number of a HTTP response
@@ -220,7 +220,7 @@ CSFML_API unsigned int sfHttpResponse_GetMajorVersion(const sfHttpResponse* http
/// \return Minor HTTP version number
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfHttpResponse_GetMinorVersion(const sfHttpResponse* httpResponse);
CSFML_NETWORK_API unsigned int sfHttpResponse_GetMinorVersion(const sfHttpResponse* httpResponse);
////////////////////////////////////////////////////////////
/// \brief Get the body of a HTTP response
@@ -236,7 +236,7 @@ CSFML_API unsigned int sfHttpResponse_GetMinorVersion(const sfHttpResponse* http
/// \return The response body
///
////////////////////////////////////////////////////////////
CSFML_API const char* sfHttpResponse_GetBody(const sfHttpResponse* httpResponse);
CSFML_NETWORK_API const char* sfHttpResponse_GetBody(const sfHttpResponse* httpResponse);
////////////////////////////////////////////////////////////
/// \brief Create a new Http object
@@ -244,7 +244,7 @@ CSFML_API const char* sfHttpResponse_GetBody(const sfHttpResponse* httpResponse)
/// \return A new sfHttp object
///
////////////////////////////////////////////////////////////
CSFML_API sfHttp* sfHttp_Create(void);
CSFML_NETWORK_API sfHttp* sfHttp_Create(void);
////////////////////////////////////////////////////////////
/// \brief Destroy a Http object
@@ -252,7 +252,7 @@ CSFML_API sfHttp* sfHttp_Create(void);
/// \param http Http object to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfHttp_Destroy(sfHttp* http);
CSFML_NETWORK_API void sfHttp_Destroy(sfHttp* http);
////////////////////////////////////////////////////////////
/// \brief Set the target host of a HTTP object
@@ -270,7 +270,7 @@ CSFML_API void sfHttp_Destroy(sfHttp* http);
/// \param port Port to use for connection
///
////////////////////////////////////////////////////////////
CSFML_API void sfHttp_SetHost(sfHttp* http, const char* host, unsigned short port);
CSFML_NETWORK_API void sfHttp_SetHost(sfHttp* http, const char* host, unsigned short port);
////////////////////////////////////////////////////////////
/// \brief Send a HTTP request and return the server's response.
@@ -291,7 +291,7 @@ CSFML_API void sfHttp_SetHost(sfHttp* http, const char* host, unsigned short por
/// \return Server's response
///
////////////////////////////////////////////////////////////
CSFML_API sfHttpResponse* sfHttp_SendRequest(sfHttp* http, const sfHttpRequest* request, sfTime timeout);
CSFML_NETWORK_API sfHttpResponse* sfHttp_SendRequest(sfHttp* http, const sfHttpRequest* request, sfTime timeout);
#endif // SFML_HTTP_H
+11 -11
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Network/Export.h>
#include <SFML/System/Time.h>
@@ -53,7 +53,7 @@ typedef struct
/// \return Resulting address
///
////////////////////////////////////////////////////////////
CSFML_API sfIpAddress sfIpAddress_FromString(const char* address);
CSFML_NETWORK_API sfIpAddress sfIpAddress_FromString(const char* address);
////////////////////////////////////////////////////////////
/// \brief Create an address from 4 bytes
@@ -71,7 +71,7 @@ CSFML_API sfIpAddress sfIpAddress_FromString(const char* address);
/// \return Resulting address
///
////////////////////////////////////////////////////////////
CSFML_API sfIpAddress sfIpAddress_FromBytes(sfUint8 byte0, sfUint8 byte1, sfUint8 byte2, sfUint8 byte3);
CSFML_NETWORK_API sfIpAddress sfIpAddress_FromBytes(sfUint8 byte0, sfUint8 byte1, sfUint8 byte2, sfUint8 byte3);
////////////////////////////////////////////////////////////
/// \brief Construct an address from a 32-bits integer
@@ -86,7 +86,7 @@ CSFML_API sfIpAddress sfIpAddress_FromBytes(sfUint8 byte0, sfUint8 byte1, sfUint
/// \return Resulting address
///
////////////////////////////////////////////////////////////
CSFML_API sfIpAddress sfIpAddress_FromInteger(sfUint32 address);
CSFML_NETWORK_API sfIpAddress sfIpAddress_FromInteger(sfUint32 address);
////////////////////////////////////////////////////////////
/// \brief Get a string representation of an address
@@ -100,7 +100,7 @@ CSFML_API sfIpAddress sfIpAddress_FromInteger(sfUint32 address);
/// \return String representation of the address
///
////////////////////////////////////////////////////////////
CSFML_API void sfIpAddress_ToString(sfIpAddress address, char* string);
CSFML_NETWORK_API void sfIpAddress_ToString(sfIpAddress address, char* string);
////////////////////////////////////////////////////////////
/// \brief Get an integer representation of the address
@@ -116,7 +116,7 @@ CSFML_API void sfIpAddress_ToString(sfIpAddress address, char* string);
/// \return 32-bits unsigned integer representation of the address
///
////////////////////////////////////////////////////////////
CSFML_API sfUint32 sfIpAddress_ToInteger(sfIpAddress address);
CSFML_NETWORK_API sfUint32 sfIpAddress_ToInteger(sfIpAddress address);
////////////////////////////////////////////////////////////
/// \brief Get the computer's local address
@@ -130,7 +130,7 @@ CSFML_API sfUint32 sfIpAddress_ToInteger(sfIpAddress address);
/// \return Local IP address of the computer
///
////////////////////////////////////////////////////////////
CSFML_API sfIpAddress sfIpAddress_GetLocalAddress(void);
CSFML_NETWORK_API sfIpAddress sfIpAddress_GetLocalAddress(void);
////////////////////////////////////////////////////////////
/// \brief Get the computer's public address
@@ -152,7 +152,7 @@ CSFML_API sfIpAddress sfIpAddress_GetLocalAddress(void);
/// \return Public IP address of the computer
///
////////////////////////////////////////////////////////////
CSFML_API sfIpAddress sfIpAddress_GetPublicAddress(sfTime timeout);
CSFML_NETWORK_API sfIpAddress sfIpAddress_GetPublicAddress(sfTime timeout);
////////////////////////////////////////////////////////////
/// \brief Get the empty/invalid address
@@ -160,7 +160,7 @@ CSFML_API sfIpAddress sfIpAddress_GetPublicAddress(sfTime timeout);
/// \return Empty object that represents invalid addresses
///
////////////////////////////////////////////////////////////
CSFML_API sfIpAddress sfIpAddress_None(void);
CSFML_NETWORK_API sfIpAddress sfIpAddress_None(void);
////////////////////////////////////////////////////////////
/// \brief Get the computer's loopback address
@@ -168,7 +168,7 @@ CSFML_API sfIpAddress sfIpAddress_None(void);
/// \return Local host IP address (127.0.0.1, or "localhost")
///
////////////////////////////////////////////////////////////
CSFML_API sfIpAddress sfIpAddress_LocalHost(void);
CSFML_NETWORK_API sfIpAddress sfIpAddress_LocalHost(void);
////////////////////////////////////////////////////////////
/// \brief Get the UDP broadcast address
@@ -176,7 +176,7 @@ CSFML_API sfIpAddress sfIpAddress_LocalHost(void);
/// \return Broadcast IP address (255.255.255.255)
///
////////////////////////////////////////////////////////////
CSFML_API sfIpAddress sfIpAddress_Broadcast(void);
CSFML_NETWORK_API sfIpAddress sfIpAddress_Broadcast(void);
#endif // SFML_IPADDRESS_H
+32 -32
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Network/Export.h>
#include <SFML/Network/Types.h>
#include <stddef.h>
@@ -39,7 +39,7 @@
/// \return A new sfPacket object
///
////////////////////////////////////////////////////////////
CSFML_API sfPacket* sfPacket_Create(void);
CSFML_NETWORK_API sfPacket* sfPacket_Create(void);
////////////////////////////////////////////////////////////
/// \brief Create a new packet by copying an existing one
@@ -49,7 +49,7 @@ CSFML_API sfPacket* sfPacket_Create(void);
/// \return A new sfPacket object which is a copy of \a packet
///
////////////////////////////////////////////////////////////
CSFML_API sfPacket* sfPacket_Copy(sfPacket* packet);
CSFML_NETWORK_API sfPacket* sfPacket_Copy(sfPacket* packet);
////////////////////////////////////////////////////////////
/// \brief Destroy a packet
@@ -57,7 +57,7 @@ CSFML_API sfPacket* sfPacket_Copy(sfPacket* packet);
/// \param packet Packet to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfPacket_Destroy(sfPacket* packet);
CSFML_NETWORK_API void sfPacket_Destroy(sfPacket* packet);
////////////////////////////////////////////////////////////
/// \brief Append data to the end of a packet
@@ -67,7 +67,7 @@ CSFML_API void sfPacket_Destroy(sfPacket* packet);
/// \param sizeInBytes Number of bytes to append
///
////////////////////////////////////////////////////////////
CSFML_API void sfPacket_Append(sfPacket* packet, const void* data, size_t sizeInBytes);
CSFML_NETWORK_API void sfPacket_Append(sfPacket* packet, const void* data, size_t sizeInBytes);
////////////////////////////////////////////////////////////
/// \brief Clear a packet
@@ -77,7 +77,7 @@ CSFML_API void sfPacket_Append(sfPacket* packet, const void* data, size_t sizeIn
/// \param packet Packet object
///
///////////////////////////////////////////////////////////
CSFML_API void sfPacket_Clear(sfPacket* packet);
CSFML_NETWORK_API void sfPacket_Clear(sfPacket* packet);
////////////////////////////////////////////////////////////
/// \brief Get a pointer to the data contained in a packet
@@ -92,7 +92,7 @@ CSFML_API void sfPacket_Clear(sfPacket* packet);
/// \return Pointer to the data
///
////////////////////////////////////////////////////////////
CSFML_API const char* sfPacket_GetData(const sfPacket* packet);
CSFML_NETWORK_API const char* sfPacket_GetData(const sfPacket* packet);
////////////////////////////////////////////////////////////
/// \brief Get the size of the data contained in a packet
@@ -105,7 +105,7 @@ CSFML_API const char* sfPacket_GetData(const sfPacket* packet);
/// \return Data size, in bytes
///
////////////////////////////////////////////////////////////
CSFML_API size_t sfPacket_GetDataSize(const sfPacket* packet);
CSFML_NETWORK_API size_t sfPacket_GetDataSize(const sfPacket* packet);
////////////////////////////////////////////////////////////
/// \brief Tell if the reading position has reached the
@@ -119,7 +119,7 @@ CSFML_API size_t sfPacket_GetDataSize(const sfPacket* packet);
/// \return sfTrue if all data was read, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfPacket_EndOfPacket(const sfPacket* packet);
CSFML_NETWORK_API sfBool sfPacket_EndOfPacket(const sfPacket* packet);
////////////////////////////////////////////////////////////
/// \brief Test the validity of a packet, for reading
@@ -135,7 +135,7 @@ CSFML_API sfBool sfPacket_EndOfPacket(const sfPacket* packet);
/// \return sfTrue if last data extraction from packet was successful
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfPacket_CanRead(const sfPacket* packet);
CSFML_NETWORK_API sfBool sfPacket_CanRead(const sfPacket* packet);
////////////////////////////////////////////////////////////
/// \brief Functions to extract data from a packet
@@ -143,17 +143,17 @@ CSFML_API sfBool sfPacket_CanRead(const sfPacket* packet);
/// \param packet Packet object
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfPacket_ReadBool(sfPacket* packet);
CSFML_API sfInt8 sfPacket_ReadInt8(sfPacket* packet);
CSFML_API sfUint8 sfPacket_ReadUint8(sfPacket* packet);
CSFML_API sfInt16 sfPacket_ReadInt16(sfPacket* packet);
CSFML_API sfUint16 sfPacket_ReadUint16(sfPacket* packet);
CSFML_API sfInt32 sfPacket_ReadInt32(sfPacket* packet);
CSFML_API sfUint32 sfPacket_ReadUint32(sfPacket* packet);
CSFML_API float sfPacket_ReadFloat(sfPacket* packet);
CSFML_API double sfPacket_ReadDouble(sfPacket* packet);
CSFML_API void sfPacket_ReadString(sfPacket* packet, char* string);
CSFML_API void sfPacket_ReadWideString(sfPacket* packet, wchar_t* string);
CSFML_NETWORK_API sfBool sfPacket_ReadBool(sfPacket* packet);
CSFML_NETWORK_API sfInt8 sfPacket_ReadInt8(sfPacket* packet);
CSFML_NETWORK_API sfUint8 sfPacket_ReadUint8(sfPacket* packet);
CSFML_NETWORK_API sfInt16 sfPacket_ReadInt16(sfPacket* packet);
CSFML_NETWORK_API sfUint16 sfPacket_ReadUint16(sfPacket* packet);
CSFML_NETWORK_API sfInt32 sfPacket_ReadInt32(sfPacket* packet);
CSFML_NETWORK_API sfUint32 sfPacket_ReadUint32(sfPacket* packet);
CSFML_NETWORK_API float sfPacket_ReadFloat(sfPacket* packet);
CSFML_NETWORK_API double sfPacket_ReadDouble(sfPacket* packet);
CSFML_NETWORK_API void sfPacket_ReadString(sfPacket* packet, char* string);
CSFML_NETWORK_API void sfPacket_ReadWideString(sfPacket* packet, wchar_t* string);
////////////////////////////////////////////////////////////
/// \brief Functions to insert data into a packet
@@ -161,17 +161,17 @@ CSFML_API void sfPacket_ReadWideString(sfPacket* packet, wchar_t* string);
/// \param packet Packet object
///
////////////////////////////////////////////////////////////
CSFML_API void sfPacket_WriteBool(sfPacket* packet, sfBool);
CSFML_API void sfPacket_WriteInt8(sfPacket* packet, sfInt8);
CSFML_API void sfPacket_WriteUint8(sfPacket* packet, sfUint8);
CSFML_API void sfPacket_WriteInt16(sfPacket* packet, sfInt16);
CSFML_API void sfPacket_WriteUint16(sfPacket* packet, sfUint16);
CSFML_API void sfPacket_WriteInt32(sfPacket* packet, sfInt32);
CSFML_API void sfPacket_WriteUint32(sfPacket* packet, sfUint32);
CSFML_API void sfPacket_WriteFloat(sfPacket* packet, float);
CSFML_API void sfPacket_WriteDouble(sfPacket* packet, double);
CSFML_API void sfPacket_WriteString(sfPacket* packet, const char* string);
CSFML_API void sfPacket_WriteWideString(sfPacket* packet, const wchar_t* string);
CSFML_NETWORK_API void sfPacket_WriteBool(sfPacket* packet, sfBool);
CSFML_NETWORK_API void sfPacket_WriteInt8(sfPacket* packet, sfInt8);
CSFML_NETWORK_API void sfPacket_WriteUint8(sfPacket* packet, sfUint8);
CSFML_NETWORK_API void sfPacket_WriteInt16(sfPacket* packet, sfInt16);
CSFML_NETWORK_API void sfPacket_WriteUint16(sfPacket* packet, sfUint16);
CSFML_NETWORK_API void sfPacket_WriteInt32(sfPacket* packet, sfInt32);
CSFML_NETWORK_API void sfPacket_WriteUint32(sfPacket* packet, sfUint32);
CSFML_NETWORK_API void sfPacket_WriteFloat(sfPacket* packet, float);
CSFML_NETWORK_API void sfPacket_WriteDouble(sfPacket* packet, double);
CSFML_NETWORK_API void sfPacket_WriteString(sfPacket* packet, const char* string);
CSFML_NETWORK_API void sfPacket_WriteWideString(sfPacket* packet, const wchar_t* string);
#endif // SFML_PACKET_H
+15 -15
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Network/Export.h>
#include <SFML/Network/Types.h>
#include <SFML/System/Time.h>
@@ -39,7 +39,7 @@
/// \return A new sfSocketSelector object
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketSelector* sfSocketSelector_Create(void);
CSFML_NETWORK_API sfSocketSelector* sfSocketSelector_Create(void);
////////////////////////////////////////////////////////////
/// \brief Create a new socket selector by copying an existing one
@@ -49,7 +49,7 @@ CSFML_API sfSocketSelector* sfSocketSelector_Create(void);
/// \return A new sfSocketSelector object which is a copy of \a selector
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketSelector* sfSocketSelector_Copy(sfSocketSelector* selector);
CSFML_NETWORK_API sfSocketSelector* sfSocketSelector_Copy(sfSocketSelector* selector);
////////////////////////////////////////////////////////////
/// \brief Destroy a socket selector
@@ -57,7 +57,7 @@ CSFML_API sfSocketSelector* sfSocketSelector_Copy(sfSocketSelector* selector);
/// \param selector Socket selector to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfSocketSelector_Destroy(sfSocketSelector* selector);
CSFML_NETWORK_API void sfSocketSelector_Destroy(sfSocketSelector* selector);
////////////////////////////////////////////////////////////
/// \brief Add a new socket to a socket selector
@@ -70,9 +70,9 @@ CSFML_API void sfSocketSelector_Destroy(sfSocketSelector* selector);
/// \param socket Pointer to the socket to add
///
////////////////////////////////////////////////////////////
CSFML_API void sfSocketSelector_AddTcpListener(sfSocketSelector* selector, sfTcpListener* socket);
CSFML_API void sfSocketSelector_AddTcpSocket(sfSocketSelector* selector, sfTcpSocket* socket);
CSFML_API void sfSocketSelector_AddUdpSocket(sfSocketSelector* selector, sfUdpSocket* socket);
CSFML_NETWORK_API void sfSocketSelector_AddTcpListener(sfSocketSelector* selector, sfTcpListener* socket);
CSFML_NETWORK_API void sfSocketSelector_AddTcpSocket(sfSocketSelector* selector, sfTcpSocket* socket);
CSFML_NETWORK_API void sfSocketSelector_AddUdpSocket(sfSocketSelector* selector, sfUdpSocket* socket);
////////////////////////////////////////////////////////////
/// \brief Remove a socket from a socket selector
@@ -84,9 +84,9 @@ CSFML_API void sfSocketSelector_AddUdpSocket(sfSocketSelector* selector, sfUdpSo
/// \param socket POointer to the socket to remove
///
////////////////////////////////////////////////////////////
CSFML_API void sfSocketSelector_RemoveTcpListener(sfSocketSelector* selector, sfTcpListener* socket);
CSFML_API void sfSocketSelector_RemoveTcpSocket(sfSocketSelector* selector, sfTcpSocket* socket);
CSFML_API void sfSocketSelector_RemoveUdpSocket(sfSocketSelector* selector, sfUdpSocket* socket);
CSFML_NETWORK_API void sfSocketSelector_RemoveTcpListener(sfSocketSelector* selector, sfTcpListener* socket);
CSFML_NETWORK_API void sfSocketSelector_RemoveTcpSocket(sfSocketSelector* selector, sfTcpSocket* socket);
CSFML_NETWORK_API void sfSocketSelector_RemoveUdpSocket(sfSocketSelector* selector, sfUdpSocket* socket);
////////////////////////////////////////////////////////////
/// \brief Remove all the sockets stored in a selector
@@ -98,7 +98,7 @@ CSFML_API void sfSocketSelector_RemoveUdpSocket(sfSocketSelector* selector, sfUd
/// \param selector Socket selector object
///
////////////////////////////////////////////////////////////
CSFML_API void sfSocketSelector_Clear(sfSocketSelector* selector);
CSFML_NETWORK_API void sfSocketSelector_Clear(sfSocketSelector* selector);
////////////////////////////////////////////////////////////
/// \brief Wait until one or more sockets are ready to receive
@@ -115,7 +115,7 @@ CSFML_API void sfSocketSelector_Clear(sfSocketSelector* selector);
/// \return sfTrue if there are sockets ready, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfSocketSelector_Wait(sfSocketSelector* selector, sfTime timeout);
CSFML_NETWORK_API sfBool sfSocketSelector_Wait(sfSocketSelector* selector, sfTime timeout);
////////////////////////////////////////////////////////////
/// \brief Test a socket to know if it is ready to receive data
@@ -133,9 +133,9 @@ CSFML_API sfBool sfSocketSelector_Wait(sfSocketSelector* selector, sfTime timeou
/// \return sfTrue if the socket is ready to read, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfSocketSelector_IsTcpListenerReady(const sfSocketSelector* selector, sfTcpListener* socket);
CSFML_API sfBool sfSocketSelector_IsTcpSocketReady(const sfSocketSelector* selector, sfTcpSocket* socket);
CSFML_API sfBool sfSocketSelector_IsUdpSocketReady(const sfSocketSelector* selector, sfUdpSocket* socket);
CSFML_NETWORK_API sfBool sfSocketSelector_IsTcpListenerReady(const sfSocketSelector* selector, sfTcpListener* socket);
CSFML_NETWORK_API sfBool sfSocketSelector_IsTcpSocketReady(const sfSocketSelector* selector, sfTcpSocket* socket);
CSFML_NETWORK_API sfBool sfSocketSelector_IsUdpSocketReady(const sfSocketSelector* selector, sfUdpSocket* socket);
#endif // SFML_SOCKETSELECTOR_H
+8 -8
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Network/Export.h>
#include <SFML/Network/SocketStatus.h>
#include <SFML/Network/Types.h>
@@ -39,7 +39,7 @@
/// \return A new sfTcpListener object
///
////////////////////////////////////////////////////////////
CSFML_API sfTcpListener* sfTcpListener_Create(void);
CSFML_NETWORK_API sfTcpListener* sfTcpListener_Create(void);
////////////////////////////////////////////////////////////
/// \brief Destroy a TCP listener
@@ -47,7 +47,7 @@ CSFML_API sfTcpListener* sfTcpListener_Create(void);
/// \param listener TCP listener to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfTcpListener_Destroy(sfTcpListener* listener);
CSFML_NETWORK_API void sfTcpListener_Destroy(sfTcpListener* listener);
////////////////////////////////////////////////////////////
/// \brief Set the blocking state of a TCP listener
@@ -65,7 +65,7 @@ CSFML_API void sfTcpListener_Destroy(sfTcpListener* listener);
/// \param blocking sfTrue to set the socket as blocking, sfFalse for non-blocking
///
////////////////////////////////////////////////////////////
CSFML_API void sfTcpListener_SetBlocking(sfTcpListener* listener, sfBool blocking);
CSFML_NETWORK_API void sfTcpListener_SetBlocking(sfTcpListener* listener, sfBool blocking);
////////////////////////////////////////////////////////////
/// \brief Tell whether a TCP listener is in blocking or non-blocking mode
@@ -75,7 +75,7 @@ CSFML_API void sfTcpListener_SetBlocking(sfTcpListener* listener, sfBool blockin
/// \return sfTrue if the socket is blocking, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfTcpListener_IsBlocking(const sfTcpListener* listener);
CSFML_NETWORK_API sfBool sfTcpListener_IsBlocking(const sfTcpListener* listener);
////////////////////////////////////////////////////////////
/// \brief Get the port to which a TCP listener is bound locally
@@ -88,7 +88,7 @@ CSFML_API sfBool sfTcpListener_IsBlocking(const sfTcpListener* listener);
/// \return Port to which the TCP listener is bound
///
////////////////////////////////////////////////////////////
CSFML_API unsigned short sfTcpListener_GetLocalPort(const sfTcpListener* listener);
CSFML_NETWORK_API unsigned short sfTcpListener_GetLocalPort(const sfTcpListener* listener);
////////////////////////////////////////////////////////////
/// \brief Start listening for connections
@@ -104,7 +104,7 @@ CSFML_API unsigned short sfTcpListener_GetLocalPort(const sfTcpListener* listene
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfTcpListener_Listen(sfTcpListener* listener, unsigned short port);
CSFML_NETWORK_API sfSocketStatus sfTcpListener_Listen(sfTcpListener* listener, unsigned short port);
////////////////////////////////////////////////////////////
/// \brief Accept a new connection
@@ -118,7 +118,7 @@ CSFML_API sfSocketStatus sfTcpListener_Listen(sfTcpListener* listener, unsigned
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfTcpListener_Accept(sfTcpListener* listener, sfTcpSocket** connected);
CSFML_NETWORK_API sfSocketStatus sfTcpListener_Accept(sfTcpListener* listener, sfTcpSocket** connected);
#endif // SFML_TCPLISTENER_H
+14 -14
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Network/Export.h>
#include <SFML/Network/IpAddress.h>
#include <SFML/Network/SocketStatus.h>
#include <SFML/Network/Types.h>
@@ -42,7 +42,7 @@
/// \return A new sfTcpSocket object
///
////////////////////////////////////////////////////////////
CSFML_API sfTcpSocket* sfTcpSocket_Create(void);
CSFML_NETWORK_API sfTcpSocket* sfTcpSocket_Create(void);
////////////////////////////////////////////////////////////
/// \brief Destroy a TCP socket
@@ -50,7 +50,7 @@ CSFML_API sfTcpSocket* sfTcpSocket_Create(void);
/// \param socket TCP socket to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfTcpSocket_Destroy(sfTcpSocket* socket);
CSFML_NETWORK_API void sfTcpSocket_Destroy(sfTcpSocket* socket);
////////////////////////////////////////////////////////////
/// \brief Set the blocking state of a TCP listener
@@ -68,7 +68,7 @@ CSFML_API void sfTcpSocket_Destroy(sfTcpSocket* socket);
/// \param blocking sfTrue to set the socket as blocking, sfFalse for non-blocking
///
////////////////////////////////////////////////////////////
CSFML_API void sfTcpSocket_SetBlocking(sfTcpSocket* socket, sfBool blocking);
CSFML_NETWORK_API void sfTcpSocket_SetBlocking(sfTcpSocket* socket, sfBool blocking);
////////////////////////////////////////////////////////////
/// \brief Tell whether a TCP socket is in blocking or non-blocking mode
@@ -78,7 +78,7 @@ CSFML_API void sfTcpSocket_SetBlocking(sfTcpSocket* socket, sfBool blocking);
/// \return sfTrue if the socket is blocking, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfTcpSocket_IsBlocking(const sfTcpSocket* socket);
CSFML_NETWORK_API sfBool sfTcpSocket_IsBlocking(const sfTcpSocket* socket);
////////////////////////////////////////////////////////////
/// \brief Get the port to which a TCP socket is bound locally
@@ -90,7 +90,7 @@ CSFML_API sfBool sfTcpSocket_IsBlocking(const sfTcpSocket* socket);
/// \return Port to which the socket is bound
///
////////////////////////////////////////////////////////////
CSFML_API unsigned short sfTcpSocket_GetLocalPort(const sfTcpSocket* socket);
CSFML_NETWORK_API unsigned short sfTcpSocket_GetLocalPort(const sfTcpSocket* socket);
////////////////////////////////////////////////////////////
/// \brief Get the address of the connected peer of a TCP socket
@@ -103,7 +103,7 @@ CSFML_API unsigned short sfTcpSocket_GetLocalPort(const sfTcpSocket* socket);
/// \return Address of the remote peer
///
////////////////////////////////////////////////////////////
CSFML_API sfIpAddress sfTcpSocket_GetRemoteAddress(const sfTcpSocket* socket);
CSFML_NETWORK_API sfIpAddress sfTcpSocket_GetRemoteAddress(const sfTcpSocket* socket);
////////////////////////////////////////////////////////////
/// \brief Get the port of the connected peer to which
@@ -116,7 +116,7 @@ CSFML_API sfIpAddress sfTcpSocket_GetRemoteAddress(const sfTcpSocket* socket);
/// \return Remote port to which the socket is connected
///
////////////////////////////////////////////////////////////
CSFML_API unsigned short sfTcpSocket_GetRemotePort(const sfTcpSocket* socket);
CSFML_NETWORK_API unsigned short sfTcpSocket_GetRemotePort(const sfTcpSocket* socket);
////////////////////////////////////////////////////////////
/// \brief Connect a TCP socket to a remote peer
@@ -134,7 +134,7 @@ CSFML_API unsigned short sfTcpSocket_GetRemotePort(const sfTcpSocket* socket);
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfTcpSocket_Connect(sfTcpSocket* socket, sfIpAddress host, unsigned short port, sfTime timeout);
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_Connect(sfTcpSocket* socket, sfIpAddress host, unsigned short port, sfTime timeout);
////////////////////////////////////////////////////////////
/// \brief Disconnect a TCP socket from its remote peer
@@ -145,7 +145,7 @@ CSFML_API sfSocketStatus sfTcpSocket_Connect(sfTcpSocket* socket, sfIpAddress ho
/// \param socket TCP socket object
///
////////////////////////////////////////////////////////////
CSFML_API void sfTcpSocket_Disconnect(sfTcpSocket* socket);
CSFML_NETWORK_API void sfTcpSocket_Disconnect(sfTcpSocket* socket);
////////////////////////////////////////////////////////////
/// \brief Send raw data to the remote peer of a TCP socket
@@ -159,7 +159,7 @@ CSFML_API void sfTcpSocket_Disconnect(sfTcpSocket* socket);
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfTcpSocket_Send(sfTcpSocket* socket, const char* data, size_t size);
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_Send(sfTcpSocket* socket, const char* data, size_t size);
////////////////////////////////////////////////////////////
/// \brief Receive raw data from the remote peer of a TCP socket
@@ -176,7 +176,7 @@ CSFML_API sfSocketStatus sfTcpSocket_Send(sfTcpSocket* socket, const char* data,
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfTcpSocket_Receive(sfTcpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived);
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_Receive(sfTcpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived);
////////////////////////////////////////////////////////////
/// \brief Send a formatted packet of data to the remote peer of a TCP socket
@@ -189,7 +189,7 @@ CSFML_API sfSocketStatus sfTcpSocket_Receive(sfTcpSocket* socket, char* data, si
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfTcpSocket_SendPacket(sfTcpSocket* socket, sfPacket* packet);
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_SendPacket(sfTcpSocket* socket, sfPacket* packet);
////////////////////////////////////////////////////////////
/// \brief Receive a formatted packet of data from the remote peer
@@ -204,7 +204,7 @@ CSFML_API sfSocketStatus sfTcpSocket_SendPacket(sfTcpSocket* socket, sfPacket* p
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfTcpSocket_ReceivePacket(sfTcpSocket* socket, sfPacket* packet);
CSFML_NETWORK_API sfSocketStatus sfTcpSocket_ReceivePacket(sfTcpSocket* socket, sfPacket* packet);
#endif // SFML_TCPSOCKET_H
+13 -13
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Network/Export.h>
#include <SFML/Network/IpAddress.h>
#include <SFML/Network/SocketStatus.h>
#include <SFML/Network/Types.h>
@@ -41,7 +41,7 @@
/// \return A new sfUdpSocket object
///
////////////////////////////////////////////////////////////
CSFML_API sfUdpSocket* sfUdpSocket_Create(void);
CSFML_NETWORK_API sfUdpSocket* sfUdpSocket_Create(void);
////////////////////////////////////////////////////////////
/// \brief Destroy a UDP socket
@@ -49,7 +49,7 @@ CSFML_API sfUdpSocket* sfUdpSocket_Create(void);
/// \param socket UDP socket to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfUdpSocket_Destroy(sfUdpSocket* socket);
CSFML_NETWORK_API void sfUdpSocket_Destroy(sfUdpSocket* socket);
////////////////////////////////////////////////////////////
/// \brief Set the blocking state of a UDP listener
@@ -67,7 +67,7 @@ CSFML_API void sfUdpSocket_Destroy(sfUdpSocket* socket);
/// \param blocking sfTrue to set the socket as blocking, sfFalse for non-blocking
///
////////////////////////////////////////////////////////////
CSFML_API void sfUdpSocket_SetBlocking(sfUdpSocket* socket, sfBool blocking);
CSFML_NETWORK_API void sfUdpSocket_SetBlocking(sfUdpSocket* socket, sfBool blocking);
////////////////////////////////////////////////////////////
/// \brief Tell whether a UDP socket is in blocking or non-blocking mode
@@ -77,7 +77,7 @@ CSFML_API void sfUdpSocket_SetBlocking(sfUdpSocket* socket, sfBool blocking);
/// \return sfTrue if the socket is blocking, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfUdpSocket_IsBlocking(const sfUdpSocket* socket);
CSFML_NETWORK_API sfBool sfUdpSocket_IsBlocking(const sfUdpSocket* socket);
////////////////////////////////////////////////////////////
/// \brief Get the port to which a UDP socket is bound locally
@@ -90,7 +90,7 @@ CSFML_API sfBool sfUdpSocket_IsBlocking(const sfUdpSocket* socket);
/// \return Port to which the socket is bound
///
////////////////////////////////////////////////////////////
CSFML_API unsigned short sfUdpSocket_GetLocalPort(const sfUdpSocket* socket);
CSFML_NETWORK_API unsigned short sfUdpSocket_GetLocalPort(const sfUdpSocket* socket);
////////////////////////////////////////////////////////////
/// \brief Bind a UDP socket to a specific port
@@ -107,7 +107,7 @@ CSFML_API unsigned short sfUdpSocket_GetLocalPort(const sfUdpSocket* socket);
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfUdpSocket_Bind(sfUdpSocket* socket, unsigned short port);
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_Bind(sfUdpSocket* socket, unsigned short port);
////////////////////////////////////////////////////////////
/// \brief Unbind a UDP socket from the local port to which it is bound
@@ -119,7 +119,7 @@ CSFML_API sfSocketStatus sfUdpSocket_Bind(sfUdpSocket* socket, unsigned short po
/// \param socket UDP socket object
///
////////////////////////////////////////////////////////////
CSFML_API void sfUdpSocket_Unbind(sfUdpSocket* socket);
CSFML_NETWORK_API void sfUdpSocket_Unbind(sfUdpSocket* socket);
////////////////////////////////////////////////////////////
/// \brief Send raw data to a remote peer with a UDP socket
@@ -137,7 +137,7 @@ CSFML_API void sfUdpSocket_Unbind(sfUdpSocket* socket);
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfUdpSocket_Send(sfUdpSocket* socket, const char* data, size_t size, sfIpAddress address, unsigned short port);
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_Send(sfUdpSocket* socket, const char* data, size_t size, sfIpAddress address, unsigned short port);
////////////////////////////////////////////////////////////
/// \brief Receive raw data from a remote peer with a UDP socket
@@ -159,7 +159,7 @@ CSFML_API sfSocketStatus sfUdpSocket_Send(sfUdpSocket* socket, const char* data,
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfUdpSocket_Receive(sfUdpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived, sfIpAddress* address, unsigned short* port);
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_Receive(sfUdpSocket* socket, char* data, size_t maxSize, size_t* sizeReceived, sfIpAddress* address, unsigned short* port);
////////////////////////////////////////////////////////////
/// \brief Send a formatted packet of data to a remote peer with a UDP socket
@@ -176,7 +176,7 @@ CSFML_API sfSocketStatus sfUdpSocket_Receive(sfUdpSocket* socket, char* data, si
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfUdpSocket_SendPacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress address, unsigned short port);
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_SendPacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress address, unsigned short port);
////////////////////////////////////////////////////////////
/// \brief Receive a formatted packet of data from a remote peer with a UDP socket
@@ -193,7 +193,7 @@ CSFML_API sfSocketStatus sfUdpSocket_SendPacket(sfUdpSocket* socket, sfPacket* p
/// \return Status code
///
////////////////////////////////////////////////////////////
CSFML_API sfSocketStatus sfUdpSocket_ReceivePacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress* address, unsigned short* port);
CSFML_NETWORK_API sfSocketStatus sfUdpSocket_ReceivePacket(sfUdpSocket* socket, sfPacket* packet, sfIpAddress* address, unsigned short* port);
////////////////////////////////////////////////////////////
/// \brief Return the maximum number of bytes that can be
@@ -202,7 +202,7 @@ CSFML_API sfSocketStatus sfUdpSocket_ReceivePacket(sfUdpSocket* socket, sfPacket
/// \return The maximum size of a UDP datagram (message)
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfUdpSocket_MaxDatagramSize();
CSFML_NETWORK_API unsigned int sfUdpSocket_MaxDatagramSize();
#endif // SFML_UDPSOCKET_H
+6 -6
View File
@@ -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
+48
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_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
+1 -1
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/System/Export.h>
typedef sfInt64 (*sfInputStreamReadFunc)(char* data, sfInt64 size, void* userData);
+5 -5
View File
@@ -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
+2 -2
View File
@@ -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
+6 -6
View File
@@ -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
+8 -8
View File
@@ -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
+4 -4
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Window/Export.h>
#include <SFML/Window/Types.h>
@@ -40,7 +40,7 @@
/// \return New sfContext object
///
////////////////////////////////////////////////////////////
CSFML_API sfContext* sfContext_Create(void);
CSFML_WINDOW_API sfContext* sfContext_Create(void);
////////////////////////////////////////////////////////////
/// \brief Destroy a context
@@ -48,7 +48,7 @@ CSFML_API sfContext* sfContext_Create(void);
/// \param context Context to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfContext_Destroy(sfContext* context);
CSFML_WINDOW_API void sfContext_Destroy(sfContext* context);
////////////////////////////////////////////////////////////
/// \brief Activate or deactivate explicitely a context
@@ -57,7 +57,7 @@ CSFML_API void sfContext_Destroy(sfContext* context);
/// \param active sfTrue to activate, sfFalse to deactivate
///
////////////////////////////////////////////////////////////
CSFML_API void sfContext_SetActive(sfContext* context, sfBool active);
CSFML_WINDOW_API void sfContext_SetActive(sfContext* context, sfBool active);
#endif // SFML_CONTEXT_H
+1 -1
View File
@@ -27,7 +27,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Window/Export.h>
#include <SFML/Window/Joystick.h>
#include <SFML/Window/Keyboard.h>
#include <SFML/Window/Mouse.h>
+48
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_H
#define SFML_WINDOW_EXPORT_H
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
////////////////////////////////////////////////////////////
// Define portable import / export macros
////////////////////////////////////////////////////////////
#if defined(CSFML_WINDOW_EXPORTS)
#define CSFML_WINDOW_API CSFML_API_EXPORT
#else
#define CSFML_WINDOW_API CSFML_API_IMPORT
#endif
#endif // SFML_WINDOW_EXPORT_H
+7 -7
View File
@@ -27,7 +27,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Window/Export.h>
////////////////////////////////////////////////////////////
@@ -67,7 +67,7 @@ typedef enum
/// \return sfTrue if the joystick is connected, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfJoystick_IsConnected(unsigned int joystick);
CSFML_WINDOW_API sfBool sfJoystick_IsConnected(unsigned int joystick);
////////////////////////////////////////////////////////////
/// \brief Return the number of buttons supported by a joystick
@@ -79,7 +79,7 @@ CSFML_API sfBool sfJoystick_IsConnected(unsigned int joystick);
/// \return Number of buttons supported by the joystick
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfJoystick_GetButtonCount(unsigned int joystick);
CSFML_WINDOW_API unsigned int sfJoystick_GetButtonCount(unsigned int joystick);
////////////////////////////////////////////////////////////
/// \brief Check if a joystick supports a given axis
@@ -92,7 +92,7 @@ CSFML_API unsigned int sfJoystick_GetButtonCount(unsigned int joystick);
/// \return sfTrue if the joystick supports the axis, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfJoystick_HasAxis(unsigned int joystick, sfJoystickAxis axis);
CSFML_WINDOW_API sfBool sfJoystick_HasAxis(unsigned int joystick, sfJoystickAxis axis);
////////////////////////////////////////////////////////////
/// \brief Check if a joystick button is pressed
@@ -105,7 +105,7 @@ CSFML_API sfBool sfJoystick_HasAxis(unsigned int joystick, sfJoystickAxis axis);
/// \return sfTrue if the button is pressed, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfJoystick_IsButtonPressed(unsigned int joystick, unsigned int button);
CSFML_WINDOW_API sfBool sfJoystick_IsButtonPressed(unsigned int joystick, unsigned int button);
////////////////////////////////////////////////////////////
/// \brief Get the current position of a joystick axis
@@ -118,7 +118,7 @@ CSFML_API sfBool sfJoystick_IsButtonPressed(unsigned int joystick, unsigned int
/// \return Current position of the axis, in range [-100 .. 100]
///
////////////////////////////////////////////////////////////
CSFML_API float sfJoystick_GetAxisPosition(unsigned int joystick, sfJoystickAxis axis);
CSFML_WINDOW_API float sfJoystick_GetAxisPosition(unsigned int joystick, sfJoystickAxis axis);
////////////////////////////////////////////////////////////
/// \brief Update the states of all joysticks
@@ -129,7 +129,7 @@ CSFML_API float sfJoystick_GetAxisPosition(unsigned int joystick, sfJoystickAxis
/// in this case the joysticks states are not updated automatically.
///
////////////////////////////////////////////////////////////
CSFML_API void sfJoystick_Update(void);
CSFML_WINDOW_API void sfJoystick_Update(void);
#endif // SFML_JOYSTICK_H
+2 -2
View File
@@ -27,7 +27,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Window/Export.h>
////////////////////////////////////////////////////////////
@@ -150,7 +150,7 @@ typedef enum
/// \return sfTrue if the key is pressed, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfKeyboard_IsKeyPressed(sfKeyCode key);
CSFML_WINDOW_API sfBool sfKeyboard_IsKeyPressed(sfKeyCode key);
#endif // SFML_KEYBOARD_H
+4 -4
View File
@@ -27,7 +27,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Window/Export.h>
#include <SFML/Window/Types.h>
@@ -55,7 +55,7 @@ typedef enum
/// \return sfTrue if the button is pressed, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfMouse_IsButtonPressed(sfMouseButton button);
CSFML_WINDOW_API sfBool sfMouse_IsButtonPressed(sfMouseButton button);
////////////////////////////////////////////////////////////
/// \brief Get the current position of the mouse
@@ -68,7 +68,7 @@ CSFML_API sfBool sfMouse_IsButtonPressed(sfMouseButton button);
/// \param relativeTo Reference window
///
////////////////////////////////////////////////////////////
CSFML_API void sfMouse_GetPosition(int* x, int* y, const sfWindow* relativeTo);
CSFML_WINDOW_API void sfMouse_GetPosition(int* x, int* y, const sfWindow* relativeTo);
////////////////////////////////////////////////////////////
/// \brief Set the current position of the mouse
@@ -81,7 +81,7 @@ CSFML_API void sfMouse_GetPosition(int* x, int* y, const sfWindow* relativeTo);
/// \param relativeTo Reference window
///
////////////////////////////////////////////////////////////
CSFML_API void sfMouse_SetPosition(int x, int y, const sfWindow* relativeTo);
CSFML_WINDOW_API void sfMouse_SetPosition(int x, int y, const sfWindow* relativeTo);
#endif // SFML_MOUSE_H
+4 -4
View File
@@ -27,7 +27,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Window/Export.h>
#include <stddef.h>
@@ -51,7 +51,7 @@ typedef struct
/// \return Current desktop video mode
///
////////////////////////////////////////////////////////////
CSFML_API sfVideoMode sfVideoMode_GetDesktopMode(void);
CSFML_WINDOW_API sfVideoMode sfVideoMode_GetDesktopMode(void);
////////////////////////////////////////////////////////////
/// \brief Retrieve all the video modes supported in fullscreen mode
@@ -69,7 +69,7 @@ CSFML_API sfVideoMode sfVideoMode_GetDesktopMode(void);
/// \return Pointer to an array containing all the supported fullscreen modes
///
////////////////////////////////////////////////////////////
CSFML_API const sfVideoMode* sfVideoMode_GetFullscreenModes(size_t* Count);
CSFML_WINDOW_API const sfVideoMode* sfVideoMode_GetFullscreenModes(size_t* Count);
////////////////////////////////////////////////////////////
/// \brief Tell whether or not a video mode is valid
@@ -83,7 +83,7 @@ CSFML_API const sfVideoMode* sfVideoMode_GetFullscreenModes(size_t* Count);
/// \return sfTrue if the video mode is valid for fullscreen mode
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfVideoMode_IsValid(sfVideoMode mode);
CSFML_WINDOW_API sfBool sfVideoMode_IsValid(sfVideoMode mode);
#endif // SFML_VIDEOMODE_H
+24 -24
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Window/Export.h>
#include <SFML/Window/Event.h>
#include <SFML/Window/VideoMode.h>
#include <SFML/Window/WindowHandle.h>
@@ -85,7 +85,7 @@ typedef struct
/// \return A new sfWindow object
///
////////////////////////////////////////////////////////////
CSFML_API sfWindow* sfWindow_Create(sfVideoMode mode, const char* title, sfUint32 style, const sfContextSettings* settings);
CSFML_WINDOW_API sfWindow* sfWindow_Create(sfVideoMode mode, const char* title, sfUint32 style, const sfContextSettings* settings);
////////////////////////////////////////////////////////////
/// \brief Construct a window from an existing control
@@ -103,7 +103,7 @@ CSFML_API sfWindow* sfWindow_Create(sfVideoMode mode, const char* title, sfUint3
/// \return A new sfWindow object
///
////////////////////////////////////////////////////////////
CSFML_API sfWindow* sfWindow_CreateFromHandle(sfWindowHandle handle, const sfContextSettings* settings);
CSFML_WINDOW_API sfWindow* sfWindow_CreateFromHandle(sfWindowHandle handle, const sfContextSettings* settings);
////////////////////////////////////////////////////////////
/// \brief Destroy a window
@@ -111,7 +111,7 @@ CSFML_API sfWindow* sfWindow_CreateFromHandle(sfWindowHandle handle, const sfCon
/// \param window Window to destroy
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_Destroy(sfWindow* window);
CSFML_WINDOW_API void sfWindow_Destroy(sfWindow* window);
////////////////////////////////////////////////////////////
/// \brief Close a window and destroy all the attached resources
@@ -125,7 +125,7 @@ CSFML_API void sfWindow_Destroy(sfWindow* window);
/// \param window Window object
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_Close(sfWindow* window);
CSFML_WINDOW_API void sfWindow_Close(sfWindow* window);
////////////////////////////////////////////////////////////
/// \brief Tell whether or not a window is opened
@@ -139,7 +139,7 @@ CSFML_API void sfWindow_Close(sfWindow* window);
/// \return sfTrue if the window is opened, sfFalse if it has been closed
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfWindow_IsOpen(const sfWindow* window);
CSFML_WINDOW_API sfBool sfWindow_IsOpen(const sfWindow* window);
////////////////////////////////////////////////////////////
/// \brief Get the width of the rendering region of a window
@@ -152,7 +152,7 @@ CSFML_API sfBool sfWindow_IsOpen(const sfWindow* window);
/// \return Width in pixels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfWindow_GetWidth(const sfWindow* window);
CSFML_WINDOW_API unsigned int sfWindow_GetWidth(const sfWindow* window);
////////////////////////////////////////////////////////////
/// \brief Get the height of the rendering region of a window
@@ -165,7 +165,7 @@ CSFML_API unsigned int sfWindow_GetWidth(const sfWindow* window);
/// \return Height in pixels
///
////////////////////////////////////////////////////////////
CSFML_API unsigned int sfWindow_GetHeight(const sfWindow* window);
CSFML_WINDOW_API unsigned int sfWindow_GetHeight(const sfWindow* window);
////////////////////////////////////////////////////////////
/// \brief Get the settings of the OpenGL context of a window
@@ -180,7 +180,7 @@ CSFML_API unsigned int sfWindow_GetHeight(const sfWindow* window);
/// \return Structure containing the OpenGL context settings
///
////////////////////////////////////////////////////////////
CSFML_API sfContextSettings sfWindow_GetSettings(const sfWindow* window);
CSFML_WINDOW_API sfContextSettings sfWindow_GetSettings(const sfWindow* window);
////////////////////////////////////////////////////////////
/// \brief Pop the event on top of events stack, if any, and return it
@@ -197,7 +197,7 @@ CSFML_API sfContextSettings sfWindow_GetSettings(const sfWindow* window);
/// \return sfTrue if an event was returned, or sfFalse if the events stack was empty
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfWindow_PollEvent(sfWindow* window, sfEvent* event);
CSFML_WINDOW_API sfBool sfWindow_PollEvent(sfWindow* window, sfEvent* event);
////////////////////////////////////////////////////////////
/// \brief Wait for an event and return it
@@ -216,7 +216,7 @@ CSFML_API sfBool sfWindow_PollEvent(sfWindow* window, sfEvent* event);
/// \return sfFalse if any error occured
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfWindow_WaitEvent(sfWindow* window, sfEvent* event);
CSFML_WINDOW_API sfBool sfWindow_WaitEvent(sfWindow* window, sfEvent* event);
////////////////////////////////////////////////////////////
/// \brief Enable or disable vertical synchronization
@@ -230,7 +230,7 @@ CSFML_API sfBool sfWindow_WaitEvent(sfWindow* window, sfEvent* event);
/// \param enabled sfTrue to enable v-sync, sfFalse to deactivate
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_EnableVerticalSync(sfWindow* window, sfBool enabled);
CSFML_WINDOW_API void sfWindow_EnableVerticalSync(sfWindow* window, sfBool enabled);
////////////////////////////////////////////////////////////
/// \brief Show or hide the mouse cursor
@@ -239,7 +239,7 @@ CSFML_API void sfWindow_EnableVerticalSync(sfWindow* window, sfBool enabled);
/// \param show sfTrue to show, sfFalse to hide
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_ShowMouseCursor(sfWindow* window, sfBool show);
CSFML_WINDOW_API void sfWindow_ShowMouseCursor(sfWindow* window, sfBool show);
////////////////////////////////////////////////////////////
/// \brief Change the position of a window on screen
@@ -253,7 +253,7 @@ CSFML_API void sfWindow_ShowMouseCursor(sfWindow* window, sfBool show);
/// \param y Top position
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_SetPosition(sfWindow* window, int left, int top);
CSFML_WINDOW_API void sfWindow_SetPosition(sfWindow* window, int left, int top);
////////////////////////////////////////////////////////////
/// \brief Change the size of the rendering region of a window
@@ -263,7 +263,7 @@ CSFML_API void sfWindow_SetPosition(sfWindow* window, int left, int top);
/// \param height New height, in pixels
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_SetSize(sfWindow* window, unsigned int width, unsigned int height);
CSFML_WINDOW_API void sfWindow_SetSize(sfWindow* window, unsigned int width, unsigned int height);
////////////////////////////////////////////////////////////
/// \brief Change the title of a window
@@ -272,7 +272,7 @@ CSFML_API void sfWindow_SetSize(sfWindow* window, unsigned int width, unsigned i
/// \param title New title
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_SetTitle(sfWindow* window, const char* title);
CSFML_WINDOW_API void sfWindow_SetTitle(sfWindow* window, const char* title);
////////////////////////////////////////////////////////////
/// \brief Show or hide a window
@@ -281,7 +281,7 @@ CSFML_API void sfWindow_SetTitle(sfWindow* window, const char* title);
/// \param show sfTrue to show, sfFalse to hide
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_Show(sfWindow* window, sfBool show);
CSFML_WINDOW_API void sfWindow_Show(sfWindow* window, sfBool show);
////////////////////////////////////////////////////////////
/// \brief Enable or disable automatic key-repeat
@@ -296,7 +296,7 @@ CSFML_API void sfWindow_Show(sfWindow* window, sfBool show);
/// \param enabled sfTrue to enable, sfFalse to disable
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_EnableKeyRepeat(sfWindow* window, sfBool enabled);
CSFML_WINDOW_API void sfWindow_EnableKeyRepeat(sfWindow* window, sfBool enabled);
////////////////////////////////////////////////////////////
/// \brief Change a window's icon
@@ -310,7 +310,7 @@ CSFML_API void sfWindow_EnableKeyRepeat(sfWindow* window, sfBool enabled);
/// \param pixels Pointer to the array of pixels in memory
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_SetIcon(sfWindow* window, unsigned int width, unsigned int height, const sfUint8* pixels);
CSFML_WINDOW_API void sfWindow_SetIcon(sfWindow* window, unsigned int width, unsigned int height, const sfUint8* pixels);
////////////////////////////////////////////////////////////
/// \brief Activate or deactivate a window as the current target
@@ -328,7 +328,7 @@ CSFML_API void sfWindow_SetIcon(sfWindow* window, unsigned int width, unsigned i
/// \return sfTrue if operation was successful, sfFalse otherwise
///
////////////////////////////////////////////////////////////
CSFML_API sfBool sfWindow_SetActive(sfWindow* window, sfBool active);
CSFML_WINDOW_API sfBool sfWindow_SetActive(sfWindow* window, sfBool active);
////////////////////////////////////////////////////////////
/// \brief Display on screen what has been rendered to the
@@ -341,7 +341,7 @@ CSFML_API sfBool sfWindow_SetActive(sfWindow* window, sfBool active);
/// \param window Window object
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_Display(sfWindow* window);
CSFML_WINDOW_API void sfWindow_Display(sfWindow* window);
////////////////////////////////////////////////////////////
/// \brief Limit the framerate to a maximum fixed frequency
@@ -354,7 +354,7 @@ CSFML_API void sfWindow_Display(sfWindow* window);
/// \param limit Framerate limit, in frames per seconds (use 0 to disable limit)
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_SetFramerateLimit(sfWindow* window, unsigned int limit);
CSFML_WINDOW_API void sfWindow_SetFramerateLimit(sfWindow* window, unsigned int limit);
////////////////////////////////////////////////////////////
/// \brief Change the joystick threshold
@@ -366,7 +366,7 @@ CSFML_API void sfWindow_SetFramerateLimit(sfWindow* window, unsigned int limit);
/// \param threshold New threshold, in the range [0, 100]
///
////////////////////////////////////////////////////////////
CSFML_API void sfWindow_SetJoystickThreshold(sfWindow* window, float threshold);
CSFML_WINDOW_API void sfWindow_SetJoystickThreshold(sfWindow* window, float threshold);
////////////////////////////////////////////////////////////
/// \brief Get the OS-specific handle of the window
@@ -382,7 +382,7 @@ CSFML_API void sfWindow_SetJoystickThreshold(sfWindow* window, float threshold);
/// \return System handle of the window
///
////////////////////////////////////////////////////////////
CSFML_API sfWindowHandle sfWindow_GetSystemHandle(const sfWindow* window);
CSFML_WINDOW_API sfWindowHandle sfWindow_GetSystemHandle(const sfWindow* window);
#endif // SFML_WINDOW_H
+1 -1
View File
@@ -28,7 +28,7 @@
////////////////////////////////////////////////////////////
// Headers
////////////////////////////////////////////////////////////
#include <SFML/Config.h>
#include <SFML/Window/Export.h>
////////////////////////////////////////////////////////////