theme / projekt.commons.theme.backend / Backend
Backend¶
interface Backend
Interface to do overlay related operations.
See Also
Properties¶
| Name | Summary |
|---|---|
| overlayState | abstract val overlayState:Map<String,Int>Returns map of installed overlay package name and its state. |
| targetWithMultipleOverlay | abstract val targetWithMultipleOverlay:List<String>Returns list of target packages that overlaid by multiple overlays. |
Functions¶
| Name | Summary |
|---|---|
| applyFonts | abstract fun applyFonts(themePid:String, name:String):UnitApplies custom fonts to the system. |
| getEnabledOverlayWithTarget | abstract fun getEnabledOverlayWithTarget(targetPackage:String):List<String>Returns list of enabled overlay package names for a target. |
| installOverlay | abstract fun installOverlay(paths:List<String>):UnitInstalls overlay to the system. |
| restartSystemUi | abstract fun restartSystemUi():UnitRestarts SystemUI |
| restoreFonts | abstract fun restoreFonts():UnitRestores fonts to system default. |
| setPriority | abstract fun setPriority(packages:List<String>, restartUi:Boolean):UnitSets priority of overlays. |
| switchOverlay | abstract fun switchOverlay(packages:List<String>, state:Boolean, restartUi:Boolean):UnitSwitches overlay state. |
| uninstallOverlay | abstract fun uninstallOverlay(packages:List<String>, restartUi:Boolean):UnitUninstalls overlay from the system. |
Extension Functions¶
| Name | Summary |
|---|---|
| isOverlayNewest | funBackend.isOverlayNewest(name:String, timeStamp:Long):BooleanChecks whether the installed overlay is the intended ones. This is checked against timestamp in the overlay metadata. |
| setPriority | funBackend.setPriority(overlays:List<String>):UnitSets priority of overlays. |
| switchOverlay | funBackend.switchOverlay(overlay:String, state:Boolean):UnitfunBackend.switchOverlay(overlays:List<String>, state:Boolean):UnitSwitches overlay state. |
| uninstallOverlay | funBackend.uninstallOverlay(overlays:List<String>):UnitUninstalls overlay from the system. |