File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed
companion-surface-base/src/surface-api
companion-surface-host/src Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -17,5 +17,7 @@ export interface SurfaceContext {
1717 rotateLeftById ( controlId : string ) : void
1818 rotateRightById ( controlId : string ) : void
1919
20+ changePage ( forward : boolean ) : void
21+
2022 sendVariableValue ( variable : string , value : any ) : void
2123}
Original file line number Diff line number Diff line change @@ -28,6 +28,8 @@ export interface HostSurfaceEvents {
2828 readonly inputPress : ( surfaceId : string , controlId : string , pressed : boolean ) => void
2929 readonly inputRotate : ( surfaceId : string , controlId : string , delta : number ) => void
3030
31+ readonly changePage : ( surfaceId : string , forward : boolean ) => void
32+
3133 readonly setVariableValue : ( surfaceId : string , name : string , value : any ) => void
3234
3335 readonly pincodeEntry : ( surfaceId : string , char : number ) => void
Original file line number Diff line number Diff line change @@ -442,6 +442,12 @@ export class SurfaceProxyContext implements SurfaceContext {
442442 this . #host. surfaceEvents . inputRotate ( this . #surfaceId, controlId , 1 )
443443 }
444444
445+ changePage ( forward : boolean ) : void {
446+ if ( this . #isLocked) return
447+
448+ this . #host. surfaceEvents . changePage ( this . #surfaceId, forward )
449+ }
450+
445451 // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
446452 sendVariableValue ( variable : string , value : any ) : void {
447453 if ( this . #isLocked) return
You can’t perform that action at this time.
0 commit comments