Last active
August 29, 2015 14:20
-
-
Save oprypin/6d2192f7c444dd57f59c to your computer and use it in GitHub Desktop.
API changes between SFML 2.2 and 2.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff CSFML-2.2 CSFML-master | grep -vP '^([^-+]|. *//)' | sed -r 's/^[-+]{3} .+\///g' | uniq | |
SoundBuffer.h | |
-CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromSamples(const sfInt16* samples, size_t sampleCount, unsigned int channelCount, unsigned int sampleRate); | |
+CSFML_AUDIO_API sfSoundBuffer* sfSoundBuffer_createFromSamples(const sfInt16* samples, sfUint64 sampleCount, unsigned int channelCount, unsigned int sampleRate); | |
-CSFML_AUDIO_API size_t sfSoundBuffer_getSampleCount(const sfSoundBuffer* soundBuffer); | |
+CSFML_AUDIO_API sfUint64 sfSoundBuffer_getSampleCount(const sfSoundBuffer* soundBuffer); | |
Audio.h | |
+#include <SFML/Audio/SoundStatus.h> | |
+#include <SFML/Audio/SoundStream.h> | |
CircleShape.h | |
+#include <stddef.h> | |
-CSFML_GRAPHICS_API unsigned int sfCircleShape_getPointCount(const sfCircleShape* shape); | |
+CSFML_GRAPHICS_API size_t sfCircleShape_getPointCount(const sfCircleShape* shape); | |
-CSFML_GRAPHICS_API sfVector2f sfCircleShape_getPoint(const sfCircleShape* shape, unsigned int index); | |
+CSFML_GRAPHICS_API sfVector2f sfCircleShape_getPoint(const sfCircleShape* shape, size_t index); | |
-CSFML_GRAPHICS_API void sfCircleShape_setPointCount(sfCircleShape* shape, unsigned int count); | |
+CSFML_GRAPHICS_API void sfCircleShape_setPointCount(sfCircleShape* shape, size_t count); | |
Color.h | |
+CSFML_GRAPHICS_API sfColor sfColor_fromInteger(sfUint32 color); | |
+ | |
+CSFML_GRAPHICS_API sfUint32 sfColor_toInteger(sfColor color); | |
+ | |
+CSFML_GRAPHICS_API sfColor sfColor_subtract(sfColor color1, sfColor color2); | |
+ | |
ConvexShape.h | |
+#include <stddef.h> | |
-CSFML_GRAPHICS_API unsigned int sfConvexShape_getPointCount(const sfConvexShape* shape); | |
+CSFML_GRAPHICS_API size_t sfConvexShape_getPointCount(const sfConvexShape* shape); | |
-CSFML_GRAPHICS_API sfVector2f sfConvexShape_getPoint(const sfConvexShape* shape, unsigned int index); | |
+CSFML_GRAPHICS_API sfVector2f sfConvexShape_getPoint(const sfConvexShape* shape, size_t index); | |
-CSFML_GRAPHICS_API void sfConvexShape_setPointCount(sfConvexShape* shape, unsigned int count); | |
+CSFML_GRAPHICS_API void sfConvexShape_setPointCount(sfConvexShape* shape, size_t count); | |
-CSFML_GRAPHICS_API void sfConvexShape_setPoint(sfConvexShape* shape, unsigned int index, sfVector2f point); | |
+CSFML_GRAPHICS_API void sfConvexShape_setPoint(sfConvexShape* shape, size_t index, sfVector2f point); | |
RectangleShape.h | |
+#include <stddef.h> | |
-CSFML_GRAPHICS_API unsigned int sfRectangleShape_getPointCount(const sfRectangleShape* shape); | |
+CSFML_GRAPHICS_API size_t sfRectangleShape_getPointCount(const sfRectangleShape* shape); | |
-CSFML_GRAPHICS_API sfVector2f sfRectangleShape_getPoint(const sfRectangleShape* shape, unsigned int index); | |
+CSFML_GRAPHICS_API sfVector2f sfRectangleShape_getPoint(const sfRectangleShape* shape, size_t index); | |
RenderTexture.h | |
+#include <stddef.h> | |
- const sfVertex* vertices, unsigned int vertexCount, | |
+ const sfVertex* vertices, size_t vertexCount, | |
RenderWindow.h | |
+#include <stddef.h> | |
- const sfVertex* vertices, unsigned int vertexCount, | |
+ const sfVertex* vertices, size_t vertexCount, | |
Shader.h | |
+CSFML_GRAPHICS_API unsigned int sfShader_getNativeHandle(const sfShader* shader); | |
+ | |
Shape.h | |
+#include <stddef.h> | |
-typedef unsigned int (*sfShapeGetPointCountCallback)(void*); ///< Type of the callback used to get the number of points in a shape | |
-typedef sfVector2f (*sfShapeGetPointCallback)(unsigned int, void*); ///< Type of the callback used to get a point of a shape | |
+typedef size_t (*sfShapeGetPointCountCallback)(void*); ///< Type of the callback used to get the number of points in a shape | |
+typedef sfVector2f (*sfShapeGetPointCallback)(size_t, void*); ///< Type of the callback used to get a point of a shape | |
-CSFML_GRAPHICS_API unsigned int sfShape_getPointCount(const sfShape* shape); | |
+CSFML_GRAPHICS_API size_t sfShape_getPointCount(const sfShape* shape); | |
-CSFML_GRAPHICS_API sfVector2f sfShape_getPoint(const sfShape* shape, unsigned int index); | |
+CSFML_GRAPHICS_API sfVector2f sfShape_getPoint(const sfShape* shape, size_t index); | |
Texture.h | |
+CSFML_GRAPHICS_API unsigned int sfTexture_getNativeHandle(const sfTexture* texture); | |
+ | |
VertexArray.h | |
+#include <stddef.h> | |
-CSFML_GRAPHICS_API unsigned int sfVertexArray_getVertexCount(const sfVertexArray* vertexArray); | |
+CSFML_GRAPHICS_API size_t sfVertexArray_getVertexCount(const sfVertexArray* vertexArray); | |
-CSFML_GRAPHICS_API sfVertex* sfVertexArray_getVertex(sfVertexArray* vertexArray, unsigned int index); | |
+CSFML_GRAPHICS_API sfVertex* sfVertexArray_getVertex(sfVertexArray* vertexArray, size_t index); | |
-CSFML_GRAPHICS_API void sfVertexArray_resize(sfVertexArray* vertexArray, unsigned int vertexCount); | |
+CSFML_GRAPHICS_API void sfVertexArray_resize(sfVertexArray* vertexArray, size_t vertexCount); | |
Graphics.h | |
+#include <SFML/Graphics/FontInfo.h> | |
-#include <SFML/Graphics/RenderWindow.h> | |
+#include <SFML/Graphics/RenderWindow.h> | |
SocketStatus.h | |
+ sfSocketPartial, ///< The socket sent a part of the data | |
TcpSocket.h | |
+CSFML_NETWORK_API sfSocketStatus sfTcpSocket_sendPartial(sfTcpSocket* socket, const void* data, size_t size, size_t* sent); | |
+ | |
Network.h | |
+#include <SFML/Network/SocketStatus.h> | |
System.h | |
+#include <SFML/System/Time.h> | |
Event.h | |
- sfEvtMouseWheelMoved, ///< The mouse wheel was scrolled (data in event.mouseWheel) | |
+ sfEvtMouseWheelMoved, ///< The mouse wheel was scrolled (data in event.mouseWheel) (deprecated) | |
+ sfEvtMouseWheelScrolled, ///< The mouse wheel was scrolled (data in event.mouseWheelScroll) | |
+typedef struct | |
+{ | |
+ sfEventType type; | |
+ sfMouseWheel wheel; | |
+ float delta; | |
+ int x; | |
+ int y; | |
+} sfMouseWheelScrollEvent; | |
+ | |
- sfMouseWheelEvent mouseWheel; ///< Mouse wheel event parameters | |
+ sfMouseWheelEvent mouseWheel; ///< Mouse wheel event parameters (deprecated) | |
+ sfMouseWheelScrollEvent mouseWheelScroll; ///< Mouse wheel event parameters | |
Mouse.h | |
+typedef enum | |
+{ | |
+ sfMouseVerticalWheel, ///< The vertical mouse wheel | |
+ sfMouseHorizontalWheel ///< The horizontal mouse wheel | |
+} sfMouseWheel; | |
+ | |
Window.h | |
+typedef enum | |
+{ | |
+ sfContextDefault = 0, ///< Non-debug, compatibility context (this and the core attribute are mutually exclusive) | |
+ sfContextCore = 1 << 0, ///< Core attribute | |
+ sfContextDebug = 1 << 2 ///< Debug attribute | |
+} sfContextAttribute; | |
+ | |
+ sfUint32 attributeFlags; ///< The attribute flags to create the context with | |
Window.h | |
+#include <SFML/Window/JoystickIdentification.h> | |
+#include <SFML/Window/Sensor.h> | |
+#include <SFML/Window/Touch.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git diff SFML-2.2 SFML-2.3 | grep -Pv '^([^\-+]|. *//)|^[\-+]( *(public|protected|private) *:| *$)' | sed -r 's/^[-+]{3} .+\///g' | uniq | |
null | |
AlResource.hpp | |
+#ifndef SFML_ALRESOURCE_HPP | |
+#define SFML_ALRESOURCE_HPP | |
+#include <SFML/Audio/Export.hpp> | |
+namespace sf | |
+{ | |
+class SFML_AUDIO_API AlResource | |
+{ | |
+ AlResource(); | |
+ ~AlResource(); | |
+}; | |
+} // namespace sf | |
+#endif // SFML_ALRESOURCE_HPP | |
Export.hpp | |
null | |
InputSoundFile.hpp | |
+#ifndef SFML_INPUTSOUNDFILE_HPP | |
+#define SFML_INPUTSOUNDFILE_HPP | |
+#include <SFML/Audio/Export.hpp> | |
+#include <SFML/System/NonCopyable.hpp> | |
+#include <SFML/System/Time.hpp> | |
+#include <string> | |
+namespace sf | |
+{ | |
+class InputStream; | |
+class SoundFileReader; | |
+class SFML_AUDIO_API InputSoundFile : NonCopyable | |
+{ | |
+ InputSoundFile(); | |
+ ~InputSoundFile(); | |
+ bool openFromFile(const std::string& filename); | |
+ bool openFromMemory(const void* data, std::size_t sizeInBytes); | |
+ bool openFromStream(InputStream& stream); | |
+ bool openForWriting(const std::string& filename, unsigned int channelCount, unsigned int sampleRate); | |
+ Uint64 getSampleCount() const; | |
+ unsigned int getChannelCount() const; | |
+ unsigned int getSampleRate() const; | |
+ Time getDuration() const; | |
+ void seek(Uint64 sampleOffset); | |
+ void seek(Time timeOffset); | |
+ Uint64 read(Int16* samples, Uint64 maxCount); | |
+ void close(); | |
+ SoundFileReader* m_reader; ///< Reader that handles I/O on the file's format | |
+ InputStream* m_stream; ///< Input stream used to access the file's data | |
+ bool m_streamOwned; ///< Is the stream internal or external? | |
+ Uint64 m_sampleCount; ///< Total number of samples in the file | |
+ unsigned int m_channelCount; ///< Number of channels of the sound | |
+ unsigned int m_sampleRate; ///< Number of samples per second | |
+}; | |
+} // namespace sf | |
+#endif // SFML_INPUTSOUNDFILE_HPP | |
Listener.hpp | |
Music.hpp | |
+#include <SFML/Audio/InputSoundFile.hpp> | |
-namespace priv | |
-{ | |
- class SoundFile; | |
-} | |
- priv::SoundFile* m_file; ///< Sound file | |
+ InputSoundFile m_file; ///< The streamed music file | |
null | |
OutputSoundFile.hpp | |
+#ifndef SFML_OUTPUTSOUNDFILE_HPP | |
+#define SFML_OUTPUTSOUNDFILE_HPP | |
+#include <SFML/Audio/Export.hpp> | |
+#include <SFML/System/NonCopyable.hpp> | |
+#include <string> | |
+namespace sf | |
+{ | |
+class SoundFileWriter; | |
+class SFML_AUDIO_API OutputSoundFile : NonCopyable | |
+{ | |
+ OutputSoundFile(); | |
+ ~OutputSoundFile(); | |
+ bool openFromFile(const std::string& filename, unsigned int sampleRate, unsigned int channelCount); | |
+ void write(const Int16* samples, Uint64 count); | |
+ void close(); | |
+ SoundFileWriter* m_writer; ///< Writer that handles I/O on the file's format | |
+}; | |
+} // namespace sf | |
+#endif // SFML_OUTPUTSOUNDFILE_HPP | |
Sound.hpp | |
SoundBuffer.hpp | |
+#include <SFML/Audio/AlResource.hpp> | |
-namespace priv | |
-{ | |
- class SoundFile; | |
-} | |
+class InputSoundFile; | |
-class SFML_AUDIO_API SoundBuffer | |
+class SFML_AUDIO_API SoundBuffer : AlResource | |
- bool loadFromSamples(const Int16* samples, std::size_t sampleCount, unsigned int channelCount, unsigned int sampleRate); | |
+ bool loadFromSamples(const Int16* samples, Uint64 sampleCount, unsigned int channelCount, unsigned int sampleRate); | |
- std::size_t getSampleCount() const; | |
+ Uint64 getSampleCount() const; | |
- bool initialize(priv::SoundFile& file); | |
+ bool initialize(InputSoundFile& file); | |
SoundBufferRecorder.hpp | |
null | |
SoundFileFactory.hpp | |
+#ifndef SFML_SOUNDFILEFACTORY_HPP | |
+#define SFML_SOUNDFILEFACTORY_HPP | |
+#include <SFML/Audio/Export.hpp> | |
+#include <string> | |
+#include <vector> | |
+namespace sf | |
+{ | |
+class InputStream; | |
+class SoundFileReader; | |
+class SoundFileWriter; | |
+class SFML_AUDIO_API SoundFileFactory | |
+{ | |
+ template <typename T> | |
+ static void registerReader(); | |
+ template <typename T> | |
+ static void unregisterReader(); | |
+ template <typename T> | |
+ static void registerWriter(); | |
+ template <typename T> | |
+ static void unregisterWriter(); | |
+ static SoundFileReader* createReaderFromFilename(const std::string& filename); | |
+ static SoundFileReader* createReaderFromMemory(const void* data, std::size_t sizeInBytes); | |
+ static SoundFileReader* createReaderFromStream(InputStream& stream); | |
+ static SoundFileWriter* createWriterFromFilename(const std::string& filename); | |
+ struct ReaderFactory | |
+ { | |
+ bool (*check)(InputStream&); | |
+ SoundFileReader* (*create)(); | |
+ }; | |
+ typedef std::vector<ReaderFactory> ReaderFactoryArray; | |
+ struct WriterFactory | |
+ { | |
+ bool (*check)(const std::string&); | |
+ SoundFileWriter* (*create)(); | |
+ }; | |
+ typedef std::vector<WriterFactory> WriterFactoryArray; | |
+ static ReaderFactoryArray s_readers; ///< List of all registered readers | |
+ static WriterFactoryArray s_writers; ///< List of all registered writers | |
+}; | |
+} // namespace sf | |
+#include <SFML/Audio/SoundFileFactory.inl> | |
+#endif // SFML_SOUNDFILEFACTORY_HPP | |
null | |
SoundFileFactory.inl | |
+namespace sf | |
+{ | |
+namespace priv | |
+{ | |
+ template <typename T> SoundFileReader* createReader() {return new T;} | |
+ template <typename T> SoundFileWriter* createWriter() {return new T;} | |
+} | |
+template <typename T> | |
+void SoundFileFactory::registerReader() | |
+{ | |
+ unregisterReader<T>(); | |
+ ReaderFactory factory; | |
+ factory.check = &T::check; | |
+ factory.create = &priv::createReader<T>; | |
+ s_readers.push_back(factory); | |
+} | |
+template <typename T> | |
+void SoundFileFactory::unregisterReader() | |
+{ | |
+ for (ReaderFactoryArray::iterator it = s_readers.begin(); it != s_readers.end(); ) | |
+ { | |
+ if (it->create == &priv::createReader<T>) | |
+ it = s_readers.erase(it); | |
+ else | |
+ ++it; | |
+ } | |
+} | |
+template <typename T> | |
+void SoundFileFactory::registerWriter() | |
+{ | |
+ unregisterWriter<T>(); | |
+ WriterFactory factory; | |
+ factory.check = &T::check; | |
+ factory.create = &priv::createWriter<T>; | |
+ s_writers.push_back(factory); | |
+} | |
+template <typename T> | |
+void SoundFileFactory::unregisterWriter() | |
+{ | |
+ for (WriterFactoryArray::iterator it = s_writers.begin(); it != s_writers.end(); ) | |
+ { | |
+ if (it->create == &priv::createWriter<T>) | |
+ it = s_writers.erase(it); | |
+ else | |
+ ++it; | |
+ } | |
+} | |
+} // namespace sf | |
null | |
SoundFileReader.hpp | |
+#ifndef SFML_SOUNDFILEREADER_HPP | |
+#define SFML_SOUNDFILEREADER_HPP | |
+#include <SFML/Audio/Export.hpp> | |
+#include <string> | |
+namespace sf | |
+{ | |
+class InputStream; | |
+class SFML_AUDIO_API SoundFileReader | |
+{ | |
+ struct Info | |
+ { | |
+ Uint64 sampleCount; ///< Total number of samples in the file | |
+ unsigned int channelCount; ///< Number of channels of the sound | |
+ unsigned int sampleRate; ///< Samples rate of the sound, in samples per second | |
+ }; | |
+ virtual ~SoundFileReader() {} | |
+ virtual bool open(InputStream& stream, Info& info) = 0; | |
+ virtual void seek(Uint64 sampleOffset) = 0; | |
+ virtual Uint64 read(Int16* samples, Uint64 maxCount) = 0; | |
+}; | |
+} // namespace sf | |
+#endif // SFML_SOUNDFILEREADER_HPP | |
null | |
SoundFileWriter.hpp | |
+#ifndef SFML_SOUNDFILEWRITER_HPP | |
+#define SFML_SOUNDFILEWRITER_HPP | |
+#include <SFML/Audio/Export.hpp> | |
+#include <string> | |
+namespace sf | |
+{ | |
+class SFML_AUDIO_API SoundFileWriter | |
+{ | |
+ virtual ~SoundFileWriter() {} | |
+ virtual bool open(const std::string& filename, unsigned int sampleRate, unsigned int channelCount) = 0; | |
+ virtual void write(const Int16* samples, Uint64 count) = 0; | |
+}; | |
+} // namespace sf | |
+#endif // SFML_SOUNDFILEWRITER_HPP | |
SoundRecorder.hpp | |
+#include <SFML/Audio/AlResource.hpp> | |
-class SFML_AUDIO_API SoundRecorder | |
+class SFML_AUDIO_API SoundRecorder : AlResource | |
SoundSource.hpp | |
+#include <SFML/Audio/AlResource.hpp> | |
-class SFML_AUDIO_API SoundSource | |
+class SFML_AUDIO_API SoundSource : AlResource | |
SoundStream.hpp | |
Audio.hpp | |
+#include <SFML/Audio/InputSoundFile.hpp> | |
+#include <SFML/Audio/OutputSoundFile.hpp> | |
+#include <SFML/Audio/SoundFileFactory.hpp> | |
+#include <SFML/Audio/SoundFileReader.hpp> | |
+#include <SFML/Audio/SoundFileWriter.hpp> | |
+#include <SFML/Audio/SoundSource.hpp> | |
Config.hpp | |
-#define SFML_VERSION_MINOR 2 | |
+#define SFML_VERSION_MINOR 3 | |
BlendMode.hpp | |
-SFML_GRAPHICS_API extern const BlendMode BlendAlpha; ///< Blend source and dest according to dest alpha | |
+SFML_GRAPHICS_API extern const BlendMode BlendAlpha; ///< Blend source and dest according to dest alpha | |
CircleShape.hpp | |
- explicit CircleShape(float radius = 0, unsigned int pointCount = 30); | |
+ explicit CircleShape(float radius = 0, std::size_t pointCount = 30); | |
- void setPointCount(unsigned int count); | |
+ void setPointCount(std::size_t count); | |
- virtual unsigned int getPointCount() const; | |
+ virtual std::size_t getPointCount() const; | |
- virtual Vector2f getPoint(unsigned int index) const; | |
+ virtual Vector2f getPoint(std::size_t index) const; | |
- float m_radius; ///< Radius of the circle | |
- unsigned int m_pointCount; ///< Number of points composing the circle | |
+ float m_radius; ///< Radius of the circle | |
+ std::size_t m_pointCount; ///< Number of points composing the circle | |
Color.hpp | |
+ explicit Color(Uint32 color); | |
+ Uint32 toInteger() const; | |
ConvexShape.hpp | |
- explicit ConvexShape(unsigned int pointCount = 0); | |
+ explicit ConvexShape(std::size_t pointCount = 0); | |
- void setPointCount(unsigned int count); | |
+ void setPointCount(std::size_t count); | |
- virtual unsigned int getPointCount() const; | |
+ virtual std::size_t getPointCount() const; | |
- void setPoint(unsigned int index, const Vector2f& point); | |
+ void setPoint(std::size_t index, const Vector2f& point); | |
- virtual Vector2f getPoint(unsigned int index) const; | |
+ virtual Vector2f getPoint(std::size_t index) const; | |
Drawable.hpp | |
Export.hpp | |
Font.hpp | |
Glyph.hpp | |
Image.hpp | |
PrimitiveType.hpp | |
Rect.hpp | |
Rect.inl | |
RectangleShape.hpp | |
- virtual unsigned int getPointCount() const; | |
+ virtual std::size_t getPointCount() const; | |
- virtual Vector2f getPoint(unsigned int index) const; | |
+ virtual Vector2f getPoint(std::size_t index) const; | |
RenderStates.hpp | |
RenderTarget.hpp | |
- void draw(const Vertex* vertices, unsigned int vertexCount, | |
+ void draw(const Vertex* vertices, std::size_t vertexCount, | |
RenderTexture.hpp | |
RenderWindow.hpp | |
Shader.hpp | |
+ unsigned int getNativeHandle() const; | |
Shape.hpp | |
- virtual unsigned int getPointCount() const = 0; | |
+ virtual std::size_t getPointCount() const = 0; | |
- virtual Vector2f getPoint(unsigned int index) const = 0; | |
+ virtual Vector2f getPoint(std::size_t index) const = 0; | |
Sprite.hpp | |
Text.hpp | |
Texture.hpp | |
+ unsigned int getNativeHandle() const; | |
Transform.hpp | |
Transformable.hpp | |
Vertex.hpp | |
VertexArray.hpp | |
- explicit VertexArray(PrimitiveType type, unsigned int vertexCount = 0); | |
+ explicit VertexArray(PrimitiveType type, std::size_t vertexCount = 0); | |
- unsigned int getVertexCount() const; | |
+ std::size_t getVertexCount() const; | |
- Vertex& operator [](unsigned int index); | |
+ Vertex& operator [](std::size_t index); | |
- const Vertex& operator [](unsigned int index) const; | |
+ const Vertex& operator [](std::size_t index) const; | |
- void resize(unsigned int vertexCount); | |
+ void resize(std::size_t vertexCount); | |
View.hpp | |
Graphics.hpp | |
+#include <SFML/Graphics/CircleShape.hpp> | |
+#include <SFML/Graphics/ConvexShape.hpp> | |
+#include <SFML/Graphics/Drawable.hpp> | |
+#include <SFML/Graphics/PrimitiveType.hpp> | |
+#include <SFML/Graphics/Rect.hpp> | |
+#include <SFML/Graphics/RectangleShape.hpp> | |
+#include <SFML/Graphics/RenderTarget.hpp> | |
-#include <SFML/Graphics/CircleShape.hpp> | |
-#include <SFML/Graphics/RectangleShape.hpp> | |
-#include <SFML/Graphics/ConvexShape.hpp> | |
+#include <SFML/Graphics/Transformable.hpp> | |
Main.hpp | |
Export.hpp | |
Ftp.hpp | |
- InvalidResponse = 1000, ///< Response is not a valid FTP one | |
- ConnectionFailed = 1001, ///< Connection with server failed | |
- ConnectionClosed = 1002, ///< Connection with server closed | |
- InvalidFile = 1003 ///< Invalid file to upload / download | |
+ InvalidResponse = 1000, ///< Not part of the FTP standard, generated by SFML when a received response cannot be parsed | |
+ ConnectionFailed = 1001, ///< Not part of the FTP standard, generated by SFML when the low-level socket connection with the server fails | |
+ ConnectionClosed = 1002, ///< Not part of the FTP standard, generated by SFML when the low-level socket connection is unexpectedly closed | |
+ InvalidFile = 1003 ///< Not part of the FTP standard, generated by SFML when a local file cannot be read or written | |
Http.hpp | |
IpAddress.hpp | |
Packet.hpp | |
+ std::size_t m_sendPos; ///< Current send position in the packet (for handling partial sends) | |
Socket.hpp | |
+ Partial, ///< The socket sent a part of the data | |
SocketHandle.hpp | |
SocketSelector.hpp | |
TcpListener.hpp | |
TcpSocket.hpp | |
+ Status send(const void* data, std::size_t size, std::size_t& sent); | |
UdpSocket.hpp | |
Network.hpp | |
+#include <SFML/Network/Socket.hpp> | |
+#include <SFML/Network/SocketHandle.hpp> | |
OpenGL.hpp | |
- #include <GL/glu.h> | |
- #include <GL/glu.h> | |
- #include <OpenGL/glu.h> | |
Clock.hpp | |
Err.hpp | |
Export.hpp | |
null | |
FileInputStream.hpp | |
+#ifndef SFML_FILEINPUTSTREAM_HPP | |
+#define SFML_FILEINPUTSTREAM_HPP | |
+#include <SFML/Config.hpp> | |
+#include <SFML/System/Export.hpp> | |
+#include <SFML/System/InputStream.hpp> | |
+#include <SFML/System/NonCopyable.hpp> | |
+#include <cstdio> | |
+#include <string> | |
+#ifdef ANDROID | |
+namespace sf | |
+{ | |
+namespace priv | |
+{ | |
+class SFML_SYSTEM_API ResourceStream; | |
+} | |
+#endif | |
+namespace sf | |
+{ | |
+class SFML_SYSTEM_API FileInputStream : public InputStream, NonCopyable | |
+{ | |
+ FileInputStream(); | |
+ virtual ~FileInputStream(); | |
+ bool open(const std::string& filename); | |
+ virtual Int64 read(void* data, Int64 size); | |
+ virtual Int64 seek(Int64 position); | |
+ virtual Int64 tell(); | |
+ virtual Int64 getSize(); | |
+#ifdef ANDROID | |
+ sf::priv::ResourceStream *m_file; | |
+#else | |
+ std::FILE* m_file; ///< stdio file stream | |
+#endif | |
+}; | |
+} // namespace sf | |
+#endif // SFML_FILEINPUTSTREAM_HPP | |
InputStream.hpp | |
+#include <SFML/System/Export.hpp> | |
-class InputStream | |
+class SFML_SYSTEM_API InputStream | |
Lock.hpp | |
null | |
MemoryInputStream.hpp | |
+#ifndef SFML_MEMORYINPUTSTREAM_HPP | |
+#define SFML_MEMORYINPUTSTREAM_HPP | |
+#include <SFML/Config.hpp> | |
+#include <SFML/System/InputStream.hpp> | |
+#include <SFML/System/Export.hpp> | |
+#include <cstdlib> | |
+namespace sf | |
+{ | |
+class SFML_SYSTEM_API MemoryInputStream : public InputStream | |
+{ | |
+ MemoryInputStream(); | |
+ void open(const void* data, std::size_t sizeInBytes); | |
+ virtual Int64 read(void* data, Int64 size); | |
+ virtual Int64 seek(Int64 position); | |
+ virtual Int64 tell(); | |
+ virtual Int64 getSize(); | |
+ const char* m_data; ///< Pointer to the data in memory | |
+ Int64 m_size; ///< Total size of the data | |
+ Int64 m_offset; ///< Current reading position | |
+}; | |
+} // namespace sf | |
+#endif // SFML_MEMORYINPUTSTREAM_HPP | |
Mutex.hpp | |
NonCopyable.hpp | |
Sleep.hpp | |
String.hpp | |
String.inl | |
Thread.hpp | |
Thread.inl | |
ThreadLocal.hpp | |
ThreadLocalPtr.hpp | |
ThreadLocalPtr.inl | |
Time.hpp | |
Utf.hpp | |
Utf.inl | |
Vector2.hpp | |
Vector2.inl | |
Vector3.hpp | |
Vector3.inl | |
System.hpp | |
+#include <SFML/System/FileInputStream.hpp> | |
+#include <SFML/System/MemoryInputStream.hpp> | |
+#include <SFML/System/NonCopyable.hpp> | |
+#include <SFML/System/Time.hpp> | |
Context.hpp | |
+typedef void (*GlFunctionPointer)(); | |
+ static GlFunctionPointer getFunction(const char* name); | |
ContextSettings.hpp | |
+ enum Attribute | |
+ { | |
+ Default = 0, ///< Non-debug, compatibility context (this and the core attribute are mutually exclusive) | |
+ Core = 1 << 0, ///< Core attribute | |
+ Debug = 1 << 2 ///< Debug attribute | |
+ }; | |
- explicit ContextSettings(unsigned int depth = 0, unsigned int stencil = 0, unsigned int antialiasing = 0, unsigned int major = 2, unsigned int minor = 0) : | |
+ explicit ContextSettings(unsigned int depth = 0, unsigned int stencil = 0, unsigned int antialiasing = 0, unsigned int major = 1, unsigned int minor = 1, unsigned int attributes = Default) : | |
- minorVersion (minor) | |
+ minorVersion (minor), | |
+ attributeFlags (attributes) | |
+ Uint32 attributeFlags; ///< The attribute flags to create the context with | |
Event.hpp | |
+ struct MouseWheelScrollEvent | |
+ { | |
+ Mouse::Wheel wheel; ///< Which wheel (for mice with multiple ones) | |
+ float delta; ///< Wheel offset (positive is up/left, negative is down/right). High-precision mice may use non-integral offsets. | |
+ int x; ///< X position of the mouse pointer, relative to the left of the owner window | |
+ int y; ///< Y position of the mouse pointer, relative to the top of the owner window | |
+ }; | |
- Sensor::Type type; ///< Type of the sensor | |
- float x; ///< Current value of the sensor on X axis | |
- float y; ///< Current value of the sensor on Y axis | |
- float z; ///< Current value of the sensor on Z axis | |
+ Sensor::Type type; ///< Type of the sensor | |
+ float x; ///< Current value of the sensor on X axis | |
+ float y; ///< Current value of the sensor on Y axis | |
+ float z; ///< Current value of the sensor on Z axis | |
- MouseWheelMoved, ///< The mouse wheel was scrolled (data in event.mouseWheel) | |
+ MouseWheelMoved, ///< The mouse wheel was scrolled (data in event.mouseWheel) (deprecated) | |
+ MouseWheelScrolled, ///< The mouse wheel was scrolled (data in event.mouseWheelScroll) | |
- SizeEvent size; ///< Size event parameters (Event::Resized) | |
- KeyEvent key; ///< Key event parameters (Event::KeyPressed, Event::KeyReleased) | |
- TextEvent text; ///< Text event parameters (Event::TextEntered) | |
- MouseMoveEvent mouseMove; ///< Mouse move event parameters (Event::MouseMoved) | |
- MouseButtonEvent mouseButton; ///< Mouse button event parameters (Event::MouseButtonPressed, Event::MouseButtonReleased) | |
- MouseWheelEvent mouseWheel; ///< Mouse wheel event parameters (Event::MouseWheelMoved) | |
- JoystickMoveEvent joystickMove; ///< Joystick move event parameters (Event::JoystickMoved) | |
- JoystickButtonEvent joystickButton; ///< Joystick button event parameters (Event::JoystickButtonPressed, Event::JoystickButtonReleased) | |
- JoystickConnectEvent joystickConnect; ///< Joystick (dis)connect event parameters (Event::JoystickConnected, Event::JoystickDisconnected) | |
- TouchEvent touch; ///< Touch events parameters (Event::TouchBegan, Event::TouchMoved, Event::TouchEnded) | |
- SensorEvent sensor; ///< Sensor event parameters (Event::SensorChanged) | |
+ SizeEvent size; ///< Size event parameters (Event::Resized) | |
+ KeyEvent key; ///< Key event parameters (Event::KeyPressed, Event::KeyReleased) | |
+ TextEvent text; ///< Text event parameters (Event::TextEntered) | |
+ MouseMoveEvent mouseMove; ///< Mouse move event parameters (Event::MouseMoved) | |
+ MouseButtonEvent mouseButton; ///< Mouse button event parameters (Event::MouseButtonPressed, Event::MouseButtonReleased) | |
+ MouseWheelEvent mouseWheel; ///< Mouse wheel event parameters (Event::MouseWheelMoved) (deprecated) | |
+ MouseWheelScrollEvent mouseWheelScroll; ///< Mouse wheel event parameters (Event::MouseWheelScrolled) | |
+ JoystickMoveEvent joystickMove; ///< Joystick move event parameters (Event::JoystickMoved) | |
+ JoystickButtonEvent joystickButton; ///< Joystick button event parameters (Event::JoystickButtonPressed, Event::JoystickButtonReleased) | |
+ JoystickConnectEvent joystickConnect; ///< Joystick (dis)connect event parameters (Event::JoystickConnected, Event::JoystickDisconnected) | |
+ TouchEvent touch; ///< Touch events parameters (Event::TouchBegan, Event::TouchMoved, Event::TouchEnded) | |
+ SensorEvent sensor; ///< Sensor event parameters (Event::SensorChanged) | |
Export.hpp | |
GlResource.hpp | |
Joystick.hpp | |
- struct Identification | |
+ struct SFML_WINDOW_API Identification | |
Keyboard.hpp | |
Mouse.hpp | |
+ enum Wheel | |
+ { | |
+ VerticalWheel, ///< The vertical mouse wheel | |
+ HorizontalWheel ///< The horizontal mouse wheel | |
+ }; | |
Sensor.hpp | |
- Accelerometer, ///< Measures the raw acceleration (m/s²) | |
+ Accelerometer, ///< Measures the raw acceleration (m/s^2) | |
- Gravity, ///< Measures the direction and intensity of gravity, independent of device acceleration (m/s²) | |
- UserAcceleration, ///< Measures the direction and intensity of device acceleration, independent of the gravity (m/s²) | |
+ Gravity, ///< Measures the direction and intensity of gravity, independent of device acceleration (m/s^2) | |
+ UserAcceleration, ///< Measures the direction and intensity of device acceleration, independent of the gravity (m/s^2) | |
Touch.hpp | |
VideoMode.hpp | |
Window.hpp | |
WindowHandle.hpp | |
WindowStyle.hpp | |
Window.hpp | |
-#include <SFML/Window/Touch.hpp> | |
+#include <SFML/Window/Touch.hpp> | |
+#include <SFML/Window/WindowHandle.hpp> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment