awesome-cordova-plugins/dist/plugins/statusbar.js

112 lines
3.5 KiB
JavaScript
Raw Normal View History

2015-12-01 10:17:55 +08:00
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
2015-12-02 08:47:24 +08:00
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
2015-11-29 06:17:04 +08:00
};
2015-11-29 08:26:55 +08:00
var plugin_1 = require('./plugin');
2016-02-06 05:06:03 +08:00
/**
* Manage the appearance of the native status bar.
*
* @usage
* ```js
* StatusBar.hide(); // Hide the bar
*
* StatusBar.setStyle(StatusBar.LIGHT_CONTENT) // Good for dark backgrounds
* ```
*/
2015-11-29 08:26:55 +08:00
var StatusBar = (function () {
function StatusBar() {
}
2016-02-06 05:06:03 +08:00
/**
* Set whether the status bar overlays the main app view. The default
* is true.
*
* @param doesOverlay whether the status bar overlays the main app view.
*/
2015-11-30 09:54:45 +08:00
StatusBar.overlaysWebView = function (doOverlay) { };
;
StatusBar.styleDefault = function () { };
;
StatusBar.styleLightContent = function () { };
;
StatusBar.styleBlackTranslucent = function () { };
;
StatusBar.styleBlackOpaque = function () { };
;
2016-02-06 05:06:03 +08:00
/**
* Set the status bar to a specific named color. Valid options:
* black, darkGray, lightGray, white, gray, red, green, blue, cyan, yellow, magenta, orange, purple, brown.
*
* iOS note: you must call StatusBar.setOverlay(false) to enable color changing.
*
* @param name the name of the color (from above)
*/
2015-11-30 09:54:45 +08:00
StatusBar.backgroundColorByName = function (colorName) { };
;
2016-02-06 05:06:03 +08:00
/**
* Set the status bar to a specific hex color (CSS shorthand supported!).
*
* iOS note: you must call StatusBar.setOverlay(false) to enable color changing.
*
* @param hex the hex value of the color.
*/
2015-11-30 09:54:45 +08:00
StatusBar.backgroundColorByHexString = function (hexString) { };
;
2016-02-06 05:06:03 +08:00
/**
* Hide the StatusBar
*
* Options:
*
* StatusBar.DEFAULT
* StatusBar.LIGHT_CONTENT
* StatusBar.BLACK_TRANSLUCENT
* StatusBar.BLACK_OPAQUE
*
* @param style the style from above
*/
2015-11-30 09:54:45 +08:00
StatusBar.hide = function () { };
;
2016-02-06 05:06:03 +08:00
/**
* Show the StatusBar
*/
2015-11-30 09:54:45 +08:00
StatusBar.show = function () { };
;
2015-12-02 08:47:24 +08:00
__decorate([
plugin_1.Cordova()
], StatusBar, "overlaysWebView", null);
__decorate([
plugin_1.Cordova()
], StatusBar, "styleDefault", null);
__decorate([
plugin_1.Cordova()
], StatusBar, "styleLightContent", null);
__decorate([
plugin_1.Cordova()
], StatusBar, "styleBlackTranslucent", null);
__decorate([
plugin_1.Cordova()
], StatusBar, "styleBlackOpaque", null);
__decorate([
plugin_1.Cordova()
], StatusBar, "backgroundColorByName", null);
__decorate([
plugin_1.Cordova()
], StatusBar, "backgroundColorByHexString", null);
__decorate([
plugin_1.Cordova()
], StatusBar, "hide", null);
__decorate([
plugin_1.Cordova()
], StatusBar, "show", null);
2015-11-29 08:26:55 +08:00
StatusBar = __decorate([
plugin_1.Plugin({
name: 'StatusBar',
plugin: 'cordova-plugin-statusbar',
pluginRef: 'StatusBar'
})
], StatusBar);
return StatusBar;
})();
exports.StatusBar = StatusBar;
2015-12-01 02:34:54 +08:00
//# sourceMappingURL=statusbar.js.map