Search Results for

    Show / Hide Table of Contents

    Class PlatformBase

    Runtime platform service.

    Inheritance
    PlatformBase
    Assembly: FlaxEngine.dll
    File: Engine/Platform/Base/PlatformBase.h
    Syntax
    public class PlatformBase

    Constructors

    DEPRECATED("Use CacheLineSize field from CPUInfo.") static int32 GetCacheLineSize()

    Gets the CPU cache line size. [Deprecated in v1.10]

    Declaration
    public DEPRECATED("Use CacheLineSize field from CPUInfo.") static int32 GetCacheLineSize()
    Parameters
    "Use CacheLineSize field from CPUInfo." PlatformBase_DEPRECATED__Use_CacheLineSize_field_from_CPUInfo___

    DEPRECATED("Use CreateProcess instead")

    Starts a new process (runs app). [Deprecated in v1.6]

    Declaration
    public DEPRECATED("Use CreateProcess instead") static int32 StartProcess(const StringView& filename
    Parameters
    "Use CreateProcess instead" PlatformBase_DEPRECATED__Use_CreateProcess_instead__

    Fields

    args

    Declaration
    public StringView args
    Field Value
    StringView

    CustomDpiScale

    The custom DPI scale factor to apply globally. Can be used to adjust the User Interface scale (resolution).

    Declaration
    public static float CustomDpiScale
    Field Value
    float

    environment

    Declaration
    public StringView Dictionary<String, String, HeapAllocation> environment
    Field Value
    StringView Dictionary<String, String, HeapAllocation>

    hiddenWindow

    Declaration
    public StringView StringView bool hiddenWindow = false
    Field Value
    StringView StringView bool

    UserAdded

    Event called when user gets added (eg. logged in).

    Declaration
    public static Delegate<User* > UserAdded
    Field Value
    Delegate<User >

    UserRemoved

    Event called when user gets removed (eg. logged out).

    Declaration
    public static Delegate<User* > UserRemoved
    Field Value
    Delegate<User >

    Users

    The list of users.

    Declaration
    public static Array<User* , FixedAllocation<8>> Users
    Field Value
    Array<User , FixedAllocation<8>>

    waitForEnd

    Declaration
    public StringView StringView bool bool waitForEnd = false)
    Field Value
    StringView StringView bool bool

    workingDir

    Declaration
    public StringView StringView workingDir
    Field Value
    StringView StringView

    Methods

    Allocate(uint64 size, uint64 alignment)

    Allocates memory on a specified alignment boundary.

    Declaration
    public static void* Allocate(uint64 size, uint64 alignment)=delete
    Parameters
    uint64 size

    The size of the allocation (in bytes).

    uint64 alignment

    The memory alignment (in bytes). Must be an integer power of 2.

    Returns
    void

    The pointer to the allocated chunk of the memory. The pointer is a multiple of alignment.

    AllocatePages(uint64 numPages, uint64 pageSize)

    Allocates pages memory block.

    Declaration
    public static void* AllocatePages(uint64 numPages, uint64 pageSize)
    Parameters
    uint64 numPages

    The number of pages to allocate.

    uint64 pageSize

    The size of single page. Use Platform::GetCPUInfo().PageSize or provide compatible, custom size.

    Returns
    void

    The pointer to the allocated pages in memory.

    Assert(const char* message, const char* file, int line)

    Performs a fatal crash due to assertion fail.

    Declaration
    public static NO_RETURN void Assert(const char* message, const char* file, int line)
    Parameters
    char message

    The assertion message.

    char file

    The source file.

    int line

    The source line.

    Returns
    NO_RETURN void

    AtomicRead(int32 const volatile* dst)

    Performs an atomic 32-bit variable read operation on the specified values.

    Declaration
    public static int32 AtomicRead(int32 const volatile* dst)=delete
    Parameters
    int32 volatile dst

    A pointer to the destination value.

    Returns
    int32

    The function returns the value of the destination parameter.

    AtomicRead(int64 const volatile* dst)

    Performs an atomic 64-bit variable read operation on the specified values.

    Declaration
    public static int64 AtomicRead(int64 const volatile* dst)=delete
    Parameters
    int64 volatile dst

    A pointer to the destination value.

    Returns
    int64

    The function returns the value of the destination parameter.

    AtomicStore(int32 volatile* dst, int32 value)

    Sets a 32-bit variable to the specified value as an atomic operation.

    Declaration
    public static void AtomicStore(int32 volatile* dst, int32 value)=delete
    Parameters
    int32 volatile dst

    A pointer to the value to be exchanged.

    int32 value

    The value to be set.

    AtomicStore(int64 volatile* dst, int64 value)

    Sets a 64-bit variable to the specified value as an atomic operation.

    Declaration
    public static void AtomicStore(int64 volatile* dst, int64 value)=delete
    Parameters
    int64 volatile dst

    A pointer to the value to be exchanged.

    int64 value

    The value to be set.

    CanOpenUrl(const StringView& url)

    Returns a value indicating whether can open a given URL in a web browser.

    Declaration
    public static bool CanOpenUrl(const StringView& url)
    Parameters
    StringView url

    The URI to assign to web browser.

    Returns
    bool

    True if can open URL, otherwise false.

    CheckFailed(const char* message, const char* file, int line)

    Performs a error message log due to runtime value check fail.

    Declaration
    public static void CheckFailed(const char* message, const char* file, int line)
    Parameters
    char message

    The assertion message.

    char file

    The source file.

    int line

    The source line.

    CollectCrashData(const String& crashDataFolder, void* context=nullptr)

    Declaration
    public static void CollectCrashData(const String& crashDataFolder, void* context=nullptr)
    Parameters
    String crashDataFolder

    void context

    Crash(int32 line, const char* file)

    Performs a fatal crash.

    Declaration
    public static NO_RETURN void Crash(int32 line, const char* file)
    Parameters
    int32 line

    The source line.

    char file

    The source file.

    Returns
    NO_RETURN void

    CreateGuid(Guid& result)

    Creates the unique identifier.

    Declaration
    public static void CreateGuid(Guid& result)
    Parameters
    Guid result

    The result.

    CreateProcess(CreateProcessSettings& settings)

    Creates a new process.

    Declaration
    public static int32 CreateProcess(CreateProcessSettings& settings)
    Parameters
    CreateProcessSettings settings

    The process settings.

    Returns
    int32

    Retrieves the termination status of the specified process. Valid only if processed ended.

    CreateWindow(CreateWindowSettings& settings)

    Creates the window.

    Declaration
    public static Window* CreateWindow(CreateWindowSettings& settings)=delete
    Parameters
    CreateWindowSettings settings

    The window settings.

    Returns
    Window

    The created native window object or null if failed.

    Error(const StringView& msg)

    Shows the error message to the user.

    Declaration
    public static void Error(const StringView& msg)
    Parameters
    StringView msg

    The message content.

    Fatal(const StringView& msg, FatalErrorType error=FatalErrorType::Unknown)

    Shows the fatal error message to the user.

    Declaration
    public static void Fatal(const StringView& msg, FatalErrorType error=FatalErrorType::Unknown)
    Parameters
    StringView msg

    The message content.

    FatalErrorType error

    The fatal error type.

    Fatal(const StringView& msg, void* context, FatalErrorType error=FatalErrorType::Unknown)

    Shows the fatal error message to the user.

    Declaration
    public static void Fatal(const StringView& msg, void* context, FatalErrorType error=FatalErrorType::Unknown)
    Parameters
    StringView msg

    The message content.

    void context

    The platform-dependent context for the stack trace collecting (eg. platform exception info).

    FatalErrorType error

    The fatal error type.

    Free(void* ptr)

    Frees a block of allocated memory.

    Declaration
    public static void Free(void* ptr)=delete
    Parameters
    void ptr

    A pointer to the memory block to deallocate.

    FreeLibrary(void* handle)

    Frees the library.

    Declaration
    public static void FreeLibrary(void* handle)=delete
    Parameters
    void handle

    The loaded library handle.

    FreePages(void* ptr)

    Frees allocated pages memory block.

    Declaration
    public static void FreePages(void* ptr)
    Parameters
    void ptr

    The pointer to the pages to deallocate.

    GetBatteryInfo()

    Gets the battery information.

    Declaration
    public static BatteryInfo GetBatteryInfo()
    Returns
    BatteryInfo

    GetClockFrequency()

    Gets the system clock frequency.

    Declaration
    public static uint64 GetClockFrequency()=delete
    Returns
    uint64

    The clock frequency.

    GetComputerName()

    Gets the computer machine name.

    Declaration
    public static String GetComputerName()=delete
    Returns
    String

    GetCPUInfo()

    Gets the CPU information.

    Declaration
    public static CPUInfo GetCPUInfo()=delete
    Returns
    CPUInfo

    The CPU info.

    GetCurrentProcessId()

    Gets the current process unique identifier.

    Declaration
    public static uint64 GetCurrentProcessId()=delete
    Returns
    uint64

    The process id.

    GetCurrentThreadID()

    Gets the current thread unique identifier.

    Declaration
    public static uint64 GetCurrentThreadID()=delete
    Returns
    uint64

    The thread id.

    GetDesktopSize()

    Gets size of the primary desktop.

    Declaration
    public static Float2 GetDesktopSize()=delete
    Returns
    Float2

    Desktop size.

    GetDpi()

    Gets the primary monitor's DPI setting.

    Declaration
    public static int32 GetDpi()
    Returns
    int32

    GetDpiScale()

    Gets the primary monitor's DPI setting scale factor (1 is default). Includes custom DPI scale.

    Declaration
    public static float GetDpiScale()
    Returns
    float

    GetEnvironmentVariable(const String& name, String& value)

    Gets the environment variable value.

    Declaration
    public static bool GetEnvironmentVariable(const String& name, String& value)
    Parameters
    String name

    The variable name.

    String value

    The result value.

    Returns
    bool

    True if failed, otherwise false.

    GetEnvironmentVariables(Dictionary<String, String, HeapAllocation>& result)

    Gets the process environment variables (pairs of key and value).

    Declaration
    public static void GetEnvironmentVariables(Dictionary<String, String, HeapAllocation>& result)
    Parameters
    Dictionary<String, String, HeapAllocation> result

    The result.

    GetExecutableFilePath()

    Gets full path of the main engine executable file.

    Declaration
    public static String GetExecutableFilePath()=delete
    Returns
    String

    The main engine executable file path.

    GetHasFocus()

    Returns true if app has user focus.

    Declaration
    public static bool GetHasFocus()=delete
    Returns
    bool

    GetIsPaused()

    Returns true if app is paused. Engine ticking (update/physics/drawing) is disabled in that state, only platform is updated until app end or resume.

    Declaration
    public static bool GetIsPaused()
    Returns
    bool

    GetLibraryExportSymbol(void* handle, const char* symbol)

    Gets the address of an exported function or variable from the specified library.

    Declaration
    public static void* GetLibraryExportSymbol(void* handle, const char* symbol)=delete
    Parameters
    void handle

    The library handle.

    char symbol

    The name of the symbol to locate (exported function or a variable).

    Returns
    void

    The address of the exported symbol, or null if failed.

    GetMainDirectory()

    Gets full path of the main engine directory.

    Declaration
    public static String GetMainDirectory()=delete
    Returns
    String

    Main engine directory path

    GetMemoryStats()

    Gets the current memory stats.

    Declaration
    public static MemoryStats GetMemoryStats()=delete
    Returns
    MemoryStats

    The memory stats.

    GetMonitorBounds(const Float2& screenPos)

    Gets the origin position and size of the monitor at the given screen-space location.

    Declaration
    public static Rectangle GetMonitorBounds(const Float2& screenPos)
    Parameters
    Float2 screenPos

    The screen position (in pixels).

    Returns
    Rectangle

    The monitor bounds.

    GetMousePosition()

    Gets the mouse cursor position in screen-space coordinates.

    Declaration
    public static Float2 GetMousePosition()
    Returns
    Float2

    Mouse cursor coordinates.

    GetNetworkConnectionType()

    Gets the current network connection type.

    Declaration
    public static NetworkConnectionType GetNetworkConnectionType()
    Returns
    NetworkConnectionType

    GetPlatformType()

    Returns the current runtime platform type. It's compile-time constant.

    Declaration
    public static PlatformType GetPlatformType()
    Returns
    PlatformType

    GetProcessMemoryStats()

    Gets the process current memory stats.

    Declaration
    public static ProcessMemoryStats GetProcessMemoryStats()=delete
    Returns
    ProcessMemoryStats

    The process memory stats.

    GetScreenOrientationType()

    Gets the current screen orientation type.

    Declaration
    public static ScreenOrientationType GetScreenOrientationType()
    Returns
    ScreenOrientationType

    GetStackFrames(int32 skipCount = 0, int32 maxDepth=60, void* context=nullptr)

    Gets current native stack trace information.

    Declaration
    public static Array<StackFrame, HeapAllocation> GetStackFrames(int32 skipCount = 0, int32 maxDepth=60, void* context=nullptr)
    Parameters
    int32 skipCount

    The amount of stack frames to skip from the beginning. Can be used to skip the callee function from the trace (eg. in crash handler).

    int32 maxDepth

    The maximum depth of the stack to collect. Can be used to prevent too long stack traces in case of stack overflow exception.

    void context

    The platform-dependent context for the stack trace collecting (eg. platform exception info).

    Returns
    Array<StackFrame, HeapAllocation>

    The collected stack trace frames. Empty if not supported (eg. platform not implements this feature or not supported in the distributed build).

    GetStackTrace(int32 skipCount = 0, int32 maxDepth=60, void* context=nullptr)

    Gets current native stack trace information as string.

    Declaration
    public static String GetStackTrace(int32 skipCount = 0, int32 maxDepth=60, void* context=nullptr)
    Parameters
    int32 skipCount

    The amount of stack frames to skip from the beginning. Can be used to skip the callee function from the trace (eg. in crash handler).

    int32 maxDepth

    The maximum depth of the stack to collect. Can be used to prevent too long stack traces in case of stack overflow exception.

    void context

    The platform-dependent context for the stack trace collecting (eg. platform exception info).

    Returns
    String

    The collected stack trace printed into string. Empty if not supported (eg. platform not implements this feature or not supported in the distributed build).

    GetSystemName()

    Gets the name of the operating system.

    Declaration
    public static String GetSystemName()=delete
    Returns
    String

    GetSystemTime(int32& year, int32& month, int32& dayOfWeek, int32& day, int32& hour, int32& minute, int32& second, int32& millisecond)

    Gets current system time based on current computer settings.

    Declaration
    public static void GetSystemTime(int32& year, int32& month, int32& dayOfWeek, int32& day, int32& hour, int32& minute, int32& second, int32& millisecond)=delete
    Parameters
    int32 year

    The result year value.

    int32 month

    The result month value.

    int32 dayOfWeek

    The result day of the week value.

    int32 day

    The result day value.

    int32 hour

    The result hour value.

    int32 minute

    The result minute value.

    int32 second

    The result second value.

    int32 millisecond

    The result millisecond value.

    GetSystemVersion()

    Gets the version of the operating system version.

    Declaration
    public static Version GetSystemVersion()=delete
    Returns
    Version

    GetTimeCycles()

    Gets the current time as CPU cycles counter.

    Declaration
    public static uint64 GetTimeCycles()=delete
    Returns
    uint64

    The CPU cycles counter value.

    GetTimeSeconds()

    Gets the current time in seconds.

    Declaration
    public static double GetTimeSeconds()=delete
    Returns
    double

    The current time.

    GetUniqueDeviceId()

    Gets the (almost) unique ID of the current user device.

    Declaration
    public static Guid GetUniqueDeviceId()=delete
    Returns
    Guid

    ID of the current user device

    GetUserLocaleName()

    Gets the current locale culture (eg. "pl-PL" or "en-US").

    Declaration
    public static String GetUserLocaleName()=delete
    Returns
    String

    GetUserName()

    Gets the user name.

    Declaration
    public static String GetUserName()
    Returns
    String

    GetUTCTime(int32& year, int32& month, int32& dayOfWeek, int32& day, int32& hour, int32& minute, int32& second, int32& millisecond)

    Gets current UTC time based on local computer settings.

    Declaration
    public static void GetUTCTime(int32& year, int32& month, int32& dayOfWeek, int32& day, int32& hour, int32& minute, int32& second, int32& millisecond)=delete
    Parameters
    int32 year

    The result year value.

    int32 month

    The result month value.

    int32 dayOfWeek

    The result day of the week value.

    int32 day

    The result day value.

    int32 hour

    The result hour value.

    int32 minute

    The result minute value.

    int32 second

    The result second value.

    int32 millisecond

    The result millisecond value.

    GetVirtualDesktopBounds()

    Gets virtual bounds of the desktop made of all the monitors outputs attached.

    Declaration
    public static Rectangle GetVirtualDesktopBounds()
    Returns
    Rectangle

    Whole desktop size.

    GetVirtualDesktopSize()

    Gets virtual size of the desktop made of all the monitors outputs attached.

    Declaration
    public static Float2 GetVirtualDesktopSize()
    Returns
    Float2

    GetWorkingDirectory()

    Gets the current working directory of the process.

    Declaration
    public static String GetWorkingDirectory()=delete
    Returns
    String

    The workspace directory path.

    Info(const StringView& msg)

    Shows the information message to the user.

    Declaration
    public static void Info(const StringView& msg)
    Parameters
    StringView msg

    The message content.

    InterlockedAdd(int64 volatile* dst, int64 value)

    Adds value to the value of the specified variable as an atomic operation.

    Declaration
    public static int64 InterlockedAdd(int64 volatile* dst, int64 value)=delete
    Parameters
    int64 volatile dst

    A pointer to the first operand. This value will be replaced with the result of the operation.

    int64 value

    The second operand.

    Returns
    int64

    The result value of the operation.

    InterlockedCompareExchange(int32 volatile* dst, int32 exchange, int32 comperand)

    Performs an atomic compare-and-exchange operation on the specified values. The function compares two specified 32-bit values and exchanges with another 32-bit value based on the outcome of the comparison.

    The function compares the dst value with the comperand value. If the dst value is equal to the comperand value, the value value is stored in the address specified by dst. Otherwise, no operation is performed.

    Declaration
    public static int32 InterlockedCompareExchange(int32 volatile* dst, int32 exchange, int32 comperand)=delete
    Parameters
    int32 volatile dst

    A pointer to the first operand. This value will be replaced with the result of the operation.

    int32 exchange

    The value to exchange.

    int32 comperand

    The value to compare to destination.

    Returns
    int32

    The original value of the dst parameter.

    InterlockedCompareExchange(int64 volatile* dst, int64 exchange, int64 comperand)

    Performs an atomic compare-and-exchange operation on the specified values. The function compares two specified 64-bit values and exchanges with another 64-bit value based on the outcome of the comparison.

    The function compares the dst value with the comperand value. If the dst value is equal to the comperand value, the value value is stored in the address specified by dst. Otherwise, no operation is performed.

    Declaration
    public static int64 InterlockedCompareExchange(int64 volatile* dst, int64 exchange, int64 comperand)=delete
    Parameters
    int64 volatile dst

    A pointer to the first operand. This value will be replaced with the result of the operation.

    int64 exchange

    The value to exchange.

    int64 comperand

    The value to compare to destination.

    Returns
    int64

    The original value of the dst parameter.

    InterlockedDecrement(int64 volatile* dst)

    Decrements (decreases by one) the value of the specified variable as an atomic operation.

    Declaration
    public static int64 InterlockedDecrement(int64 volatile* dst)=delete
    Parameters
    int64 volatile dst

    A pointer to the variable to be decremented.

    Returns
    int64

    The decremented value of the decremented parameter.

    InterlockedExchange(int64 volatile* dst, int64 exchange)

    Sets a 64-bit variable to the specified value as an atomic operation. The function prevents more than one thread from using the same variable simultaneously.

    Declaration
    public static int64 InterlockedExchange(int64 volatile* dst, int64 exchange)=delete
    Parameters
    int64 volatile dst

    A pointer to the first operand. This value will be replaced with the result of the operation.

    int64 exchange

    The value to exchange.

    Returns
    int64

    The original value of the dst parameter.

    InterlockedIncrement(int64 volatile* dst)

    Increments (increases by one) the value of the specified variable as an atomic operation.

    Declaration
    public static int64 InterlockedIncrement(int64 volatile* dst)=delete
    Parameters
    int64 volatile dst

    A pointer to the variable to be incremented.

    Returns
    int64

    The incremented value of the dst parameter.

    Is64BitApp()

    Returns true if is running 64 bit application (otherwise 32 bit). It's compile-time constant.

    Declaration
    public static bool Is64BitApp()
    Returns
    bool

    Is64BitPlatform()

    Returns true if running on 64-bit computer

    Declaration
    public static bool Is64BitPlatform()=delete
    Returns
    bool

    True if running on 64-bit computer, otherwise false.

    IsDebuggerPresent()

    Checks whenever program is running with debugger attached.

    Declaration
    public static bool IsDebuggerPresent()
    Returns
    bool

    True if debugger is present, otherwise false.

    LoadLibrary(const Char* filename)

    Loads the library.

    Declaration
    public static void* LoadLibrary(const Char* filename)=delete
    Parameters
    Char filename

    The filename of the library to load (relative to workspace or absolute path).

    Returns
    void

    The loaded library handle (native) or null if failed.

    Log(const StringView& msg)

    Logs the specified message to the platform-dependant logging stream.

    Declaration
    public static void Log(const StringView& msg)
    Parameters
    StringView msg

    The message.

    MemoryBarrier()

    Creates a hardware memory barrier (fence) that prevents the CPU from re-ordering read and write operations

    Declaration
    public static void MemoryBarrier()=delete

    MemoryClear(void* dst, uint64 size)

    Clear memory region with zeros

    Declaration
    public static void MemoryClear(void* dst, uint64 size)
    Parameters
    void dst

    Destination memory address. Must not be null, even if size is zero.

    uint64 size

    Size of the memory to clear in bytes

    Returns
    void

    MemoryCompare(const void* buf1, const void* buf2, uint64 size)

    Compare two blocks of the memory.

    Declaration
    public static int32 MemoryCompare(const void* buf1, const void* buf2, uint64 size)
    Parameters
    void buf1

    The first buffer address. Must not be null, even if size is zero.

    void buf2

    The second buffer address. Must not be null, even if size is zero.

    uint64 size

    Size of the memory to compare in bytes.

    Returns
    int32

    MemoryCopy(void* dst, const void* src, uint64 size)

    Copy memory region

    Declaration
    public static void MemoryCopy(void* dst, const void* src, uint64 size)
    Parameters
    void dst

    Destination memory address. Must not be null, even if size is zero.

    void src

    Source memory address. Must not be null, even if size is zero.

    uint64 size

    Size of the memory to copy in bytes

    Returns
    void

    MemorySet(void* dst, uint64 size, int32 value)

    Set memory region with given value

    Declaration
    public static void MemorySet(void* dst, uint64 size, int32 value)
    Parameters
    void dst

    Destination memory address. Must not be null, even if size is zero.

    uint64 size

    Size of the memory to set in bytes

    int32 value

    Value to set

    Returns
    void

    MissingCode(int32 line, const char* file, const char* info)

    Performs a fatal crash due to code not being implemented.

    Declaration
    public static NO_RETURN void MissingCode(int32 line, const char* file, const char* info)
    Parameters
    int32 line

    The source line.

    char file

    The source file.

    char info

    The additional info.

    Returns
    NO_RETURN void

    OnMemoryAlloc(void* ptr, uint64 size)

    Declaration
    public static void OnMemoryAlloc(void* ptr, uint64 size)
    Parameters
    void ptr

    uint64 size

    OnMemoryFree(void* ptr)

    Declaration
    public static void OnMemoryFree(void* ptr)
    Parameters
    void ptr

    OpenUrl(const StringView& url)

    Launches a web browser and opens a given URL.

    Declaration
    public static void OpenUrl(const StringView& url)
    Parameters
    StringView url

    The URI to assign to web browser.

    OutOfMemory(int32 line=-1, const char* file=nullptr)

    Performs a fatal crash occurred on memory allocation fail.

    Declaration
    public static NO_RETURN void OutOfMemory(int32 line=-1, const char* file=nullptr)
    Parameters
    int32 line

    The source line.

    char file

    The source file.

    Returns
    NO_RETURN void

    Prefetch(void const* ptr)

    Indicates to the processor that a cache line will be needed in the near future.

    Declaration
    public static void Prefetch(void const* ptr)=delete
    Parameters
    void const ptr

    The address of the cache line to be loaded. This address is not required to be on a cache line boundary.

    SetEnvironmentVariable(const String& name, const String& value)

    Sets the environment variable value.

    Declaration
    public static bool SetEnvironmentVariable(const String& name, const String& value)
    Parameters
    String name

    The variable name.

    String value

    The value to assign.

    Returns
    bool

    True if failed, otherwise false.

    SetHighDpiAwarenessEnabled(bool enable)

    Sets the High DPI awareness.

    Declaration
    public static void SetHighDpiAwarenessEnabled(bool enable)
    Parameters
    bool enable

    SetMousePosition(const Float2& position)

    Sets the mouse cursor position in screen-space coordinates.

    Declaration
    public static void SetMousePosition(const Float2& position)
    Parameters
    Float2 position

    Cursor position to set.

    SetThreadAffinityMask(uint64 affinityMask)

    Sets a processor affinity mask for the specified thread.

    A thread affinity mask is a bit vector in which each bit represents a logical processor that a thread is allowed to run on. A thread affinity mask must be a subset of the process affinity mask for the containing process of a thread. A thread can only run on the processors its process can run on. Therefore, the thread affinity mask cannot specify a 1 bit for a processor when the process affinity mask specifies a 0 bit for that processor.

    Declaration
    public static void SetThreadAffinityMask(uint64 affinityMask)=delete
    Parameters
    uint64 affinityMask

    The affinity mask for the thread.

    SetThreadPriority(ThreadPriority priority)

    Sets the current thread priority.

    Declaration
    public static void SetThreadPriority(ThreadPriority priority)=delete
    Parameters
    ThreadPriority priority

    The priority.

    SetWorkingDirectory(const String& path)

    Sets the current working directory of the process.

    Declaration
    public static bool SetWorkingDirectory(const String& path)
    Parameters
    String path

    The directory to set.

    Returns
    bool

    True if failed, otherwise false.

    Sleep(int32 milliseconds)

    Suspends the execution of the current thread until the time-out interval elapses

    Declaration
    public static void Sleep(int32 milliseconds)=delete
    Parameters
    int32 milliseconds

    The time interval for which execution is to be suspended, in milliseconds.

    Warning(const StringView& msg)

    Shows the warning message to the user.

    Declaration
    public static void Warning(const StringView& msg)
    Parameters
    StringView msg

    The message content.

    • Improve this Doc
    • View Source
    In This Article
    Back to top Copyright © 2012-2024 Wojciech Figat