forked from Ddv0623/expo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[brightness] add doc comments in source (expo#13693)
- Loading branch information
Showing
9 changed files
with
250 additions
and
161 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"name":"expo-brightness","kind":0,"kindString":"Project","originalName":"","children":[{"name":"BrightnessMode","kind":4,"kindString":"Enumeration","children":[{"name":"AUTOMATIC","kind":16,"kindString":"Enumeration member","comment":{"shortText":"Mode in which the device OS will automatically adjust the screen brightness depending on the\nambient light."},"defaultValue":"1"},{"name":"MANUAL","kind":16,"kindString":"Enumeration member","comment":{"shortText":"Mode in which the screen brightness will remain constant and will not be adjusted by the OS."},"defaultValue":"2"},{"name":"UNKNOWN","kind":16,"kindString":"Enumeration member","comment":{"shortText":"Means that the current brightness mode cannot be determined."},"defaultValue":"0"}]},{"name":"PermissionStatus","kind":4,"kindString":"Enumeration","children":[{"name":"DENIED","kind":16,"kindString":"Enumeration member","defaultValue":"\"denied\""},{"name":"GRANTED","kind":16,"kindString":"Enumeration member","defaultValue":"\"granted\""},{"name":"UNDETERMINED","kind":16,"kindString":"Enumeration member","defaultValue":"\"undetermined\""}]},{"name":"PermissionResponse","kind":256,"kindString":"Interface","children":[{"name":"canAskAgain","kind":1024,"kindString":"Property","type":{"type":"intrinsic","name":"boolean"}},{"name":"expires","kind":1024,"kindString":"Property","type":{"type":"reference","name":"PermissionExpiration"}},{"name":"granted","kind":1024,"kindString":"Property","type":{"type":"intrinsic","name":"boolean"}},{"name":"status","kind":1024,"kindString":"Property","type":{"type":"reference","name":"PermissionStatus"}}]},{"name":"getBrightnessAsync","kind":64,"kindString":"Function","signatures":[{"name":"getBrightnessAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"Gets the current brightness level of the device's main screen.","returns":"A `Promise` that fulfils with a number between `0` and `1`, inclusive, representing the\ncurrent screen brightness.\n"},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Promise"}}]},{"name":"getPermissionsAsync","kind":64,"kindString":"Function","signatures":[{"name":"getPermissionsAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"Checks user's permissions for accessing system brightness.","returns":"A promise that fulfils with an object of type [PermissionResponse](#permissionrespons).\n"},"type":{"type":"reference","typeArguments":[{"type":"reference","name":"PermissionResponse"}],"name":"Promise"}}]},{"name":"getSystemBrightnessAsync","kind":64,"kindString":"Function","signatures":[{"name":"getSystemBrightnessAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"__Android only.__ Gets the global system screen brightness.","returns":"A `Promise` that is resolved with a number between `0` and `1`, inclusive, representing\nthe current system screen brightness.\n"},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"number"}],"name":"Promise"}}]},{"name":"getSystemBrightnessModeAsync","kind":64,"kindString":"Function","signatures":[{"name":"getSystemBrightnessModeAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"__Android only.__ Gets the system brightness mode (e.g. whether or not the OS will automatically\nadjust the screen brightness depending on ambient light).","returns":"A `Promise` that fulfils with a [`BrightnessMode`](#brightnessmode). Requires\n`SYSTEM_BRIGHTNESS` permissions.\n"},"type":{"type":"reference","typeArguments":[{"type":"reference","name":"BrightnessMode"}],"name":"Promise"}}]},{"name":"isAvailableAsync","kind":64,"kindString":"Function","signatures":[{"name":"isAvailableAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"Returns whether the Brightness API is enabled on the current device. This does not check the app\npermissions.","returns":"Async `boolean`, indicating whether the Brightness API is available on the current device.\nCurrently this resolves `true` on iOS and Android only.\n"},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise"}}]},{"name":"isUsingSystemBrightnessAsync","kind":64,"kindString":"Function","signatures":[{"name":"isUsingSystemBrightnessAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"__Android only.__ Returns a boolean specifying whether or not the current activity is using the\nsystem-wide brightness value.","returns":"A `Promise` that fulfils with `true` when the current activity is using the system-wide\nbrightness value, and `false` otherwise.\n"},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"boolean"}],"name":"Promise"}}]},{"name":"requestPermissionsAsync","kind":64,"kindString":"Function","signatures":[{"name":"requestPermissionsAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"Asks the user to grant permissions for accessing system brightness.","returns":"A promise that fulfils with an object of type [PermissionResponse](#permissionrespons).\n"},"type":{"type":"reference","typeArguments":[{"type":"reference","name":"PermissionResponse"}],"name":"Promise"}}]},{"name":"setBrightnessAsync","kind":64,"kindString":"Function","signatures":[{"name":"setBrightnessAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"Sets the current screen brightness. On iOS, this setting will persist until the device is locked,\nafter which the screen brightness will revert to the user's default setting. On Android, this\nsetting only applies to the current activity; it will override the system brightness value\nwhenever your app is in the foreground.","returns":"A `Promise` that fulfils when the brightness has been successfully set.\n"},"parameters":[{"name":"brightnessValue","kind":32768,"kindString":"Parameter","comment":{"text":"A number between `0` and `1`, inclusive, representing the desired screen\nbrightness."},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise"}}]},{"name":"setSystemBrightnessAsync","kind":64,"kindString":"Function","signatures":[{"name":"setSystemBrightnessAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"> __WARNING:__ This method is experimental.","text":"__Android only.__ Sets the global system screen brightness and changes the brightness mode to\n`MANUAL`. Requires `SYSTEM_BRIGHTNESS` permissions.","returns":"A `Promise` that fulfils when the brightness has been successfully set.\n"},"parameters":[{"name":"brightnessValue","kind":32768,"kindString":"Parameter","comment":{"text":"A number between `0` and `1`, inclusive, representing the desired screen\nbrightness."},"type":{"type":"intrinsic","name":"number"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise"}}]},{"name":"setSystemBrightnessModeAsync","kind":64,"kindString":"Function","signatures":[{"name":"setSystemBrightnessModeAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"__Android only.__ Sets the system brightness mode."},"parameters":[{"name":"brightnessMode","kind":32768,"kindString":"Parameter","comment":{"text":"One of `BrightnessMode.MANUAL` or `BrightnessMode.AUTOMATIC`. The system\nbrightness mode cannot be set to `BrightnessMode.UNKNOWN`.\n"},"type":{"type":"reference","name":"BrightnessMode"}}],"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise"}}]},{"name":"useSystemBrightnessAsync","kind":64,"kindString":"Function","signatures":[{"name":"useSystemBrightnessAsync","kind":4096,"kindString":"Call signature","comment":{"shortText":"__Android only.__ Resets the brightness setting of the current activity to use the system-wide\nbrightness value rather than overriding it.","returns":"A `Promise` that fulfils when the setting has been successfully changed.\n"},"type":{"type":"reference","typeArguments":[{"type":"intrinsic","name":"void"}],"name":"Promise"}}]}]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.