summaryrefslogtreecommitdiffstats
path: root/modules/libpref/nsIPrefBranch.idl
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@wolfbeast.com>2019-04-05 20:01:10 +0200
committerwolfbeast <mcwerewolf@wolfbeast.com>2019-04-05 20:01:10 +0200
commitc3b63b831cd2c64700e875b28540212c7c881ac6 (patch)
treeedd98fcbd2004d3b562904f822bf6c3322fc7f52 /modules/libpref/nsIPrefBranch.idl
parentd432e068a21c815d5d5e7bcbc1cc8c6e77a7d1e0 (diff)
parentcc07da9cb4d6e7a53f8d953427ffc2bca2e0c2df (diff)
downloadUXP-c3b63b831cd2c64700e875b28540212c7c881ac6.tar
UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.tar.gz
UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.tar.lz
UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.tar.xz
UXP-c3b63b831cd2c64700e875b28540212c7c881ac6.zip
Merge branch 'master' into 816
Diffstat (limited to 'modules/libpref/nsIPrefBranch.idl')
-rw-r--r--modules/libpref/nsIPrefBranch.idl24
1 files changed, 20 insertions, 4 deletions
diff --git a/modules/libpref/nsIPrefBranch.idl b/modules/libpref/nsIPrefBranch.idl
index ee0c11ef0..900806b42 100644
--- a/modules/libpref/nsIPrefBranch.idl
+++ b/modules/libpref/nsIPrefBranch.idl
@@ -57,12 +57,16 @@ interface nsIPrefBranch : nsISupports
* Called to get the state of an individual boolean preference.
*
* @param aPrefName The boolean preference to get the state of.
+ * @param aDefaultValue The value to return if the preference is not set.
*
* @return boolean The value of the requested boolean preference.
*
* @see setBoolPref
*/
- boolean getBoolPref(in string aPrefName);
+ [optional_argc,binaryname(GetBoolPrefWithDefault)]
+ boolean getBoolPref(in string aPrefName, [optional] in boolean aDefaultValue);
+ [noscript,binaryname(GetBoolPref)]
+ boolean getBoolPrefXPCOM(in string aPrefName);
/**
* Called to set the state of an individual boolean preference.
@@ -83,23 +87,31 @@ interface nsIPrefBranch : nsISupports
* are converted to floating point numbers.
*
* @param aPrefName The floating point preference to get the state of.
+ * @param aDefaultValue The value to return if the preference is not set.
*
* @return float The value of the requested floating point preference.
*
* @see setCharPref
*/
- float getFloatPref(in string aPrefName);
+ [optional_argc,binaryname(GetFloatPrefWithDefault)]
+ float getFloatPref(in string aPrefName, [optional] in float aDefaultValue);
+ [noscript,binaryname(GetFloatPref)]
+ float getFloatPrefXPCOM(in string aPrefName);
/**
* Called to get the state of an individual string preference.
*
* @param aPrefName The string preference to retrieve.
+ * @param aDefaultValue The string to return if the preference is not set.
*
* @return string The value of the requested string preference.
*
* @see setCharPref
*/
- string getCharPref(in string aPrefName);
+ [optional_argc,binaryname(GetCharPrefWithDefault)]
+ string getCharPref(in string aPrefName, [optional] in string aDefaultValue);
+ [noscript,binaryname(GetCharPref)]
+ string getCharPrefXPCOM(in string aPrefName);
/**
* Called to set the state of an individual string preference.
@@ -118,12 +130,16 @@ interface nsIPrefBranch : nsISupports
* Called to get the state of an individual integer preference.
*
* @param aPrefName The integer preference to get the value of.
+ * @param aDefaultValue The value to return if the preference is not set.
*
* @return long The value of the requested integer preference.
*
* @see setIntPref
*/
- long getIntPref(in string aPrefName);
+ [optional_argc,binaryname(GetIntPrefWithDefault)]
+ long getIntPref(in string aPrefName, [optional] in long aDefaultValue);
+ [noscript,binaryname(GetIntPref)]
+ long getIntPrefXPCOM(in string aPrefName);
/**
* Called to set the state of an individual integer preference.