UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FMacApplication Class Reference

#include <MacApplication.h>

+ Inheritance diagram for FMacApplication:

Public Types

typedef void(* MenuBarShutdownFuncPtr) ()
 
- Public Types inherited from GenericApplication
typedef FOnConsoleCommandAdded::FDelegate FOnConsoleCommandListener
 

Public Member Functions

 ~FMacApplication ()
 
virtual void SetMessageHandler (const TSharedRef< class FGenericApplicationMessageHandler > &InMessageHandler) override
 
virtual void PollGameDeviceState (const float TimeDelta) override
 
virtual void PumpMessages (const float TimeDelta) override
 
virtual void ProcessDeferredEvents (const float TimeDelta) override
 
virtual TSharedRef< FGenericWindowMakeWindow () override
 
virtual void InitializeWindow (const TSharedRef< FGenericWindow > &Window, const TSharedRef< FGenericWindowDefinition > &InDefinition, const TSharedPtr< FGenericWindow > &InParent, const bool bShowImmediately) override
 
virtual FModifierKeysState GetModifierKeys () const override
 
virtual bool IsCursorDirectlyOverSlateWindow () const override
 
virtual TSharedPtr< FGenericWindowGetWindowUnderCursor () override
 
virtual void SetHighPrecisionMouseMode (const bool Enable, const TSharedPtr< FGenericWindow > &InWindow) override
 
virtual bool IsUsingHighPrecisionMouseMode () const override
 
virtual bool IsUsingTrackpad () const override
 
virtual bool IsGamepadAttached () const override
 
virtual FPlatformRect GetWorkArea (const FPlatformRect &CurrentWindow) const override
 
virtual EWindowTitleAlignment::Type GetWindowTitleAlignment () const override
 
virtual EWindowTransparency GetWindowTransparencySupport () const override
 
virtual ITextInputMethodSystemGetTextInputMethodSystem () override
 
void ResendLastEvent ()
 
void CloseWindow (TSharedRef< FMacWindow > Window)
 
void DeferEvent (NSObject *Object)
 
bool IsProcessingDeferredEvents () const
 
TSharedPtr< FMacWindowFindWindowByNSWindow (FCocoaWindow *WindowHandle)
 
void OnWindowWillResize (TSharedRef< FMacWindow > Window)
 
void InvalidateTextLayout (FCocoaWindow *Window)
 
void ResetModifierKeys ()
 
bool IsWorkspaceSessionActive () const
 
void SystemModalMode (bool const bInSystemModalMode)
 
const TArray< TSharedRef< FMacWindow > > & GetAllWindows () const
 
FCriticalSectionGetWindowsArrayMutex ()
 
void OnCursorLock ()
 
void IgnoreMouseMoveDelta ()
 
void SetIsRightClickEmulationEnabled (bool bEnabled)
 
void OnWindowDidResize (TSharedRef< FMacWindow > Window, bool bRestoreMouseCursorLocking=false)
 
void OnWindowChangedScreen (TSharedRef< FMacWindow > Window)
 
void OnWindowOrderedFront (TSharedRef< FMacWindow > Window)
 
void OnWindowActivationChanged (const TSharedRef< FMacWindow > &Window, const EWindowActivation ActivationType)
 
bool IsDisplayReconfiguring () const
 
virtual IInputInterfaceGetInputInterface () override
 
virtual void SetForceFeedbackChannelValue (int32 ControllerId, FForceFeedbackChannelType ChannelType, float Value) override
 
virtual void SetForceFeedbackChannelValues (int32 ControllerId, const FForceFeedbackValues &Values) override
 
virtual void SetHapticFeedbackValues (int32 ControllerId, int32 Hand, const FHapticFeedbackValues &Values) override
 
virtual void SetLightColor (int32 ControllerId, FColor Color) override
 
virtual void ResetLightColor (int32 ControllerId) override
 
- Public Member Functions inherited from GenericApplication
 DECLARE_MULTICAST_DELEGATE_OneParam (FOnConsoleCommandAdded, const FString &)
 
APPLICATIONCORE_API GenericApplication (const TSharedPtr< ICursor > &InCursor)
 
virtual APPLICATIONCORE_API ~GenericApplication ()
 
TSharedRef< FGenericApplicationMessageHandlerGetMessageHandler ()
 
virtual void Tick (const float TimeDelta)
 
virtual void SetCapture (const TSharedPtr< FGenericWindow > &InWindow)
 
virtual voidGetCapture (void) const
 
virtual bool IsMinimized () const
 
virtual bool IsMouseAttached () const
 
virtual void RegisterConsoleCommandListener (const FOnConsoleCommandListener &InListener)
 
virtual void AddPendingConsoleCommand (const FString &InCommand)
 
virtual bool TryCalculatePopupWindowPosition (const FPlatformRect &InAnchor, const FVector2D &InSize, const FVector2D &ProposedPlacement, const EPopUpOrientation::Type Orientation, FVector2D *const CalculatedPopUpPosition) const
 
 DECLARE_EVENT_OneParam (GenericApplication, FOnDisplayMetricsChanged, const FDisplayMetrics &)
 
FOnDisplayMetricsChangedOnDisplayMetricsChanged ()
 
virtual void GetInitialDisplayMetrics (FDisplayMetrics &OutDisplayMetrics) const
 
 DECLARE_EVENT_OneParam (FSlateApplication, FVirtualKeyboardShownEvent, FPlatformRect)
 
FVirtualKeyboardShownEventOnVirtualKeyboardShown ()
 
 DECLARE_EVENT (FSlateApplication, FVirtualKeyboardHiddenEvent)
 
FVirtualKeyboardHiddenEventOnVirtualKeyboardHidden ()
 
 DECLARE_EVENT (FSlateApplication, FOnClipboardContentChanged)
 
FOnClipboardContentChangedOnClipboardContentChanged ()
 
virtual void DestroyApplication ()
 
virtual void SendAnalytics (IAnalyticsProvider *Provider)
 
virtual bool SupportsSystemHelp () const
 
virtual void ShowSystemHelp ()
 
virtual bool ApplicationLicenseValid (FPlatformUserId PlatformUser=PLATFORMUSERID_NONE)
 
virtual bool IsAllowedToRender () const
 
virtual void FinishedInputThisFrame ()
 
- Public Member Functions inherited from IInputInterface
virtual ~IInputInterface ()
 
virtual void SetDeviceProperty (int32 ControllerId, const FInputDeviceProperty *Property)
 

Static Public Member Functions

static FMacApplicationCreateMacApplication ()
 
static void OnDisplayReconfiguration (CGDirectDisplayID Display, CGDisplayChangeSummaryFlags Flags, void *UserInfo)
 
static void UpdateScreensArray ()
 
static FMacScreenRef FindScreenBySlatePosition (double X, double Y)
 
static FMacScreenRef FindScreenByCocoaPosition (double X, double Y)
 
static FVector2D ConvertSlatePositionToCocoa (double X, double Y)
 
static FVector2D ConvertCocoaPositionToSlate (double X, double Y)
 
static CGPoint ConvertSlatePositionToCGPoint (double X, double Y)
 
static FVector2D CalculateScreenOrigin (NSScreen *Screen)
 
static float GetPrimaryScreenBackingScaleFactor ()
 
static unichar TranslateKeyCodeToUniCode (uint32 KeyCode, uint32 Modifier)
 

Static Public Attributes

static MenuBarShutdownFuncPtr MenuBarShutdownFunc = nullptr
 

Friends

class FMacWindow
 

Additional Inherited Members

- Public Attributes inherited from GenericApplication
const TSharedPtr< ICursorCursor
 
- Protected Member Functions inherited from GenericApplication
void BroadcastDisplayMetricsChanged (const FDisplayMetrics &InMetrics)
 
- Protected Attributes inherited from GenericApplication
TSharedRef< class FGenericApplicationMessageHandlerMessageHandler
 
FOnDisplayMetricsChanged OnDisplayMetricsChangedEvent
 
FVirtualKeyboardShownEvent VirtualKeyboardShownEvent
 
FVirtualKeyboardHiddenEvent VirtualKeyboardHiddenEvent
 
FOnClipboardContentChanged OnClipboardContentChangedEvent
 

Detailed Description

Mac-specific application implementation.

Member Typedef Documentation

◆ MenuBarShutdownFuncPtr

typedef void(* FMacApplication::MenuBarShutdownFuncPtr) ()

Constructor & Destructor Documentation

◆ ~FMacApplication()

FMacApplication::~FMacApplication ( )

Member Function Documentation

◆ CalculateScreenOrigin()

FVector2D FMacApplication::CalculateScreenOrigin ( NSScreen Screen)
static

◆ CloseWindow()

void FMacApplication::CloseWindow ( TSharedRef< FMacWindow Window)

◆ ConvertCocoaPositionToSlate()

FVector2D FMacApplication::ConvertCocoaPositionToSlate ( double  X,
double  Y 
)
static

◆ ConvertSlatePositionToCGPoint()

CGPoint FMacApplication::ConvertSlatePositionToCGPoint ( double  X,
double  Y 
)
static

◆ ConvertSlatePositionToCocoa()

FVector2D FMacApplication::ConvertSlatePositionToCocoa ( double  X,
double  Y 
)
static

◆ CreateMacApplication()

FMacApplication * FMacApplication::CreateMacApplication ( )
static

◆ DeferEvent()

void FMacApplication::DeferEvent ( NSObject *  Object)

◆ FindScreenByCocoaPosition()

FMacScreenRef FMacApplication::FindScreenByCocoaPosition ( double  X,
double  Y 
)
static

◆ FindScreenBySlatePosition()

FMacScreenRef FMacApplication::FindScreenBySlatePosition ( double  X,
double  Y 
)
static

◆ FindWindowByNSWindow()

TSharedPtr< FMacWindow > FMacApplication::FindWindowByNSWindow ( FCocoaWindow WindowHandle)

◆ GetAllWindows()

const TArray< TSharedRef< FMacWindow > > & FMacApplication::GetAllWindows ( ) const
inline

◆ GetInputInterface()

virtual IInputInterface * FMacApplication::GetInputInterface ( )
inlineoverridevirtual

Reimplemented from GenericApplication.

◆ GetModifierKeys()

FModifierKeysState FMacApplication::GetModifierKeys ( ) const
overridevirtual

Reimplemented from GenericApplication.

◆ GetPrimaryScreenBackingScaleFactor()

float FMacApplication::GetPrimaryScreenBackingScaleFactor ( )
static

◆ GetTextInputMethodSystem()

virtual ITextInputMethodSystem * FMacApplication::GetTextInputMethodSystem ( )
inlineoverridevirtual

Function to return the current implementation of the Text Input Method System

Reimplemented from GenericApplication.

◆ GetWindowsArrayMutex()

FCriticalSection & FMacApplication::GetWindowsArrayMutex ( )
inline

◆ GetWindowTitleAlignment()

virtual EWindowTitleAlignment::Type FMacApplication::GetWindowTitleAlignment ( ) const
inlineoverridevirtual

Gets the horizontal alignment of the window title bar's title text.

Reimplemented from GenericApplication.

◆ GetWindowTransparencySupport()

virtual EWindowTransparency FMacApplication::GetWindowTransparencySupport ( ) const
inlineoverridevirtual

Reimplemented from GenericApplication.

◆ GetWindowUnderCursor()

TSharedPtr< FGenericWindow > FMacApplication::GetWindowUnderCursor ( )
overridevirtual
Returns
Native window under the mouse cursor.

Reimplemented from GenericApplication.

◆ GetWorkArea()

FPlatformRect FMacApplication::GetWorkArea ( const FPlatformRect CurrentWindow) const
overridevirtual

Reimplemented from GenericApplication.

◆ IgnoreMouseMoveDelta()

void FMacApplication::IgnoreMouseMoveDelta ( )
inline

◆ InitializeWindow()

void FMacApplication::InitializeWindow ( const TSharedRef< FGenericWindow > &  Window,
const TSharedRef< FGenericWindowDefinition > &  InDefinition,
const TSharedPtr< FGenericWindow > &  InParent,
const bool  bShowImmediately 
)
overridevirtual

Reimplemented from GenericApplication.

◆ InvalidateTextLayout()

void FMacApplication::InvalidateTextLayout ( FCocoaWindow Window)

Queues a window for text layout invalidation when safe

◆ IsCursorDirectlyOverSlateWindow()

bool FMacApplication::IsCursorDirectlyOverSlateWindow ( ) const
overridevirtual
Returns
true if the system cursor is currently directly over a slate window.

Reimplemented from GenericApplication.

◆ IsDisplayReconfiguring()

bool FMacApplication::IsDisplayReconfiguring ( ) const
inline

◆ IsGamepadAttached()

bool FMacApplication::IsGamepadAttached ( ) const
overridevirtual

Reimplemented from GenericApplication.

◆ IsProcessingDeferredEvents()

bool FMacApplication::IsProcessingDeferredEvents ( ) const
inline

◆ IsUsingHighPrecisionMouseMode()

virtual bool FMacApplication::IsUsingHighPrecisionMouseMode ( ) const
inlineoverridevirtual

Reimplemented from GenericApplication.

◆ IsUsingTrackpad()

virtual bool FMacApplication::IsUsingTrackpad ( ) const
inlineoverridevirtual

Reimplemented from GenericApplication.

◆ IsWorkspaceSessionActive()

bool FMacApplication::IsWorkspaceSessionActive ( ) const
inline

◆ MakeWindow()

TSharedRef< FGenericWindow > FMacApplication::MakeWindow ( )
overridevirtual

Reimplemented from GenericApplication.

◆ OnCursorLock()

void FMacApplication::OnCursorLock ( )

◆ OnDisplayReconfiguration()

void FMacApplication::OnDisplayReconfiguration ( CGDirectDisplayID  Display,
CGDisplayChangeSummaryFlags  Flags,
void UserInfo 
)
static

◆ OnWindowActivationChanged()

void FMacApplication::OnWindowActivationChanged ( const TSharedRef< FMacWindow > &  Window,
const EWindowActivation  ActivationType 
)

◆ OnWindowChangedScreen()

void FMacApplication::OnWindowChangedScreen ( TSharedRef< FMacWindow Window)

◆ OnWindowDidResize()

void FMacApplication::OnWindowDidResize ( TSharedRef< FMacWindow Window,
bool  bRestoreMouseCursorLocking = false 
)

◆ OnWindowOrderedFront()

void FMacApplication::OnWindowOrderedFront ( TSharedRef< FMacWindow Window)

◆ OnWindowWillResize()

void FMacApplication::OnWindowWillResize ( TSharedRef< FMacWindow Window)

◆ PollGameDeviceState()

void FMacApplication::PollGameDeviceState ( const float  TimeDelta)
overridevirtual

Reimplemented from GenericApplication.

◆ ProcessDeferredEvents()

void FMacApplication::ProcessDeferredEvents ( const float  TimeDelta)
overridevirtual

Reimplemented from GenericApplication.

◆ PumpMessages()

void FMacApplication::PumpMessages ( const float  TimeDelta)
overridevirtual

Reimplemented from GenericApplication.

◆ ResendLastEvent()

void FMacApplication::ResendLastEvent ( )

◆ ResetLightColor()

virtual void FMacApplication::ResetLightColor ( int32  ControllerId)
inlineoverridevirtual

Implements IInputInterface.

◆ ResetModifierKeys()

void FMacApplication::ResetModifierKeys ( )
inline

◆ SetForceFeedbackChannelValue()

void FMacApplication::SetForceFeedbackChannelValue ( int32  ControllerId,
FForceFeedbackChannelType  ChannelType,
float  Value 
)
overridevirtual

Sets the strength/speed of the given channel for the given controller id. NOTE: If the channel is not supported, the call will silently fail

Parameters
ControllerIdthe id of the controller whose value is to be set
ChannelTypethe type of channel whose value should be set
Valuestrength or speed of feedback, 0.0f to 1.0f. 0.0f will disable

Implements IInputInterface.

◆ SetForceFeedbackChannelValues()

void FMacApplication::SetForceFeedbackChannelValues ( int32  ControllerId,
const FForceFeedbackValues Values 
)
overridevirtual

Sets the strength/speed of all the channels for the given controller id. NOTE: Unsupported channels are silently ignored

Parameters
ControllerIdthe id of the controller whose value is to be set
FForceFeedbackChannelValuesstrength or speed of feedback for all channels

Implements IInputInterface.

◆ SetHapticFeedbackValues()

void FMacApplication::SetHapticFeedbackValues ( int32  ControllerId,
int32  Hand,
const FHapticFeedbackValues Values 
)
overridevirtual

Sets the frequency and amplitude of haptic feedback channels for a given controller id. Some devices / platforms may support just haptics, or just force feedback.

Parameters
ControllerIdID of the controller to issue haptic feedback for
HandIdWhich hand id (e.g. left or right) to issue the feedback for. These usually correspond to EControllerHands
ValuesFrequency and amplitude to haptics at

Reimplemented from IInputInterface.

◆ SetHighPrecisionMouseMode()

void FMacApplication::SetHighPrecisionMouseMode ( const bool  Enable,
const TSharedPtr< FGenericWindow > &  InWindow 
)
overridevirtual

Reimplemented from GenericApplication.

◆ SetIsRightClickEmulationEnabled()

void FMacApplication::SetIsRightClickEmulationEnabled ( bool  bEnabled)
inline

◆ SetLightColor()

virtual void FMacApplication::SetLightColor ( int32  ControllerId,
FColor  Color 
)
inlineoverridevirtual

Implements IInputInterface.

◆ SetMessageHandler()

void FMacApplication::SetMessageHandler ( const TSharedRef< class FGenericApplicationMessageHandler > &  InMessageHandler)
overridevirtual

Reimplemented from GenericApplication.

◆ SystemModalMode()

void FMacApplication::SystemModalMode ( bool const  bInSystemModalMode)
inline

◆ TranslateKeyCodeToUniCode()

unichar FMacApplication::TranslateKeyCodeToUniCode ( uint32  KeyCode,
uint32  Modifier 
)
static

◆ UpdateScreensArray()

void FMacApplication::UpdateScreensArray ( )
static

Friends And Related Symbol Documentation

◆ FMacWindow

friend class FMacWindow
friend

Member Data Documentation

◆ MenuBarShutdownFunc

FMacApplication::MenuBarShutdownFuncPtr FMacApplication::MenuBarShutdownFunc = nullptr
static

The documentation for this class was generated from the following files: