Package-level declarations

Types

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ActionHandler(val action: KClass<out SettingAction>)

Defines an action handler for BUTTON type settings.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class AddedInVersion(val version: Int)

Marks a field that was added in a specific version.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class CategoryDefinition(val order: Int = 0, val titleRes: Int = 0)

Marks an object as a setting category.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ConfirmReset(val message: String = "Are you sure you want to reset this setting?")

Marks a field that requires confirmation before reset.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class DeprecatedSetting(val message: String = "", val removeInVersion: Int = Int.MAX_VALUE)

Marks a field that was deprecated.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Length(val min: Int = 0, val max: Int = Int.MAX_VALUE, val errorMessage: String = "Invalid length", val errorMessageRes: Int = 0)

Validates string length.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class NoReset

Marks a field that should NOT be reset.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Pattern(val regex: String, val errorMessage: String = "Invalid format", val errorMessageRes: Int = 0)

Validates string pattern.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Persisted(val key: String = "")

Marks a property as persisted but NOT shown in UI.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Range(val min: Double = Double.MIN_VALUE, val max: Double = Double.MAX_VALUE, val errorMessage: String = "Value out of range", val errorMessageRes: Int = 0)

Validates numeric range for Int/Long/Float/Double fields.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class RenamedFrom(val previousKey: String, val sinceVersion: Int = 1)

Marks a field that was renamed from a previous key.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Required(val errorMessage: String = "This field is required", val errorMessageRes: Int = 0)

Marks field as required.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class RequiresConfirmation(val title: String = "Confirm Change", val message: String = "Are you sure you want to change this setting?", val titleRes: Int = 0, val messageRes: Int = 0, val confirmText: String = "Confirm", val confirmTextRes: Int = 0, val cancelText: String = "Cancel", val cancelTextRes: Int = 0, val isDangerous: Boolean = false)

Requires confirmation before changing this setting.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.CLASS])
annotation class SchemaVersion(val version: Int)

Defines schema version for a settings class.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Serialized

Marks a property for JSON serialization.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class SerializedWith(val serializer: KClass<out SettingSerializer<*>>)

Specify a custom serializer class.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class Setting(val title: String = "", val description: String = "", val category: KClass<*>, val type: KClass<*> = Toggle::class, val key: String = "", val dependsOn: String = "", val titleRes: Int = 0, val descriptionRes: Int = 0, val min: Float = 0.0f, val max: Float = 100.0f, val step: Float = 1.0f, val options: Array<String> = [], val optionsRes: Int = 0, val platforms: Array<SettingPlatform> = [SettingPlatform.ALL])

Marks a property as a UI-visible setting.

Link copied to clipboard
interface SettingAction

Base interface for setting actions.

Link copied to clipboard

Marker interface for category objects.

Link copied to clipboard

Target platforms for a setting.

Link copied to clipboard
interface SettingSerializer<T>

Interface for custom serializers.

Link copied to clipboard
interface SettingValidator<T>

Base validator interface.

Link copied to clipboard
@Target(allowedTargets = [AnnotationTarget.PROPERTY])
annotation class ValidatedBy(val validator: KClass<out SettingValidator<*>>)

Custom validation using a validator class.

Link copied to clipboard
sealed class ValidationResult