mirror of
https://github.com/SFML/CSFML.git
synced 2026-10-27 05:26:13 +01:00
Use C standard library utilities for booleans and fixed-width ints
This commit is contained in:
1 parent
46bc9a7ed8
commit
a51c22a7a3
97 files changed
+670
-707
No files matched your search
@@ -110,24 +110,24 @@ CSFML_AUDIO_API void sfMusic_destroy(sfMusic* music);
|
||||
///
|
||||
/// If set, the music will restart from beginning after
|
||||
/// reaching the end and so on, until it is stopped or
|
||||
/// sfMusic_setLoop(music, sfFalse) is called.
|
||||
/// sfMusic_setLoop(music, false) is called.
|
||||
/// The default looping state for musics is false.
|
||||
///
|
||||
/// \param music Music object
|
||||
/// \param loop sfTrue to play in loop, sfFalse to play once
|
||||
/// \param loop true to play in loop, false to play once
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfMusic_setLoop(sfMusic* music, sfBool loop);
|
||||
CSFML_AUDIO_API void sfMusic_setLoop(sfMusic* music, bool loop);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether or not a music is in loop mode
|
||||
///
|
||||
/// \param music Music object
|
||||
///
|
||||
/// \return sfTrue if the music is looping, sfFalse otherwise
|
||||
/// \return true if the music is looping, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfBool sfMusic_getLoop(const sfMusic* music);
|
||||
CSFML_AUDIO_API bool sfMusic_getLoop(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the total duration of a music
|
||||
@@ -310,10 +310,10 @@ CSFML_AUDIO_API void sfMusic_setPosition(sfMusic* music, sfVector3f position);
|
||||
/// The default value is false (position is absolute).
|
||||
///
|
||||
/// \param music Music object
|
||||
/// \param relative sfTrue to set the position relative, sfFalse to set it absolute
|
||||
/// \param relative true to set the position relative, false to set it absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfMusic_setRelativeToListener(sfMusic* music, sfBool relative);
|
||||
CSFML_AUDIO_API void sfMusic_setRelativeToListener(sfMusic* music, bool relative);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the minimum distance of a music
|
||||
@@ -397,10 +397,10 @@ CSFML_AUDIO_API sfVector3f sfMusic_getPosition(const sfMusic* music);
|
||||
///
|
||||
/// \param music Music object
|
||||
///
|
||||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
/// \return true if the position is relative, false if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfBool sfMusic_isRelativeToListener(const sfMusic* music);
|
||||
CSFML_AUDIO_API bool sfMusic_isRelativeToListener(const sfMusic* music);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the minimum distance of a music
|
||||
|
||||
@@ -126,24 +126,24 @@ CSFML_AUDIO_API const sfSoundBuffer* sfSound_getBuffer(const sfSound* sound);
|
||||
///
|
||||
/// If set, the sound will restart from beginning after
|
||||
/// reaching the end and so on, until it is stopped or
|
||||
/// sfSound_setLoop(sound, sfFalse) is called.
|
||||
/// sfSound_setLoop(sound, false) is called.
|
||||
/// The default looping state for sounds is false.
|
||||
///
|
||||
/// \param sound Sound object
|
||||
/// \param loop sfTrue to play in loop, sfFalse to play once
|
||||
/// \param loop true to play in loop, false to play once
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSound_setLoop(sfSound* sound, sfBool loop);
|
||||
CSFML_AUDIO_API void sfSound_setLoop(sfSound* sound, bool loop);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether or not a sound is in loop mode
|
||||
///
|
||||
/// \param sound Sound object
|
||||
///
|
||||
/// \return sfTrue if the sound is looping, sfFalse otherwise
|
||||
/// \return true if the sound is looping, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfBool sfSound_getLoop(const sfSound* sound);
|
||||
CSFML_AUDIO_API bool sfSound_getLoop(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current status of a sound (stopped, paused, playing)
|
||||
@@ -205,10 +205,10 @@ CSFML_AUDIO_API void sfSound_setPosition(sfSound* sound, sfVector3f position);
|
||||
/// The default value is false (position is absolute).
|
||||
///
|
||||
/// \param sound Sound object
|
||||
/// \param relative sfTrue to set the position relative, sfFalse to set it absolute
|
||||
/// \param relative true to set the position relative, false to set it absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSound_setRelativeToListener(sfSound* sound, sfBool relative);
|
||||
CSFML_AUDIO_API void sfSound_setRelativeToListener(sfSound* sound, bool relative);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the minimum distance of a sound
|
||||
@@ -292,10 +292,10 @@ CSFML_AUDIO_API sfVector3f sfSound_getPosition(const sfSound* sound);
|
||||
///
|
||||
/// \param sound Sound object
|
||||
///
|
||||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
/// \return true if the position is relative, false if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfBool sfSound_isRelativeToListener(const sfSound* sound);
|
||||
CSFML_AUDIO_API bool sfSound_isRelativeToListener(const sfSound* sound);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the minimum distance of a sound
|
||||
|
||||
@@ -82,7 +82,7 @@ CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromStream(sfInputStream* str
|
||||
/// \brief Create a new sound buffer and load it from an array of samples in memory
|
||||
///
|
||||
/// The assumed format of the audio samples is 16 bits signed integer
|
||||
/// (sfInt16).
|
||||
/// (int16_t).
|
||||
///
|
||||
/// \param samples Pointer to the array of samples in memory
|
||||
/// \param sampleCount Number of samples in the array
|
||||
@@ -92,7 +92,7 @@ CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromStream(sfInputStream* str
|
||||
/// \return A new sfSoundBuffer object (NULL if failed)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromSamples(const sfInt16* samples, sfUint64 sampleCount, unsigned int channelCount, unsigned int sampleRate);
|
||||
CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromSamples(const int16_t* samples, uint64_t sampleCount, unsigned int channelCount, unsigned int sampleRate);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create a new sound buffer by copying an existing one
|
||||
@@ -122,16 +122,16 @@ CSFML_AUDIO_API void sfSoundBuffer_destroy(sfSoundBuffer* soundBuffer);
|
||||
/// \param soundBuffer Sound buffer object
|
||||
/// \param filename Path of the sound file to write
|
||||
///
|
||||
/// \return sfTrue if saving succeeded, sfFalse if it failed
|
||||
/// \return true if saving succeeded, false if it failed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfBool sfSoundBuffer_saveToFile(const sfSoundBuffer* soundBuffer, const char* filename);
|
||||
CSFML_AUDIO_API bool sfSoundBuffer_saveToFile(const sfSoundBuffer* soundBuffer, const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the array of audio samples stored in a sound buffer
|
||||
///
|
||||
/// The format of the returned samples is 16 bits signed integer
|
||||
/// (sfInt16). The total number of samples in this array
|
||||
/// (int16_t). The total number of samples in this array
|
||||
/// is given by the sfSoundBuffer_getSampleCount function.
|
||||
///
|
||||
/// \param soundBuffer Sound buffer object
|
||||
@@ -139,7 +139,7 @@ CSFML_AUDIO_API sfBool sfSoundBuffer_saveToFile(const sfSoundBuffer* soundBuffer
|
||||
/// \return Read-only pointer to the array of sound samples
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API const sfInt16* sfSoundBuffer_getSamples(const sfSoundBuffer* soundBuffer);
|
||||
CSFML_AUDIO_API const int16_t* sfSoundBuffer_getSamples(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the number of samples stored in a sound buffer
|
||||
@@ -152,7 +152,7 @@ CSFML_AUDIO_API const sfInt16* sfSoundBuffer_getSamples(const sfSoundBuffer* sou
|
||||
/// \return Number of samples
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfUint64 sfSoundBuffer_getSampleCount(const sfSoundBuffer* soundBuffer);
|
||||
CSFML_AUDIO_API uint64_t sfSoundBuffer_getSampleCount(const sfSoundBuffer* soundBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the sample rate of a sound buffer
|
||||
|
||||
@@ -61,10 +61,10 @@ CSFML_AUDIO_API void sfSoundBufferRecorder_destroy(sfSoundBufferRecorder* soundB
|
||||
/// \param soundBufferRecorder Sound buffer recorder object
|
||||
/// \param sampleRate Desired capture rate, in number of samples per second
|
||||
///
|
||||
/// \return sfTrue, if it was able to start recording
|
||||
/// \return true, if it was able to start recording
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfBool sfSoundBufferRecorder_start(sfSoundBufferRecorder* soundBufferRecorder, unsigned int sampleRate);
|
||||
CSFML_AUDIO_API bool sfSoundBufferRecorder_start(sfSoundBufferRecorder* soundBufferRecorder, unsigned int sampleRate);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Stop the capture of a sound recorder
|
||||
@@ -114,10 +114,10 @@ CSFML_AUDIO_API const sfSoundBuffer* sfSoundBufferRecorder_getBuffer(const sfSou
|
||||
/// \param soundBufferRecorder Sound buffer recorder object
|
||||
/// \param name The name of the audio capture device
|
||||
///
|
||||
/// \return sfTrue, if it was able to set the requested device
|
||||
/// \return true, if it was able to set the requested device
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfBool sfSoundBufferRecorder_setDevice(sfSoundBufferRecorder* soundBufferRecorder, const char* name);
|
||||
CSFML_AUDIO_API bool sfSoundBufferRecorder_setDevice(sfSoundBufferRecorder* soundBufferRecorder, const char* name);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the name of the current audio capture device
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
typedef sfBool (*sfSoundRecorderStartCallback)(void*); ///< Type of the callback used when starting a capture
|
||||
typedef sfBool (*sfSoundRecorderProcessCallback)(const sfInt16*, size_t, void*); ///< Type of the callback used to process audio data
|
||||
typedef void (*sfSoundRecorderStopCallback)(void*); ///< Type of the callback used when stopping a capture
|
||||
typedef bool (*sfSoundRecorderStartCallback)(void*); ///< Type of the callback used when starting a capture
|
||||
typedef bool (*sfSoundRecorderProcessCallback)(const int16_t*, size_t, void*); ///< Type of the callback used to process audio data
|
||||
typedef void (*sfSoundRecorderStopCallback)(void*); ///< Type of the callback used when stopping a capture
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -79,7 +79,7 @@ CSFML_AUDIO_API void sfSoundRecorder_destroy(sfSoundRecorder* soundRecorder);
|
||||
/// \return True, if start of capture was successful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfBool sfSoundRecorder_start(sfSoundRecorder* soundRecorder, unsigned int sampleRate);
|
||||
CSFML_AUDIO_API bool sfSoundRecorder_start(sfSoundRecorder* soundRecorder, unsigned int sampleRate);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Stop the capture of a sound recorder
|
||||
@@ -110,10 +110,10 @@ CSFML_AUDIO_API unsigned int sfSoundRecorder_getSampleRate(const sfSoundRecorder
|
||||
/// the audio capture features. If it returns false, then
|
||||
/// any attempt to use sfSoundRecorder will fail.
|
||||
///
|
||||
/// \return sfTrue if audio capture is supported, sfFalse otherwise
|
||||
/// \return true if audio capture is supported, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfBool sfSoundRecorder_isAvailable(void);
|
||||
CSFML_AUDIO_API bool sfSoundRecorder_isAvailable(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the processing interval
|
||||
@@ -170,10 +170,10 @@ CSFML_AUDIO_API const char* sfSoundRecorder_getDefaultDevice(void);
|
||||
/// \param soundRecorder Sound recorder object
|
||||
/// \param name The name of the audio capture device
|
||||
///
|
||||
/// \return sfTrue, if it was able to set the requested device
|
||||
/// \return true, if it was able to set the requested device
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfBool sfSoundRecorder_setDevice(sfSoundRecorder* soundRecorder, const char* name);
|
||||
CSFML_AUDIO_API bool sfSoundRecorder_setDevice(sfSoundRecorder* soundRecorder, const char* name);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the name of the current audio capture device
|
||||
|
||||
@@ -41,12 +41,12 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
sfInt16* samples; ///< Pointer to the audio samples
|
||||
int16_t* samples; ///< Pointer to the audio samples
|
||||
unsigned int sampleCount; ///< Number of samples pointed by Samples
|
||||
} sfSoundStreamChunk;
|
||||
|
||||
typedef sfBool (*sfSoundStreamGetDataCallback)(sfSoundStreamChunk*, void*); ///< Type of the callback used to get a sound stream data
|
||||
typedef void (*sfSoundStreamSeekCallback)(sfTime, void*); ///< Type of the callback used to seek in a sound stream
|
||||
typedef bool (*sfSoundStreamGetDataCallback)(sfSoundStreamChunk*, void*); ///< Type of the callback used to get a sound stream data
|
||||
typedef void (*sfSoundStreamSeekCallback)(sfTime, void*); ///< Type of the callback used to seek in a sound stream
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -197,10 +197,10 @@ CSFML_AUDIO_API void sfSoundStream_setPosition(sfSoundStream* soundStream, sfVec
|
||||
/// The default value is false (position is absolute).
|
||||
///
|
||||
/// \param soundStream Sound stream object
|
||||
/// \param relative sfTrue to set the position relative, sfFalse to set it absolute
|
||||
/// \param relative true to set the position relative, false to set it absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSoundStream_setRelativeToListener(sfSoundStream* soundStream, sfBool relative);
|
||||
CSFML_AUDIO_API void sfSoundStream_setRelativeToListener(sfSoundStream* soundStream, bool relative);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the minimum distance of a sound stream
|
||||
@@ -253,14 +253,14 @@ CSFML_AUDIO_API void sfSoundStream_setPlayingOffset(sfSoundStream* soundStream,
|
||||
///
|
||||
/// If set, the stream will restart from beginning after
|
||||
/// reaching the end and so on, until it is stopped or
|
||||
/// sfSoundStream_setLoop(stream, sfFalse) is called.
|
||||
/// sfSoundStream_setLoop(stream, false) is called.
|
||||
/// The default looping state for sound streams is false.
|
||||
///
|
||||
/// \param soundStream Sound stream object
|
||||
/// \param loop sfTrue to play in loop, sfFalse to play once
|
||||
/// \param loop true to play in loop, false to play once
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API void sfSoundStream_setLoop(sfSoundStream* soundStream, sfBool loop);
|
||||
CSFML_AUDIO_API void sfSoundStream_setLoop(sfSoundStream* soundStream, bool loop);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the pitch of a sound stream
|
||||
@@ -298,10 +298,10 @@ CSFML_AUDIO_API sfVector3f sfSoundStream_getPosition(const sfSoundStream* soundS
|
||||
///
|
||||
/// \param soundStream Sound stream object
|
||||
///
|
||||
/// \return sfTrue if the position is relative, sfFalse if it's absolute
|
||||
/// \return true if the position is relative, false if it's absolute
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfBool sfSoundStream_isRelativeToListener(const sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API bool sfSoundStream_isRelativeToListener(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the minimum distance of a sound stream
|
||||
@@ -328,10 +328,10 @@ CSFML_AUDIO_API float sfSoundStream_getAttenuation(const sfSoundStream* soundStr
|
||||
///
|
||||
/// \param soundStream Sound stream object
|
||||
///
|
||||
/// \return sfTrue if the music is looping, sfFalse otherwise
|
||||
/// \return true if the music is looping, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_AUDIO_API sfBool sfSoundStream_getLoop(const sfSoundStream* soundStream);
|
||||
CSFML_AUDIO_API bool sfSoundStream_getLoop(const sfSoundStream* soundStream);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current playing position of a sound stream
|
||||
|
||||
+7
-38
@@ -25,6 +25,13 @@
|
||||
#ifndef SFML_CONFIG_H
|
||||
#define SFML_CONFIG_H
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Headers
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stdbool.h>
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Define the CSFML version
|
||||
@@ -135,42 +142,4 @@
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Define a portable boolean type
|
||||
////////////////////////////////////////////////////////////
|
||||
typedef int sfBool;
|
||||
#define sfFalse 0
|
||||
#define sfTrue 1
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
// Define portable fixed-size types
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
// All "common" platforms use the same size for char, short and int
|
||||
// (basically there are 3 types for 3 sizes, so no other match is possible),
|
||||
// we can use them without doing any kind of check
|
||||
|
||||
// 8 bits integer types
|
||||
typedef signed char sfInt8;
|
||||
typedef unsigned char sfUint8;
|
||||
|
||||
// 16 bits integer types
|
||||
typedef signed short sfInt16;
|
||||
typedef unsigned short sfUint16;
|
||||
|
||||
// 32 bits integer types
|
||||
typedef signed int sfInt32;
|
||||
typedef unsigned int sfUint32;
|
||||
|
||||
// 64 bits integer types
|
||||
#if defined(_MSC_VER)
|
||||
typedef signed __int64 sfInt64;
|
||||
typedef unsigned __int64 sfUint64;
|
||||
#else
|
||||
typedef signed long long sfInt64;
|
||||
typedef unsigned long long sfUint64;
|
||||
#endif
|
||||
|
||||
|
||||
#endif // SFML_CONFIG_H
|
||||
@@ -235,7 +235,7 @@ CSFML_GRAPHICS_API sfTransform sfCircleShape_getInverseTransform(const sfCircleS
|
||||
/// \param resetRect Should the texture rect be reset to the size of the new texture?
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setTexture(sfCircleShape* shape, const sfTexture* texture, sfBool resetRect);
|
||||
CSFML_GRAPHICS_API void sfCircleShape_setTexture(sfCircleShape* shape, const sfTexture* texture, bool resetRect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the sub-rectangle of the texture that a circle shape will display
|
||||
|
||||
@@ -37,10 +37,10 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
sfUint8 r;
|
||||
sfUint8 g;
|
||||
sfUint8 b;
|
||||
sfUint8 a;
|
||||
uint8_t r;
|
||||
uint8_t g;
|
||||
uint8_t b;
|
||||
uint8_t a;
|
||||
} sfColor;
|
||||
|
||||
|
||||
@@ -65,7 +65,7 @@ CSFML_GRAPHICS_API sfColor sfTransparent; ///< Transparent (black) predefined co
|
||||
/// \return sfColor constructed from the components
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfColor_fromRGB(sfUint8 red, sfUint8 green, sfUint8 blue);
|
||||
CSFML_GRAPHICS_API sfColor sfColor_fromRGB(uint8_t red, uint8_t green, uint8_t blue);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a color from its 4 RGBA components
|
||||
@@ -78,7 +78,7 @@ CSFML_GRAPHICS_API sfColor sfColor_fromRGB(sfUint8 red, sfUint8 green, sfUint8 b
|
||||
/// \return sfColor constructed from the components
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfColor_fromRGBA(sfUint8 red, sfUint8 green, sfUint8 blue, sfUint8 alpha);
|
||||
CSFML_GRAPHICS_API sfColor sfColor_fromRGBA(uint8_t red, uint8_t green, uint8_t blue, uint8_t alpha);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct the color from 32-bit unsigned integer
|
||||
@@ -88,7 +88,7 @@ CSFML_GRAPHICS_API sfColor sfColor_fromRGBA(sfUint8 red, sfUint8 green, sfUint8
|
||||
/// \return sfColor constructed from the 32-bit unsigned integer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfColor sfColor_fromInteger(sfUint32 color);
|
||||
CSFML_GRAPHICS_API sfColor sfColor_fromInteger(uint32_t color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Convert a color to a 32-bit unsigned integer
|
||||
@@ -96,7 +96,7 @@ CSFML_GRAPHICS_API sfColor sfColor_fromInteger(sfUint32 color);
|
||||
/// \return Color represented as a 32-bit unsigned integer
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfUint32 sfColor_toInteger(sfColor color);
|
||||
CSFML_GRAPHICS_API uint32_t sfColor_toInteger(sfColor color);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Add two colors
|
||||
|
||||
@@ -235,7 +235,7 @@ CSFML_GRAPHICS_API sfTransform sfConvexShape_getInverseTransform(const sfConvexS
|
||||
/// \param resetRect Should the texture rect be reset to the size of the new texture?
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setTexture(sfConvexShape* shape, const sfTexture* texture, sfBool resetRect);
|
||||
CSFML_GRAPHICS_API void sfConvexShape_setTexture(sfConvexShape* shape, const sfTexture* texture, bool resetRect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the sub-rectangle of the texture that a convex shape will display
|
||||
|
||||
@@ -97,7 +97,7 @@ CSFML_GRAPHICS_API void sfFont_destroy(sfFont* font);
|
||||
/// \return The corresponding glyph
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfGlyph sfFont_getGlyph(const sfFont* font, sfUint32 codePoint, unsigned int characterSize, sfBool bold, float outlineThickness);
|
||||
CSFML_GRAPHICS_API sfGlyph sfFont_getGlyph(const sfFont* font, uint32_t codePoint, unsigned int characterSize, bool bold, float outlineThickness);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the kerning value corresponding to a given pair of characters in a font
|
||||
@@ -110,7 +110,7 @@ CSFML_GRAPHICS_API sfGlyph sfFont_getGlyph(const sfFont* font, sfUint32 codePoin
|
||||
/// \return Kerning offset, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfFont_getKerning(const sfFont* font, sfUint32 first, sfUint32 second, unsigned int characterSize);
|
||||
CSFML_GRAPHICS_API float sfFont_getKerning(const sfFont* font, uint32_t first, uint32_t second, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the bold kerning value corresponding to a given pair of characters in a font
|
||||
@@ -123,7 +123,7 @@ CSFML_GRAPHICS_API float sfFont_getKerning(const sfFont* font, sfUint32 first, s
|
||||
/// \return Kerning offset, in pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API float sfFont_getBoldKerning(const sfFont* font, sfUint32 first, sfUint32 second, unsigned int characterSize);
|
||||
CSFML_GRAPHICS_API float sfFont_getBoldKerning(const sfFont* font, uint32_t first, uint32_t second, unsigned int characterSize);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the line spacing value
|
||||
@@ -184,24 +184,24 @@ CSFML_GRAPHICS_API const sfTexture* sfFont_getTexture(sfFont* font, unsigned int
|
||||
/// The smooth filter is enabled by default.
|
||||
///
|
||||
/// \param font Source font
|
||||
/// \param smooth sfTrue to enable smoothing, sfFalse to disable it
|
||||
/// \param smooth true to enable smoothing, false to disable it
|
||||
///
|
||||
/// \see isSmooth
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfFont_setSmooth(sfFont* font, sfBool smooth);
|
||||
CSFML_GRAPHICS_API void sfFont_setSmooth(sfFont* font, bool smooth);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether the smooth filter is enabled or disabled
|
||||
///
|
||||
/// \param font Source font
|
||||
///
|
||||
/// \return sfTrue if smoothing is enabled, sfFalse if it is disabled
|
||||
/// \return true if smoothing is enabled, false if it is disabled
|
||||
///
|
||||
/// \see setSmooth
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfFont_isSmooth(const sfFont* font);
|
||||
CSFML_GRAPHICS_API bool sfFont_isSmooth(const sfFont* font);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the font information
|
||||
|
||||
@@ -39,8 +39,8 @@ typedef sfVector2i sfGlslIvec2;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sfBool x;
|
||||
sfBool y;
|
||||
bool x;
|
||||
bool y;
|
||||
} sfGlslBvec2;
|
||||
|
||||
// 3D vectors
|
||||
@@ -55,9 +55,9 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sfBool x;
|
||||
sfBool y;
|
||||
sfBool z;
|
||||
bool x;
|
||||
bool y;
|
||||
bool z;
|
||||
} sfGlslBvec3;
|
||||
|
||||
// 4D vectors
|
||||
@@ -79,10 +79,10 @@ typedef struct
|
||||
|
||||
typedef struct
|
||||
{
|
||||
sfBool x;
|
||||
sfBool y;
|
||||
sfBool z;
|
||||
sfBool w;
|
||||
bool x;
|
||||
bool y;
|
||||
bool z;
|
||||
bool w;
|
||||
} sfGlslBvec4;
|
||||
|
||||
// matrices
|
||||
|
||||
@@ -78,7 +78,7 @@ CSFML_GRAPHICS_API sfImage* sfImage_createFromColor(unsigned int width, unsigned
|
||||
/// \return A new sfImage object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_createFromPixels(unsigned int width, unsigned int height, const sfUint8* pixels);
|
||||
CSFML_GRAPHICS_API sfImage* sfImage_createFromPixels(unsigned int width, unsigned int height, const uint8_t* pixels);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Create an image from a file on disk
|
||||
@@ -155,12 +155,12 @@ CSFML_GRAPHICS_API void sfImage_destroy(sfImage* image);
|
||||
/// \param image Image object
|
||||
/// \param filename Path of the file to save
|
||||
///
|
||||
/// \return sfTrue if saving was successful
|
||||
/// \return true if saving was successful
|
||||
///
|
||||
/// \see sfImage_saveToMemory
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfImage_saveToFile(const sfImage* image, const char* filename);
|
||||
CSFML_GRAPHICS_API bool sfImage_saveToFile(const sfImage* image, const char* filename);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Save the image to a buffer in memory
|
||||
@@ -174,12 +174,12 @@ CSFML_GRAPHICS_API sfBool sfImage_saveToFile(const sfImage* image, const char* f
|
||||
/// \param output Buffer to fill with encoded data
|
||||
/// \param format Encoding format to use
|
||||
///
|
||||
/// \return sfTrue if saving was successful
|
||||
/// \return true if saving was successful
|
||||
///
|
||||
/// \see sfImage_saveToFile
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfImage_saveToMemory(const sfImage* image, sfBuffer* output, const char* format);
|
||||
CSFML_GRAPHICS_API bool sfImage_saveToMemory(const sfImage* image, sfBuffer* output, const char* format);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the size of an image
|
||||
@@ -203,7 +203,7 @@ CSFML_GRAPHICS_API sfVector2u sfImage_getSize(const sfImage* image);
|
||||
/// \param alpha Alpha value to assign to transparent pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfImage_createMaskFromColor(sfImage* image, sfColor color, sfUint8 alpha);
|
||||
CSFML_GRAPHICS_API void sfImage_createMaskFromColor(sfImage* image, sfColor color, uint8_t alpha);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy pixels from an image onto another
|
||||
@@ -226,7 +226,7 @@ CSFML_GRAPHICS_API void sfImage_createMaskFromColor(sfImage* image, sfColor colo
|
||||
/// \param applyAlpha Should the copy take in account the source transparency?
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfImage_copyImage(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect, sfBool applyAlpha);
|
||||
CSFML_GRAPHICS_API void sfImage_copyImage(sfImage* image, const sfImage* source, unsigned int destX, unsigned int destY, sfIntRect sourceRect, bool applyAlpha);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the color of a pixel in an image
|
||||
@@ -274,7 +274,7 @@ CSFML_GRAPHICS_API sfColor sfImage_getPixel(const sfImage* image, unsigned int x
|
||||
/// \return Read-only pointer to the array of pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfUint8* sfImage_getPixelsPtr(const sfImage* image);
|
||||
CSFML_GRAPHICS_API const uint8_t* sfImage_getPixelsPtr(const sfImage* image);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Flip an image horizontally (left <-> right)
|
||||
|
||||
@@ -60,11 +60,11 @@ typedef struct
|
||||
/// \param x X coordinate of the point to test
|
||||
/// \param y Y coordinate of the point to test
|
||||
///
|
||||
/// \return sfTrue if the point is inside
|
||||
/// \return true if the point is inside
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfFloatRect_contains(const sfFloatRect* rect, float x, float y);
|
||||
CSFML_GRAPHICS_API sfBool sfIntRect_contains(const sfIntRect* rect, int x, int y);
|
||||
CSFML_GRAPHICS_API bool sfFloatRect_contains(const sfFloatRect* rect, float x, float y);
|
||||
CSFML_GRAPHICS_API bool sfIntRect_contains(const sfIntRect* rect, int x, int y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check intersection between two rectangles
|
||||
@@ -73,11 +73,11 @@ CSFML_GRAPHICS_API sfBool sfIntRect_contains(const sfIntRect* rect, int x, int y
|
||||
/// \param rect2 Second rectangle to test
|
||||
/// \param intersection Rectangle to be filled with overlapping rect (can be NULL)
|
||||
///
|
||||
/// \return sfTrue if rectangles overlap
|
||||
/// \return true if rectangles overlap
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfFloatRect_intersects(const sfFloatRect* rect1, const sfFloatRect* rect2, sfFloatRect* intersection);
|
||||
CSFML_GRAPHICS_API sfBool sfIntRect_intersects(const sfIntRect* rect1, const sfIntRect* rect2, sfIntRect* intersection);
|
||||
CSFML_GRAPHICS_API bool sfFloatRect_intersects(const sfFloatRect* rect1, const sfFloatRect* rect2, sfFloatRect* intersection);
|
||||
CSFML_GRAPHICS_API bool sfIntRect_intersects(const sfIntRect* rect1, const sfIntRect* rect2, sfIntRect* intersection);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of the rectangle's top-left corner
|
||||
|
||||
@@ -235,7 +235,7 @@ CSFML_GRAPHICS_API sfTransform sfRectangleShape_getInverseTransform(const sfRect
|
||||
/// \param resetRect Should the texture rect be reset to the size of the new texture?
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRectangleShape_setTexture(sfRectangleShape* shape, const sfTexture* texture, sfBool resetRect);
|
||||
CSFML_GRAPHICS_API void sfRectangleShape_setTexture(sfRectangleShape* shape, const sfTexture* texture, bool resetRect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the sub-rectangle of the texture that a rectangle shape will display
|
||||
|
||||
@@ -53,7 +53,7 @@
|
||||
/// Use sfRenderTexture_createWithSettings instead.
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_create(unsigned int width, unsigned int height, sfBool depthBuffer);
|
||||
CSFML_GRAPHICS_API sfRenderTexture* sfRenderTexture_create(unsigned int width, unsigned int height, bool depthBuffer);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a new render texture
|
||||
@@ -90,21 +90,21 @@ CSFML_GRAPHICS_API sfVector2u sfRenderTexture_getSize(const sfRenderTexture* ren
|
||||
///
|
||||
/// \param renderTexture Render texture object
|
||||
///
|
||||
/// \return sfTrue if the render texture use sRGB encoding, sfFalse otherwise
|
||||
/// \return true if the render texture use sRGB encoding, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderTexture_isSrgb(const sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API bool sfRenderTexture_isSrgb(const sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Activate or deactivate a render texture as the current target for rendering
|
||||
///
|
||||
/// \param renderTexture Render texture object
|
||||
/// \param active sfTrue to activate, sfFalse to deactivate
|
||||
/// \param active true to activate, false to deactivate
|
||||
///
|
||||
/// \return True if operation was successful, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderTexture_setActive(sfRenderTexture* renderTexture, sfBool active);
|
||||
CSFML_GRAPHICS_API bool sfRenderTexture_setActive(sfRenderTexture* renderTexture, bool active);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Update the contents of the target texture
|
||||
@@ -332,39 +332,39 @@ CSFML_GRAPHICS_API unsigned int sfRenderTexture_getMaximumAntialiasingLevel(void
|
||||
/// \brief Enable or disable the smooth filter on a render texture
|
||||
///
|
||||
/// \param renderTexture Render texture object
|
||||
/// \param smooth sfTrue to enable smoothing, sfFalse to disable it
|
||||
/// \param smooth true to enable smoothing, false to disable it
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_setSmooth(sfRenderTexture* renderTexture, sfBool smooth);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_setSmooth(sfRenderTexture* renderTexture, bool smooth);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether the smooth filter is enabled or not for a render texture
|
||||
///
|
||||
/// \param renderTexture Render texture object
|
||||
///
|
||||
/// \return sfTrue if smoothing is enabled, sfFalse if it is disabled
|
||||
/// \return true if smoothing is enabled, false if it is disabled
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderTexture_isSmooth(const sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API bool sfRenderTexture_isSmooth(const sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Enable or disable texture repeating
|
||||
///
|
||||
/// \param renderTexture Render texture object
|
||||
/// \param repeated sfTrue to enable repeating, sfFalse to disable it
|
||||
/// \param repeated true to enable repeating, false to disable it
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_setRepeated(sfRenderTexture* renderTexture, sfBool repeated);
|
||||
CSFML_GRAPHICS_API void sfRenderTexture_setRepeated(sfRenderTexture* renderTexture, bool repeated);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether the texture is repeated or not
|
||||
///
|
||||
/// \param renderTexture Render texture object
|
||||
///
|
||||
/// \return sfTrue if repeat mode is enabled, sfFalse if it is disabled
|
||||
/// \return true if repeat mode is enabled, false if it is disabled
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderTexture_isRepeated(const sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API bool sfRenderTexture_isRepeated(const sfRenderTexture* renderTexture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Generate a mipmap using the current texture data
|
||||
@@ -377,10 +377,10 @@ CSFML_GRAPHICS_API sfBool sfRenderTexture_isRepeated(const sfRenderTexture* rend
|
||||
/// after subsequent drawing will lead to undefined behavior if a mipmap
|
||||
/// had been previously generated.
|
||||
///
|
||||
/// \return sfTrue if mipmap generation was successful, sfFalse if unsuccessful
|
||||
/// \return true if mipmap generation was successful, false if unsuccessful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderTexture_generateMipmap(sfRenderTexture* renderTexture);
|
||||
CSFML_GRAPHICS_API bool sfRenderTexture_generateMipmap(sfRenderTexture* renderTexture);
|
||||
|
||||
|
||||
#endif // SFML_RENDERTEXTURE_H
|
||||
@@ -52,7 +52,7 @@
|
||||
/// \param settings Creation settings (pass NULL to use default values)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_create(sfVideoMode mode, const char* title, sfUint32 style, const sfContextSettings* settings);
|
||||
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_create(sfVideoMode mode, const char* title, uint32_t style, const sfContextSettings* settings);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a new render window (with a UTF-32 title)
|
||||
@@ -63,7 +63,7 @@ CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_create(sfVideoMode mode, const
|
||||
/// \param settings Creation settings (pass NULL to use default values)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_createUnicode(sfVideoMode mode, const sfUint32* title, sfUint32 style, const sfContextSettings* settings);
|
||||
CSFML_GRAPHICS_API sfRenderWindow* sfRenderWindow_createUnicode(sfVideoMode mode, const uint32_t* title, uint32_t style, const sfContextSettings* settings);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a render window from an existing control
|
||||
@@ -96,7 +96,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_close(sfRenderWindow* renderWindow);
|
||||
/// \param renderWindow Render window object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_isOpen(const sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API bool sfRenderWindow_isOpen(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the creation settings of a render window
|
||||
@@ -114,10 +114,10 @@ CSFML_GRAPHICS_API sfContextSettings sfRenderWindow_getSettings(const sfRenderWi
|
||||
/// \param renderWindow Render window object
|
||||
/// \param event Event to fill, if any
|
||||
///
|
||||
/// \return sfTrue if an event was returned, sfFalse if event queue was empty
|
||||
/// \return true if an event was returned, false if event queue was empty
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_pollEvent(sfRenderWindow* renderWindow, sfEvent* event);
|
||||
CSFML_GRAPHICS_API bool sfRenderWindow_pollEvent(sfRenderWindow* renderWindow, sfEvent* event);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Wait for an event and return it
|
||||
@@ -125,10 +125,10 @@ CSFML_GRAPHICS_API sfBool sfRenderWindow_pollEvent(sfRenderWindow* renderWindow,
|
||||
/// \param renderWindow Render window object
|
||||
/// \param event Event to fill
|
||||
///
|
||||
/// \return sfFalse if an error occured
|
||||
/// \return false if an error occured
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_waitEvent(sfRenderWindow* renderWindow, sfEvent* event);
|
||||
CSFML_GRAPHICS_API bool sfRenderWindow_waitEvent(sfRenderWindow* renderWindow, sfEvent* event);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a render window
|
||||
@@ -166,10 +166,10 @@ CSFML_GRAPHICS_API sfVector2u sfRenderWindow_getSize(const sfRenderWindow* rende
|
||||
///
|
||||
/// \param renderWindow Render window object
|
||||
///
|
||||
/// \return sfTrue if the render window use sRGB encoding, sfFalse otherwise
|
||||
/// \return true if the render window use sRGB encoding, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_isSrgb(const sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API bool sfRenderWindow_isSrgb(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the size of the rendering region of a render window
|
||||
@@ -196,7 +196,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_setTitle(sfRenderWindow* renderWindow, co
|
||||
/// \param title New title
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setUnicodeTitle(sfRenderWindow* renderWindow, const sfUint32* title);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setUnicodeTitle(sfRenderWindow* renderWindow, const uint32_t* title);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a render window's icon
|
||||
@@ -207,34 +207,34 @@ CSFML_GRAPHICS_API void sfRenderWindow_setUnicodeTitle(sfRenderWindow* renderWin
|
||||
/// \param pixels Pointer to the pixels in memory, format must be RGBA 32 bits
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setIcon(sfRenderWindow* renderWindow, unsigned int width, unsigned int height, const sfUint8* pixels);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setIcon(sfRenderWindow* renderWindow, unsigned int width, unsigned int height, const uint8_t* pixels);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Show or hide a render window
|
||||
///
|
||||
/// \param renderWindow Render window object
|
||||
/// \param visible sfTrue to show the window, sfFalse to hide it
|
||||
/// \param visible true to show the window, false to hide it
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setVisible(sfRenderWindow* renderWindow, sfBool visible);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setVisible(sfRenderWindow* renderWindow, bool visible);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Enable / disable vertical synchronization on a render window
|
||||
///
|
||||
/// \param renderWindow Render window object
|
||||
/// \param enabled sfTrue to enable v-sync, sfFalse to deactivate
|
||||
/// \param enabled true to enable v-sync, false to deactivate
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setVerticalSyncEnabled(sfRenderWindow* renderWindow, sfBool enabled);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setVerticalSyncEnabled(sfRenderWindow* renderWindow, bool enabled);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Show or hide the mouse cursor on a render window
|
||||
///
|
||||
/// \param renderWindow Render window object
|
||||
/// \param show sfTrue to show, sfFalse to hide
|
||||
/// \param show true to show, false to hide
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setMouseCursorVisible(sfRenderWindow* renderWindow, sfBool show);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setMouseCursorVisible(sfRenderWindow* renderWindow, bool show);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Grab or release the mouse cursor
|
||||
@@ -246,10 +246,10 @@ CSFML_GRAPHICS_API void sfRenderWindow_setMouseCursorVisible(sfRenderWindow* ren
|
||||
/// won't have any effect (fullscreen windows always grab the
|
||||
/// cursor).
|
||||
///
|
||||
/// \param grabbed sfTrue to enable, sfFalse to disable
|
||||
/// \param grabbed true to enable, false to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setMouseCursorGrabbed(sfRenderWindow* renderWindow, sfBool grabbed);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setMouseCursorGrabbed(sfRenderWindow* renderWindow, bool grabbed);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the displayed cursor to a native system cursor
|
||||
@@ -276,10 +276,10 @@ CSFML_GRAPHICS_API void sfRenderWindow_setMouseCursor(sfRenderWindow* window, co
|
||||
/// Automatic key-repeat is enabled by default
|
||||
///
|
||||
/// \param renderWindow Render window object
|
||||
/// \param enabled sfTrue to enable, sfFalse to disable
|
||||
/// \param enabled true to enable, false to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setKeyRepeatEnabled(sfRenderWindow* renderWindow, sfBool enabled);
|
||||
CSFML_GRAPHICS_API void sfRenderWindow_setKeyRepeatEnabled(sfRenderWindow* renderWindow, bool enabled);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Limit the framerate to a maximum fixed frequency for a render window
|
||||
@@ -303,12 +303,12 @@ CSFML_GRAPHICS_API void sfRenderWindow_setJoystickThreshold(sfRenderWindow* rend
|
||||
/// \brief Activate or deactivate a render window as the current target for rendering
|
||||
///
|
||||
/// \param renderWindow Render window object
|
||||
/// \param active sfTrue to activate, sfFalse to deactivate
|
||||
/// \param active true to activate, false to deactivate
|
||||
///
|
||||
/// \return True if operation was successful, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_setActive(sfRenderWindow* renderWindow, sfBool active);
|
||||
CSFML_GRAPHICS_API bool sfRenderWindow_setActive(sfRenderWindow* renderWindow, bool active);
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
/// \brief Request the current render window to be made the active
|
||||
@@ -334,7 +334,7 @@ CSFML_GRAPHICS_API void sfRenderWindow_requestFocus(sfRenderWindow* renderWindow
|
||||
/// \return True if window has focus, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfRenderWindow_hasFocus(const sfRenderWindow* renderWindow);
|
||||
CSFML_GRAPHICS_API bool sfRenderWindow_hasFocus(const sfRenderWindow* renderWindow);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Display a render window on screen
|
||||
|
||||
@@ -221,7 +221,7 @@ CSFML_GRAPHICS_API void sfShader_setIntColorUniform(sfShader* shader, const char
|
||||
/// \param x Value of the bool scalar
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShader_setBoolUniform(sfShader* shader, const char* name, sfBool x);
|
||||
CSFML_GRAPHICS_API void sfShader_setBoolUniform(sfShader* shader, const char* name, bool x);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Specify value for \p bvec2 uniform
|
||||
@@ -689,10 +689,10 @@ CSFML_GRAPHICS_API void sfShader_bind(const sfShader* shader);
|
||||
/// the shader features. If it returns false, then
|
||||
/// any attempt to use sfShader will fail.
|
||||
///
|
||||
/// \return sfTrue if the system can use shaders, sfFalse otherwise
|
||||
/// \return true if the system can use shaders, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfShader_isAvailable(void);
|
||||
CSFML_GRAPHICS_API bool sfShader_isAvailable(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether or not the system supports geometry shaders
|
||||
@@ -711,6 +711,6 @@ CSFML_GRAPHICS_API sfBool sfShader_isAvailable(void);
|
||||
/// \return True if geometry shaders are supported, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfShader_isGeometryAvailable(void);
|
||||
CSFML_GRAPHICS_API bool sfShader_isGeometryAvailable(void);
|
||||
|
||||
#endif // SFML_SHADER_H
|
||||
@@ -234,7 +234,7 @@ CSFML_GRAPHICS_API sfTransform sfShape_getInverseTransform(const sfShape* shape)
|
||||
/// \param resetRect Should the texture rect be reset to the size of the new texture?
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfShape_setTexture(sfShape* shape, const sfTexture* texture, sfBool resetRect);
|
||||
CSFML_GRAPHICS_API void sfShape_setTexture(sfShape* shape, const sfTexture* texture, bool resetRect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the sub-rectangle of the texture that a shape will display
|
||||
|
||||
@@ -234,7 +234,7 @@ CSFML_GRAPHICS_API sfTransform sfSprite_getInverseTransform(const sfSprite* spri
|
||||
/// \param resetRect Should the texture rect be reset to the size of the new texture?
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfSprite_setTexture(sfSprite* sprite, const sfTexture* texture, sfBool resetRect);
|
||||
CSFML_GRAPHICS_API void sfSprite_setTexture(sfSprite* sprite, const sfTexture* texture, bool resetRect);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the sub-rectangle of the texture that a sprite will display
|
||||
|
||||
@@ -247,7 +247,7 @@ CSFML_GRAPHICS_API void sfText_setString(sfText* text, const char* string);
|
||||
/// \param string New string
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_setUnicodeString(sfText* text, const sfUint32* string);
|
||||
CSFML_GRAPHICS_API void sfText_setUnicodeString(sfText* text, const uint32_t* string);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the font of a text
|
||||
@@ -322,7 +322,7 @@ CSFML_GRAPHICS_API void sfText_setLetterSpacing(sfText* text, float spacingFacto
|
||||
/// \param style New style
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfText_setStyle(sfText* text, sfUint32 style);
|
||||
CSFML_GRAPHICS_API void sfText_setStyle(sfText* text, uint32_t style);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the fill color of a text
|
||||
@@ -397,7 +397,7 @@ CSFML_GRAPHICS_API const char* sfText_getString(const sfText* text);
|
||||
/// \return String as UTF-32
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API const sfUint32* sfText_getUnicodeString(const sfText* text);
|
||||
CSFML_GRAPHICS_API const uint32_t* sfText_getUnicodeString(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the font used by a text
|
||||
@@ -455,7 +455,7 @@ CSFML_GRAPHICS_API float sfText_getLineSpacing(const sfText* text);
|
||||
/// \return Current string style (see sfTextStyle enum)
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfUint32 sfText_getStyle(const sfText* text);
|
||||
CSFML_GRAPHICS_API uint32_t sfText_getStyle(const sfText* text);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the fill color of a text
|
||||
|
||||
@@ -208,7 +208,7 @@ CSFML_GRAPHICS_API sfImage* sfTexture_copyToImage(const sfTexture* texture);
|
||||
/// \param y Y offset in the texture where to copy the source pixels
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTexture_updateFromPixels(sfTexture* texture, const sfUint8* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y);
|
||||
CSFML_GRAPHICS_API void sfTexture_updateFromPixels(sfTexture* texture, const uint8_t* pixels, unsigned int width, unsigned int height, unsigned int x, unsigned int y);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Update a part of this texture from another texture
|
||||
@@ -265,20 +265,20 @@ CSFML_GRAPHICS_API void sfTexture_updateFromRenderWindow(sfTexture* texture, con
|
||||
/// \brief Enable or disable the smooth filter on a texture
|
||||
///
|
||||
/// \param texture The texture object
|
||||
/// \param smooth sfTrue to enable smoothing, sfFalse to disable it
|
||||
/// \param smooth true to enable smoothing, false to disable it
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTexture_setSmooth(sfTexture* texture, sfBool smooth);
|
||||
CSFML_GRAPHICS_API void sfTexture_setSmooth(sfTexture* texture, bool smooth);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether the smooth filter is enabled or not for a texture
|
||||
///
|
||||
/// \param texture The texture object
|
||||
///
|
||||
/// \return sfTrue if smoothing is enabled, sfFalse if it is disabled
|
||||
/// \return true if smoothing is enabled, false if it is disabled
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfTexture_isSmooth(const sfTexture* texture);
|
||||
CSFML_GRAPHICS_API bool sfTexture_isSmooth(const sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether the texture source is converted from sRGB or not
|
||||
@@ -291,7 +291,7 @@ CSFML_GRAPHICS_API sfBool sfTexture_isSmooth(const sfTexture* texture);
|
||||
/// \see sfTexture_createSrgbFromImage
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfTexture_isSrgb(const sfTexture* texture);
|
||||
CSFML_GRAPHICS_API bool sfTexture_isSrgb(const sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Enable or disable repeating for a texture
|
||||
@@ -314,17 +314,17 @@ CSFML_GRAPHICS_API sfBool sfTexture_isSrgb(const sfTexture* texture);
|
||||
/// \param repeated True to repeat the texture, false to disable repeating
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API void sfTexture_setRepeated(sfTexture* texture, sfBool repeated);
|
||||
CSFML_GRAPHICS_API void sfTexture_setRepeated(sfTexture* texture, bool repeated);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a texture is repeated or not
|
||||
///
|
||||
/// \param texture The texture object
|
||||
///
|
||||
/// \return sfTrue if repeat mode is enabled, sfFalse if it is disabled
|
||||
/// \return true if repeat mode is enabled, false if it is disabled
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfTexture_isRepeated(const sfTexture* texture);
|
||||
CSFML_GRAPHICS_API bool sfTexture_isRepeated(const sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Generate a mipmap using the current texture data
|
||||
@@ -346,10 +346,10 @@ CSFML_GRAPHICS_API sfBool sfTexture_isRepeated(const sfTexture* texture);
|
||||
/// modified, at which point this function will have to be called again to
|
||||
/// regenerate it.
|
||||
///
|
||||
/// \return sfTrue if mipmap generation was successful, sfFalse if unsuccessful
|
||||
/// \return true if mipmap generation was successful, false if unsuccessful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfTexture_generateMipmap(sfTexture* texture);
|
||||
CSFML_GRAPHICS_API bool sfTexture_generateMipmap(sfTexture* texture);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Swap the contents of a texture with those of another
|
||||
|
||||
@@ -218,6 +218,6 @@ CSFML_GRAPHICS_API void sfTransform_scaleWithCenter(sfTransform* transform, floa
|
||||
/// \return true if the transforms are equal, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfTransform_equal(sfTransform* left, sfTransform* right);
|
||||
CSFML_GRAPHICS_API bool sfTransform_equal(sfTransform* left, sfTransform* right);
|
||||
|
||||
#endif // SFML_TRANSFORM_H
|
||||
@@ -126,10 +126,10 @@ CSFML_GRAPHICS_API unsigned int sfVertexBuffer_getVertexCount(const sfVertexBuff
|
||||
/// \param vertexCount Number of vertices to copy
|
||||
/// \param offset Offset in the buffer to copy to
|
||||
///
|
||||
/// \return sfTrue if the update was successful
|
||||
/// \return true if the update was successful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfVertexBuffer_update(sfVertexBuffer* vertexBuffer, const sfVertex* vertices, unsigned int vertexCount, unsigned int offset);
|
||||
CSFML_GRAPHICS_API bool sfVertexBuffer_update(sfVertexBuffer* vertexBuffer, const sfVertex* vertices, unsigned int vertexCount, unsigned int offset);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Copy the contents of another buffer into this buffer
|
||||
@@ -137,10 +137,10 @@ CSFML_GRAPHICS_API sfBool sfVertexBuffer_update(sfVertexBuffer* vertexBuffer, co
|
||||
/// \param vertexBuffer Vertex buffer object
|
||||
/// \param other Vertex buffer whose contents to copy into first vertex buffer
|
||||
///
|
||||
/// \return sfTrue if the copy was successful
|
||||
/// \return true if the copy was successful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfVertexBuffer_updateFromVertexBuffer(sfVertexBuffer* vertexBuffer, const sfVertexBuffer* other);
|
||||
CSFML_GRAPHICS_API bool sfVertexBuffer_updateFromVertexBuffer(sfVertexBuffer* vertexBuffer, const sfVertexBuffer* other);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Swap the contents of this vertex buffer with those of another
|
||||
@@ -248,7 +248,7 @@ CSFML_GRAPHICS_API void sfVertexBuffer_bind(const sfVertexBuffer* vertexBuffer);
|
||||
/// \return True if vertex buffers are supported, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_GRAPHICS_API sfBool sfVertexBuffer_isAvailable(void);
|
||||
CSFML_GRAPHICS_API bool sfVertexBuffer_isAvailable(void);
|
||||
|
||||
|
||||
#endif // SFML_VERTEXBUFFER_H
|
||||
@@ -129,10 +129,10 @@ CSFML_NETWORK_API void sfFtpListingResponse_destroy(sfFtpListingResponse* ftpLis
|
||||
///
|
||||
/// \param ftpListingResponse Ftp listing response
|
||||
///
|
||||
/// \return sfTrue if the status is a success, sfFalse if it is a failure
|
||||
/// \return true if the status is a success, false if it is a failure
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfBool sfFtpListingResponse_isOk(const sfFtpListingResponse* ftpListingResponse);
|
||||
CSFML_NETWORK_API bool sfFtpListingResponse_isOk(const sfFtpListingResponse* ftpListingResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the status code of a FTP listing response
|
||||
@@ -191,10 +191,10 @@ CSFML_NETWORK_API void sfFtpDirectoryResponse_destroy(sfFtpDirectoryResponse* ft
|
||||
///
|
||||
/// \param ftpDirectoryResponse Ftp directory response
|
||||
///
|
||||
/// \return sfTrue if the status is a success, sfFalse if it is a failure
|
||||
/// \return true if the status is a success, false if it is a failure
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfBool sfFtpDirectoryResponse_isOk(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
CSFML_NETWORK_API bool sfFtpDirectoryResponse_isOk(const sfFtpDirectoryResponse* ftpDirectoryResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the status code of a FTP directory response
|
||||
@@ -243,10 +243,10 @@ CSFML_NETWORK_API void sfFtpResponse_destroy(sfFtpResponse* ftpResponse);
|
||||
///
|
||||
/// \param ftpResponse Ftp response object
|
||||
///
|
||||
/// \return sfTrue if the status is a success, sfFalse if it is a failure
|
||||
/// \return true if the status is a success, false if it is a failure
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfBool sfFtpResponse_isOk(const sfFtpResponse* ftpResponse);
|
||||
CSFML_NETWORK_API bool sfFtpResponse_isOk(const sfFtpResponse* ftpResponse);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the status code of a FTP response
|
||||
@@ -500,12 +500,12 @@ CSFML_NETWORK_API sfFtpResponse* sfFtp_download(sfFtp* ftp, const char* remoteFi
|
||||
/// \param localFile Path of the local file to upload
|
||||
/// \param remotePath Where to put to file on the server
|
||||
/// \param mode Transfer mode
|
||||
/// \param append Pass sfTrue to append to or sfFalse to overwrite the remote file if it already exists
|
||||
/// \param append Pass true to append to or false to overwrite the remote file if it already exists
|
||||
///
|
||||
/// \return Server response to the request
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_upload(sfFtp* ftp, const char* localFile, const char* remotePath, sfFtpTransferMode mode, sfBool append);
|
||||
CSFML_NETWORK_API sfFtpResponse* sfFtp_upload(sfFtp* ftp, const char* localFile, const char* remotePath, sfFtpTransferMode mode, bool append);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Send a command to the FTP server
|
||||
|
||||
@@ -95,7 +95,7 @@ CSFML_NETWORK_API sfIpAddress sfIpAddress_fromString(const char* address);
|
||||
/// \return Resulting address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_fromBytes(sfUint8 byte0, sfUint8 byte1, sfUint8 byte2, sfUint8 byte3);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_fromBytes(uint8_t byte0, uint8_t byte1, uint8_t byte2, uint8_t byte3);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct an address from a 32-bits integer
|
||||
@@ -110,7 +110,7 @@ CSFML_NETWORK_API sfIpAddress sfIpAddress_fromBytes(sfUint8 byte0, sfUint8 byte1
|
||||
/// \return Resulting address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_fromInteger(sfUint32 address);
|
||||
CSFML_NETWORK_API sfIpAddress sfIpAddress_fromInteger(uint32_t address);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get a string representation of an address
|
||||
@@ -139,7 +139,7 @@ CSFML_NETWORK_API void sfIpAddress_toString(sfIpAddress address, char* string);
|
||||
/// \return 32-bits unsigned integer representation of the address
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfUint32 sfIpAddress_toInteger(sfIpAddress address);
|
||||
CSFML_NETWORK_API uint32_t sfIpAddress_toInteger(sfIpAddress address);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the computer's local address
|
||||
|
||||
@@ -128,10 +128,10 @@ CSFML_NETWORK_API size_t sfPacket_getDataSize(const sfPacket* packet);
|
||||
///
|
||||
/// \param packet Packet object
|
||||
///
|
||||
/// \return sfTrue if all data was read, sfFalse otherwise
|
||||
/// \return true if all data was read, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfBool sfPacket_endOfPacket(const sfPacket* packet);
|
||||
CSFML_NETWORK_API bool sfPacket_endOfPacket(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Test the validity of a packet, for reading
|
||||
@@ -144,10 +144,10 @@ CSFML_NETWORK_API sfBool sfPacket_endOfPacket(const sfPacket* packet);
|
||||
///
|
||||
/// \param packet Packet object
|
||||
///
|
||||
/// \return sfTrue if last data extraction from packet was successful
|
||||
/// \return true if last data extraction from packet was successful
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfBool sfPacket_canRead(const sfPacket* packet);
|
||||
CSFML_NETWORK_API bool sfPacket_canRead(const sfPacket* packet);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Functions to extract data from a packet
|
||||
@@ -155,13 +155,13 @@ CSFML_NETWORK_API sfBool sfPacket_canRead(const sfPacket* packet);
|
||||
/// \param packet Packet object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfBool sfPacket_readBool(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfInt8 sfPacket_readInt8(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfUint8 sfPacket_readUint8(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfInt16 sfPacket_readInt16(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfUint16 sfPacket_readUint16(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfInt32 sfPacket_readInt32(sfPacket* packet);
|
||||
CSFML_NETWORK_API sfUint32 sfPacket_readUint32(sfPacket* packet);
|
||||
CSFML_NETWORK_API bool sfPacket_readBool(sfPacket* packet);
|
||||
CSFML_NETWORK_API int8_t sfPacket_readInt8(sfPacket* packet);
|
||||
CSFML_NETWORK_API uint8_t sfPacket_readUint8(sfPacket* packet);
|
||||
CSFML_NETWORK_API int16_t sfPacket_readInt16(sfPacket* packet);
|
||||
CSFML_NETWORK_API uint16_t sfPacket_readUint16(sfPacket* packet);
|
||||
CSFML_NETWORK_API int32_t sfPacket_readInt32(sfPacket* packet);
|
||||
CSFML_NETWORK_API uint32_t sfPacket_readUint32(sfPacket* packet);
|
||||
CSFML_NETWORK_API float sfPacket_readFloat(sfPacket* packet);
|
||||
CSFML_NETWORK_API double sfPacket_readDouble(sfPacket* packet);
|
||||
CSFML_NETWORK_API void sfPacket_readString(sfPacket* packet, char* string);
|
||||
@@ -173,13 +173,13 @@ CSFML_NETWORK_API void sfPacket_readWideString(sfPacket* packet, wchar_t* st
|
||||
/// \param packet Packet object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfPacket_writeBool(sfPacket* packet, sfBool);
|
||||
CSFML_NETWORK_API void sfPacket_writeInt8(sfPacket* packet, sfInt8);
|
||||
CSFML_NETWORK_API void sfPacket_writeUint8(sfPacket* packet, sfUint8);
|
||||
CSFML_NETWORK_API void sfPacket_writeInt16(sfPacket* packet, sfInt16);
|
||||
CSFML_NETWORK_API void sfPacket_writeUint16(sfPacket* packet, sfUint16);
|
||||
CSFML_NETWORK_API void sfPacket_writeInt32(sfPacket* packet, sfInt32);
|
||||
CSFML_NETWORK_API void sfPacket_writeUint32(sfPacket* packet, sfUint32);
|
||||
CSFML_NETWORK_API void sfPacket_writeBool(sfPacket* packet, bool);
|
||||
CSFML_NETWORK_API void sfPacket_writeInt8(sfPacket* packet, int8_t);
|
||||
CSFML_NETWORK_API void sfPacket_writeUint8(sfPacket* packet, uint8_t);
|
||||
CSFML_NETWORK_API void sfPacket_writeInt16(sfPacket* packet, int16_t);
|
||||
CSFML_NETWORK_API void sfPacket_writeUint16(sfPacket* packet, uint16_t);
|
||||
CSFML_NETWORK_API void sfPacket_writeInt32(sfPacket* packet, int32_t);
|
||||
CSFML_NETWORK_API void sfPacket_writeUint32(sfPacket* packet, uint32_t);
|
||||
CSFML_NETWORK_API void sfPacket_writeFloat(sfPacket* packet, float);
|
||||
CSFML_NETWORK_API void sfPacket_writeDouble(sfPacket* packet, double);
|
||||
CSFML_NETWORK_API void sfPacket_writeString(sfPacket* packet, const char* string);
|
||||
|
||||
@@ -107,15 +107,15 @@ CSFML_NETWORK_API void sfSocketSelector_clear(sfSocketSelector* selector);
|
||||
/// some data available to be received. To know which sockets are
|
||||
/// ready, use the sfSocketSelector_isXxxReady functions.
|
||||
/// If you use a timeout and no socket is ready before the timeout
|
||||
/// is over, the function returns sfFalse.
|
||||
/// is over, the function returns false.
|
||||
///
|
||||
/// \param selector Socket selector object
|
||||
/// \param timeout Maximum time to wait (use sfTimeZero for infinity)
|
||||
///
|
||||
/// \return sfTrue if there are sockets ready, sfFalse otherwise
|
||||
/// \return true if there are sockets ready, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfBool sfSocketSelector_wait(sfSocketSelector* selector, sfTime timeout);
|
||||
CSFML_NETWORK_API bool sfSocketSelector_wait(sfSocketSelector* selector, sfTime timeout);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Test a socket to know if it is ready to receive data
|
||||
@@ -124,18 +124,18 @@ CSFML_NETWORK_API sfBool sfSocketSelector_wait(sfSocketSelector* selector, sfTim
|
||||
/// sfSocketSelector_wait, to know which sockets are ready to
|
||||
/// receive data. If a socket is ready, a call to Receive will
|
||||
/// never block because we know that there is data available to read.
|
||||
/// Note that if this function returns sfTrue for a sfTcpListener,
|
||||
/// Note that if this function returns true for a sfTcpListener,
|
||||
/// this means that it is ready to accept a new connection.
|
||||
///
|
||||
/// \param selector Socket selector object
|
||||
/// \param socket Socket to test
|
||||
///
|
||||
/// \return sfTrue if the socket is ready to read, sfFalse otherwise
|
||||
/// \return true if the socket is ready to read, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfBool sfSocketSelector_isTcpListenerReady(const sfSocketSelector* selector, sfTcpListener* socket);
|
||||
CSFML_NETWORK_API sfBool sfSocketSelector_isTcpSocketReady(const sfSocketSelector* selector, sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API sfBool sfSocketSelector_isUdpSocketReady(const sfSocketSelector* selector, sfUdpSocket* socket);
|
||||
CSFML_NETWORK_API bool sfSocketSelector_isTcpListenerReady(const sfSocketSelector* selector, sfTcpListener* socket);
|
||||
CSFML_NETWORK_API bool sfSocketSelector_isTcpSocketReady(const sfSocketSelector* selector, sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API bool sfSocketSelector_isUdpSocketReady(const sfSocketSelector* selector, sfUdpSocket* socket);
|
||||
|
||||
|
||||
#endif // SFML_SOCKETSELECTOR_H
|
||||
@@ -63,20 +63,20 @@ CSFML_NETWORK_API void sfTcpListener_destroy(sfTcpListener* listener);
|
||||
/// By default, all sockets are blocking.
|
||||
///
|
||||
/// \param listener TCP listener object
|
||||
/// \param blocking sfTrue to set the socket as blocking, sfFalse for non-blocking
|
||||
/// \param blocking true to set the socket as blocking, false for non-blocking
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfTcpListener_setBlocking(sfTcpListener* listener, sfBool blocking);
|
||||
CSFML_NETWORK_API void sfTcpListener_setBlocking(sfTcpListener* listener, bool blocking);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a TCP listener is in blocking or non-blocking mode
|
||||
///
|
||||
/// \param listener TCP listener object
|
||||
///
|
||||
/// \return sfTrue if the socket is blocking, sfFalse otherwise
|
||||
/// \return true if the socket is blocking, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfBool sfTcpListener_isBlocking(const sfTcpListener* listener);
|
||||
CSFML_NETWORK_API bool sfTcpListener_isBlocking(const sfTcpListener* listener);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the port to which a TCP listener is bound locally
|
||||
|
||||
@@ -65,20 +65,20 @@ CSFML_NETWORK_API void sfTcpSocket_destroy(sfTcpSocket* socket);
|
||||
/// By default, all sockets are blocking.
|
||||
///
|
||||
/// \param socket TCP socket object
|
||||
/// \param blocking sfTrue to set the socket as blocking, sfFalse for non-blocking
|
||||
/// \param blocking true to set the socket as blocking, false for non-blocking
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfTcpSocket_setBlocking(sfTcpSocket* socket, sfBool blocking);
|
||||
CSFML_NETWORK_API void sfTcpSocket_setBlocking(sfTcpSocket* socket, bool blocking);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a TCP socket is in blocking or non-blocking mode
|
||||
///
|
||||
/// \param socket TCP socket object
|
||||
///
|
||||
/// \return sfTrue if the socket is blocking, sfFalse otherwise
|
||||
/// \return true if the socket is blocking, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfBool sfTcpSocket_isBlocking(const sfTcpSocket* socket);
|
||||
CSFML_NETWORK_API bool sfTcpSocket_isBlocking(const sfTcpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the port to which a TCP socket is bound locally
|
||||
|
||||
@@ -64,20 +64,20 @@ CSFML_NETWORK_API void sfUdpSocket_destroy(sfUdpSocket* socket);
|
||||
/// By default, all sockets are blocking.
|
||||
///
|
||||
/// \param socket UDP socket object
|
||||
/// \param blocking sfTrue to set the socket as blocking, sfFalse for non-blocking
|
||||
/// \param blocking true to set the socket as blocking, false for non-blocking
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API void sfUdpSocket_setBlocking(sfUdpSocket* socket, sfBool blocking);
|
||||
CSFML_NETWORK_API void sfUdpSocket_setBlocking(sfUdpSocket* socket, bool blocking);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Tell whether a UDP socket is in blocking or non-blocking mode
|
||||
///
|
||||
/// \param socket UDP socket object
|
||||
///
|
||||
/// \return sfTrue if the socket is blocking, sfFalse otherwise
|
||||
/// \return true if the socket is blocking, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_NETWORK_API sfBool sfUdpSocket_isBlocking(const sfUdpSocket* socket);
|
||||
CSFML_NETWORK_API bool sfUdpSocket_isBlocking(const sfUdpSocket* socket);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the port to which a UDP socket is bound locally
|
||||
|
||||
@@ -67,7 +67,7 @@ CSFML_SYSTEM_API size_t sfBuffer_getSize(const sfBuffer* buffer);
|
||||
/// \return Read-only pointer to the array of bytes
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_SYSTEM_API const sfUint8* sfBuffer_getData(const sfBuffer* buffer);
|
||||
CSFML_SYSTEM_API const uint8_t* sfBuffer_getData(const sfBuffer* buffer);
|
||||
|
||||
|
||||
#endif // SFML_BUFFER_H
|
||||
@@ -31,10 +31,10 @@
|
||||
#include <SFML/System/Export.h>
|
||||
|
||||
|
||||
typedef sfInt64 (*sfInputStreamReadFunc)(void* data, sfInt64 size, void* userData);
|
||||
typedef sfInt64 (*sfInputStreamSeekFunc)(sfInt64 position, void* userData);
|
||||
typedef sfInt64 (*sfInputStreamTellFunc)(void* userData);
|
||||
typedef sfInt64 (*sfInputStreamGetSizeFunc)(void* userData);
|
||||
typedef int64_t (*sfInputStreamReadFunc)(void* data, int64_t size, void* userData);
|
||||
typedef int64_t (*sfInputStreamSeekFunc)(int64_t position, void* userData);
|
||||
typedef int64_t (*sfInputStreamTellFunc)(void* userData);
|
||||
typedef int64_t (*sfInputStreamGetSizeFunc)(void* userData);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
////////////////////////////////////////////////////////////
|
||||
typedef struct
|
||||
{
|
||||
sfInt64 microseconds;
|
||||
int64_t microseconds;
|
||||
} sfTime;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -64,7 +64,7 @@ CSFML_SYSTEM_API float sfTime_asSeconds(sfTime time);
|
||||
/// \return Time in milliseconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_SYSTEM_API sfInt32 sfTime_asMilliseconds(sfTime time);
|
||||
CSFML_SYSTEM_API int32_t sfTime_asMilliseconds(sfTime time);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return a time value as a number of microseconds
|
||||
@@ -74,7 +74,7 @@ CSFML_SYSTEM_API sfInt32 sfTime_asMilliseconds(sfTime time);
|
||||
/// \return Time in microseconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_SYSTEM_API sfInt64 sfTime_asMicroseconds(sfTime time);
|
||||
CSFML_SYSTEM_API int64_t sfTime_asMicroseconds(sfTime time);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a time value from a number of seconds
|
||||
@@ -94,7 +94,7 @@ CSFML_SYSTEM_API sfTime sfSeconds(float amount);
|
||||
/// \return Time value constructed from the amount of milliseconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_SYSTEM_API sfTime sfMilliseconds(sfInt32 amount);
|
||||
CSFML_SYSTEM_API sfTime sfMilliseconds(int32_t amount);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a time value from a number of microseconds
|
||||
@@ -104,7 +104,7 @@ CSFML_SYSTEM_API sfTime sfMilliseconds(sfInt32 amount);
|
||||
/// \return Time value constructed from the amount of microseconds
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_SYSTEM_API sfTime sfMicroseconds(sfInt64 amount);
|
||||
CSFML_SYSTEM_API sfTime sfMicroseconds(int64_t amount);
|
||||
|
||||
|
||||
#endif // SFML_TIME_H
|
||||
@@ -55,7 +55,7 @@ CSFML_WINDOW_API const char* sfClipboard_getString(void);
|
||||
/// \return Clipboard contents as UTF-32
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API const sfUint32* sfClipboard_getUnicodeString(void);
|
||||
CSFML_WINDOW_API const uint32_t* sfClipboard_getUnicodeString(void);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the content of the clipboard as ANSI string data
|
||||
@@ -79,7 +79,7 @@ CSFML_WINDOW_API void sfClipboard_setString(const char* text);
|
||||
/// to the clipboard
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfClipboard_setUnicodeString(const sfUint32* text);
|
||||
CSFML_WINDOW_API void sfClipboard_setUnicodeString(const uint32_t* text);
|
||||
|
||||
|
||||
#endif // SFML_CURSOR_H
|
||||
@@ -60,18 +60,18 @@ CSFML_WINDOW_API void sfContext_destroy(sfContext* context);
|
||||
/// \return True if available, false if unavailable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfContext_isExtensionAvailable(const char* name);
|
||||
CSFML_WINDOW_API bool sfContext_isExtensionAvailable(const char* name);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Activate or deactivate explicitely a context
|
||||
///
|
||||
/// \param context Context object
|
||||
/// \param active sfTrue to activate, sfFalse to deactivate
|
||||
/// \param active true to activate, false to deactivate
|
||||
///
|
||||
/// \return sfTrue on success, sfFalse on failure
|
||||
/// \return true on success, false on failure
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfContext_setActive(sfContext* context, sfBool active);
|
||||
CSFML_WINDOW_API bool sfContext_setActive(sfContext* context, bool active);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the address of an OpenGL function.
|
||||
@@ -106,6 +106,6 @@ CSFML_WINDOW_API sfContextSettings sfContext_getSettings(const sfContext* contex
|
||||
/// \return The active context's ID or 0 if no context is currently active
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfUint64 sfContext_getActiveContextId(void);
|
||||
CSFML_WINDOW_API uint64_t sfContext_getActiveContextId(void);
|
||||
|
||||
#endif // SFML_CONTEXT_H
|
||||
@@ -118,7 +118,7 @@ typedef enum
|
||||
/// \return A new sfCursor object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfCursor* sfCursor_createFromPixels(const sfUint8* pixels, sfVector2u size, sfVector2u hotspot);
|
||||
CSFML_WINDOW_API sfCursor* sfCursor_createFromPixels(const uint8_t* pixels, sfVector2u size, sfVector2u hotspot);
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -78,10 +78,10 @@ typedef struct
|
||||
sfEventType type;
|
||||
sfKeyCode code;
|
||||
sfScancode scancode;
|
||||
sfBool alt;
|
||||
sfBool control;
|
||||
sfBool shift;
|
||||
sfBool system;
|
||||
bool alt;
|
||||
bool control;
|
||||
bool shift;
|
||||
bool system;
|
||||
} sfKeyEvent;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
@@ -91,7 +91,7 @@ typedef struct
|
||||
typedef struct
|
||||
{
|
||||
sfEventType type;
|
||||
sfUint32 unicode;
|
||||
uint32_t unicode;
|
||||
} sfTextEvent;
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -66,10 +66,10 @@ typedef enum
|
||||
///
|
||||
/// \param joystick Index of the joystick to check
|
||||
///
|
||||
/// \return sfTrue if the joystick is connected, sfFalse otherwise
|
||||
/// \return true if the joystick is connected, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfJoystick_isConnected(unsigned int joystick);
|
||||
CSFML_WINDOW_API bool sfJoystick_isConnected(unsigned int joystick);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Return the number of buttons supported by a joystick
|
||||
@@ -91,10 +91,10 @@ CSFML_WINDOW_API unsigned int sfJoystick_getButtonCount(unsigned int joystick);
|
||||
/// \param joystick Index of the joystick
|
||||
/// \param axis Axis to check
|
||||
///
|
||||
/// \return sfTrue if the joystick supports the axis, sfFalse otherwise
|
||||
/// \return true if the joystick supports the axis, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfJoystick_hasAxis(unsigned int joystick, sfJoystickAxis axis);
|
||||
CSFML_WINDOW_API bool sfJoystick_hasAxis(unsigned int joystick, sfJoystickAxis axis);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check if a joystick button is pressed
|
||||
@@ -104,10 +104,10 @@ CSFML_WINDOW_API sfBool sfJoystick_hasAxis(unsigned int joystick, sfJoystickAxis
|
||||
/// \param joystick Index of the joystick
|
||||
/// \param button Button to check
|
||||
///
|
||||
/// \return sfTrue if the button is pressed, sfFalse otherwise
|
||||
/// \return true if the button is pressed, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfJoystick_isButtonPressed(unsigned int joystick, unsigned int button);
|
||||
CSFML_WINDOW_API bool sfJoystick_isButtonPressed(unsigned int joystick, unsigned int button);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current position of a joystick axis
|
||||
|
||||
@@ -331,24 +331,24 @@ typedef enum
|
||||
///
|
||||
/// \param key Key to check
|
||||
///
|
||||
/// \return sfTrue if the key is pressed, sfFalse otherwise
|
||||
/// \return true if the key is pressed, false otherwise
|
||||
///
|
||||
/// \see sfKeyboard_isScancodePressed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfKeyboard_isKeyPressed(sfKeyCode key);
|
||||
CSFML_WINDOW_API bool sfKeyboard_isKeyPressed(sfKeyCode key);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Check if a key is pressed
|
||||
///
|
||||
/// \param code Scancode to check
|
||||
///
|
||||
/// \return sfTrue if the physical key is pressed, sfFalse otherwise
|
||||
/// \return true if the physical key is pressed, false otherwise
|
||||
///
|
||||
/// \see sfKeyboard_isKeyPressed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfKeyboard_isScancodePressed(sfScancode code);
|
||||
CSFML_WINDOW_API bool sfKeyboard_isScancodePressed(sfScancode code);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Localize a physical key to a logical one
|
||||
@@ -418,6 +418,6 @@ CSFML_WINDOW_API const char* sfKeyboard_getDescription(sfScancode code);
|
||||
/// \param visible True to show, false to hide
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfKeyboard_setVirtualKeyboardVisible(sfBool visible);
|
||||
CSFML_WINDOW_API void sfKeyboard_setVirtualKeyboardVisible(bool visible);
|
||||
|
||||
#endif // SFML_KEYBOARD_H
|
||||
@@ -64,10 +64,10 @@ typedef enum
|
||||
///
|
||||
/// \param button Button to check
|
||||
///
|
||||
/// \return sfTrue if the button is pressed, sfFalse otherwise
|
||||
/// \return true if the button is pressed, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfMouse_isButtonPressed(sfMouseButton button);
|
||||
CSFML_WINDOW_API bool sfMouse_isButtonPressed(sfMouseButton button);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current position of the mouse
|
||||
|
||||
@@ -55,10 +55,10 @@ typedef enum
|
||||
///
|
||||
/// \param sensor Sensor to check
|
||||
///
|
||||
/// \return sfTrue if the sensor is available, sfFalse otherwise
|
||||
/// \return true if the sensor is available, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfSensor_isAvailable(sfSensorType sensor);
|
||||
CSFML_WINDOW_API bool sfSensor_isAvailable(sfSensorType sensor);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Enable or disable a sensor
|
||||
@@ -70,10 +70,10 @@ CSFML_WINDOW_API sfBool sfSensor_isAvailable(sfSensorType sensor);
|
||||
/// This function does nothing if the sensor is unavailable.
|
||||
///
|
||||
/// \param sensor Sensor to enable
|
||||
/// \param enabled sfTrue to enable, sfFalse to disable
|
||||
/// \param enabled true to enable, false to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfSensor_setEnabled(sfSensorType sensor, sfBool enabled);
|
||||
CSFML_WINDOW_API void sfSensor_setEnabled(sfSensorType sensor, bool enabled);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current sensor value
|
||||
|
||||
@@ -38,10 +38,10 @@
|
||||
///
|
||||
/// \param finger Finger index
|
||||
///
|
||||
/// \return sfTrue if \a finger is currently touching the screen, sfFalse otherwise
|
||||
/// \return true if \a finger is currently touching the screen, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfTouch_isDown(unsigned int finger);
|
||||
CSFML_WINDOW_API bool sfTouch_isDown(unsigned int finger);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the current position of a touch in window coordinates
|
||||
|
||||
@@ -81,10 +81,10 @@ CSFML_WINDOW_API const sfVideoMode* sfVideoMode_getFullscreenModes(size_t* count
|
||||
///
|
||||
/// \param mode Video mode
|
||||
///
|
||||
/// \return sfTrue if the video mode is valid for fullscreen mode
|
||||
/// \return true if the video mode is valid for fullscreen mode
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfVideoMode_isValid(sfVideoMode mode);
|
||||
CSFML_WINDOW_API bool sfVideoMode_isValid(sfVideoMode mode);
|
||||
|
||||
|
||||
#endif // SFML_VIDEOMODE_H
|
||||
@@ -37,7 +37,7 @@ typedef struct VkSurfaceKHR_T* VkSurfaceKHR;
|
||||
|
||||
#else
|
||||
|
||||
typedef sfUint64 VkSurfaceKHR;
|
||||
typedef uint64_t VkSurfaceKHR;
|
||||
|
||||
#endif
|
||||
|
||||
@@ -62,7 +62,7 @@ typedef void (*sfVulkanFunctionPointer)(void);
|
||||
/// \return True if Vulkan is supported, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfVulkan_isAvailable(sfBool requireGraphics);
|
||||
CSFML_WINDOW_API bool sfVulkan_isAvailable(bool requireGraphics);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the address of a Vulkan function
|
||||
|
||||
@@ -60,8 +60,8 @@ typedef struct
|
||||
unsigned int antialiasingLevel; ///< Level of antialiasing
|
||||
unsigned int majorVersion; ///< Major number of the context version to create
|
||||
unsigned int minorVersion; ///< Minor number of the context version to create
|
||||
sfUint32 attributeFlags; ///< The attribute flags to create the context with
|
||||
sfBool sRgbCapable; ///< Whether the context framebuffer is sRGB capable
|
||||
uint32_t attributeFlags; ///< The attribute flags to create the context with
|
||||
bool sRgbCapable; ///< Whether the context framebuffer is sRGB capable
|
||||
} sfContextSettings;
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ typedef struct
|
||||
/// \return A new sfWindow object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfWindow* sfWindow_create(sfVideoMode mode, const char* title, sfUint32 style, const sfContextSettings* settings);
|
||||
CSFML_WINDOW_API sfWindow* sfWindow_create(sfVideoMode mode, const char* title, uint32_t style, const sfContextSettings* settings);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a new window (with a UTF-32 title)
|
||||
@@ -109,7 +109,7 @@ CSFML_WINDOW_API sfWindow* sfWindow_create(sfVideoMode mode, const char* title,
|
||||
/// \return A new sfWindow object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfWindow* sfWindow_createUnicode(sfVideoMode mode, const sfUint32* title, sfUint32 style, const sfContextSettings* settings);
|
||||
CSFML_WINDOW_API sfWindow* sfWindow_createUnicode(sfVideoMode mode, const uint32_t* title, uint32_t style, const sfContextSettings* settings);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a window from an existing control
|
||||
@@ -155,15 +155,15 @@ CSFML_WINDOW_API void sfWindow_close(sfWindow* window);
|
||||
/// \brief Tell whether or not a window is opened
|
||||
///
|
||||
/// This function returns whether or not the window exists.
|
||||
/// Note that a hidden window (sfWindow_setVisible(sfFalse)) will return
|
||||
/// sfTrue.
|
||||
/// Note that a hidden window (sfWindow_setVisible(false)) will return
|
||||
/// true.
|
||||
///
|
||||
/// \param window Window object
|
||||
///
|
||||
/// \return sfTrue if the window is opened, sfFalse if it has been closed
|
||||
/// \return true if the window is opened, false if it has been closed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindow_isOpen(const sfWindow* window);
|
||||
CSFML_WINDOW_API bool sfWindow_isOpen(const sfWindow* window);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the settings of the OpenGL context of a window
|
||||
@@ -192,10 +192,10 @@ CSFML_WINDOW_API sfContextSettings sfWindow_getSettings(const sfWindow* window);
|
||||
/// \param window Window object
|
||||
/// \param event Event to be returned
|
||||
///
|
||||
/// \return sfTrue if an event was returned, or sfFalse if the event queue was empty
|
||||
/// \return true if an event was returned, or false if the event queue was empty
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindow_pollEvent(sfWindow* window, sfEvent* event);
|
||||
CSFML_WINDOW_API bool sfWindow_pollEvent(sfWindow* window, sfEvent* event);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Wait for an event and return it
|
||||
@@ -211,10 +211,10 @@ CSFML_WINDOW_API sfBool sfWindow_pollEvent(sfWindow* window, sfEvent* event);
|
||||
/// \param window Window object
|
||||
/// \param event Event to be returned
|
||||
///
|
||||
/// \return sfFalse if any error occured
|
||||
/// \return false if any error occured
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindow_waitEvent(sfWindow* window, sfEvent* event);
|
||||
CSFML_WINDOW_API bool sfWindow_waitEvent(sfWindow* window, sfEvent* event);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a window
|
||||
@@ -277,7 +277,7 @@ CSFML_WINDOW_API void sfWindow_setTitle(sfWindow* window, const char* title);
|
||||
/// \param title New title
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setUnicodeTitle(sfWindow* window, const sfUint32* title);
|
||||
CSFML_WINDOW_API void sfWindow_setUnicodeTitle(sfWindow* window, const uint32_t* title);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a window's icon
|
||||
@@ -291,16 +291,16 @@ CSFML_WINDOW_API void sfWindow_setUnicodeTitle(sfWindow* window, const sfUint32*
|
||||
/// \param pixels Pointer to the array of pixels in memory
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setIcon(sfWindow* window, unsigned int width, unsigned int height, const sfUint8* pixels);
|
||||
CSFML_WINDOW_API void sfWindow_setIcon(sfWindow* window, unsigned int width, unsigned int height, const uint8_t* pixels);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Show or hide a window
|
||||
///
|
||||
/// \param window Window object
|
||||
/// \param visible sfTrue to show the window, sfFalse to hide it
|
||||
/// \param visible true to show the window, false to hide it
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setVisible(sfWindow* window, sfBool visible);
|
||||
CSFML_WINDOW_API void sfWindow_setVisible(sfWindow* window, bool visible);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Enable or disable vertical synchronization
|
||||
@@ -311,19 +311,19 @@ CSFML_WINDOW_API void sfWindow_setVisible(sfWindow* window, sfBool visible);
|
||||
/// to a good value (but not constant across different computers).
|
||||
///
|
||||
/// \param window Window object
|
||||
/// \param enabled sfTrue to enable v-sync, sfFalse to deactivate
|
||||
/// \param enabled true to enable v-sync, false to deactivate
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setVerticalSyncEnabled(sfWindow* window, sfBool enabled);
|
||||
CSFML_WINDOW_API void sfWindow_setVerticalSyncEnabled(sfWindow* window, bool enabled);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Show or hide the mouse cursor
|
||||
///
|
||||
/// \param window Window object
|
||||
/// \param visible sfTrue to show, sfFalse to hide
|
||||
/// \param visible true to show, false to hide
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setMouseCursorVisible(sfWindow* window, sfBool visible);
|
||||
CSFML_WINDOW_API void sfWindow_setMouseCursorVisible(sfWindow* window, bool visible);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Grab or release the mouse cursor
|
||||
@@ -335,10 +335,10 @@ CSFML_WINDOW_API void sfWindow_setMouseCursorVisible(sfWindow* window, sfBool vi
|
||||
/// won't have any effect (fullscreen windows always grab the
|
||||
/// cursor).
|
||||
///
|
||||
/// \param grabbed sfTrue to enable, sfFalse to disable
|
||||
/// \param grabbed true to enable, false to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setMouseCursorGrabbed(sfWindow* window, sfBool grabbed);
|
||||
CSFML_WINDOW_API void sfWindow_setMouseCursorGrabbed(sfWindow* window, bool grabbed);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the displayed cursor to a native system cursor
|
||||
@@ -370,10 +370,10 @@ CSFML_WINDOW_API void sfWindow_setMouseCursor(sfWindow* window, const sfCursor*
|
||||
/// Key repeat is enabled by default.
|
||||
///
|
||||
/// \param window Window object
|
||||
/// \param enabled sfTrue to enable, sfFalse to disable
|
||||
/// \param enabled true to enable, false to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindow_setKeyRepeatEnabled(sfWindow* window, sfBool enabled);
|
||||
CSFML_WINDOW_API void sfWindow_setKeyRepeatEnabled(sfWindow* window, bool enabled);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Limit the framerate to a maximum fixed frequency
|
||||
@@ -412,12 +412,12 @@ CSFML_WINDOW_API void sfWindow_setJoystickThreshold(sfWindow* window, float thre
|
||||
/// This is not to be confused with sfWindow_requestFocus().
|
||||
///
|
||||
/// \param window Window object
|
||||
/// \param active sfTrue to activate, sfFalse to deactivate
|
||||
/// \param active true to activate, false to deactivate
|
||||
///
|
||||
/// \return sfTrue if operation was successful, sfFalse otherwise
|
||||
/// \return true if operation was successful, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindow_setActive(sfWindow* window, sfBool active);
|
||||
CSFML_WINDOW_API bool sfWindow_setActive(sfWindow* window, bool active);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Request the current window to be made the active
|
||||
@@ -443,7 +443,7 @@ CSFML_WINDOW_API void sfWindow_requestFocus(sfWindow* window);
|
||||
/// \return True if window has focus, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindow_hasFocus(const sfWindow* window);
|
||||
CSFML_WINDOW_API bool sfWindow_hasFocus(const sfWindow* window);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Display on screen what has been rendered to the
|
||||
|
||||
@@ -68,7 +68,7 @@ typedef enum
|
||||
/// \return A new sfWindow object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfWindowBase* sfWindowBase_create(sfVideoMode mode, const char* title, sfUint32 style);
|
||||
CSFML_WINDOW_API sfWindowBase* sfWindowBase_create(sfVideoMode mode, const char* title, uint32_t style);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a new window (with a UTF-32 title)
|
||||
@@ -86,7 +86,7 @@ CSFML_WINDOW_API sfWindowBase* sfWindowBase_create(sfVideoMode mode, const char*
|
||||
/// \return A new sfWindow object
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfWindowBase* sfWindowBase_createUnicode(sfVideoMode mode, const sfUint32* title, sfUint32 style);
|
||||
CSFML_WINDOW_API sfWindowBase* sfWindowBase_createUnicode(sfVideoMode mode, const uint32_t* title, uint32_t style);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Construct a window from an existing control
|
||||
@@ -124,15 +124,15 @@ CSFML_WINDOW_API void sfWindowBase_close(sfWindowBase* windowBase);
|
||||
/// \brief Tell whether or not a window is opened
|
||||
///
|
||||
/// This function returns whether or not the window exists.
|
||||
/// Note that a hidden window (sfWindowBase_setVisible(sfFalse)) will return
|
||||
/// sfTrue.
|
||||
/// Note that a hidden window (sfWindowBase_setVisible(false)) will return
|
||||
/// true.
|
||||
///
|
||||
/// \param windowBase Window object
|
||||
///
|
||||
/// \return sfTrue if the window is opened, sfFalse if it has been closed
|
||||
/// \return true if the window is opened, false if it has been closed
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindowBase_isOpen(const sfWindowBase* windowBase);
|
||||
CSFML_WINDOW_API bool sfWindowBase_isOpen(const sfWindowBase* windowBase);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Pop the event on top of event queue, if any, and return it
|
||||
@@ -146,10 +146,10 @@ CSFML_WINDOW_API sfBool sfWindowBase_isOpen(const sfWindowBase* windowBase);
|
||||
/// \param windowBase Window object
|
||||
/// \param event Event to be returned
|
||||
///
|
||||
/// \return sfTrue if an event was returned, or sfFalse if the event queue was empty
|
||||
/// \return true if an event was returned, or false if the event queue was empty
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindowBase_pollEvent(sfWindowBase* windowBase, sfEvent* event);
|
||||
CSFML_WINDOW_API bool sfWindowBase_pollEvent(sfWindowBase* windowBase, sfEvent* event);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Wait for an event and return it
|
||||
@@ -165,10 +165,10 @@ CSFML_WINDOW_API sfBool sfWindowBase_pollEvent(sfWindowBase* windowBase, sfEvent
|
||||
/// \param windowBase Window object
|
||||
/// \param event Event to be returned
|
||||
///
|
||||
/// \return sfFalse if any error occured
|
||||
/// \return false if any error occured
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindowBase_waitEvent(sfWindowBase* windowBase, sfEvent* event);
|
||||
CSFML_WINDOW_API bool sfWindowBase_waitEvent(sfWindowBase* windowBase, sfEvent* event);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the position of a window
|
||||
@@ -231,7 +231,7 @@ CSFML_WINDOW_API void sfWindowBase_setTitle(sfWindowBase* windowBase, const char
|
||||
/// \param title New title
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_setUnicodeTitle(sfWindowBase* windowBase, const sfUint32* title);
|
||||
CSFML_WINDOW_API void sfWindowBase_setUnicodeTitle(sfWindowBase* windowBase, const uint32_t* title);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change a window's icon
|
||||
@@ -245,25 +245,25 @@ CSFML_WINDOW_API void sfWindowBase_setUnicodeTitle(sfWindowBase* windowBase, con
|
||||
/// \param pixels Pointer to the array of pixels in memory
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_setIcon(sfWindowBase* windowBase, unsigned int width, unsigned int height, const sfUint8* pixels);
|
||||
CSFML_WINDOW_API void sfWindowBase_setIcon(sfWindowBase* windowBase, unsigned int width, unsigned int height, const uint8_t* pixels);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Show or hide a window
|
||||
///
|
||||
/// \param windowBase Window object
|
||||
/// \param visible sfTrue to show the windowBase, sfFalse to hide it
|
||||
/// \param visible true to show the windowBase, false to hide it
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_setVisible(sfWindowBase* windowBase, sfBool visible);
|
||||
CSFML_WINDOW_API void sfWindowBase_setVisible(sfWindowBase* windowBase, bool visible);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Show or hide the mouse cursor
|
||||
///
|
||||
/// \param windowBase Window object
|
||||
/// \param visible sfTrue to show, sfFalse to hide
|
||||
/// \param visible true to show, false to hide
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_setMouseCursorVisible(sfWindowBase* windowBase, sfBool visible);
|
||||
CSFML_WINDOW_API void sfWindowBase_setMouseCursorVisible(sfWindowBase* windowBase, bool visible);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Grab or release the mouse cursor
|
||||
@@ -275,10 +275,10 @@ CSFML_WINDOW_API void sfWindowBase_setMouseCursorVisible(sfWindowBase* windowBas
|
||||
/// won't have any effect (fullscreen windows always grab the
|
||||
/// cursor).
|
||||
///
|
||||
/// \param grabbed sfTrue to enable, sfFalse to disable
|
||||
/// \param grabbed true to enable, false to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_setMouseCursorGrabbed(sfWindowBase* windowBase, sfBool grabbed);
|
||||
CSFML_WINDOW_API void sfWindowBase_setMouseCursorGrabbed(sfWindowBase* windowBase, bool grabbed);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Set the displayed cursor to a native system cursor
|
||||
@@ -310,10 +310,10 @@ CSFML_WINDOW_API void sfWindowBase_setMouseCursor(sfWindowBase* windowBase, cons
|
||||
/// Key repeat is enabled by default.
|
||||
///
|
||||
/// \param windowBase Window object
|
||||
/// \param enabled sfTrue to enable, sfFalse to disable
|
||||
/// \param enabled true to enable, false to disable
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API void sfWindowBase_setKeyRepeatEnabled(sfWindowBase* windowBase, sfBool enabled);
|
||||
CSFML_WINDOW_API void sfWindowBase_setKeyRepeatEnabled(sfWindowBase* windowBase, bool enabled);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Change the joystick threshold
|
||||
@@ -350,7 +350,7 @@ CSFML_WINDOW_API void sfWindowBase_requestFocus(sfWindowBase* windowBase);
|
||||
/// \return True if window has focus, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindowBase_hasFocus(const sfWindowBase* windowBase);
|
||||
CSFML_WINDOW_API bool sfWindowBase_hasFocus(const sfWindowBase* windowBase);
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
/// \brief Get the OS-specific handle of the window
|
||||
@@ -379,6 +379,6 @@ CSFML_WINDOW_API sfWindowHandle sfWindowBase_getSystemHandle(const sfWindowBase*
|
||||
/// \return True if surface creation was successful, false otherwise
|
||||
///
|
||||
////////////////////////////////////////////////////////////
|
||||
CSFML_WINDOW_API sfBool sfWindowBase_createVulkanSurface(sfWindowBase* windowBase, const VkInstance* instance, VkSurfaceKHR* surface, const VkAllocationCallbacks* allocator);
|
||||
CSFML_WINDOW_API bool sfWindowBase_createVulkanSurface(sfWindowBase* windowBase, const VkInstance* instance, VkSurfaceKHR* surface, const VkAllocationCallbacks* allocator);
|
||||
|
||||
#endif // SFML_WINDOWBASE_H
|
||||
Reference in new issue
Block a user