FGenericPlatformApplicationMisc

Windows
MacOS
Linux

Inheritance Hierarchy

FGenericPlatformApplicationMisc

FHoloLensPlatformApplicationMisc

References

Module

ApplicationCore

Header

/Engine/Source/Runtime/ApplicationCore/Public/GenericPlatform/GenericPlatformApplicationMisc.h

Include

#include "GenericPlatform/GenericPlatformApplicationMisc.h"

Syntax

struct FGenericPlatformApplicationMisc

Functions

Name Description

Public function Static

bool

 

AnchorWindowWindowPositionTopLeft()

UE expects mouse coordinates in screen space.

Public function Static

void

 

ClipboardCopy

(
    const TCHAR* Str
)

Copies text to the operating system clipboard.

Public function Static

void

 

ClipboardPaste

(
    FString& Dest
)

Pastes in text from the operating system clipboard.

Public function Static

EScreenPhysi...

 

ComputePhysicalScreenDensity

(
    int32& OutScreenDensity
)

Gets the physical size of the screen if possible. Some platforms lie, some platforms don't know.

Public function Static

bool

 

ControlScreensaver

(
    EScreenSaverAction Action
)

Disables screensaver (if platform supports such an API)

Public function Static

EScreenPhysi...

 

ConvertInchesToPixels

(
    float Inches,
    float& OutPixels
)

If we know or can approximate the pixel density of the screen we will convert the incoming inches to pixels on the device.

Public function Static

EScreenPhysi...

 

ConvertPixelsToInches

(
    float Pixels,
    float& OutInches
)

If we know or can approximate the pixel density of the screen we will convert the incoming pixels to inches on the device.

Public function Static

GenericAppli...

 

CreateApplication()

Creates an application instance.

Public function Static

FOutputDevic...

 

CreateConsoleOutputDevice()

Creates a console output device for this platform. Should only be called once.

Public function Static

void

 

EnableMotionData

(
    bool bEnable
)

Whether to enable controller motion data polling (by default motion data is enabled) Some platforms may want to disable it to reduce battery drain

Public function Static

float

 

GetDPIScaleFactorAtPoint

(
    float X,
    float Y
)

Returns monitor's DPI scale factor at given screen coordinates (expressed in pixels)

Public function Static

FOutputDevic...

 

GetErrorOutputDevice()

Gets a pointer to the platform error output device singleton.

Public function Static

FFeedbackCon...

 

GetFeedbackContext()

Gets a pointer to the default platform feedback context implementation.

Public function Static

UTexture2D &...

 

GetGamepadButtonGlyph

(
    const FGamepadKeyNames::Type& Butt...,
    uint32 ControllerIndex
)

Returns a texture of the glyph representing the specified button on the specified controller, or nullptr if not supported.

Public function Static

FString

 

GetGamepadControllerName

(
    int32 ControllerId
)

Returns name of gamepad if controller id assigned to a gamepad

Public function Static

EScreenPhysi...

 

GetPhysicalScreenDensity

(
    int32& OutScreenDensity
)

Gets the physical size of the screen if possible. Some platforms lie, some platforms don't know.

Public function Static

FLinearColor

 

GetScreenPixelColor

(
    const FVector2D& InScreenPos,
    float InGamma
)

Sample the displayed pixel color from anywhere on the screen using the OS

Public function Static

bool

 

GetWindowTitleMatchingText

(
    const TCHAR* TitleStartsWith,
    FString& OutTitle
)

Searches for a window that matches the window name or the title starts with a particular text.

Public function Static

void

 

Init()

Public function Static

bool

 

IsControllerAssignedToGamepad

(
    int32 ControllerId
)

Returns true if controller id assigned to a gamepad

Public function Static

bool

 

IsHighDPIAwarenessEnabled()

Public function Static

bool

 

IsMotionDataEnabled()

Whether controller motion data polling is enabled (by default motion data is enabled)

Public function Static

bool

 

IsScreensaverEnabled()

Returns state of screensaver (if platform supports it)

Public function Static

bool

 

IsThisApplicationForeground()

Returns true if the specified application has a visible window, and that window is active/has focus/is selected

Public function Static

void

 

LoadPreInitModules()

Load the preinit modules required by this platform, typically they are the renderer modules

Public function Static

void

 

LoadStartupModules()

Load the platform-specific startup modules

Public function Static

void

 

PostInit()

Public function Static

void

 

PreInit()

Public function Static

void

 

PreventScreenSaver()

Prevents screen-saver from kicking in by moving the mouse by 0 pixels.

Public function Static

void

 

PumpMessages

(
    bool bFromMainLoop
)

Pumps Windows messages.

Public function Static

void

 

RequestMinimize()

Request application to minimize (goto background).

Public function Static

bool

 

RequiresVirtualKeyboard()

Returns whether the platform wants to use a touch screen for a virtual keyboard.

Public function Static

void

 

ResetGamepadAssignments()

Resets the gamepad to player controller id assignments

Public function Static

void

 

ResetGamepadAssignmentToController

(
    int32 ControllerId
)

Resets the gamepad assignment to player controller id

Public function Static

void

 

SetGamepadsAllowed

(
    bool bAllowed
)

Set whether gamepads are allowed at the platform level.

Public function Static

void

 

SetGamepadsBlockDeviceFeedback

(
    bool bAllowed
)

Set whether gamepads are allowed at the platform level.

Public function Static

void

 

SetHighDPIMode()

Allows the OS to enable high DPI mode

Public function Static

void

 

TearDown()

Enums

Name

Description

Public enum

EScreenSaverAction

Constants

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss