![]() |
Kodi Documentation
18.0
Kodi is an open source media player and entertainment hub.
|
#include <Skin.h>
Classes | |
class | CStartupWindow |
Public Member Functions | |
CSkinInfo (CAddonInfo addonInfo, const RESOLUTION_INFO &resolution=RESOLUTION_INFO()) | |
CSkinInfo (CAddonInfo addonInfo, const RESOLUTION_INFO &resolution, const std::vector< RESOLUTION_INFO > &resolutions, float effectsSlowDown, bool debugging) | |
~CSkinInfo () override | |
void | Start () |
Load resolution information from directories in Path(). More... | |
bool | HasSkinFile (const std::string &strFile) const |
std::string | GetSkinPath (const std::string &file, RESOLUTION_INFO *res=NULL, const std::string &baseDir="") const |
Get the full path to the specified file in the skin We search for XML files in the skin folder that best matches the current resolution. More... | |
bool | IsDebugging () const |
Return whether skin debugging is enabled. More... | |
int | GetFirstWindow () const |
Get the id of the first window to load The first window is generally Startup.xml unless it doesn't exist or if the skinner has specified which start windows they support and the user is going to somewhere other than the home screen. More... | |
int | GetStartWindow () const |
Get the id of the window the user wants to start in after any skin animation. More... | |
void | ResolveIncludes (TiXmlElement *node, std::map< INFO::InfoPtr, bool > *xmlIncludeConditions=NULL) |
float | GetEffectsSlowdown () const |
const std::vector< CStartupWindow > & | GetStartupWindows () const |
void | GetSkinPaths (std::vector< std::string > &paths) const |
Retrieve the skin paths to search for skin XML files. More... | |
bool | IsInUse () const override |
const std::string & | GetCurrentAspect () const |
void | LoadIncludes () |
void | ToggleDebug () |
const INFO::CSkinVariableString * | CreateSkinVariable (const std::string &name, int context) |
bool | HasSettings () override |
Don't handle skin settings like normal addon settings. More... | |
bool | HasUserSettings () override |
Check whether the user has configured this addon or not. More... | |
int | TranslateString (const std::string &setting) |
const std::string & | GetString (int setting) const |
void | SetString (int setting, const std::string &label) |
int | TranslateBool (const std::string &setting) |
bool | GetBool (int setting) const |
void | SetBool (int setting, bool set) |
void | Reset (const std::string &setting) |
void | Reset () |
void | OnPreInstall () override |
void | OnPostInstall (bool update, bool modal) override |
![]() | |
CAddon (CAddonInfo addonInfo) | |
~CAddon () override=default | |
TYPE | Type () const override |
TYPE | FullType () const override |
bool | IsType (TYPE type) const override |
std::string | ID () const override |
std::string | Name () const override |
AddonVersion | Version () const override |
AddonVersion | MinVersion () const override |
std::string | Summary () const override |
std::string | Description () const override |
std::string | Path () const override |
std::string | Profile () const override |
std::string | LibPath () const override |
std::string | Author () const override |
std::string | ChangeLog () const override |
std::string | Icon () const override |
ArtMap | Art () const override |
std::vector< std::string > | Screenshots () const override |
std::string | Disclaimer () const override |
std::string | Broken () const override |
CDateTime | InstallDate () const override |
CDateTime | LastUpdated () const override |
CDateTime | LastUsed () const override |
std::string | Origin () const override |
uint64_t | PackageSize () const override |
const InfoMap & | ExtraInfo () const override |
const std::vector< DependencyInfo > & | GetDependencies () const override |
std::string | FanArt () const override |
void | SaveSettings () override |
Save any user configured settings. More... | |
void | UpdateSetting (const std::string &key, const std::string &value) override |
Update a user-configured setting with a new value. More... | |
bool | UpdateSettingBool (const std::string &key, bool value) override |
Update a user-configured setting with a new boolean value. More... | |
bool | UpdateSettingInt (const std::string &key, int value) override |
Update a user-configured setting with a new integer value. More... | |
bool | UpdateSettingNumber (const std::string &key, double value) override |
Update a user-configured setting with a new number value. More... | |
bool | UpdateSettingString (const std::string &key, const std::string &value) override |
Update a user-configured setting with a new string value. More... | |
std::string | GetSetting (const std::string &key) override |
Retrieve a particular settings value If a previously configured user setting is available, we return it's value, else we return the default (if available) More... | |
bool | GetSettingBool (const std::string &key, bool &value) override |
Retrieve a particular settings value as boolean If a previously configured user setting is available, we return it's value, else we return the default (if available) More... | |
bool | GetSettingInt (const std::string &key, int &value) override |
Retrieve a particular settings value as integer If a previously configured user setting is available, we return it's value, else we return the default (if available) More... | |
bool | GetSettingNumber (const std::string &key, double &value) override |
Retrieve a particular settings value as number If a previously configured user setting is available, we return it's value, else we return the default (if available) More... | |
bool | GetSettingString (const std::string &key, std::string &value) override |
Retrieve a particular settings value as string If a previously configured user setting is available, we return it's value, else we return the default (if available) More... | |
CAddonSettings * | GetSettings () const override |
AddonVersion | GetDependencyVersion (const std::string &dependencyID) const override |
get the required version of a dependency. More... | |
bool | MeetsVersion (const AddonVersion &version) const override |
return whether or not this addon satisfies the given version requirements More... | |
bool | ReloadSettings () override |
AddonPtr | GetRunningInstance () const override |
retrieve the running instance of an add-on if it persists while running. More... | |
void | OnPreUnInstall () override |
void | OnPostUnInstall () override |
![]() | |
virtual | ~IAddon ()=default |
Static Public Member Functions | |
static std::unique_ptr< CSkinInfo > | FromExtension (CAddonInfo addonInfo, const cp_extension_t *ext) |
static bool | TranslateResolution (const std::string &name, RESOLUTION_INFO &res) |
Translate a resolution string. More... | |
static void | SettingOptionsSkinColorsFiller (std::shared_ptr< const CSetting > setting, std::vector< std::pair< std::string, std::string > > &list, std::string ¤t, void *data) |
static void | SettingOptionsSkinFontsFiller (std::shared_ptr< const CSetting > setting, std::vector< std::pair< std::string, std::string > > &list, std::string ¤t, void *data) |
static void | SettingOptionsSkinThemesFiller (std::shared_ptr< const CSetting > setting, std::vector< std::pair< std::string, std::string > > &list, std::string ¤t, void *data) |
static void | SettingOptionsStartupWindowsFiller (std::shared_ptr< const CSetting > setting, std::vector< std::pair< std::string, int > > &list, int ¤t, void *data) |
static std::set< CSkinSettingPtr > | ParseSettings (const TiXmlElement *rootElement) |
Protected Member Functions | |
std::string | GetDirFromRes (RESOLUTION res) const |
Given a resolution, retrieve the corresponding directory name. More... | |
void | GetDefaultResolution (const cp_extension_t *ext, const char *tag, RESOLUTION &res, const RESOLUTION &def) const |
grab a resolution tag from a skin's configuration data More... | |
bool | LoadStartupWindows (const cp_extension_t *ext) |
bool | SettingsInitialized () const override |
Whether or not the settings have been initialized. More... | |
bool | SettingsLoaded () const override |
Whether or not the settings have been loaded. More... | |
bool | SettingsFromXML (const CXBMCTinyXML &doc, bool loadDefaults=false) override |
Parse settings from an XML document. More... | |
bool | SettingsToXML (CXBMCTinyXML &doc) const override |
Write settings into an XML document. More... | |
![]() | |
bool | LoadSettings (bool bForce, bool loadUserSettings=true) |
Load the default settings and override these with any previously configured user settings. More... | |
virtual bool | LoadUserSettings () |
Load the user settings. More... | |
virtual bool | HasSettingsToSave () const |
Static Protected Member Functions | |
static CSkinSettingPtr | ParseSetting (const TiXmlElement *element) |
Protected Attributes | |
RESOLUTION_INFO | m_defaultRes |
std::vector< RESOLUTION_INFO > | m_resolutions |
float | m_effectsSlowDown |
CGUIIncludes | m_includes |
std::string | m_currentAspect |
std::vector< CStartupWindow > | m_startupWindows |
bool | m_debugging |
![]() | |
const CAddonInfo | m_addonInfo |
std::string | m_userSettingsPath |
|
explicit |
ADDON::CSkinInfo::CSkinInfo | ( | CAddonInfo | addonInfo, |
const RESOLUTION_INFO & | resolution, | ||
const std::vector< RESOLUTION_INFO > & | resolutions, | ||
float | effectsSlowDown, | ||
bool | debugging | ||
) |
|
overridedefault |
const INFO::CSkinVariableString * ADDON::CSkinInfo::CreateSkinVariable | ( | const std::string & | name, |
int | context | ||
) |
|
static |
bool ADDON::CSkinInfo::GetBool | ( | int | setting | ) | const |
|
inline |
|
protected |
grab a resolution tag from a skin's configuration data
ext | passed addoninfo structure to check for resolution |
tag | name of the tag to look for |
res | resolution to return |
|
protected |
Given a resolution, retrieve the corresponding directory name.
res | RESOLUTION to translate |
|
inline |
int ADDON::CSkinInfo::GetFirstWindow | ( | ) | const |
Get the id of the first window to load The first window is generally Startup.xml unless it doesn't exist or if the skinner has specified which start windows they support and the user is going to somewhere other than the home screen.
std::string ADDON::CSkinInfo::GetSkinPath | ( | const std::string & | file, |
RESOLUTION_INFO * | res = NULL , |
||
const std::string & | baseDir = "" |
||
) | const |
Get the full path to the specified file in the skin We search for XML files in the skin folder that best matches the current resolution.
file | XML file to look for |
res | [out] If non-NULL, the resolution that the returned XML file is in is returned. Defaults to NULL. |
baseDir | [in] If non-empty, the given directory is searched instead of the skin's directory. Defaults to empty. |
void ADDON::CSkinInfo::GetSkinPaths | ( | std::vector< std::string > & | paths | ) | const |
Retrieve the skin paths to search for skin XML files.
paths | [out] vector of paths to search, in order. |
|
inline |
int ADDON::CSkinInfo::GetStartWindow | ( | ) | const |
Get the id of the window the user wants to start in after any skin animation.
const std::string & ADDON::CSkinInfo::GetString | ( | int | setting | ) | const |
|
inlineoverridevirtual |
Don't handle skin settings like normal addon settings.
Reimplemented from ADDON::CAddon.
bool ADDON::CSkinInfo::HasSkinFile | ( | const std::string & | strFile | ) | const |
|
inlineoverridevirtual |
Check whether the user has configured this addon or not.
Reimplemented from ADDON::CAddon.
|
inline |
Return whether skin debugging is enabled.
|
overridevirtual |
Reimplemented from ADDON::CAddon.
void ADDON::CSkinInfo::LoadIncludes | ( | ) |
|
protected |
|
overridevirtual |
Reimplemented from ADDON::CAddon.
|
overridevirtual |
Reimplemented from ADDON::CAddon.
|
staticprotected |
|
static |
void ADDON::CSkinInfo::Reset | ( | const std::string & | setting | ) |
void ADDON::CSkinInfo::Reset | ( | ) |
void ADDON::CSkinInfo::ResolveIncludes | ( | TiXmlElement * | node, |
std::map< INFO::InfoPtr, bool > * | xmlIncludeConditions = NULL |
||
) |
void ADDON::CSkinInfo::SetBool | ( | int | setting, |
bool | set | ||
) |
void ADDON::CSkinInfo::SetString | ( | int | setting, |
const std::string & | label | ||
) |
|
static |
|
static |
|
static |
|
static |
|
overrideprotectedvirtual |
Parse settings from an XML document.
doc | XML document to parse for settings |
loadDefaults | if true, the default attribute is used and settings are reset prior to parsing, else the value attribute is used. |
Reimplemented from ADDON::CAddon.
|
overrideprotectedvirtual |
Whether or not the settings have been initialized.
Reimplemented from ADDON::CAddon.
|
overrideprotectedvirtual |
Whether or not the settings have been loaded.
Reimplemented from ADDON::CAddon.
|
overrideprotectedvirtual |
Write settings into an XML document.
doc | XML document to receive the settings |
Reimplemented from ADDON::CAddon.
void ADDON::CSkinInfo::ToggleDebug | ( | ) |
int ADDON::CSkinInfo::TranslateBool | ( | const std::string & | setting | ) |
|
static |
Translate a resolution string.
name | the string to translate |
res | [out] the resolution structure if name is valid |
int ADDON::CSkinInfo::TranslateString | ( | const std::string & | setting | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |