XDGKit v1.0.0-1
C++ XDG Utilities
Loading...
Searching...
No Matches
Classes | Public Member Functions | Static Public Member Functions | List of all members
XDGKit Class Reference

Core class. More...

#include <XDGKit.h>

Classes

struct  Options
 Configuration options. More...
 

Public Member Functions

 XDGKit (const Options &options=Options()) noexcept
 Creates a new instance of XDGKit.
 
XDGIconThemeManagericonThemeManager () noexcept
 Provides access to functionality related to icon themes.
 
const std::string & username () const noexcept
 Retrieves the current user's username.
 
const std::filesystem::path & homeDir () const noexcept
 Retrieves the current user's home directory as an absolute path.
 
const std::vector< std::filesystem::path > & dataDirs () const noexcept
 Retrieves valid absolute paths found in XDG_DATA_DIRS.
 
const Optionsoptions () const noexcept
 Retrieves the configuration options used to create this instance.
 

Static Public Member Functions

static std::shared_ptr< XDGKitMake (const Options &options=Options()) noexcept
 Creates a new instance of XDGKit.
 

Detailed Description

Core class.

When destroyed, all references to themes and icons are invalidated.

Constructor & Destructor Documentation

◆ XDGKit()

XDGKit ( const Options options = Options())
noexcept

Creates a new instance of XDGKit.

Member Function Documentation

◆ Make()

std::shared_ptr< XDGKit > Make ( const Options options = Options())
staticnoexcept

Creates a new instance of XDGKit.

Returns
A shared pointer to the newly created XDGKit instance. Never nullptr.

◆ iconThemeManager()

XDGIconThemeManager & iconThemeManager ( )
inlinenoexcept

Provides access to functionality related to icon themes.

◆ username()

const std::string & username ( ) const
inlinenoexcept

Retrieves the current user's username.

◆ homeDir()

const std::filesystem::path & homeDir ( ) const
inlinenoexcept

Retrieves the current user's home directory as an absolute path.

◆ dataDirs()

const std::vector< std::filesystem::path > & dataDirs ( ) const
inlinenoexcept

Retrieves valid absolute paths found in XDG_DATA_DIRS.

◆ options()

const Options & options ( ) const
inlinenoexcept

Retrieves the configuration options used to create this instance.