sfml Reference Manual
Packages
sfml
sf
sf.ClipBoard
sf.Joystick
sf.Keyboard
sf.Listener
sf.Mouse
sf.Sensor
sf.Touch
sf.Vulkan
FloatRect
IntRect
Vector2f
Vector2i
Vector2u
Vector3f
VideoMode
sfml
Description:
Content:
Namespaces:
sf
-
SFML is multi-media
Classes:
Buffer
CircleShape
-
Specialized shape representing a circle.
Clock
Context
-
Class holding a valid drawing context.
ConvexShape
-
Specialized shape representing a convex polygon
Cursor
-
Cursor defines the appearance of a system cursor.
Font
-
Class for loading and manipulating character fonts.
Ftp
FtpDirectoryResponse
FtpListingResponse
FtpResponse
Http
HttpRequest
HttpResponse
Image
-
Class for loading, manipulating and saving images.
Music
-
Streamed music played from an audio file.
Packet
RectangleShape
-
Specialized shape representing a rectangle.
RenderTexture
-
Target for off-screen 2D rendering into a texture.
RenderWindow
-
Window that can serve as a target for 2D drawing.
Shader
Shape
-
Base class for textured shapes with outline.
Sound
-
Regular sound that can be played in the audio environment.
SoundBuffer
-
Storage for audio samples defining a sound.
SoundBufferRecorder
SoundRecorder
Sprite
-
Class representing a sprite, which is an object that can be drawn to the screen
TcpListener
TcpSocket
Text
-
Graphical text that can be drawn to a render target
Texture
-
Texture stores pixels that can be drawn, with a sprite for example.
Transformable
-
Decomposed transform defined by a position, a rotation and a scale.
UdpSocket
VertexArray
VertexBuffer
View
-
2D camera that defines what region is shown on screen
Window
-
Window that serves as a target for OpenGL rendering.
WindowBase
Structs:
BlendMode
Color
-
Utility class for manipulating RGBA colors.
ContextSettings
Event
-
Defines a system event and its parameters.
FloatRect
FontInfo
GlslBvec2
GlslBvec3
GlslBvec4
GlslIvec2
GlslIvec3
GlslIvec4
GlslMat3
GlslMat4
GlslVec2
GlslVec3
GlslVec4
Glyph
InputStream
IntRect
IpAddress
JoystickButtonEvent
JoystickConnectEvent
JoystickIdentification
JoystickMoveEvent
KeyEvent
MouseButtonEvent
MouseMoveEvent
MouseWheelEvent
MouseWheelScrollEvent
RenderStates
SensorEvent
SizeEvent
TextEvent
Time
-
Represents a time value
TimeSpan
TouchEvent
Transform
-
Define a 3x3 transform matrix.
Vector2f
Vector2i
Vector2u
Vector3f
Vertex
VideoMode
WindowHandle
Enums:
BlendEquation
BlendFactor
ContextAttribute
CursorType
EventType
FtpStatus
FtpTransferMode
HttpMethod
HttpStatus
JoystickAxis
KeyCode
MouseButton
MouseWheel
PrimitiveType
SensorType
SocketStatus
SoundStatus
TextStyle
TextureCoordinateType
VertexBufferUsage
WindowStyle
Constants:
public
const
int
JoystickAxisCount
public
const
int
JoystickButtonCount
public
const
int
JoystickCount
Delegates:
public
delegate
int64
InputStreamGetSizeFunc
(
void
* userData)
public
delegate
int64
InputStreamReadFunc
(
void
* data,
int64
size,
void
* userData)
public
delegate
int64
InputStreamSeekFunc
(
int64
position,
void
* userData)
public
delegate
int64
InputStreamTellFunc
(
void
* userData)
Methods:
public
void
sleep
(
Time
duration)
ClipBoard
-
Give access to the system clipboard.
Methods:
public
unowned
string
getString
()
Get the content of the clipboard as string data.
public
uint32
[]
getUnicodeString
()
public
void
setString
(
string
text)
Set the content of the clipboard as string data.
public
void
setUnicodeString
(
uint32
[] text)
Joystick
-
Give access to the real-time state of the joysticks.
Methods:
public
float
getAxisPosition
(
uint
joystick,
JoystickAxis
axis)
public
uint
getButtonCount
(
uint
joystick)
public
JoystickIdentification
getIdentification
(
uint
joystick)
public
bool
hasAxis
(
uint
joystick,
JoystickAxis
axis)
public
bool
isButtonPressed
(
uint
joystick,
uint
button)
public
bool
isConnected
(
uint
joystick)
public
void
update
()
Keyboard
-
Give access to the real-time state of the keyboard.
Methods:
public
bool
isKeyPressed
(
KeyCode
key)
Check if a key is pressed.
public
void
setVirtualKeyboardVisible
(
bool
visible)
Show or hide the virtual keyboard.
Listener
Methods:
public
Vector3f
getDirection
()
public
float
getGlobalVolume
()
public
Vector3f
getPosition
()
public
Vector3f
getUpVector
()
public
void
setDirection
(
Vector3f
direction)
public
void
setGlobalVolume
(
float
volume)
public
void
setPosition
(
Vector3f
position)
public
void
setUpVector
(
Vector3f
upVector)
Mouse
-
Give access to the real-time state of the mouse.
Methods:
public
Vector2i
getPosition
(
Window
relativeTo)
Get the current position of the mouse in window coordinates.
public
Vector2i
getPositionWindowBase
(
WindowBase
relativeTo)
public
bool
isButtonPressed
(
MouseButton
button)
Check if a mouse button is pressed.
public
void
setPosition
(
Vector2i
position,
Window
relativeTo)
Set the current position of the mouse in desktop coordinates.
public
void
setPositionWindowBase
(
Vector2i
position,
WindowBase
relativeTo)
Sensor
-
Give access to the real-time state of the sensors.
Methods:
public
Vector3f
getValue
(
SensorType
sensor)
Get the current sensor value.
public
bool
isAvailable
(
SensorType
sensor)
Check if a sensor is available on the underlying platform.
public
void
setEnabled
(
SensorType
sensor,
bool
enabled)
Enable or disable a sensor.
Touch
-
Give access to the real-time state of the touches.
Methods:
public
Vector2i
getPosition
(
uint
finger,
Window
relativeTo)
Get the current position of a touch in window coordinates.
public
Vector2i
getPositionWindowBase
(
uint
finger,
WindowBase
relativeTo)
public
bool
isDown
(
uint
finger)
Check if a touch event is currently down.
Vulkan
Structs:
VkAllocationCallbacks
VkInstance
VkSurfaceKHR
Delegates:
public
delegate
void
FunctionPointer
()
Methods:
public
FunctionPointer
getFunction
(
string
name)
public
string
getGraphicsRequiredInstanceExtensions
(
out
size_t
count)
public
bool
isAvailable
(
bool
requireGraphics)
Functions:
public
inline
FloatRect
FloatRect
(
float
left,
float
top,
float
width,
float
height)
public
inline
IntRect
IntRect
(
int
left,
int
top,
int
width,
int
height)
public
inline
Vector2f
Vector2f
(
float
x,
float
y)
Vector2f constructor
public
inline
Vector2i
Vector2i
(
int
x,
int
y)
Vector2i constructor
public
inline
Vector2u
Vector2u
(
uint
x,
uint
y)
Vector2u constructor
public
inline
Vector3f
Vector3f
(
float
x,
float
y,
float
z)
Vector3f constructor
public
inline
VideoMode
VideoMode
(
int
width,
int
height)
VideoMode constructor