UOperatingSystemSettingModule_Wallpaper
#include <OperatingSystemSimulator/Public/Programs/Settings/Modules/OperatingSystemSettingModule_Wallpaper.h>class UOperatingSystemSettingModule_WallpaperDefined in OperatingSystemSettingModule_Wallpaper.h:14
Inherits:
UOperatingSystemSettingModule
Inheritance diagram
Section titled “Inheritance diagram”---
config:
class:
hideEmptyMembersBox: true
---
classDiagram
class UOperatingSystemSettingModule_Wallpaper["UOperatingSystemSettingModule_Wallpaper"]
class UOperatingSystemSettingModule["UOperatingSystemSettingModule"]
UOperatingSystemSettingModule <|-- UOperatingSystemSettingModule_Wallpaper
Class detail
Section titled “Class detail”---
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
}
Caller impact — Internal_GetSavePath
Section titled “Caller impact — Internal_GetSavePath”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
Public Methods
Section titled “Public Methods”| Return | Name | Description |
|---|---|---|
UOperatingSystemSettingModule_Wallpaper | ||
void | GetDesktopWallpapers | 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. |
void | SaveBundledWallpaper | 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. |
void | SaveCustomWallpaper | 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. |
UTexture2D * | GetSavedWallpaper const | Returns the saved wallpaper. If saved wallpaper is null, default fallback texture is returned. |
void | SetSavedWallpaper | Sets the saved wallpaper based on the given parameters. |
UOperatingSystemSettingModule_Wallpaper
Section titled “UOperatingSystemSettingModule_Wallpaper”UOperatingSystemSettingModule_Wallpaper()Defined in OperatingSystemSettingModule_Wallpaper.h:35
References
Section titled “References”GetDesktopWallpapers
Section titled “GetDesktopWallpapers”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.
Parameters
Section titled “Parameters”OutPathsArray of paths that contains images from real PC.
References
Section titled “References”SaveBundledWallpaper
Section titled “SaveBundledWallpaper”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.
Parameters
Section titled “Parameters”BundledWallpaperTarget texture from Content Browser.
Referenced by
Section titled “Referenced by”References
Section titled “References”bIsUsingCustomWallpaperGetParentOperatingSystemGetSettingsOS_LOG_VERY_VERBOSESaveGameWallpaperPath
SaveCustomWallpaper
Section titled “SaveCustomWallpaper”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.
Parameters
Section titled “Parameters”ImagePathAbsolute path to image texture.
Referenced by
Section titled “Referenced by”References
Section titled “References”bIsUsingCustomWallpaperGetParentOperatingSystemGetSettingsOS_LOG_VERY_VERBOSESaveGameWallpaperPath
GetSavedWallpaper
Section titled “GetSavedWallpaper”const
UTexture2D * GetSavedWallpaper() constDefined in OperatingSystemSettingModule_Wallpaper.h:99 Returns the saved wallpaper. If saved wallpaper is null, default fallback texture is returned.
Returns
Section titled “Returns”Saved wallpaper or default wallpaper if null.
References
Section titled “References”SetSavedWallpaper
Section titled “SetSavedWallpaper”void SetSavedWallpaper(const bool bIsUsingCustomWallpaper, const FString & Path)Defined in OperatingSystemSettingModule_Wallpaper.h:116 Sets the saved wallpaper based on the given parameters.
Parameters
Section titled “Parameters”-
bIsUsingCustomWallpaperWhether the custom wallpaper is being used. -
PathThe path to the custom wallpaper.
References
Section titled “References”CreateTextureFromPathDefaultFallbackTextureOS_LOG_VERBOSEOS_LOG_WARNSavedWallpaper
Public Static Methods
Section titled “Public Static Methods”| Return | Name | Description |
|---|---|---|
FName | GetWallpaperChangeEventName static inline | A helper static function for getting the event when applying wallpaper. You can listen to this event name via device messenger. |
TSet< FString > | GetImageExtensions static inline | Returns a set of image extensions supported by the operating system setting module. |
GetWallpaperChangeEventName
Section titled “GetWallpaperChangeEventName”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.
Returns
Section titled “Returns”The event name when changing wallpaper.
Referenced by
Section titled “Referenced by”GetImageExtensions
Section titled “GetImageExtensions”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();Returns
Section titled “Returns”A set of image extensions, represented as strings. The extensions include “.png”, “.jpg”, “.jpeg”, and “.bmp”.
Referenced by
Section titled “Referenced by”Protected Methods
Section titled “Protected Methods”| Return | Name | Description |
|---|---|---|
void | OnCreated virtual override | 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. |
OnCreated
Section titled “OnCreated”virtual override
virtual void OnCreated() overrideDefined 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()
References
Section titled “References”bSaveAutomaticallyFindMessengerFromOperatingSystemGetParentOperatingSystemGetWallpaperChangeEventNameInternal_GetBasePathInternal_GetDesktopWallpapersPathInternal_GetLoginWallpapersPathInternal_GetOperatingSystemUserSavePathInternal_GetSavePathInternal_UserIconsPathREAL_DIR
Reimplements
Section titled “Reimplements”Private Attributes
Section titled “Private Attributes”| Return | Name | Description |
|---|---|---|
bool | bSaveAutomatically | 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 | Default texture to use if wallpaper is null (for any reason) after loading. Make sure this points to a valid texture. |
UTexture2D * | SavedWallpaper |
bSaveAutomatically
Section titled “bSaveAutomatically”bool bSaveAutomaticallyDefined 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.
Referenced by
Section titled “Referenced by”DefaultFallbackTexture
Section titled “DefaultFallbackTexture”TSoftObjectPtr< UTexture2D > DefaultFallbackTextureDefined 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.
Referenced by
Section titled “Referenced by”SavedWallpaper
Section titled “SavedWallpaper”UTexture2D * SavedWallpaperDefined in OperatingSystemSettingModule_Wallpaper.h:31
Referenced by
Section titled “Referenced by”Private Methods
Section titled “Private Methods”| Return | Name | Description |
|---|---|---|
void | Internal_OnWallpaperChanged | 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. |
Internal_OnWallpaperChanged
Section titled “Internal_OnWallpaperChanged”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.
Parameters
Section titled “Parameters”PayloadThe payload object representing the wallpaper that has changed.
References
Section titled “References”OS_LOG_WARNSaveBundledWallpaperSaveCustomWallpaper
Private Static Methods
Section titled “Private Static Methods”| Return | Name | Description |
|---|---|---|
TArray< FString > | Internal_GetFiles static | 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. |
FString | Internal_GetBasePath static | Retrieves the base path for the wallpaper settings. |
FString | Internal_GetOperatingSystemUserSavePath static | 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”. |
FString | Internal_GetSavePath static | 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. |
FString | Internal_GetLoginWallpapersPath static | 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. |
FString | Internal_GetDesktopWallpapersPath static | 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. |
FString | Internal_UserIconsPath static | 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. |
bool | Internal_CreatePhysicalDirectory static | Creates a physical directory at the specified path. |
Internal_GetFiles
Section titled “Internal_GetFiles”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.
Parameters
Section titled “Parameters”-
InPathThe path to search for files. -
InExtensionsThe set of file extensions to match.
Returns
Section titled “Returns”An array of file paths that match the provided extensions.
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_GetBasePath
Section titled “Internal_GetBasePath”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.
Returns
Section titled “Returns”The base path for the wallpaper settings.
Referenced by
Section titled “Referenced by”Internal_GetOperatingSystemUserSavePath
Section titled “Internal_GetOperatingSystemUserSavePath”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”.
Returns
Section titled “Returns”The operating system user save path.
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_GetSavePath
Section titled “Internal_GetSavePath”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.
Parameters
Section titled “Parameters”InDeviceThe device for which the save path is to be obtained.
Returns
Section titled “Returns”The save path for wallpaper settings.
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_GetLoginWallpapersPath
Section titled “Internal_GetLoginWallpapersPath”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.
Parameters
Section titled “Parameters”InDeviceThe device for which to retrieve the login wallpapers path.
Returns
Section titled “Returns”The path to the login wallpapers folder for the specified device.
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_GetDesktopWallpapersPath
Section titled “Internal_GetDesktopWallpapersPath”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.
Parameters
Section titled “Parameters”InDeviceThe device for which the desktop wallpapers path is to be retrieved.
Returns
Section titled “Returns”The path to the folder where desktop wallpapers are saved.
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_UserIconsPath
Section titled “Internal_UserIconsPath”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.
Parameters
Section titled “Parameters”InDevicePointer to an instance of UOperatingSystemBaseDevice that represents the device.
Returns
Section titled “Returns”The internal path to the user icons folder.
Referenced by
Section titled “Referenced by”References
Section titled “References”Internal_CreatePhysicalDirectory
Section titled “Internal_CreatePhysicalDirectory”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.
Parameters
Section titled “Parameters”InPathThe path at which to create the directory.
Returns
Section titled “Returns”True if the directory was successfully created or if it already exists, false otherwise.
References
Section titled “References”OS_LOG