JindongScope
DSL scope interface for defining haptic patterns
JindongScope
The scope interface that provides the DSL for defining haptic patterns.
Definition
Description
JindongScope is the receiver for the Jindong content block. It serves two purposes:
- DSL Extension Point: All haptic DSL functions are defined as extensions on
JindongScope - Scope Control: The
@JindongScopeMarkerannotation prevents implicit nesting
Available Functions
Functions available within JindongScope:
| Function | Description |
|---|---|
Haptic | Emit a vibration event |
Delay | Pause the pattern |
Sequence | Group events sequentially |
Repeat | Repeat content N times |
RepeatWithIndex | Repeat with index access |
Usage
The scope is automatically provided by Jindong:
DSL Functions as Extensions
All haptic functions are extensions on JindongScope:
Scope Marker
The @JindongScopeMarker annotation prevents confusing nested scopes:
This means you cannot accidentally access outer scopes:
Composable Support
The scope supports standard Compose patterns:
Conditionals
When Expressions
Loops
Internal Implementation
The default implementation is straightforward:
The actual behavior comes from the DSL extension functions, not the scope interface itself.