SFML - Simple and Fast Multimedia Library

SFML 2.6.2

- Main Page
- Related Pages
- Topics
- Namespaces
- Classes
- Files

- Namespace List
- Namespace Members

Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
sf Namespace Reference

## Namespaces
namespace | Glsl
| Namespace with GLSL types.
namespace | Style

## Classes
class | AlResource
| Base class for classes that require an OpenAL context. More...
class | BlendMode
| Blending modes for drawing. More...
class | CircleShape
| Specialized shape representing a circle. More...
class | Clipboard
| Give access to the system clipboard. More...
class | Clock
| Utility class that measures the elapsed time. More...
class | Color
| Utility class for manipulating RGBA colors. More...
class | Context
| Class holding a valid drawing context. More...
class | ContextSettings
| Structure defining the settings of the OpenGL context attached to a window. More...
class | ConvexShape
| Specialized shape representing a convex polygon. More...
class | Cursor
| Cursor defines the appearance of a system cursor. More...
class | Drawable
| Abstract base class for objects that can be drawn to a render target. More...
class | Event
| Defines a system event and its parameters. More...
class | FileInputStream
| Implementation of input stream based on a file. More...
class | Font
| Class for loading and manipulating character fonts. More...
class | Ftp
| A FTP client. More...
class | GlResource
| Base class for classes that require an OpenGL context. More...
class | Glyph
| Structure describing a glyph. More...
class | Http
| A HTTP client. More...
class | Image
| Class for loading, manipulating and saving images. More...
class | InputSoundFile
| Provide read access to sound files. More...
class | InputStream
| Abstract class for custom file input streams. More...
class | IpAddress
| Encapsulate an IPv4 network address. More...
class | Joystick
| Give access to the real-time state of the joysticks. More...
class | Keyboard
| Give access to the real-time state of the keyboard. More...
class | Listener
| The audio listener is the point in the scene from where all the sounds are heard. More...
class | Lock
| Automatic wrapper for locking and unlocking mutexes. More...
class | MemoryInputStream
| Implementation of input stream based on a memory chunk. More...
class | Mouse
| Give access to the real-time state of the mouse. More...
class | Music
| Streamed music played from an audio file. More...
class | Mutex
| Blocks concurrent access to shared resources from multiple threads. More...
class | NonCopyable
| Utility class that makes any derived class non-copyable. More...
class | OutputSoundFile
| Provide write access to sound files. More...
class | Packet
| Utility class to build blocks of data to transfer over the network. More...
class | Rect
| Utility class for manipulating 2D axis aligned rectangles. More...
class | RectangleShape
| Specialized shape representing a rectangle. More...
class | RenderStates
| Define the states used for drawing to a RenderTarget. More...
class | RenderTarget
| Base class for all render targets (window, texture, ...) More...
class | RenderTexture
| Target for off-screen 2D rendering into a texture. More...
class | RenderWindow
| Window that can serve as a target for 2D drawing. More...
class | Sensor
| Give access to the real-time state of the sensors. More...
class | Shader
| Shader class (vertex, geometry and fragment) More...
class | Shape
| Base class for textured shapes with outline. More...
class | Socket
| Base class for all the socket types. More...
class | SocketSelector
| Multiplexer that allows to read from multiple sockets. More...
class | Sound
| Regular sound that can be played in the audio environment. More...
class | SoundBuffer
| Storage for audio samples defining a sound. More...
class | SoundBufferRecorder
| Specialized SoundRecorder which stores the captured audio data into a sound buffer. More...
class | SoundFileFactory
| Manages and instantiates sound file readers and writers. More...
class | SoundFileReader
| Abstract base class for sound file decoding. More...
class | SoundFileWriter
| Abstract base class for sound file encoding. More...
class | SoundRecorder
| Abstract base class for capturing sound data. More...
class | SoundSource
| Base class defining a sound's properties. More...
class | SoundStream
| Abstract base class for streamed audio sources. More...
class | Sprite
| Drawable representation of a texture, with its own transformations, color, etc. More...
class | String
| Utility string class that automatically handles conversions between types and encodings. More...
class | TcpListener
| Socket that listens to new TCP connections. More...
class | TcpSocket
| Specialized socket using the TCP protocol. More...
class | Text
| Graphical text that can be drawn to a render target. More...
class | Texture
| Image living on the graphics card that can be used for drawing. More...
class | Thread
| Utility class to manipulate threads. More...
class | ThreadLocal
| Defines variables with thread-local storage. More...
class | ThreadLocalPtr
| Pointer to a thread-local variable. More...
class | Time
| Represents a time value. More...
class | Touch
| Give access to the real-time state of the touches. More...
class | Transform
| Define a 3x3 transform matrix. More...
class | Transformable
| Decomposed transform defined by a position, a rotation and a scale. More...
class | UdpSocket
| Specialized socket using the UDP protocol. More...
class | Utf
| Utility class providing generic functions for UTF conversions. More...
class | Utf< 16 >
| Specialization of the Utf template for UTF-16. More...
class | Utf< 32 >
| Specialization of the Utf template for UTF-32. More...
class | Utf< 8 >
| Specialization of the Utf template for UTF-8. More...
class | Vector2
| Utility template class for manipulating 2-dimensional vectors. More...
class | Vector3
| Utility template class for manipulating 3-dimensional vectors. More...
class | Vertex
| Define a point with color and texture coordinates. More...
class | VertexArray
| Define a set of one or more 2D primitives. More...
class | VertexBuffer
| Vertex buffer storage for one or more 2D primitives. More...
class | VideoMode
| VideoMode defines a video mode (width, height, bpp) More...
class | View
| 2D camera that defines what region is shown on screen More...
class | Vulkan
| Vulkan helper functions. More...
class | Window
| Window that serves as a target for OpenGL rendering. More...
class | WindowBase
| Window that serves as a base for other windows. More...

## Typedefs
typedef signed char | Int8
typedef unsigned char | Uint8
typedef signed short | Int16
typedef unsigned short | Uint16
typedef signed int | Int32
typedef unsigned int | Uint32
typedef signed long long | Int64
typedef unsigned long long | Uint64
typedef Rect< int > | IntRect
typedef Rect< float > | FloatRect
typedef int | SocketHandle
typedef Utf< 8 > | Utf8
typedef Utf< 16 > | Utf16
typedef Utf< 32 > | Utf32
typedef Vector2< int > | Vector2i
typedef Vector2< unsigned int > | Vector2u
typedef Vector2< float > | Vector2f
typedef Vector3< int > | Vector3i
typedef Vector3< float > | Vector3f
typedef void(* | GlFunctionPointer) ()
typedef void(* | ContextDestroyCallback) (void *)
typedef void(* | VulkanFunctionPointer) ()
typedef platform specific | WindowHandle
| Define a low-level window handle type, specific to each platform.

## Enumerations
enum | PrimitiveType { Points , Lines , LineStrip , Triangles , TriangleStrip , TriangleFan , Quads , LinesStrip = LineStrip , TrianglesStrip = TriangleStrip , TrianglesFan = TriangleFan }
| Types of primitives that a sf::VertexArray can render. More...

## Functions
bool | operator== (const IpAddress &left, const IpAddress &right)
| Overload of == operator to compare two IP addresses.
bool | operator!= (const IpAddress &left, const IpAddress &right)
| Overload of != operator to compare two IP addresses.
bool | operator< (const IpAddress &left, const IpAddress &right)
| Overload of < operator to compare two IP addresses.
bool | operator> (const IpAddress &left, const IpAddress &right)
| Overload of > operator to compare two IP addresses.
bool | operator<= (const IpAddress &left, const IpAddress &right)
| Overload of <= operator to compare two IP addresses.
bool | operator>= (const IpAddress &left, const IpAddress &right)
| Overload of >= operator to compare two IP addresses.
std::istream & | operator>> (std::istream &stream, IpAddress &address)
| Overload of >> operator to extract an IP address from an input stream.
std::ostream & | operator<< (std::ostream &stream, const IpAddress &address)
| Overload of << operator to print an IP address to an output stream.
std::ostream & | err ()
| Standard stream used by SFML to output warnings and errors.
ANativeActivity * | getNativeActivity ()
| Return a pointer to the Android native activity.
void | sleep (Time duration)
| Make the current thread sleep for a given duration.
bool | operator== (const BlendMode &left, const BlendMode &right)
| Overload of the == operator.
bool | operator!= (const BlendMode &left, const BlendMode &right)
| Overload of the != operator.
bool | operator== (const Color &left, const Color &right)
| Overload of the == operator.
bool | operator!= (const Color &left, const Color &right)
| Overload of the != operator.
Color | operator+ (const Color &left, const Color &right)
| Overload of the binary + operator.
Color | operator- (const Color &left, const Color &right)
| Overload of the binary - operator.
Color | operator* (const Color &left, const Color &right)
| Overload of the binary * operator.
Color & | operator+= (Color &left, const Color &right)
| Overload of the binary += operator.
Color & | operator-= (Color &left, const Color &right)
| Overload of the binary -= operator.
Color & | operator*= (Color &left, const Color &right)
| Overload of the binary *= operator.
template<typename T >
bool | operator== (const Rect< T > &left, const Rect< T > &right)
| Overload of binary operator ==.
template<typename T >
bool | operator!= (const Rect< T > &left, const Rect< T > &right)
| Overload of binary operator !=.
Transform | operator* (const Transform &left, const Transform &right)
| Overload of binary operator * to combine two transforms.
Transform & | operator*= (Transform &left, const Transform &right)
| Overload of binary operator *= to combine two transforms.
Vector2f | operator* (const Transform &left, const Vector2f &right)
| Overload of binary operator * to transform a point.
bool | operator== (const Transform &left, const Transform &right)
| Overload of binary operator == to compare two transforms.
bool | operator!= (const Transform &left, const Transform &right)
| Overload of binary operator != to compare two transforms.
bool | operator== (const String &left, const String &right)
| Overload of == operator to compare two UTF-32 strings.
bool | operator!= (const String &left, const String &right)
| Overload of != operator to compare two UTF-32 strings.
bool | operator< (const String &left, const String &right)
| Overload of < operator to compare two UTF-32 strings.
bool | operator> (const String &left, const String &right)
| Overload of > operator to compare two UTF-32 strings.
bool | operator<= (const String &left, const String &right)
| Overload of <= operator to compare two UTF-32 strings.
bool | operator>= (const String &left, const String &right)
| Overload of >= operator to compare two UTF-32 strings.
String | operator+ (const String &left, const String &right)
| Overload of binary + operator to concatenate two strings.
Time | seconds (float amount)
| Construct a time value from a number of seconds.
Time | milliseconds (Int32 amount)
| Construct a time value from a number of milliseconds.
Time | microseconds (Int64 amount)
| Construct a time value from a number of microseconds.
bool | operator== (Time left, Time right)
| Overload of == operator to compare two time values.
bool | operator!= (Time left, Time right)
| Overload of != operator to compare two time values.
bool | operator< (Time left, Time right)
| Overload of < operator to compare two time values.
bool | operator> (Time left, Time right)
| Overload of > operator to compare two time values.
bool | operator<= (Time left, Time right)
| Overload of <= operator to compare two time values.
bool | operator>= (Time left, Time right)
| Overload of >= operator to compare two time values.
Time | operator- (Time right)
| Overload of unary - operator to negate a time value.
Time | operator+ (Time left, Time right)
| Overload of binary + operator to add two time values.
Time & | operator+= (Time &left, Time right)
| Overload of binary += operator to add/assign two time values.
Time | operator- (Time left, Time right)
| Overload of binary - operator to subtract two time values.
Time & | operator-= (Time &left, Time right)
| Overload of binary -= operator to subtract/assign two time values.
Time | operator* (Time left, float right)
| Overload of binary * operator to scale a time value.
Time | operator* (Time left, Int64 right)
| Overload of binary * operator to scale a time value.
Time | operator* (float left, Time right)
| Overload of binary * operator to scale a time value.
Time | operator* (Int64 left, Time right)
| Overload of binary * operator to scale a time value.
Time & | operator*= (Time &left, float right)
| Overload of binary *= operator to scale/assign a time value.
Time & | operator*= (Time &left, Int64 right)
| Overload of binary *= operator to scale/assign a time value.
Time | operator/ (Time left, float right)
| Overload of binary / operator to scale a time value.
Time | operator/ (Time left, Int64 right)
| Overload of binary / operator to scale a time value.
Time & | operator/= (Time &left, float right)
| Overload of binary /= operator to scale/assign a time value.
Time & | operator/= (Time &left, Int64 right)
| Overload of binary /= operator to scale/assign a time value.
float | operator/ (Time left, Time right)
| Overload of binary / operator to compute the ratio of two time values.
Time | operator% (Time left, Time right)
| Overload of binary % operator to compute remainder of a time value.
Time & | operator%= (Time &left, Time right)
| Overload of binary %= operator to compute/assign remainder of a time value.
template<typename T >
Vector2< T > | operator- (const Vector2< T > &right)
| Overload of unary operator -.
template<typename T >
Vector2< T > & | operator+= (Vector2< T > &left, const Vector2< T > &right)
| Overload of binary operator +=.
template<typename T >
Vector2< T > & | operator-= (Vector2< T > &left, const Vector2< T > &right)
| Overload of binary operator -=.
template<typename T >
Vector2< T > | operator+ (const Vector2< T > &left, const Vector2< T > &right)
| Overload of binary operator +.
template<typename T >
Vector2< T > | operator- (const Vector2< T > &left, const Vector2< T > &right)
| Overload of binary operator -.
template<typename T >
Vector2< T > | operator* (const Vector2< T > &left, T right)
| Overload of binary operator *.
template<typename T >
Vector2< T > | operator* (T left, const Vector2< T > &right)
| Overload of binary operator *.
template<typename T >
Vector2< T > & | operator*= (Vector2< T > &left, T right)
| Overload of binary operator *=.
template<typename T >
Vector2< T > | operator/ (const Vector2< T > &left, T right)
| Overload of binary operator /.
template<typename T >
Vector2< T > & | operator/= (Vector2< T > &left, T right)
| Overload of binary operator /=.
template<typename T >
bool | operator== (const Vector2< T > &left, const Vector2< T > &right)
| Overload of binary operator ==.
template<typename T >
bool | operator!= (const Vector2< T > &left, const Vector2< T > &right)
| Overload of binary operator !=.
template<typename T >
Vector3< T > | operator- (const Vector3< T > &left)
| Overload of unary operator -.
template<typename T >
Vector3< T > & | operator+= (Vector3< T > &left, const Vector3< T > &right)
| Overload of binary operator +=.
template<typename T >
Vector3< T > & | operator-= (Vector3< T > &left, const Vector3< T > &right)
| Overload of binary operator -=.
template<typename T >
Vector3< T > | operator+ (const Vector3< T > &left, const Vector3< T > &right)
| Overload of binary operator +.
template<typename T >
Vector3< T > | operator- (const Vector3< T > &left, const Vector3< T > &right)
| Overload of binary operator -.
template<typename T >
Vector3< T > | operator* (const Vector3< T > &left, T right)
| Overload of binary operator *.
template<typename T >
Vector3< T > | operator* (T left, const Vector3< T > &right)
| Overload of binary operator *.
template<typename T >
Vector3< T > & | operator*= (Vector3< T > &left, T right)
| Overload of binary operator *=.
template<typename T >
Vector3< T > | operator/ (const Vector3< T > &left, T right)
| Overload of binary operator /.
template<typename T >
Vector3< T > & | operator/= (Vector3< T > &left, T right)
| Overload of binary operator /=.
template<typename T >
bool | operator== (const Vector3< T > &left, const Vector3< T > &right)
| Overload of binary operator ==.
template<typename T >
bool | operator!= (const Vector3< T > &left, const Vector3< T > &right)
| Overload of binary operator !=.
bool | operator== (const VideoMode &left, const VideoMode &right)
| Overload of == operator to compare two video modes.
bool | operator!= (const VideoMode &left, const VideoMode &right)
| Overload of != operator to compare two video modes.
bool | operator< (const VideoMode &left, const VideoMode &right)
| Overload of < operator to compare video modes.
bool | operator> (const VideoMode &left, const VideoMode &right)
| Overload of > operator to compare video modes.
bool | operator<= (const VideoMode &left, const VideoMode &right)
| Overload of <= operator to compare video modes.
bool | operator>= (const VideoMode &left, const VideoMode &right)
| Overload of >= operator to compare video modes.

## Variables
const BlendMode | BlendAlpha
| Blend source and dest according to dest alpha.
const BlendMode | BlendAdd
| Add source to dest.
const BlendMode | BlendMultiply
| Multiply source and dest.
const BlendMode | BlendMin
| Take minimum between source and dest.
const BlendMode | BlendMax
| Take maximum between source and dest.
const BlendMode | BlendNone
| Overwrite dest with source.

## Typedef Documentation

## ◆ ContextDestroyCallback

typedef void(* sf::ContextDestroyCallback) (void *)

Definition at line 40 of file GlResource.hpp.

## ◆ FloatRect

typedef Rect<float> sf::FloatRect

Definition at line 217 of file Rect.hpp.

## ◆ GlFunctionPointer

typedef void(* sf::GlFunctionPointer) ()

Definition at line 44 of file Context.hpp.

## ◆ Int16

typedef signed short sf::Int16

Definition at line 222 of file Config.hpp.

## ◆ Int32

typedef signed int sf::Int32

Definition at line 226 of file Config.hpp.

## ◆ Int64

typedef signed long long sf::Int64

Definition at line 238 of file Config.hpp.

## ◆ Int8

typedef signed char sf::Int8

Definition at line 218 of file Config.hpp.

## ◆ IntRect

typedef Rect<int> sf::IntRect

Definition at line 216 of file Rect.hpp.

## ◆ SocketHandle

typedef int sf::SocketHandle

Definition at line 50 of file SocketHandle.hpp.

## ◆ Uint16

typedef unsigned short sf::Uint16

Definition at line 223 of file Config.hpp.

## ◆ Uint32

typedef unsigned int sf::Uint32

Definition at line 227 of file Config.hpp.

## ◆ Uint64

typedef unsigned long long sf::Uint64

Definition at line 239 of file Config.hpp.

## ◆ Uint8

typedef unsigned char sf::Uint8

Definition at line 219 of file Config.hpp.

## ◆ Utf16

typedef Utf<16> sf::Utf16

Definition at line 735 of file Utf.hpp.

## ◆ Utf32

typedef Utf<32> sf::Utf32

Definition at line 736 of file Utf.hpp.

## ◆ Utf8

typedef Utf<8> sf::Utf8

Definition at line 734 of file Utf.hpp.

## ◆ Vector2f

typedef Vector2<float> sf::Vector2f

Definition at line 255 of file Vector2.hpp.

## ◆ Vector2i

typedef Vector2<int> sf::Vector2i

Definition at line 253 of file Vector2.hpp.

## ◆ Vector2u

typedef Vector2<unsigned int> sf::Vector2u

Definition at line 254 of file Vector2.hpp.

## ◆ Vector3f

typedef Vector3<float> sf::Vector3f

Definition at line 256 of file Vector3.hpp.

## ◆ Vector3i

typedef Vector3<int> sf::Vector3i

Definition at line 255 of file Vector3.hpp.

## ◆ VulkanFunctionPointer

typedef void(* sf::VulkanFunctionPointer) ()

Definition at line 56 of file Vulkan.hpp.

## Function Documentation

## ◆ operator!=() [1/10]

bool sf::operator!= | ( | const IpAddress & | left,
|  | const IpAddress & | right )

Overload of != operator to compare two IP addresses.

Parameters

  left | Left operand (a IP address)
  right | Right operand (a IP address)

Returns
  True if both addresses are different

## ◆ operator<() [1/4]

bool sf::operator< | ( | const IpAddress & | left,
|  | const IpAddress & | right )

Overload of < operator to compare two IP addresses.

Parameters

  left | Left operand (a IP address)
  right | Right operand (a IP address)

Returns
  True if left is lesser than right

## ◆ operator<<()

std::ostream & sf::operator<< | ( | std::ostream & | stream,
|  | const IpAddress & | address )

Overload of << operator to print an IP address to an output stream.

Parameters

  stream | Output stream
  address | IP address to print

Returns
  Reference to the output stream

## ◆ operator<=() [1/4]

bool sf::operator<= | ( | const IpAddress & | left,
|  | const IpAddress & | right )

Overload of <= operator to compare two IP addresses.

Parameters

  left | Left operand (a IP address)
  right | Right operand (a IP address)

Returns
  True if left is lesser or equal than right

## ◆ operator==() [1/10]

bool sf::operator== | ( | const IpAddress & | left,
|  | const IpAddress & | right )

Overload of == operator to compare two IP addresses.

Parameters

  left | Left operand (a IP address)
  right | Right operand (a IP address)

Returns
  True if both addresses are equal

## ◆ operator>() [1/4]

bool sf::operator> | ( | const IpAddress & | left,
|  | const IpAddress & | right )

Overload of > operator to compare two IP addresses.

Parameters

  left | Left operand (a IP address)
  right | Right operand (a IP address)

Returns
  True if left is greater than right

## ◆ operator>=() [1/4]

bool sf::operator>= | ( | const IpAddress & | left,
|  | const IpAddress & | right )

Overload of >= operator to compare two IP addresses.

Parameters

  left | Left operand (a IP address)
  right | Right operand (a IP address)

Returns
  True if left is greater or equal than right

## ◆ operator>>()

std::istream & sf::operator>> | ( | std::istream & | stream,
|  | IpAddress & | address )

Overload of >> operator to extract an IP address from an input stream.

Parameters

  stream | Input stream
  address | IP address to extract

Returns
  Reference to the input stream

## Variable Documentation

## ◆ BlendAdd

const BlendMode sf::BlendAdd
| extern

Add source to dest.

## ◆ BlendAlpha

const BlendMode sf::BlendAlpha
| extern

Blend source and dest according to dest alpha.

## ◆ BlendMax

const BlendMode sf::BlendMax
| extern

Take maximum between source and dest.

## ◆ BlendMin

const BlendMode sf::BlendMin
| extern

Take minimum between source and dest.

## ◆ BlendMultiply

const BlendMode sf::BlendMultiply
| extern

Multiply source and dest.

## ◆ BlendNone

const BlendMode sf::BlendNone
| extern

Overwrite dest with source.