Skip to content

UOperatingSystemSettingModule_Wallpaper

#include <OperatingSystemSimulator/Public/Programs/Settings/Modules/OperatingSystemSettingModule_Wallpaper.h>
class UOperatingSystemSettingModule_Wallpaper

Defined in OperatingSystemSettingModule_Wallpaper.h:14

Inherits: UOperatingSystemSettingModule

---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemSettingModule_Wallpaper["UOperatingSystemSettingModule_Wallpaper"]
  class UOperatingSystemSettingModule["UOperatingSystemSettingModule"]
  UOperatingSystemSettingModule <|-- UOperatingSystemSettingModule_Wallpaper
---
config:
  class:
    hideEmptyMembersBox: true
---
classDiagram
  class UOperatingSystemSettingModule_Wallpaper {
    +UOperatingSystemSettingModule_Wallpaper()
    +GetDesktopWallpapers(TArray< FString > &OutPaths)
    +SaveBundledWallpaper(const UTexture2D *BundledWallpaper)
    +SaveCustomWallpaper(const FString ImagePath)
    +GetSavedWallpaper() const UTexture2D *
    +SetSavedWallpaper(const bool bIsUsingCustomWallpaper, const F
    +GetWallpaperChangeEventName() FName
    +GetImageExtensions() TSet< FString >
    +OnCreated() override
    +bSaveAutomatically : bool
    +DefaultFallbackTexture : TSoftObjectPtr< UTexture2D >
    +SavedWallpaper : UTexture2D *
    +Internal_OnWallpaperChanged(UObject *Payload)
    +Internal_GetFiles(const FString &InPath, const TSet< FString  TArray< FString >
    +Internal_GetBasePath() FString
    +Internal_GetOperatingSystemUserSavePath() FString
    +Internal_GetSavePath(const UOperatingSystemBaseDevice *InDevice) FString
    +Internal_GetLoginWallpapersPath(const UOperatingSystemBaseDevice *InDevice) FString
    +Internal_GetDesktopWallpapersPath(const UOperatingSystemBaseDevice *InDevice) FString
    +Internal_UserIconsPath(const UOperatingSystemBaseDevice *InDevice) FString
    +Internal_CreatePhysicalDirectory(const FString &InPath) bool
  }

Documented call sites inside the plugin (4):

flowchart LR
  UOperatingSystemSettingModule_Wallpaper__Internal_GetSavePath["UOperatingSystemSettingModule_Wallpaper::Internal_GetSavePath"]
  UOperatingSystemSettingModule_Wallpaper__Internal_GetDesktopWallpapersPath["UOperatingSystemSettingModule_Wallpaper::Internal_GetDesktopWallpapersPath"]
  UOperatingSystemSettingModule_Wallpaper__Internal_GetDesktopWallpapersPath --> UOperatingSystemSettingModule_Wallpaper__Internal_GetSavePath
  UOperatingSystemSettingModule_Wallpaper__Internal_GetLoginWallpapersPath["UOperatingSystemSettingModule_Wallpaper::Internal_GetLoginWallpapersPath"]
  UOperatingSystemSettingModule_Wallpaper__Internal_GetLoginWallpapersPath --> UOperatingSystemSettingModule_Wallpaper__Internal_GetSavePath
  UOperatingSystemSettingModule_Wallpaper__Internal_UserIconsPath["UOperatingSystemSettingModule_Wallpaper::Internal_UserIconsPath"]
  UOperatingSystemSettingModule_Wallpaper__Internal_UserIconsPath --> UOperatingSystemSettingModule_Wallpaper__Internal_GetSavePath
  UOperatingSystemSettingModule_Wallpaper__OnCreated["UOperatingSystemSettingModule_Wallpaper::OnCreated"]
  UOperatingSystemSettingModule_Wallpaper__OnCreated --> UOperatingSystemSettingModule_Wallpaper__Internal_GetSavePath

Caller impact — Internal_GetOperatingSystemUserSavePath

Section titled “Caller impact — Internal_GetOperatingSystemUserSavePath”

Documented call sites inside the plugin (3):

flowchart LR
  UOperatingSystemSettingModule_Wallpaper__Internal_GetOperatingSystemUserSavePath["UOperatingSystemSettingModule_Wallpaper::Internal_GetOperatingSystemUserSavePath"]
  UOperatingSystemSettingModule_Wallpaper__Internal_GetFiles["UOperatingSystemSettingModule_Wallpaper::Internal_GetFiles"]
  UOperatingSystemSettingModule_Wallpaper__Internal_GetFiles --> UOperatingSystemSettingModule_Wallpaper__Internal_GetOperatingSystemUserSavePath
  UOperatingSystemSettingModule_Wallpaper__Internal_GetSavePath["UOperatingSystemSettingModule_Wallpaper::Internal_GetSavePath"]
  UOperatingSystemSettingModule_Wallpaper__Internal_GetSavePath --> UOperatingSystemSettingModule_Wallpaper__Internal_GetOperatingSystemUserSavePath
  UOperatingSystemSettingModule_Wallpaper__OnCreated["UOperatingSystemSettingModule_Wallpaper::OnCreated"]
  UOperatingSystemSettingModule_Wallpaper__OnCreated --> UOperatingSystemSettingModule_Wallpaper__Internal_GetOperatingSystemUserSavePath
ReturnNameDescription
UOperatingSystemSettingModule_Wallpaper
voidGetDesktopWallpapersReturns an array of image paths from real PC from the below path. C:\Users<USER_NAME>\Documents\YetiTechStudios\OperatingSystemSimulator<OS_NAME>\DesktopWallpapers Each Operating System can have it’s own unique images.
voidSaveBundledWallpaperSaves the given wallpaper as current wallpaper. The texture parameter should point to a valid texture from Content Browser and must be available in cooked game.
voidSaveCustomWallpaperSaves the given path as current wallpaper. When Operating System starts it will dynamically load the texture from this path at runtime and use it as wallpaper. If image does not exist in the given path, Default Fallback Texture from this module is used.
UTexture2D *GetSavedWallpaper constReturns the saved wallpaper. If saved wallpaper is null, default fallback texture is returned.
voidSetSavedWallpaperSets the saved wallpaper based on the given parameters.

UOperatingSystemSettingModule_Wallpaper()

Defined in OperatingSystemSettingModule_Wallpaper.h:35


void GetDesktopWallpapers(TArray< FString > & OutPaths)

Defined in OperatingSystemSettingModule_Wallpaper.h:69 Returns an array of image paths from real PC from the below path. C:\Users<USER_NAME>\Documents\YetiTechStudios\OperatingSystemSimulator<OS_NAME>\DesktopWallpapers Each Operating System can have it’s own unique images.

  • OutPaths Array of paths that contains images from real PC.

void SaveBundledWallpaper(const UTexture2D * BundledWallpaper)

Defined in OperatingSystemSettingModule_Wallpaper.h:79 Saves the given wallpaper as current wallpaper. The texture parameter should point to a valid texture from Content Browser and must be available in cooked game.

  • BundledWallpaper Target texture from Content Browser.

void SaveCustomWallpaper(const FString ImagePath)

Defined in OperatingSystemSettingModule_Wallpaper.h:91 Saves the given path as current wallpaper. When Operating System starts it will dynamically load the texture from this path at runtime and use it as wallpaper. If image does not exist in the given path, Default Fallback Texture from this module is used.

  • ImagePath Absolute path to image texture.

const

UTexture2D * GetSavedWallpaper() const

Defined in OperatingSystemSettingModule_Wallpaper.h:99 Returns the saved wallpaper. If saved wallpaper is null, default fallback texture is returned.

Saved wallpaper or default wallpaper if null.


void SetSavedWallpaper(const bool bIsUsingCustomWallpaper, const FString & Path)

Defined in OperatingSystemSettingModule_Wallpaper.h:116 Sets the saved wallpaper based on the given parameters.

  • bIsUsingCustomWallpaper Whether the custom wallpaper is being used.

  • Path The path to the custom wallpaper.

ReturnNameDescription
FNameGetWallpaperChangeEventName static inlineA helper static function for getting the event when applying wallpaper. You can listen to this event name via device messenger.
TSet< FString >GetImageExtensions static inlineReturns a set of image extensions supported by the operating system setting module.

static inline

static inline FName GetWallpaperChangeEventName()

Defined in OperatingSystemSettingModule_Wallpaper.h:59 A helper static function for getting the event when applying wallpaper. You can listen to this event name via device messenger.

The event name when changing wallpaper.


static inline

static inline TSet< FString > GetImageExtensions()

Defined in OperatingSystemSettingModule_Wallpaper.h:233 Returns a set of image extensions supported by the operating system setting module.

Example usage:

TSet<FString> imageExtensions = GetImageExtensions();

A set of image extensions, represented as strings. The extensions include “.png”, “.jpg”, “.jpeg”, and “.bmp”.

ReturnNameDescription
voidOnCreated virtual overridePerforms operations when the object is created. This method is called when the object is created and is responsible for initializing the necessary directories and event listeners.

virtual override

virtual void OnCreated() override

Defined in OperatingSystemSettingModule_Wallpaper.h:48 Performs operations when the object is created. This method is called when the object is created and is responsible for initializing the necessary directories and event listeners.

See also: UOperatingSystemSettingModule_Wallpaper::GetParentOperatingSystem()

See also: UOperatingSystemSettingModule_Wallpaper::GetWallpaperChangeEventName()

ReturnNameDescription
boolbSaveAutomaticallyOperating System will automatically save after changing wallpaper. In any case, if you want to manually manage it you can call Save Wallpaper from this module to save wallpaper settings assuming you use Get Wallpaper Change Event Name to broadcast the changes.
TSoftObjectPtr< UTexture2D >DefaultFallbackTextureDefault texture to use if wallpaper is null (for any reason) after loading. Make sure this points to a valid texture.
UTexture2D *SavedWallpaper

bool bSaveAutomatically

Defined in OperatingSystemSettingModule_Wallpaper.h:24 Operating System will automatically save after changing wallpaper. In any case, if you want to manually manage it you can call Save Wallpaper from this module to save wallpaper settings assuming you use Get Wallpaper Change Event Name to broadcast the changes.


TSoftObjectPtr< UTexture2D > DefaultFallbackTexture

Defined in OperatingSystemSettingModule_Wallpaper.h:28 Default texture to use if wallpaper is null (for any reason) after loading. Make sure this points to a valid texture.


UTexture2D * SavedWallpaper

Defined in OperatingSystemSettingModule_Wallpaper.h:31

ReturnNameDescription
voidInternal_OnWallpaperChangedEvent handler for when the wallpaper has changed. This method is called internally when the wallpaper has changed. It is responsible for determining whether the payload is a custom wallpaper or a bundled wallpaper, and saves the appropriate wallpaper based on the payload type.

void Internal_OnWallpaperChanged(UObject * Payload)

Defined in OperatingSystemSettingModule_Wallpaper.h:136 Event handler for when the wallpaper has changed. This method is called internally when the wallpaper has changed. It is responsible for determining whether the payload is a custom wallpaper or a bundled wallpaper, and saves the appropriate wallpaper based on the payload type.

If the payload is a UTexture2D and has an asset user data of type UOperatingSystemImageToTextureUserData, the method saves a custom wallpaper using the image path stored in the user data.

If the payload is a UTexture2D without the expected asset user data, the method saves a bundled wallpaper using the provided texture payload.

If the payload is not a UTexture2D, a warning log message is displayed.

  • Payload The payload object representing the wallpaper that has changed.
ReturnNameDescription
TArray< FString >Internal_GetFiles staticRetrieves the files in a given path that match the provided extensions. This method searches the specified path for files that have extensions matching the ones specified in the set of extensions. It returns an array of file paths.
FStringInternal_GetBasePath staticRetrieves the base path for the wallpaper settings.
FStringInternal_GetOperatingSystemUserSavePath staticInternal method to get the operating system user save path. This method returns the path where the operating system saves user settings. The path is a combination of the base path and the folder “OperatingSystemSimulator”.
FStringInternal_GetSavePath staticGet the save path for wallpaper settings. This method returns the save path for wallpaper settings based on the given device. The save path is calculated by combining the operating system user save path obtained from Internal_GetOperatingSystemUserSavePath() method with the operating system name of the device.
FStringInternal_GetLoginWallpapersPath staticRetrieves the path to the login wallpapers folder for the specified device. This method concatenates the save path obtained from Internal_GetSavePath with the “LoginWallpapers” folder name.
FStringInternal_GetDesktopWallpapersPath staticReturns the path to the folder where desktop wallpapers are saved. This method combines the save path obtained from Internal_GetSavePath method with the folder name “DesktopWallpapers”. The save path is determined based on the given device.
FStringInternal_UserIconsPath staticReturns the internal path to the user icons folder. This path is calculated by combining the save path obtained through the Internal_GetSavePath method with the folder name ‘UserIcons’. This method is used internally within the UOperatingSystemSettingModule_Wallpaper class.
boolInternal_CreatePhysicalDirectory staticCreates a physical directory at the specified path.

static

static TArray< FString > Internal_GetFiles(const FString & InPath, const TSet< FString > & InExtensions)

Defined in OperatingSystemSettingModule_Wallpaper.h:148 Retrieves the files in a given path that match the provided extensions. This method searches the specified path for files that have extensions matching the ones specified in the set of extensions. It returns an array of file paths.

  • InPath The path to search for files.

  • InExtensions The set of file extensions to match.

An array of file paths that match the provided extensions.


static

static FString Internal_GetBasePath()

Defined in OperatingSystemSettingModule_Wallpaper.h:158 Retrieves the base path for the wallpaper settings.

This method concatenates the user directory path obtained from the platform process with the “YetiTechStudios” subdirectory to create the base path for the wallpaper settings.

The base path for the wallpaper settings.


static

static FString Internal_GetOperatingSystemUserSavePath()

Defined in OperatingSystemSettingModule_Wallpaper.h:167 Internal method to get the operating system user save path. This method returns the path where the operating system saves user settings. The path is a combination of the base path and the folder “OperatingSystemSimulator”.

The operating system user save path.


static

static FString Internal_GetSavePath(const UOperatingSystemBaseDevice * InDevice)

Defined in OperatingSystemSettingModule_Wallpaper.h:178 Get the save path for wallpaper settings. This method returns the save path for wallpaper settings based on the given device. The save path is calculated by combining the operating system user save path obtained from Internal_GetOperatingSystemUserSavePath() method with the operating system name of the device.

  • InDevice The device for which the save path is to be obtained.

The save path for wallpaper settings.


static

static FString Internal_GetLoginWallpapersPath(const UOperatingSystemBaseDevice * InDevice)

Defined in OperatingSystemSettingModule_Wallpaper.h:187 Retrieves the path to the login wallpapers folder for the specified device. This method concatenates the save path obtained from Internal_GetSavePath with the “LoginWallpapers” folder name.

  • InDevice The device for which to retrieve the login wallpapers path.

The path to the login wallpapers folder for the specified device.


static

static FString Internal_GetDesktopWallpapersPath(const UOperatingSystemBaseDevice * InDevice)

Defined in OperatingSystemSettingModule_Wallpaper.h:197 Returns the path to the folder where desktop wallpapers are saved. This method combines the save path obtained from Internal_GetSavePath method with the folder name “DesktopWallpapers”. The save path is determined based on the given device.

  • InDevice The device for which the desktop wallpapers path is to be retrieved.

The path to the folder where desktop wallpapers are saved.


static

static FString Internal_UserIconsPath(const UOperatingSystemBaseDevice * InDevice)

Defined in OperatingSystemSettingModule_Wallpaper.h:208 Returns the internal path to the user icons folder. This path is calculated by combining the save path obtained through the Internal_GetSavePath method with the folder name ‘UserIcons’. This method is used internally within the UOperatingSystemSettingModule_Wallpaper class.

The internal path to the user icons folder.


static

static bool Internal_CreatePhysicalDirectory(const FString & InPath)

Defined in OperatingSystemSettingModule_Wallpaper.h:218 Creates a physical directory at the specified path.

This method creates a physical directory at the given path if the directory does not already exist.

  • InPath The path at which to create the directory.

True if the directory was successfully created or if it already exists, false otherwise.

  • OS_LOG