Fixed linker errors in sfml-network and csfml-network
Made every read-only pointer "const" in CSFML git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1290 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
29ecc552c2
commit
d979ca254e
62 changed files with 438 additions and 429 deletions
|
@ -79,7 +79,7 @@ CSFML_API void sfMusic_SetLoop(sfMusic* music, sfBool loop);
|
|||
/// \return sfTrue if the music is looping, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfMusic_GetLoop(sfMusic* music);
|
||||
CSFML_API sfBool sfMusic_GetLoop(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get a music duration
|
||||
|
@ -89,7 +89,7 @@ CSFML_API sfBool sfMusic_GetLoop(sfMusic* music);
|
|||
/// \return Music duration, in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetDuration(sfMusic* music);
|
||||
CSFML_API float sfMusic_GetDuration(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Start playing a music
|
||||
|
@ -123,7 +123,7 @@ CSFML_API void sfMusic_Stop(sfMusic* music);
|
|||
/// \return Number of channels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfMusic_GetChannelsCount(sfMusic* music);
|
||||
CSFML_API unsigned int sfMusic_GetChannelsCount(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the stream sample rate of a music
|
||||
|
@ -133,7 +133,7 @@ CSFML_API unsigned int sfMusic_GetChannelsCount(sfMusic* music);
|
|||
/// \return Stream frequency (number of samples per second)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfMusic_GetSampleRate(sfMusic* music);
|
||||
CSFML_API unsigned int sfMusic_GetSampleRate(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the status of a music (stopped, paused, playing)
|
||||
|
@ -143,7 +143,7 @@ CSFML_API unsigned int sfMusic_GetSampleRate(sfMusic* music);
|
|||
/// \return Current status of the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundStatus sfMusic_GetStatus(sfMusic* music);
|
||||
CSFML_API sfSoundStatus sfMusic_GetStatus(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current playing position of a music
|
||||
|
@ -153,7 +153,7 @@ CSFML_API sfSoundStatus sfMusic_GetStatus(sfMusic* music);
|
|||
/// \return Current playing position, expressed in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetPlayingOffset(sfMusic* music);
|
||||
CSFML_API float sfMusic_GetPlayingOffset(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the pitch of a music
|
||||
|
@ -234,7 +234,7 @@ CSFML_API void sfMusic_SetPlayingOffset(sfMusic* music, float timeOffset);
|
|||
/// \return Pitch value
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetPitch(sfMusic* music);
|
||||
CSFML_API float sfMusic_GetPitch(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the volume of a music
|
||||
|
@ -244,7 +244,7 @@ CSFML_API float sfMusic_GetPitch(sfMusic* music);
|
|||
/// \return Volume value (in range [1, 100])
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetVolume(sfMusic* music);
|
||||
CSFML_API float sfMusic_GetVolume(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the position of a music
|
||||
|
@ -255,7 +255,7 @@ CSFML_API float sfMusic_GetVolume(sfMusic* music);
|
|||
/// \param z : Z position of the sound in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfMusic_GetPosition(sfMusic* music, float* x, float* y, float* z);
|
||||
CSFML_API void sfMusic_GetPosition(const sfMusic* music, float* x, float* y, float* z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the music's position is relative to the listener's
|
||||
|
@ -266,7 +266,7 @@ CSFML_API void sfMusic_GetPosition(sfMusic* music, float* x, float* y, float* z)
|
|||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfMusic_IsRelativeToListener(sfMusic* music);
|
||||
CSFML_API sfBool sfMusic_IsRelativeToListener(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minimum distance of a music
|
||||
|
@ -276,7 +276,7 @@ CSFML_API sfBool sfMusic_IsRelativeToListener(sfMusic* music);
|
|||
/// \return Minimum distance for the music
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetMinDistance(sfMusic* music);
|
||||
CSFML_API float sfMusic_GetMinDistance(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the attenuation factor of a music
|
||||
|
@ -286,7 +286,7 @@ CSFML_API float sfMusic_GetMinDistance(sfMusic* music);
|
|||
/// \return Attenuation factor for the a music
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfMusic_GetAttenuation(sfMusic* music);
|
||||
CSFML_API float sfMusic_GetAttenuation(const sfMusic* music);
|
||||
|
||||
|
||||
#endif // SFML_MUSIC_H
|
||||
|
|
|
@ -80,7 +80,7 @@ CSFML_API void sfSound_Stop(sfSound* sound);
|
|||
/// \param buffer : Buffer to bind
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_SetBuffer(sfSound* sound, sfSoundBuffer* buffer);
|
||||
CSFML_API void sfSound_SetBuffer(sfSound* sound, const sfSoundBuffer* buffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the sound buffer bound to a sound
|
||||
|
@ -90,7 +90,7 @@ CSFML_API void sfSound_SetBuffer(sfSound* sound, sfSoundBuffer* buffer);
|
|||
/// \return Pointer to the sound's buffer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSound_GetBuffer(sfSound* sound);
|
||||
CSFML_API const sfSoundBuffer* sfSound_GetBuffer(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set a sound loop state
|
||||
|
@ -109,7 +109,7 @@ CSFML_API void sfSound_SetLoop(sfSound* sound, sfBool loop);
|
|||
/// \return sfTrue if the sound is looping, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSound_GetLoop(sfSound* sound);
|
||||
CSFML_API sfBool sfSound_GetLoop(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the status of a sound (stopped, paused, playing)
|
||||
|
@ -119,7 +119,7 @@ CSFML_API sfBool sfSound_GetLoop(sfSound* sound);
|
|||
/// \return Current status of the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundStatus sfSound_GetStatus(sfSound* sound);
|
||||
CSFML_API sfSoundStatus sfSound_GetStatus(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the pitch of a sound
|
||||
|
@ -200,7 +200,7 @@ CSFML_API void sfSound_SetPlayingOffset(sfSound* sound, float timeOffset);
|
|||
/// \return Pitch value
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetPitch(sfSound* sound);
|
||||
CSFML_API float sfSound_GetPitch(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the volume of a sound
|
||||
|
@ -210,7 +210,7 @@ CSFML_API float sfSound_GetPitch(sfSound* sound);
|
|||
/// \return Volume value (in range [1, 100])
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetVolume(sfSound* sound);
|
||||
CSFML_API float sfSound_GetVolume(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the position of a sound
|
||||
|
@ -221,7 +221,7 @@ CSFML_API float sfSound_GetVolume(sfSound* sound);
|
|||
/// \param z : Z position of the sound in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSound_GetPosition(sfSound* sound, float* x, float* y, float* z);
|
||||
CSFML_API void sfSound_GetPosition(const sfSound* sound, float* x, float* y, float* z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the sound's position is relative to the listener's
|
||||
|
@ -232,7 +232,7 @@ CSFML_API void sfSound_GetPosition(sfSound* sound, float* x, float* y, float* z)
|
|||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSound_IsRelativeToListener(sfSound* sound);
|
||||
CSFML_API sfBool sfSound_IsRelativeToListener(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minimum distance of a sound
|
||||
|
@ -242,7 +242,7 @@ CSFML_API sfBool sfSound_IsRelativeToListener(sfSound* sound);
|
|||
/// \return Minimum distance for the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetMinDistance(sfSound* sound);
|
||||
CSFML_API float sfSound_GetMinDistance(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the attenuation factor of a sound
|
||||
|
@ -252,7 +252,7 @@ CSFML_API float sfSound_GetMinDistance(sfSound* sound);
|
|||
/// \return Attenuation factor for the sound
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetAttenuation(sfSound* sound);
|
||||
CSFML_API float sfSound_GetAttenuation(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current playing position of a sound
|
||||
|
@ -262,7 +262,7 @@ CSFML_API float sfSound_GetAttenuation(sfSound* sound);
|
|||
/// \return Current playing position, expressed in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSound_GetPlayingOffset(sfSound* sound);
|
||||
CSFML_API float sfSound_GetPlayingOffset(const sfSound* sound);
|
||||
|
||||
|
||||
#endif // SFML_SOUND_H
|
||||
|
|
|
@ -85,7 +85,7 @@ CSFML_API void sfSoundBuffer_Destroy(sfSoundBuffer* soundBuffer);
|
|||
/// \return sfTrue if saving has been successful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSoundBuffer_SaveToFile(sfSoundBuffer* soundBuffer, const char* filename);
|
||||
CSFML_API sfBool sfSoundBuffer_SaveToFile(const sfSoundBuffer* soundBuffer, const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the samples contained in a sound buffer
|
||||
|
@ -95,7 +95,7 @@ CSFML_API sfBool sfSoundBuffer_SaveToFile(sfSoundBuffer* soundBuffer, const char
|
|||
/// \return Pointer to the array of sound samples, in 16 bits signed integer format
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const sfInt16* sfSoundBuffer_GetSamples(sfSoundBuffer* soundBuffer);
|
||||
CSFML_API const sfInt16* sfSoundBuffer_GetSamples(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the number of samples contained in a sound buffer
|
||||
|
@ -105,7 +105,7 @@ CSFML_API const sfInt16* sfSoundBuffer_GetSamples(sfSoundBuffer* soundBuffer);
|
|||
/// \return Number of samples
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API size_t sfSoundBuffer_GetSamplesCount(sfSoundBuffer* soundBuffer);
|
||||
CSFML_API size_t sfSoundBuffer_GetSamplesCount(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the sample rate of a sound buffer
|
||||
|
@ -115,7 +115,7 @@ CSFML_API size_t sfSoundBuffer_GetSamplesCount(sfSoundBuffer* soundBuffer);
|
|||
/// \return Sound frequency (number of samples per second)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundBuffer_GetSampleRate(sfSoundBuffer* soundBuffer);
|
||||
CSFML_API unsigned int sfSoundBuffer_GetSampleRate(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the number of channels of a sound buffer (1 = mono, 2 = stereo, ...)
|
||||
|
@ -125,7 +125,7 @@ CSFML_API unsigned int sfSoundBuffer_GetSampleRate(sfSoundBuffer* soundBuffer);
|
|||
/// \return Number of channels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundBuffer_GetChannelsCount(sfSoundBuffer* soundBuffer);
|
||||
CSFML_API unsigned int sfSoundBuffer_GetChannelsCount(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the duration of a sound buffer
|
||||
|
@ -135,7 +135,7 @@ CSFML_API unsigned int sfSoundBuffer_GetChannelsCount(sfSoundBuffer* soundBuffer
|
|||
/// \return Sound duration, in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundBuffer_GetDuration(sfSoundBuffer* soundBuffer);
|
||||
CSFML_API float sfSoundBuffer_GetDuration(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
|
||||
#endif // SFML_SOUNDBUFFER_H
|
||||
|
|
|
@ -74,7 +74,7 @@ CSFML_API void sfSoundBufferRecorder_Stop(sfSoundBufferRecorder* soundBufferReco
|
|||
/// \return Frequency, in samples per second
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundBufferRecorder_GetSampleRate(sfSoundBufferRecorder* soundBufferRecorder);
|
||||
CSFML_API unsigned int sfSoundBufferRecorder_GetSampleRate(const sfSoundBufferRecorder* soundBufferRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the sound buffer containing the captured audio data
|
||||
|
@ -85,7 +85,7 @@ CSFML_API unsigned int sfSoundBufferRecorder_GetSampleRate(sfSoundBufferRecorder
|
|||
/// \return Pointer to the sound buffer (you don't need to destroy it after use)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundBuffer* sfSoundBufferRecorder_GetBuffer(sfSoundBufferRecorder* soundBufferRecorder);
|
||||
CSFML_API const sfSoundBuffer* sfSoundBufferRecorder_GetBuffer(const sfSoundBufferRecorder* soundBufferRecorder);
|
||||
|
||||
|
||||
#endif // SFML_SOUNDBUFFERRECORDER_H
|
||||
|
|
|
@ -88,7 +88,7 @@ CSFML_API void sfSoundRecorder_Stop(sfSoundRecorder* soundRecorder);
|
|||
/// \return Frequency, in samples per second
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundRecorder_GetSampleRate(sfSoundRecorder* soundRecorder);
|
||||
CSFML_API unsigned int sfSoundRecorder_GetSampleRate(const sfSoundRecorder* soundRecorder);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the system supports sound capture.
|
||||
|
|
|
@ -105,7 +105,7 @@ CSFML_API void sfSoundStream_Stop(sfSoundStream* soundStream);
|
|||
/// \return Current status of the sound stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSoundStatus sfSoundStream_GetStatus(sfSoundStream* soundStream);
|
||||
CSFML_API sfSoundStatus sfSoundStream_GetStatus(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the number of channels of a sound stream
|
||||
|
@ -116,7 +116,7 @@ CSFML_API sfSoundStatus sfSoundStream_GetStatus(sfSoundStream* soundStream);
|
|||
/// \return Number of channels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundStream_GetChannelsCount(sfSoundStream* soundStream);
|
||||
CSFML_API unsigned int sfSoundStream_GetChannelsCount(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the sample rate of a sound stream
|
||||
|
@ -126,7 +126,7 @@ CSFML_API unsigned int sfSoundStream_GetChannelsCount(sfSoundStream* soundStream
|
|||
/// \return Stream frequency (number of samples per second)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfSoundStream_GetSampleRate(sfSoundStream* soundStream);
|
||||
CSFML_API unsigned int sfSoundStream_GetSampleRate(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the pitch of a sound stream
|
||||
|
@ -216,7 +216,7 @@ CSFML_API void sfSoundStream_SetLoop(sfSoundStream* soundStream, sfBool loop);
|
|||
/// \return Pitch value
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetPitch(sfSoundStream* soundStream);
|
||||
CSFML_API float sfSoundStream_GetPitch(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the volume of a sound stream
|
||||
|
@ -226,7 +226,7 @@ CSFML_API float sfSoundStream_GetPitch(sfSoundStream* soundStream);
|
|||
/// \return Volume value (in range [1, 100])
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetVolume(sfSoundStream* soundStream);
|
||||
CSFML_API float sfSoundStream_GetVolume(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the position of a sound stream
|
||||
|
@ -237,7 +237,7 @@ CSFML_API float sfSoundStream_GetVolume(sfSoundStream* soundStream);
|
|||
/// \param z : Z position of the sound stream in the world
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSoundStream_GetPosition(sfSoundStream* soundStream, float* x, float* y, float* z);
|
||||
CSFML_API void sfSoundStream_GetPosition(const sfSoundStream* soundStream, float* x, float* y, float* z);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the sound stream's position is relative to the listener's
|
||||
|
@ -248,7 +248,7 @@ CSFML_API void sfSoundStream_GetPosition(sfSoundStream* soundStream, float* x, f
|
|||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSoundStream_IsRelativeToListener(sfSoundStream* soundStream);
|
||||
CSFML_API sfBool sfSoundStream_IsRelativeToListener(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minimum distance of a sound stream
|
||||
|
@ -258,7 +258,7 @@ CSFML_API sfBool sfSoundStream_IsRelativeToListener(sfSoundStream* soundStream);
|
|||
/// \return Minimum distance for the sound stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetMinDistance(sfSoundStream* soundStream);
|
||||
CSFML_API float sfSoundStream_GetMinDistance(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the attenuation factor of a sound stream
|
||||
|
@ -268,7 +268,7 @@ CSFML_API float sfSoundStream_GetMinDistance(sfSoundStream* soundStream);
|
|||
/// \return Attenuation factor for the sound stream
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetAttenuation(sfSoundStream* soundStream);
|
||||
CSFML_API float sfSoundStream_GetAttenuation(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell whether or not a stream is looping
|
||||
|
@ -278,7 +278,7 @@ CSFML_API float sfSoundStream_GetAttenuation(sfSoundStream* soundStream);
|
|||
/// \return sfTrue if the stream is looping, sfFalse otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSoundStream_GetLoop(sfSoundStream* soundStream);
|
||||
CSFML_API sfBool sfSoundStream_GetLoop(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current playing position of a sound stream
|
||||
|
@ -288,7 +288,7 @@ CSFML_API sfBool sfSoundStream_GetLoop(sfSoundStream* soundStream);
|
|||
/// \return Current playing position, expressed in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSoundStream_GetPlayingOffset(sfSoundStream* soundStream);
|
||||
CSFML_API float sfSoundStream_GetPlayingOffset(const sfSoundStream* soundStream);
|
||||
|
||||
|
||||
#endif // SFML_SOUNDSTREAM_H
|
||||
|
|
|
@ -82,7 +82,7 @@ CSFML_API void sfFont_Destroy(sfFont* font);
|
|||
/// \return Base size of characters
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfFont_GetCharacterSize(sfFont* font);
|
||||
CSFML_API unsigned int sfFont_GetCharacterSize(const sfFont* font);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the built-in default font (Arial)
|
||||
|
@ -90,7 +90,7 @@ CSFML_API unsigned int sfFont_GetCharacterSize(sfFont* font);
|
|||
/// \return Pointer to the default font
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFont* sfFont_GetDefaultFont();
|
||||
CSFML_API const sfFont* sfFont_GetDefaultFont();
|
||||
|
||||
|
||||
#endif // SFML_IMAGE_H
|
||||
|
|
|
@ -104,7 +104,7 @@ CSFML_API void sfImage_Destroy(sfImage* image);
|
|||
/// \return sfTrue if saving was successful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfImage_SaveToFile(sfImage* image, const char* filename);
|
||||
CSFML_API sfBool sfImage_SaveToFile(const sfImage* image, const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Create a transparency mask for an image from a specified colorkey
|
||||
|
@ -128,7 +128,7 @@ CSFML_API void sfImage_CreateMaskFromColor(sfImage* image, sfColor colorKey, sfU
|
|||
/// \param sourceRect : Sub-rectangle of the source image to copy
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfImage_Copy(sfImage* image, sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect);
|
||||
CSFML_API void sfImage_Copy(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Create the image from the current contents of the
|
||||
|
@ -165,7 +165,7 @@ CSFML_API void sfImage_SetPixel(sfImage* image, unsigned int x, unsigned int y,
|
|||
/// \return Color of pixel (x, y)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfColor sfImage_GetPixel(sfImage* image, unsigned int x, unsigned int y);
|
||||
CSFML_API sfColor sfImage_GetPixel(const sfImage* image, unsigned int x, unsigned int y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get a read-only pointer to the array of pixels of an image (8 bits integers RGBA)
|
||||
|
@ -177,7 +177,7 @@ CSFML_API sfColor sfImage_GetPixel(sfImage* image, unsigned int x, unsigned int
|
|||
/// \return Pointer to the array of pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const sfUint8* sfImage_GetPixelsPtr(sfImage* image);
|
||||
CSFML_API const sfUint8* sfImage_GetPixelsPtr(const sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Bind the image for rendering
|
||||
|
@ -185,7 +185,7 @@ CSFML_API const sfUint8* sfImage_GetPixelsPtr(sfImage* image);
|
|||
/// \param image : Image to bind
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfImage_Bind(sfImage* image);
|
||||
CSFML_API void sfImage_Bind(const sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Enable or disable image smooth filter
|
||||
|
@ -204,7 +204,7 @@ CSFML_API void sfImage_SetSmooth(sfImage* image, sfBool smooth);
|
|||
/// \return Width in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfImage_GetWidth(sfImage* image);
|
||||
CSFML_API unsigned int sfImage_GetWidth(const sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the height of the image
|
||||
|
@ -214,7 +214,7 @@ CSFML_API unsigned int sfImage_GetWidth(sfImage* image);
|
|||
/// \return Height in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfImage_GetHeight(sfImage* image);
|
||||
CSFML_API unsigned int sfImage_GetHeight(const sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tells whether the smoothing filter is enabled or not on an image
|
||||
|
@ -224,7 +224,7 @@ CSFML_API unsigned int sfImage_GetHeight(sfImage* image);
|
|||
/// \return sfTrue if the smoothing filter is enabled
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfImage_IsSmooth(sfImage* image);
|
||||
CSFML_API sfBool sfImage_IsSmooth(const sfImage* image);
|
||||
|
||||
|
||||
#endif // SFML_IMAGE_H
|
||||
|
|
|
@ -73,8 +73,8 @@ CSFML_API void sfIntRect_Offset(sfIntRect* rect, int offsetX, int offsetY);
|
|||
/// \return sfTrue if the point is inside
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfFloatRect_Contains(sfFloatRect* rect, float x, float y);
|
||||
CSFML_API sfBool sfIntRect_Contains(sfIntRect* rect, int x, int y);
|
||||
CSFML_API sfBool sfFloatRect_Contains(const sfFloatRect* rect, float x, float y);
|
||||
CSFML_API sfBool sfIntRect_Contains(const sfIntRect* rect, int x, int y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Check intersection between two rectangles
|
||||
|
@ -86,8 +86,8 @@ CSFML_API sfBool sfIntRect_Contains(sfIntRect* rect, int x, int y);
|
|||
/// \return sfTrue if rectangles overlap
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfFloatRect_Intersects(sfFloatRect* rect1, sfFloatRect* rect2, sfFloatRect* intersection);
|
||||
CSFML_API sfBool sfIntRect_Intersects(sfIntRect* rect1, sfIntRect* rect2, sfIntRect* intersection);
|
||||
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);
|
||||
|
||||
|
||||
#endif // SFML_RECT_H
|
||||
|
|
|
@ -60,7 +60,7 @@ CSFML_API void sfRenderImage_Destroy(sfRenderImage* renderImage);
|
|||
/// \return Width in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfRenderImage_GetWidth(sfRenderImage* renderImage);
|
||||
CSFML_API unsigned int sfRenderImage_GetWidth(const sfRenderImage* renderImage);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the height of the rendering region of a renderimage
|
||||
|
@ -70,7 +70,7 @@ CSFML_API unsigned int sfRenderImage_GetWidth(sfRenderImage* renderImage);
|
|||
/// \return Height in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfRenderImage_GetHeight(sfRenderImage* renderImage);
|
||||
CSFML_API unsigned int sfRenderImage_GetHeight(const sfRenderImage* renderImage);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Activate or deactivate a renderimage as the current target for rendering
|
||||
|
@ -116,9 +116,9 @@ CSFML_API void sfRenderImage_Display(sfRenderImage* renderImage);
|
|||
/// \param sprite / text / shape : Object to draw
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfRenderImage_DrawSprite(sfRenderImage* renderImage, sfSprite* sprite);
|
||||
CSFML_API void sfRenderImage_DrawShape (sfRenderImage* renderImage, sfShape* shape);
|
||||
CSFML_API void sfRenderImage_DrawText (sfRenderImage* renderImage, sfText* text);
|
||||
CSFML_API void sfRenderImage_DrawSprite(sfRenderImage* renderImage, const sfSprite* sprite);
|
||||
CSFML_API void sfRenderImage_DrawShape (sfRenderImage* renderImage, const sfShape* shape);
|
||||
CSFML_API void sfRenderImage_DrawText (sfRenderImage* renderImage, const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Draw something on a renderimage with a shader
|
||||
|
@ -128,9 +128,9 @@ CSFML_API void sfRenderImage_DrawText (sfRenderImage* renderImage, sfText* te
|
|||
/// \param shader : Shader to use
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfRenderImage_DrawSpriteWithShader(sfRenderImage* renderImage, sfSprite* sprite, sfShader* shader);
|
||||
CSFML_API void sfRenderImage_DrawShapeWithShader (sfRenderImage* renderImage, sfShape* shape, sfShader* shader);
|
||||
CSFML_API void sfRenderImage_DrawTextWithShader (sfRenderImage* renderImage, sfText* text, sfShader* shader);
|
||||
CSFML_API void sfRenderImage_DrawSpriteWithShader(sfRenderImage* renderImage, const sfSprite* sprite, const sfShader* shader);
|
||||
CSFML_API void sfRenderImage_DrawShapeWithShader (sfRenderImage* renderImage, const sfShape* shape, const sfShader* shader);
|
||||
CSFML_API void sfRenderImage_DrawTextWithShader (sfRenderImage* renderImage, const sfText* text, const sfShader* shader);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Clear the renderimage with the given color
|
||||
|
@ -148,7 +148,7 @@ CSFML_API void sfRenderImage_Clear(sfRenderImage* renderImage, sfColor color);
|
|||
/// \param view : Pointer to the new view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfRenderImage_SetView(sfRenderImage* renderImage, sfView* view);
|
||||
CSFML_API void sfRenderImage_SetView(sfRenderImage* renderImage, const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current active view of a renderimage
|
||||
|
@ -158,7 +158,7 @@ CSFML_API void sfRenderImage_SetView(sfRenderImage* renderImage, sfView* view);
|
|||
/// \return Current active view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const sfView* sfRenderImage_GetView(sfRenderImage* renderImage);
|
||||
CSFML_API const sfView* sfRenderImage_GetView(const sfRenderImage* renderImage);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the default view of a renderimage
|
||||
|
@ -179,7 +179,7 @@ CSFML_API sfView* sfRenderImage_GetDefaultView(sfRenderImage* renderImage);
|
|||
/// \return Viewport rectangle, expressed in pixels in the current target
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIntRect sfRenderImage_GetViewport(sfRenderImage* renderImage, sfView* view);
|
||||
CSFML_API sfIntRect sfRenderImage_GetViewport(const sfRenderImage* renderImage, const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Convert a point in image coordinates into view coordinates
|
||||
|
@ -192,7 +192,7 @@ CSFML_API sfIntRect sfRenderImage_GetViewport(sfRenderImage* renderImage, sfView
|
|||
/// \param targetView : Target view to convert the point to (pass NULL to use the current view)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfRenderImage_ConvertCoords(sfRenderImage* renderImage, unsigned int windowX, unsigned int windowY, float* viewX, float* viewY, sfView* targetView);
|
||||
CSFML_API void sfRenderImage_ConvertCoords(const sfRenderImage* renderImage, unsigned int windowX, unsigned int windowY, float* viewX, float* viewY, const sfView* targetView);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the target image
|
||||
|
@ -202,7 +202,7 @@ CSFML_API void sfRenderImage_ConvertCoords(sfRenderImage* renderImage, unsigned
|
|||
/// \return Pointer to the target image
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfImage* sfRenderImage_GetImage(sfRenderImage* renderImage);
|
||||
CSFML_API const sfImage* sfRenderImage_GetImage(const sfRenderImage* renderImage);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Check whether the system supports render images or not
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
/// \param settings : Creation settings (pass NULL to use default values)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfRenderWindow* sfRenderWindow_Create(sfVideoMode mode, const char* title, unsigned long style, sfContextSettings* settings);
|
||||
CSFML_API sfRenderWindow* sfRenderWindow_Create(sfVideoMode mode, const char* title, unsigned long style, const sfContextSettings* settings);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Construct a renderwindow from an existing control
|
||||
|
@ -56,7 +56,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, sfContextSettings* settings);
|
||||
CSFML_API sfRenderWindow* sfRenderWindow_CreateFromHandle(sfWindowHandle handle, const sfContextSettings* settings);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing renderwindow
|
||||
|
@ -80,7 +80,7 @@ CSFML_API void sfRenderWindow_Close(sfRenderWindow* renderWindow);
|
|||
/// \param renderWindow : Renderwindow object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfRenderWindow_IsOpened(sfRenderWindow* renderWindow);
|
||||
CSFML_API sfBool sfRenderWindow_IsOpened(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the width of the rendering region of a window
|
||||
|
@ -90,7 +90,7 @@ CSFML_API sfBool sfRenderWindow_IsOpened(sfRenderWindow* renderWindow);
|
|||
/// \return Width in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfRenderWindow_GetWidth(sfRenderWindow* renderWindow);
|
||||
CSFML_API unsigned int sfRenderWindow_GetWidth(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the height of the rendering region of a window
|
||||
|
@ -100,7 +100,7 @@ CSFML_API unsigned int sfRenderWindow_GetWidth(sfRenderWindow* renderWindow);
|
|||
/// \return Height in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfRenderWindow_GetHeight(sfRenderWindow* renderWindow);
|
||||
CSFML_API unsigned int sfRenderWindow_GetHeight(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the creation settings of a window
|
||||
|
@ -110,7 +110,7 @@ CSFML_API unsigned int sfRenderWindow_GetHeight(sfRenderWindow* renderWindow);
|
|||
/// \return Settings used to create the window
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfContextSettings sfRenderWindow_GetSettings(sfRenderWindow* renderWindow);
|
||||
CSFML_API sfContextSettings sfRenderWindow_GetSettings(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the event on top of events stack of a window, if any, and pop it
|
||||
|
@ -211,7 +211,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, sfUint8* pixels);
|
||||
CSFML_API void sfRenderWindow_SetIcon(sfRenderWindow* renderWindow, unsigned int width, unsigned int height, const sfUint8* pixels);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Activate or deactivate a window as the current target for rendering
|
||||
|
@ -258,7 +258,7 @@ CSFML_API void sfRenderWindow_Display(sfRenderWindow* renderWindow);
|
|||
/// \return Reference to the input
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfInput* sfRenderWindow_GetInput(sfRenderWindow* renderWindow);
|
||||
CSFML_API const sfInput* sfRenderWindow_GetInput(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Limit the framerate to a maximum fixed frequency for a window
|
||||
|
@ -277,7 +277,7 @@ CSFML_API void sfRenderWindow_SetFramerateLimit(sfRenderWindow* renderWindow, un
|
|||
/// \return Time elapsed, in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfRenderWindow_GetFrameTime(sfRenderWindow* renderWindow);
|
||||
CSFML_API float sfRenderWindow_GetFrameTime(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Change the joystick threshold, ie. the value below which
|
||||
|
@ -296,9 +296,9 @@ CSFML_API void sfRenderWindow_SetJoystickThreshold(sfRenderWindow* renderWindow,
|
|||
/// \param sprite / text / shape : Object to draw
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfRenderWindow_DrawSprite(sfRenderWindow* renderWindow, sfSprite* sprite);
|
||||
CSFML_API void sfRenderWindow_DrawShape (sfRenderWindow* renderWindow, sfShape* shape);
|
||||
CSFML_API void sfRenderWindow_DrawText (sfRenderWindow* renderWindow, sfText* text);
|
||||
CSFML_API void sfRenderWindow_DrawSprite(sfRenderWindow* renderWindow, const sfSprite* sprite);
|
||||
CSFML_API void sfRenderWindow_DrawShape (sfRenderWindow* renderWindow, const sfShape* shape);
|
||||
CSFML_API void sfRenderWindow_DrawText (sfRenderWindow* renderWindow, const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Draw something on a renderwindow with a shader
|
||||
|
@ -308,9 +308,9 @@ CSFML_API void sfRenderWindow_DrawText (sfRenderWindow* renderWindow, sfText*
|
|||
/// \param shader : Shader to use
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfRenderWindow_DrawSpriteWithShader(sfRenderWindow* renderWindow, sfSprite* sprite, sfShader* shader);
|
||||
CSFML_API void sfRenderWindow_DrawShapeWithShader (sfRenderWindow* renderWindow, sfShape* shape, sfShader* shader);
|
||||
CSFML_API void sfRenderWindow_DrawTextWithShader (sfRenderWindow* renderWindow, sfText* text, sfShader* shader);
|
||||
CSFML_API void sfRenderWindow_DrawSpriteWithShader(sfRenderWindow* renderWindow, const sfSprite* sprite, const sfShader* shader);
|
||||
CSFML_API void sfRenderWindow_DrawShapeWithShader (sfRenderWindow* renderWindow, const sfShape* shape, const sfShader* shader);
|
||||
CSFML_API void sfRenderWindow_DrawTextWithShader (sfRenderWindow* renderWindow, const sfText* text, const sfShader* shader);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Clear the screen with the given color
|
||||
|
@ -328,7 +328,7 @@ CSFML_API void sfRenderWindow_Clear(sfRenderWindow* renderWindow, sfColor color)
|
|||
/// \param view : Pointer to the new view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfRenderWindow_SetView(sfRenderWindow* renderWindow, sfView* view);
|
||||
CSFML_API void sfRenderWindow_SetView(sfRenderWindow* renderWindow, const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current active view of a renderwindow
|
||||
|
@ -338,7 +338,7 @@ CSFML_API void sfRenderWindow_SetView(sfRenderWindow* renderWindow, sfView* view
|
|||
/// \return Current active view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const sfView* sfRenderWindow_GetView(sfRenderWindow* renderWindow);
|
||||
CSFML_API const sfView* sfRenderWindow_GetView(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the default view of a renderwindow
|
||||
|
@ -359,7 +359,7 @@ CSFML_API sfView* sfRenderWindow_GetDefaultView(sfRenderWindow* renderWindow);
|
|||
/// \return Viewport rectangle, expressed in pixels in the current target
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIntRect sfRenderWindow_GetViewport(sfRenderWindow* renderWindow, sfView* view);
|
||||
CSFML_API sfIntRect sfRenderWindow_GetViewport(const sfRenderWindow* renderWindow, const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Convert a point in window coordinates into view coordinates
|
||||
|
@ -372,7 +372,7 @@ CSFML_API sfIntRect sfRenderWindow_GetViewport(sfRenderWindow* renderWindow, sfV
|
|||
/// \param targetView : Target view to convert the point to (pass NULL to use the current view)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfRenderWindow_ConvertCoords(sfRenderWindow* renderWindow, unsigned int windowX, unsigned int windowY, float* viewX, float* viewY, sfView* targetView);
|
||||
CSFML_API void sfRenderWindow_ConvertCoords(const sfRenderWindow* renderWindow, unsigned int windowX, unsigned int windowY, float* viewX, float* viewY, const sfView* targetView);
|
||||
|
||||
|
||||
#endif // SFML_RENDERWINDOW_H
|
||||
|
|
|
@ -40,7 +40,7 @@
|
|||
/// \return A new sfShader object, or NULL if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfShader* sfShader_CreateFromFile(const char* Filename);
|
||||
CSFML_API sfShader* sfShader_CreateFromFile(const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Create a new shader from an effect source code
|
||||
|
@ -108,7 +108,7 @@ CSFML_API void sfShader_SetParameter4(sfShader* shader, const char* name, float
|
|||
/// \param texture : Image to set (pass NULL to use the texture of the object being drawn)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfShader_SetTexture(sfShader* shader, const char* name, sfImage* texture);
|
||||
CSFML_API void sfShader_SetTexture(sfShader* shader, const char* name, const sfImage* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Bind a shader for rendering
|
||||
|
@ -116,7 +116,7 @@ CSFML_API void sfShader_SetTexture(sfShader* shader, const char* name, sfImage*
|
|||
/// \param shader : Shader to bind
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfShader_Bind(sfShader* shader);
|
||||
CSFML_API void sfShader_Bind(const sfShader* shader);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Unbind a shader
|
||||
|
@ -124,7 +124,7 @@ CSFML_API void sfShader_Bind(sfShader* shader);
|
|||
/// \param shader : Shader to unbind
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfShader_Unbind(sfShader* shader);
|
||||
CSFML_API void sfShader_Unbind(const sfShader* shader);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell whether or not the system supports shaders
|
||||
|
|
|
@ -189,7 +189,7 @@ CSFML_API void sfShape_SetBlendMode(sfShape* shape, sfBlendMode mode);
|
|||
/// \return Current X position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfShape_GetX(sfShape* shape);
|
||||
CSFML_API float sfShape_GetX(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the Y position of a shape
|
||||
|
@ -199,7 +199,7 @@ CSFML_API float sfShape_GetX(sfShape* shape);
|
|||
/// \return Current Y position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfShape_GetY(sfShape* shape);
|
||||
CSFML_API float sfShape_GetY(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the horizontal scale of a shape
|
||||
|
@ -209,7 +209,7 @@ CSFML_API float sfShape_GetY(sfShape* shape);
|
|||
/// \return Current X scale factor (always positive)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfShape_GetScaleX(sfShape* shape);
|
||||
CSFML_API float sfShape_GetScaleX(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the vertical scale of a shape
|
||||
|
@ -219,7 +219,7 @@ CSFML_API float sfShape_GetScaleX(sfShape* shape);
|
|||
/// \return Current Y scale factor (always positive)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfShape_GetScaleY(sfShape* shape);
|
||||
CSFML_API float sfShape_GetScaleY(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the orientation of a shape
|
||||
|
@ -229,7 +229,7 @@ CSFML_API float sfShape_GetScaleY(sfShape* shape);
|
|||
/// \return Current rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfShape_GetRotation(sfShape* shape);
|
||||
CSFML_API float sfShape_GetRotation(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the X position of the origin a shape
|
||||
|
@ -239,7 +239,7 @@ CSFML_API float sfShape_GetRotation(sfShape* shape);
|
|||
/// \return Current X origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfShape_GetOriginX(sfShape* shape);
|
||||
CSFML_API float sfShape_GetOriginX(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the Y position of the origin a shape
|
||||
|
@ -249,7 +249,7 @@ CSFML_API float sfShape_GetOriginX(sfShape* shape);
|
|||
/// \return Current Y origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfShape_GetOriginY(sfShape* shape);
|
||||
CSFML_API float sfShape_GetOriginY(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the color of a shape
|
||||
|
@ -259,7 +259,7 @@ CSFML_API float sfShape_GetOriginY(sfShape* shape);
|
|||
/// \return Current color
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfColor sfShape_GetColor(sfShape* shape);
|
||||
CSFML_API sfColor sfShape_GetColor(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current blending mode of a shape
|
||||
|
@ -269,7 +269,7 @@ CSFML_API sfColor sfShape_GetColor(sfShape* shape);
|
|||
/// \return Current blending mode
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBlendMode sfShape_GetBlendMode(sfShape* shape);
|
||||
CSFML_API sfBlendMode sfShape_GetBlendMode(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Move a shape
|
||||
|
@ -311,7 +311,7 @@ CSFML_API void sfShape_Rotate(sfShape* shape, float angle);
|
|||
/// \param y : Value to fill with the y coordinate of the converted point
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfShape_TransformToLocal(sfShape* shape, float pointX, float pointY, float* x, float* y);
|
||||
CSFML_API void sfShape_TransformToLocal(const sfShape* shape, float pointX, float pointY, float* x, float* y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Transform a point from the shape's local coordinates into global coordinates
|
||||
|
@ -324,7 +324,7 @@ CSFML_API void sfShape_TransformToLocal(sfShape* shape, float pointX, float poin
|
|||
/// \param y : Value to fill with the y coordinate of the converted point
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfShape_TransformToGlobal(sfShape* shape, float pointX, float pointY, float* x, float* y);
|
||||
CSFML_API void sfShape_TransformToGlobal(const sfShape* shape, float pointX, float pointY, float* x, float* y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Add a point to a shape
|
||||
|
@ -374,7 +374,7 @@ CSFML_API void sfShape_SetOutlineWidth(sfShape* shape, float width);
|
|||
/// \param return Current outline width
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfShape_GetOutlineWidth(sfShape* shape);
|
||||
CSFML_API float sfShape_GetOutlineWidth(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the number of points composing a shape
|
||||
|
@ -384,7 +384,7 @@ CSFML_API float sfShape_GetOutlineWidth(sfShape* shape);
|
|||
/// \return Total number of points
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfShape_GetNbPoints(sfShape* shape);
|
||||
CSFML_API unsigned int sfShape_GetNbPoints(const sfShape* shape);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get a the position of a shape's point
|
||||
|
@ -395,7 +395,7 @@ CSFML_API unsigned int sfShape_GetNbPoints(sfShape* shape);
|
|||
/// \param y : Variable to fill with the Y coordinate of the point
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfShape_GetPointPosition(sfShape* shape, unsigned int index, float* x, float* y);
|
||||
CSFML_API void sfShape_GetPointPosition(const sfShape* shape, unsigned int index, float* x, float* y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get a the color of a shape's point
|
||||
|
@ -406,7 +406,7 @@ CSFML_API void sfShape_GetPointPosition(sfShape* shape, unsigned int index, floa
|
|||
/// \return Color of the point
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfColor sfShape_GetPointColor(sfShape* shape, unsigned int index);
|
||||
CSFML_API sfColor sfShape_GetPointColor(const sfShape* shape, unsigned int index);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get a the outline color of a shape's point
|
||||
|
@ -417,7 +417,7 @@ CSFML_API sfColor sfShape_GetPointColor(sfShape* shape, unsigned int index);
|
|||
/// \return Outline color of the point
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfColor sfShape_GetPointOutlineColor(sfShape* shape, unsigned int index);
|
||||
CSFML_API sfColor sfShape_GetPointOutlineColor(const sfShape* shape, unsigned int index);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set a the position of a shape's point
|
||||
|
|
|
@ -153,7 +153,7 @@ CSFML_API void sfSprite_SetBlendMode(sfSprite* sprite, sfBlendMode mode);
|
|||
/// \return Current X position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSprite_GetX(sfSprite* sprite);
|
||||
CSFML_API float sfSprite_GetX(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the Y position of a sprite
|
||||
|
@ -163,7 +163,7 @@ CSFML_API float sfSprite_GetX(sfSprite* sprite);
|
|||
/// \return Current Y position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSprite_GetY(sfSprite* sprite);
|
||||
CSFML_API float sfSprite_GetY(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the horizontal scale of a sprite
|
||||
|
@ -173,7 +173,7 @@ CSFML_API float sfSprite_GetY(sfSprite* sprite);
|
|||
/// \return Current X scale factor (always positive)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSprite_GetScaleX(sfSprite* sprite);
|
||||
CSFML_API float sfSprite_GetScaleX(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the vertical scale of a sprite
|
||||
|
@ -183,7 +183,7 @@ CSFML_API float sfSprite_GetScaleX(sfSprite* sprite);
|
|||
/// \return Current Y scale factor (always positive)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSprite_GetScaleY(sfSprite* sprite);
|
||||
CSFML_API float sfSprite_GetScaleY(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the orientation of a sprite
|
||||
|
@ -193,7 +193,7 @@ CSFML_API float sfSprite_GetScaleY(sfSprite* sprite);
|
|||
/// \return Current rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSprite_GetRotation(sfSprite* sprite);
|
||||
CSFML_API float sfSprite_GetRotation(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the X position of the origin a sprite
|
||||
|
@ -203,7 +203,7 @@ CSFML_API float sfSprite_GetRotation(sfSprite* sprite);
|
|||
/// \return Current X origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSprite_GetOriginX(sfSprite* sprite);
|
||||
CSFML_API float sfSprite_GetOriginX(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the Y position of the origin a sprite
|
||||
|
@ -213,7 +213,7 @@ CSFML_API float sfSprite_GetOriginX(sfSprite* sprite);
|
|||
/// \return Current Y origin
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSprite_GetOriginY(sfSprite* sprite);
|
||||
CSFML_API float sfSprite_GetOriginY(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the color of a sprite
|
||||
|
@ -223,7 +223,7 @@ CSFML_API float sfSprite_GetOriginY(sfSprite* sprite);
|
|||
/// \return Current color
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfColor sfSprite_GetColor(sfSprite* sprite);
|
||||
CSFML_API sfColor sfSprite_GetColor(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current blending mode of a sprite
|
||||
|
@ -233,7 +233,7 @@ CSFML_API sfColor sfSprite_GetColor(sfSprite* sprite);
|
|||
/// \return Current blending mode
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBlendMode sfSprite_GetBlendMode(sfSprite* sprite);
|
||||
CSFML_API sfBlendMode sfSprite_GetBlendMode(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Move a sprite
|
||||
|
@ -275,7 +275,7 @@ CSFML_API void sfSprite_Rotate(sfSprite* sprite, float angle);
|
|||
/// \param y : Value to fill with the y coordinate of the converted point
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSprite_TransformToLocal(sfSprite* sprite, float pointX, float pointY, float* x, float* y);
|
||||
CSFML_API void sfSprite_TransformToLocal(const sfSprite* sprite, float pointX, float pointY, float* x, float* y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Transform a point from the sprite's local coordinates into global coordinates
|
||||
|
@ -288,7 +288,7 @@ CSFML_API void sfSprite_TransformToLocal(sfSprite* sprite, float pointX, float p
|
|||
/// \param y : Value to fill with the y coordinate of the converted point
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSprite_TransformToGlobal(sfSprite* sprite, float pointX, float pointY, float* x, float* y);
|
||||
CSFML_API void sfSprite_TransformToGlobal(const sfSprite* sprite, float pointX, float pointY, float* x, float* y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Change the image of a sprite
|
||||
|
@ -297,7 +297,7 @@ CSFML_API void sfSprite_TransformToGlobal(sfSprite* sprite, float pointX, float
|
|||
/// \param image : New image
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfSprite_SetImage(sfSprite* sprite, sfImage* image);
|
||||
CSFML_API void sfSprite_SetImage(sfSprite* sprite, const sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the sub-rectangle of a sprite inside the source image
|
||||
|
@ -344,7 +344,7 @@ CSFML_API void sfSprite_FlipY(sfSprite* sprite, sfBool flipped);
|
|||
/// \return Pointer to the image (can be NULL)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfImage* sfSprite_GetImage(sfSprite* sprite);
|
||||
CSFML_API const sfImage* sfSprite_GetImage(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the sub-rectangle of a sprite inside the source image
|
||||
|
@ -354,7 +354,7 @@ CSFML_API sfImage* sfSprite_GetImage(sfSprite* sprite);
|
|||
/// \return Sub-rectangle
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfIntRect sfSprite_GetSubRect(sfSprite* sprite);
|
||||
CSFML_API sfIntRect sfSprite_GetSubRect(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get a sprite width
|
||||
|
@ -364,7 +364,7 @@ CSFML_API sfIntRect sfSprite_GetSubRect(sfSprite* sprite);
|
|||
/// \return Width of the sprite
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSprite_GetWidth(sfSprite* sprite);
|
||||
CSFML_API float sfSprite_GetWidth(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get a sprite height
|
||||
|
@ -374,7 +374,7 @@ CSFML_API float sfSprite_GetWidth(sfSprite* sprite);
|
|||
/// \return Height of the sprite
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfSprite_GetHeight(sfSprite* sprite);
|
||||
CSFML_API float sfSprite_GetHeight(const sfSprite* sprite);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the color of a given pixel in a sprite
|
||||
|
@ -386,7 +386,7 @@ CSFML_API float sfSprite_GetHeight(sfSprite* sprite);
|
|||
/// \return Color of pixel (X, Y)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfColor sfSprite_GetPixel(sfSprite* sprite, unsigned int x, unsigned int y);
|
||||
CSFML_API sfColor sfSprite_GetPixel(const sfSprite* sprite, unsigned int x, unsigned int y);
|
||||
|
||||
|
||||
#endif // SFML_SPRITE_H
|
||||
|
|
|
@ -165,7 +165,7 @@ CSFML_API void sfText_SetBlendMode(sfText* text, sfBlendMode mode);
|
|||
/// \return Current X position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfText_GetX(sfText* text);
|
||||
CSFML_API float sfText_GetX(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the top Y of a text
|
||||
|
@ -175,7 +175,7 @@ CSFML_API float sfText_GetX(sfText* text);
|
|||
/// \return Current Y position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfText_GetY(sfText* text);
|
||||
CSFML_API float sfText_GetY(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the horizontal scale of a text
|
||||
|
@ -185,7 +185,7 @@ CSFML_API float sfText_GetY(sfText* text);
|
|||
/// \return Current X scale factor (always positive)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfText_GetScaleX(sfText* text);
|
||||
CSFML_API float sfText_GetScaleX(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the vertical scale of a text
|
||||
|
@ -195,7 +195,7 @@ CSFML_API float sfText_GetScaleX(sfText* text);
|
|||
/// \return Current Y scale factor (always positive)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfText_GetScaleY(sfText* text);
|
||||
CSFML_API float sfText_GetScaleY(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the orientation of a text
|
||||
|
@ -205,7 +205,7 @@ CSFML_API float sfText_GetScaleY(sfText* text);
|
|||
/// \return Current rotation, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfText_GetRotation(sfText* text);
|
||||
CSFML_API float sfText_GetRotation(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the X position of the origin a text
|
||||
|
@ -215,7 +215,7 @@ CSFML_API float sfText_GetRotation(sfText* text);
|
|||
/// \return Current X origin position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfText_GetOriginX(sfText* text);
|
||||
CSFML_API float sfText_GetOriginX(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the top Y of the origin of a text
|
||||
|
@ -225,7 +225,7 @@ CSFML_API float sfText_GetOriginX(sfText* text);
|
|||
/// \return Current Y origin position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfText_GetOriginY(sfText* text);
|
||||
CSFML_API float sfText_GetOriginY(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the color of a text
|
||||
|
@ -235,7 +235,7 @@ CSFML_API float sfText_GetOriginY(sfText* text);
|
|||
/// \return Current color
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfColor sfText_GetColor(sfText* text);
|
||||
CSFML_API sfColor sfText_GetColor(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current blending mode of a text
|
||||
|
@ -245,7 +245,7 @@ CSFML_API sfColor sfText_GetColor(sfText* text);
|
|||
/// \return Current blending mode
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBlendMode sfText_GetBlendMode(sfText* text);
|
||||
CSFML_API sfBlendMode sfText_GetBlendMode(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Move a text
|
||||
|
@ -287,7 +287,7 @@ CSFML_API void sfText_Rotate(sfText* text, float angle);
|
|||
/// \param y : Value to fill with the y coordinate of the converted point
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfText_TransformToLocal(sfText* text, float pointX, float pointY, float* x, float* y);
|
||||
CSFML_API void sfText_TransformToLocal(const sfText* text, float pointX, float pointY, float* x, float* y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Transform a point from the string's local coordinates into global coordinates
|
||||
|
@ -300,7 +300,7 @@ CSFML_API void sfText_TransformToLocal(sfText* text, float pointX, float pointY,
|
|||
/// \param y : Value to fill with the y coordinate of the converted point
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfText_TransformToGlobal(sfText* text, float pointX, float pointY, float* X, float* y);
|
||||
CSFML_API void sfText_TransformToGlobal(const sfText* text, float pointX, float pointY, float* X, float* y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the string of a text (from a multibyte string)
|
||||
|
@ -327,7 +327,7 @@ CSFML_API void sfText_SetUnicodeString(sfText* text, const sfUint32* string);
|
|||
/// \param font : Font to use
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfText_SetFont(sfText* text, sfFont* font);
|
||||
CSFML_API void sfText_SetFont(sfText* text, const sfFont* font);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Set the size of a text
|
||||
|
@ -355,7 +355,7 @@ CSFML_API void sfText_SetStyle(sfText* text, unsigned long style);
|
|||
/// \return String as UTF-32
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const sfUint32* sfText_GetUnicodeString(sfText* text);
|
||||
CSFML_API const sfUint32* sfText_GetUnicodeString(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the text of a text (returns an ANSI string)
|
||||
|
@ -365,7 +365,7 @@ CSFML_API const sfUint32* sfText_GetUnicodeString(sfText* text);
|
|||
/// \return String an a locale-dependant ANSI string
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfText_GetString(sfText* text);
|
||||
CSFML_API const char* sfText_GetString(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the font used by a text
|
||||
|
@ -375,7 +375,7 @@ CSFML_API const char* sfText_GetString(sfText* text);
|
|||
/// \return Pointer to the font
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFont* sfText_GetFont(sfText* text);
|
||||
CSFML_API const sfFont* sfText_GetFont(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the size of the characters of a text
|
||||
|
@ -385,7 +385,7 @@ CSFML_API sfFont* sfText_GetFont(sfText* text);
|
|||
/// \return Size of the characters
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfText_GetSize(sfText* text);
|
||||
CSFML_API float sfText_GetSize(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the style of a text
|
||||
|
@ -395,7 +395,7 @@ CSFML_API float sfText_GetSize(sfText* text);
|
|||
/// \return Current string style (see sfTextStyle enum)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned long sfText_GetStyle(sfText* text);
|
||||
CSFML_API unsigned long sfText_GetStyle(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the visual position of the Index-th character of the text,
|
||||
|
@ -408,7 +408,7 @@ CSFML_API unsigned long sfText_GetStyle(sfText* text);
|
|||
/// \param y : Value to fill with the y coordinate of the position
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfText_GetCharacterPos(sfText* text, size_t index, float* x, float* y);
|
||||
CSFML_API void sfText_GetCharacterPos(const sfText* text, size_t index, float* x, float* y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the bounding rectangle of a text on screen
|
||||
|
@ -418,7 +418,7 @@ CSFML_API void sfText_GetCharacterPos(sfText* text, size_t index, float* x, floa
|
|||
/// \return Rectangle contaning the string in screen coordinates
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFloatRect sfText_GetRect(sfText* text);
|
||||
CSFML_API sfFloatRect sfText_GetRect(const sfText* text);
|
||||
|
||||
|
||||
#endif // SFML_TEXT_H
|
||||
|
|
|
@ -115,7 +115,7 @@ CSFML_API void sfView_Reset(sfView* view, sfFloatRect rectangle);
|
|||
/// \return X coordinate of the center of the view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfView_GetCenterX(sfView* view);
|
||||
CSFML_API float sfView_GetCenterX(const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the Y coordinate of the center of a view
|
||||
|
@ -125,7 +125,7 @@ CSFML_API float sfView_GetCenterX(sfView* view);
|
|||
/// \return Y coordinate of the center of the view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfView_GetCenterY(sfView* view);
|
||||
CSFML_API float sfView_GetCenterY(const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the width of the view
|
||||
|
@ -135,7 +135,7 @@ CSFML_API float sfView_GetCenterY(sfView* view);
|
|||
/// \return Width of the view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfView_GetWidth(sfView* view);
|
||||
CSFML_API float sfView_GetWidth(const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the height of the view
|
||||
|
@ -145,7 +145,7 @@ CSFML_API float sfView_GetWidth(sfView* view);
|
|||
/// \return Height of the view
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfView_GetHeight(sfView* view);
|
||||
CSFML_API float sfView_GetHeight(const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the current rotation of a view
|
||||
|
@ -155,7 +155,7 @@ CSFML_API float sfView_GetHeight(sfView* view);
|
|||
/// \return Rotation of the view, in degrees
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfView_GetRotation(sfView* view);
|
||||
CSFML_API float sfView_GetRotation(const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the target viewport of a view
|
||||
|
@ -165,7 +165,7 @@ CSFML_API float sfView_GetRotation(sfView* view);
|
|||
/// \return Viewport rectangle, expressed as a factor of the target size
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFloatRect sfView_GetViewport(sfView* view);
|
||||
CSFML_API sfFloatRect sfView_GetViewport(const sfView* view);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Move a view
|
||||
|
|
|
@ -128,7 +128,7 @@ CSFML_API void sfFtpListingResponse_Destroy(sfFtpListingResponse* ftpListingResp
|
|||
/// \return sfTrue if status is success (code < 400)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfFtpListingResponse_IsOk(sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_API sfBool sfFtpListingResponse_IsOk(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the response status code
|
||||
|
@ -138,7 +138,7 @@ CSFML_API sfBool sfFtpListingResponse_IsOk(sfFtpListingResponse* ftpListingRespo
|
|||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpStatus sfFtpListingResponse_GetStatus(sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_API sfFtpStatus sfFtpListingResponse_GetStatus(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the full message contained in the response
|
||||
|
@ -148,7 +148,7 @@ CSFML_API sfFtpStatus sfFtpListingResponse_GetStatus(sfFtpListingResponse* ftpLi
|
|||
/// \return The response message
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpListingResponse_GetMessage(sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_API const char* sfFtpListingResponse_GetMessage(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the number of filenames in the listing
|
||||
|
@ -158,7 +158,7 @@ CSFML_API const char* sfFtpListingResponse_GetMessage(sfFtpListingResponse* ftpL
|
|||
/// \return Total number of filenames
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API size_t sfFtpListingResponse_GetCount(sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_API size_t sfFtpListingResponse_GetCount(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the Index-th filename in the directory
|
||||
|
@ -169,7 +169,7 @@ CSFML_API size_t sfFtpListingResponse_GetCount(sfFtpListingResponse* ftpListingR
|
|||
/// \return Index-th filename
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpListingResponse_GetFilename(sfFtpListingResponse* ftpListingResponse, size_t index);
|
||||
CSFML_API const char* sfFtpListingResponse_GetFilename(const sfFtpListingResponse* ftpListingResponse, size_t index);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing Ftp directory response
|
||||
|
@ -188,7 +188,7 @@ CSFML_API void sfFtpDirectoryResponse_Destroy(sfFtpDirectoryResponse* ftpDirecto
|
|||
/// \return sfTrue if status is success (code < 400)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfFtpDirectoryResponse_IsOk(sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_API sfBool sfFtpDirectoryResponse_IsOk(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the response status code
|
||||
|
@ -198,7 +198,7 @@ CSFML_API sfBool sfFtpDirectoryResponse_IsOk(sfFtpDirectoryResponse* ftpDirector
|
|||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the full message contained in the response
|
||||
|
@ -208,7 +208,7 @@ CSFML_API sfFtpStatus sfFtpDirectoryResponse_GetStatus(sfFtpDirectoryResponse* f
|
|||
/// \return The response message
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpDirectoryResponse_GetMessage(sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_API const char* sfFtpDirectoryResponse_GetMessage(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the directory returned in the response
|
||||
|
@ -218,7 +218,7 @@ CSFML_API const char* sfFtpDirectoryResponse_GetMessage(sfFtpDirectoryResponse*
|
|||
/// \return Directory name
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpDirectoryResponse_GetDirectory(sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_API const char* sfFtpDirectoryResponse_GetDirectory(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -238,7 +238,7 @@ CSFML_API void sfFtpResponse_Destroy(sfFtpResponse* ftpResponse);
|
|||
/// \return sfTrue if status is success (code < 400)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfFtpResponse_IsOk(sfFtpResponse* ftpResponse);
|
||||
CSFML_API sfBool sfFtpResponse_IsOk(const sfFtpResponse* ftpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the response status code
|
||||
|
@ -248,7 +248,7 @@ CSFML_API sfBool sfFtpResponse_IsOk(sfFtpResponse* ftpResponse);
|
|||
/// \return Status code
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfFtpStatus sfFtpResponse_GetStatus(sfFtpResponse* ftpResponse);
|
||||
CSFML_API sfFtpStatus sfFtpResponse_GetStatus(const sfFtpResponse* ftpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the full message contained in the response
|
||||
|
@ -258,7 +258,7 @@ CSFML_API sfFtpStatus sfFtpResponse_GetStatus(sfFtpResponse* ftpResponse);
|
|||
/// \return The response message
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfFtpResponse_GetMessage(sfFtpResponse* ftpResponse);
|
||||
CSFML_API const char* sfFtpResponse_GetMessage(const sfFtpResponse* ftpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Construct a new Ftp
|
||||
|
|
|
@ -164,7 +164,7 @@ CSFML_API void sfHttpResponse_Destroy(sfHttpResponse* httpResponse);
|
|||
/// \return Value of the field (NULL if it doesn't exist)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfHttpResponse_GetField(sfHttpResponse* httpResponse, const char* field);
|
||||
CSFML_API const char* sfHttpResponse_GetField(const sfHttpResponse* httpResponse, const char* field);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the status of a response
|
||||
|
@ -174,7 +174,7 @@ CSFML_API const char* sfHttpResponse_GetField(sfHttpResponse* httpResponse, cons
|
|||
/// \return Status of the response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfHttpStatus sfHttpResponse_GetStatus(sfHttpResponse* httpResponse);
|
||||
CSFML_API sfHttpStatus sfHttpResponse_GetStatus(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the major HTTP version of a response
|
||||
|
@ -184,7 +184,7 @@ CSFML_API sfHttpStatus sfHttpResponse_GetStatus(sfHttpResponse* httpResponse);
|
|||
/// \return HTTP major version of the response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfHttpResponse_GetMajorVersion(sfHttpResponse* httpResponse);
|
||||
CSFML_API unsigned int sfHttpResponse_GetMajorVersion(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the minor HTTP version of a response
|
||||
|
@ -194,7 +194,7 @@ CSFML_API unsigned int sfHttpResponse_GetMajorVersion(sfHttpResponse* httpRespon
|
|||
/// \return HTTP minor version of the response
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfHttpResponse_GetMinorVersion(sfHttpResponse* httpResponse);
|
||||
CSFML_API unsigned int sfHttpResponse_GetMinorVersion(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the body of the response. The body can contain :
|
||||
|
@ -208,7 +208,7 @@ CSFML_API unsigned int sfHttpResponse_GetMinorVersion(sfHttpResponse* httpRespon
|
|||
/// \return Body of the response (empty string if no body)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfHttpResponse_GetBody(sfHttpResponse* httpResponse);
|
||||
CSFML_API const char* sfHttpResponse_GetBody(const sfHttpResponse* httpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Construct a new Http object
|
||||
|
@ -251,7 +251,7 @@ CSFML_API void sfHttp_SetHost(sfHttp* http, const char* host, unsigned short por
|
|||
/// \return Server's response, or NULL if request is invalid
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfHttpResponse* sfHttp_SendRequest(sfHttp* http, sfHttpRequest* request, float timeout);
|
||||
CSFML_API sfHttpResponse* sfHttp_SendRequest(sfHttp* http, const sfHttpRequest* request, float timeout);
|
||||
|
||||
|
||||
#endif // SFML_HTTP_H
|
||||
|
|
|
@ -56,7 +56,7 @@ CSFML_API void sfPacket_Destroy(sfPacket* packet);
|
|||
/// \param sizeInBytes : Number of bytes to append
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfPacket_Append(sfPacket* packet, void* data, size_t sizeInBytes);
|
||||
CSFML_API void sfPacket_Append(sfPacket* packet, const void* data, size_t sizeInBytes);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Clear all the data of a packet
|
||||
|
@ -76,7 +76,7 @@ CSFML_API void sfPacket_Clear(sfPacket* packet);
|
|||
/// \return Pointer to the data
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API const char* sfPacket_GetData(sfPacket* packet);
|
||||
CSFML_API const char* sfPacket_GetData(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the size of the data contained in a packet
|
||||
|
@ -86,7 +86,7 @@ CSFML_API const char* sfPacket_GetData(sfPacket* packet);
|
|||
/// \return Data size, in bytes
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API size_t sfPacket_GetDataSize(sfPacket* packet);
|
||||
CSFML_API size_t sfPacket_GetDataSize(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Tell if the reading position has reached the end of the packet
|
||||
|
@ -96,7 +96,7 @@ CSFML_API size_t sfPacket_GetDataSize(sfPacket* packet);
|
|||
/// \return sfTrue if all data have been read into the packet
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfPacket_EndOfPacket(sfPacket* packet);
|
||||
CSFML_API sfBool sfPacket_EndOfPacket(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Return the validity of packet
|
||||
|
@ -106,7 +106,7 @@ CSFML_API sfBool sfPacket_EndOfPacket(sfPacket* packet);
|
|||
/// \return sfTrue if last data extraction from packet was successful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfPacket_CanRead(sfPacket* packet);
|
||||
CSFML_API sfBool sfPacket_CanRead(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Functions to extract data from a packet
|
||||
|
|
|
@ -104,8 +104,8 @@ CSFML_API unsigned int sfSelectorUDP_Wait(sfSelectorUDP* selector, float timeout
|
|||
/// \return The Index-th socket
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfSocketTCP* sfSelectorTCP_GetSocketReady(sfSelectorTCP* selector, unsigned int index);
|
||||
CSFML_API sfSocketUDP* sfSelectorUDP_GetSocketReady(sfSelectorUDP* selector, unsigned int index);
|
||||
CSFML_API sfSocketTCP* sfSelectorTCP_GetSocketReady(const sfSelectorTCP* selector, unsigned int index);
|
||||
CSFML_API sfSocketUDP* sfSelectorUDP_GetSocketReady(const sfSelectorUDP* selector, unsigned int index);
|
||||
|
||||
|
||||
#endif // SFML_SELECTOR_H
|
||||
|
|
|
@ -164,7 +164,7 @@ CSFML_API sfBool sfSocketTCP_Close(sfSocketTCP* socket);
|
|||
/// \return True if the socket is valid
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfSocketTCP_IsValid(sfSocketTCP* socket);
|
||||
CSFML_API sfBool sfSocketTCP_IsValid(const sfSocketTCP* socket);
|
||||
|
||||
|
||||
#endif // SFML_SOCKETTCP_H
|
||||
|
|
|
@ -54,7 +54,7 @@ CSFML_API void sfClock_Destroy(sfClock* clock);
|
|||
/// \param clock : Clock to get time from
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfClock_GetTime(sfClock* clock);
|
||||
CSFML_API float sfClock_GetTime(const sfClock* clock);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Restart a clock
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
/// \return sfTrue if key is down, sfFalse if key is up
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfInput_IsKeyDown(sfInput* input, sfKeyCode code);
|
||||
CSFML_API sfBool sfInput_IsKeyDown(const sfInput* input, sfKeyCode code);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the state of a mouse button
|
||||
|
@ -52,7 +52,7 @@ CSFML_API sfBool sfInput_IsKeyDown(sfInput* input, sfKeyCode code);
|
|||
/// \return sfTrue if button is down, sfFalse if button is up
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfInput_IsMouseButtonDown(sfInput* input, sfMouseButton button);
|
||||
CSFML_API sfBool sfInput_IsMouseButtonDown(const sfInput* input, sfMouseButton button);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the state of a joystick button
|
||||
|
@ -64,7 +64,7 @@ CSFML_API sfBool sfInput_IsMouseButtonDown(sfInput* input, sfMouseButton button)
|
|||
/// \return sfTrue if button is down, sfFalse if button is up
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfInput_IsJoystickButtonDown(sfInput* input, unsigned int joyId, unsigned int button);
|
||||
CSFML_API sfBool sfInput_IsJoystickButtonDown(const sfInput* input, unsigned int joyId, unsigned int button);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the mouse X position
|
||||
|
@ -74,7 +74,7 @@ CSFML_API sfBool sfInput_IsJoystickButtonDown(sfInput* input, unsigned int joyId
|
|||
/// \return Current mouse left position, relative to owner window
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API int sfInput_GetMouseX(sfInput* input);
|
||||
CSFML_API int sfInput_GetMouseX(const sfInput* input);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the mouse Y position
|
||||
|
@ -84,7 +84,7 @@ CSFML_API int sfInput_GetMouseX(sfInput* input);
|
|||
/// \return Current mouse top position, relative to owner window
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API int sfInput_GetMouseY(sfInput* input);
|
||||
CSFML_API int sfInput_GetMouseY(const sfInput* input);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the joystick position on a given axis
|
||||
|
@ -96,7 +96,7 @@ CSFML_API int sfInput_GetMouseY(sfInput* input);
|
|||
/// \return Current joystick position, in the range [-100, 100]
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfInput_GetJoystickAxis(sfInput* input, unsigned int joyId, sfJoyAxis axis);
|
||||
CSFML_API float sfInput_GetJoystickAxis(const sfInput* input, unsigned int joyId, sfJoyAxis axis);
|
||||
|
||||
|
||||
#endif // SFML_INPUT_H
|
||||
|
|
|
@ -71,7 +71,7 @@ typedef struct
|
|||
/// \param settings : Creation settings (pass NULL to use default values)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfWindow* sfWindow_Create(sfVideoMode mode, const char* title, unsigned long style, sfContextSettings* settings);
|
||||
CSFML_API sfWindow* sfWindow_Create(sfVideoMode mode, const char* title, unsigned long style, const sfContextSettings* settings);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Construct a window from an existing control
|
||||
|
@ -80,7 +80,7 @@ CSFML_API sfWindow* sfWindow_Create(sfVideoMode mode, const char* title, unsigne
|
|||
/// \param settings : Creation settings (pass NULL to use default values)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfWindow* sfWindow_CreateFromHandle(sfWindowHandle handle, sfContextSettings* settings);
|
||||
CSFML_API sfWindow* sfWindow_CreateFromHandle(sfWindowHandle handle, const sfContextSettings* settings);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Destroy an existing window
|
||||
|
@ -104,7 +104,7 @@ CSFML_API void sfWindow_Close(sfWindow* window);
|
|||
/// \param window : Window object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfBool sfWindow_IsOpened(sfWindow* window);
|
||||
CSFML_API sfBool sfWindow_IsOpened(const sfWindow* window);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the width of the rendering region of a window
|
||||
|
@ -114,7 +114,7 @@ CSFML_API sfBool sfWindow_IsOpened(sfWindow* window);
|
|||
/// \return Width in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfWindow_GetWidth(sfWindow* window);
|
||||
CSFML_API unsigned int sfWindow_GetWidth(const sfWindow* window);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the height of the rendering region of a window
|
||||
|
@ -124,7 +124,7 @@ CSFML_API unsigned int sfWindow_GetWidth(sfWindow* window);
|
|||
/// \return Height in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API unsigned int sfWindow_GetHeight(sfWindow* window);
|
||||
CSFML_API unsigned int sfWindow_GetHeight(const sfWindow* window);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the creation settings of a window
|
||||
|
@ -134,7 +134,7 @@ CSFML_API unsigned int sfWindow_GetHeight(sfWindow* window);
|
|||
/// \return Settings used to create the window
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfContextSettings sfWindow_GetSettings(sfWindow* window);
|
||||
CSFML_API sfContextSettings sfWindow_GetSettings(const sfWindow* window);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Get the event on top of events stack of a window, if any, and pop it
|
||||
|
@ -235,7 +235,7 @@ CSFML_API void sfWindow_EnableKeyRepeat(sfWindow* window, sfBool enabled);
|
|||
/// \param pixels : Pointer to the pixels in memory, format must be RGBA 32 bits
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API void sfWindow_SetIcon(sfWindow* window, unsigned int width, unsigned int height, sfUint8* pixels);
|
||||
CSFML_API void sfWindow_SetIcon(sfWindow* window, unsigned int width, unsigned int height, const sfUint8* pixels);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Activate or deactivate a window as the current target for rendering
|
||||
|
@ -264,7 +264,7 @@ CSFML_API void sfWindow_Display(sfWindow* window);
|
|||
/// \return Reference to the input
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API sfInput* sfWindow_GetInput(sfWindow* window);
|
||||
CSFML_API const sfInput* sfWindow_GetInput(sfWindow* window);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Limit the framerate to a maximum fixed frequency for a window
|
||||
|
@ -283,7 +283,7 @@ CSFML_API void sfWindow_SetFramerateLimit(sfWindow* window, unsigned int limit);
|
|||
/// \return Time elapsed, in seconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_API float sfWindow_GetFrameTime(sfWindow* window);
|
||||
CSFML_API float sfWindow_GetFrameTime(const sfWindow* window);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// Change the joystick threshold, ie. the value below which
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue