# DirectNavigationEventInput

Artifact: [androidx.navigationevent:navigationevent](https://developer.android.com/jetpack/androidx/releases/navigationevent) [View Source](https://cs.android.com/search?q=file:androidx/navigationevent/DirectNavigationEventInput.kt+class:androidx.navigationevent.DirectNavigationEventInput) Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

*** ** * ** ***

Common/AllAndroid/JVMJavaScript
- Cmn

  ```
  class DirectNavigationEventInput : NavigationEventInput
  ```

|---|---|---|
| [kotlin.Any](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html) |||
| ↳ | [androidx.navigationevent.NavigationEventInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput) ||
|   | ↳ | [androidx.navigationevent.DirectNavigationEventInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/DirectNavigationEventInput) |

*** ** * ** ***

An input that can send events to a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher`. Instead of subclassing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput`, users can create instances of this class and use it directly.

## Summary

| ### Public constructors |
|---|---|
| `https://developer.android.com/reference/kotlin/androidx/navigationevent/DirectNavigationEventInput#DirectNavigationEventInput()()` | Cmn |

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/DirectNavigationEventInput#backCancelled()()` Dispatch a back cancelled event with the connected dispatcher. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/DirectNavigationEventInput#backCompleted()()` Dispatch a back completed event with the connected dispatcher. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/DirectNavigationEventInput#backProgressed(androidx.navigationevent.NavigationEvent)(event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent)` Dispatch a back progressed event with the connected dispatcher. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/DirectNavigationEventInput#backStarted(androidx.navigationevent.NavigationEvent)(event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent)` Dispatch a back started event with the connected dispatcher. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/DirectNavigationEventInput#forwardCancelled()()` Dispatch a forward cancelled event with the connected dispatcher. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/DirectNavigationEventInput#forwardCompleted()()` Dispatch a forward completed event with the connected dispatcher. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/DirectNavigationEventInput#forwardProgressed(androidx.navigationevent.NavigationEvent)(event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent)` Dispatch a forward progressed event with the connected dispatcher. | Cmn |
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread https://developer.android.com/reference/kotlin/androidx/navigationevent/DirectNavigationEventInput#forwardStarted(androidx.navigationevent.NavigationEvent)(event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent)` Dispatch a forward started event with the connected dispatcher. | Cmn |

### Inherited functions

From [androidx.navigationevent.NavigationEventInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnBackCancelled()()`

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has been **cancelled**.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnBackCompleted()()`

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **completed**.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnBackProgressed(androidx.navigationevent.NavigationEvent)(event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent)`

Notifies the dispatcher that an ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **progressed**.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnBackStarted(androidx.navigationevent.NavigationEvent)(event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent)`

Notifies the dispatcher that a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_BACK()` navigation gesture has **started**.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnForwardCancelled()()`

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has been **cancelled**.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnForwardCompleted()()`

Notifies the dispatcher that the ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **completed**.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnForwardProgressed(androidx.navigationevent.NavigationEvent)(event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent)`

Notifies the dispatcher that an ongoing `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **progressed**.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#dispatchOnForwardStarted(androidx.navigationevent.NavigationEvent)(event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent)`

Notifies the dispatcher that a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventTransitionState#TRANSITIONING_FORWARD()` navigation gesture has **started**.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onAdded(androidx.navigationevent.NavigationEventDispatcher)(dispatcher: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher)`

Called after this `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput` is added to `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onAdded(androidx.navigationevent.NavigationEventDispatcher)`.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onHasEnabledBackHandlersChanged(kotlin.Boolean)(hasEnabledBackHandlers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Called when the enabled state of back handlers in the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` changes.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onHasEnabledForwardHandlersChanged(kotlin.Boolean)(hasEnabledForwardHandlers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Called when the enabled state of forward handlers in the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` changes.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onHasEnabledHandlersChanged(kotlin.Boolean)(hasEnabledHandlers: https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html)`

Called when the enabled state of handlers (either back or forward) in the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` changes.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onHistoryChanged(androidx.navigationevent.NavigationEventHistory)(history: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory)`

Called when the `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHistory` state in the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` changes.
Cmn `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` `@https://developer.android.com/reference/kotlin/androidx/annotation/MainThread
@https://developer.android.com/reference/kotlin/androidx/annotation/EmptySuper
https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#onRemoved()()`

Called after this `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput` is removed from a `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher`.
Cmn

### Inherited properties

From [androidx.navigationevent.NavigationEventInput](https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput) `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#hasEnabledBackHandlers()`

Tracks whether the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHandler` for back navigation matching this input's priority scope.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#hasEnabledForwardHandlers()`

Tracks whether the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHandler` for forward navigation matching this input's priority scope.
Cmn `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventInput#hasEnabledHandlers()`

Tracks whether the connected `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventDispatcher` has any enabled `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEventHandler` matching this input's priority scope.
Cmn

## Public constructors

### DirectNavigationEventInput

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
DirectNavigationEventInput()
```

## Public functions

### backCancelled

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
fun backCancelled(): Unit
```

Dispatch a back cancelled event with the connected dispatcher.

### backCompleted

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
fun backCompleted(): Unit
```

Dispatch a back completed event with the connected dispatcher.

### backProgressed

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
fun backProgressed(event: NavigationEvent): Unit
```

Dispatch a back progressed event with the connected dispatcher.

| Parameters |
|---|---|
| `event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` | The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` to dispatch. |

### backStarted

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
fun backStarted(event: NavigationEvent): Unit
```

Dispatch a back started event with the connected dispatcher.

| Parameters |
|---|---|
| `event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` | The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` to dispatch. |

### forwardCancelled

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
fun forwardCancelled(): Unit
```

Dispatch a forward cancelled event with the connected dispatcher.

### forwardCompleted

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
fun forwardCompleted(): Unit
```

Dispatch a forward completed event with the connected dispatcher.

### forwardProgressed

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
fun forwardProgressed(event: NavigationEvent): Unit
```

Dispatch a forward progressed event with the connected dispatcher.

| Parameters |
|---|---|
| `event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` | The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` to dispatch. |

### forwardStarted

Cmn Added in [1.0.0](https://developer.android.com/jetpack/androidx/releases/navigationevent#1.0.0)

```
@MainThread
fun forwardStarted(event: NavigationEvent): Unit
```

Dispatch a forward started event with the connected dispatcher.

| Parameters |
|---|---|
| `event: https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` | The `https://developer.android.com/reference/kotlin/androidx/navigationevent/NavigationEvent` to dispatch. |