Documentation of SFML 2.6.1

Loading...
Searching...
No Matches
System module

Base module of SFML, defining various utilities. More...

Classes

class  sf::Clock
 Utility class that measures the elapsed time. More...
 
class  sf::FileInputStream
 Implementation of input stream based on a file. More...
 
class  sf::InputStream
 Abstract class for custom file input streams. More...
 
class  sf::Lock
 Automatic wrapper for locking and unlocking mutexes. More...
 
class  sf::MemoryInputStream
 Implementation of input stream based on a memory chunk. More...
 
class  sf::Mutex
 Blocks concurrent access to shared resources from multiple threads. More...
 
class  sf::NonCopyable
 Utility class that makes any derived class non-copyable. More...
 
class  sf::String
 Utility string class that automatically handles conversions between types and encodings. More...
 
class  sf::Thread
 Utility class to manipulate threads. More...
 
class  sf::ThreadLocal
 Defines variables with thread-local storage. More...
 
class  sf::ThreadLocalPtr< T >
 Pointer to a thread-local variable. More...
 
class  sf::Time
 Represents a time value. More...
 
class  sf::Utf< N >
 Utility class providing generic functions for UTF conversions. More...
 
class  sf::Vector2< T >
 Utility template class for manipulating 2-dimensional vectors. More...
 
class  sf::Vector3< T >
 Utility template class for manipulating 3-dimensional vectors. More...
 

Functions

ANativeActivity * sf::getNativeActivity ()
 Return a pointer to the Android native activity.
 
void sf::sleep (Time duration)
 Make the current thread sleep for a given duration.
 

Detailed Description

Base module of SFML, defining various utilities.

It provides vector classes, Unicode strings and conversion functions, threads and mutexes, timing classes.

Function Documentation

◆ getNativeActivity()

ANativeActivity * sf::getNativeActivity ( )

Return a pointer to the Android native activity.

You shouldn't have to use this function, unless you want to implement very specific details, that SFML doesn't support, or to use a workaround for a known issue.

Returns
Pointer to Android native activity structure
Platform Limitation
This is only available on Android and to use it, you'll have to specifically include SFML/System/NativeActivity.hpp in your code.

◆ sleep()

void sf::sleep ( Time  duration)

Make the current thread sleep for a given duration.

sf::sleep is the best way to block a program or one of its threads, as it doesn't consume any CPU power.

Parameters
durationTime to sleep