# DragAndDropSourceScope

Artifact: [androidx.compose.foundation:foundation](https://developer.android.com/jetpack/androidx/releases/compose-foundation) [View Source](https://cs.android.com/search?q=file:androidx/compose/foundation/draganddrop/LegacyDragAndDropSource.android.kt+class:androidx.compose.foundation.draganddrop.DragAndDropSourceScope) Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.8.0) Common/AllAndroid/JVM
- android

  ```
  @ExperimentalFoundationApi
  interface DragAndDropSourceScope : PointerInputScope
  ```

*** ** * ** ***

> [!CAUTION]
> **This interface is deprecated.**   
> Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself

A scope that allows for the detection of the start of a drag and drop gesture, and subsequently starting a drag and drop session.

## Summary

| ### Public functions |
|---|---|---|
| `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-unit/index.html` | `[startTransfer](https://developer.android.com/reference/kotlin/androidx/compose/foundation/draganddrop/DragAndDropSourceScope#startTransfer(androidx.compose.ui.draganddrop.DragAndDropTransferData))(transferData: https://developer.android.com/reference/kotlin/androidx/compose/ui/draganddrop/DragAndDropTransferData)` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android |

| ### Inherited functions |
|---|
| From [androidx.compose.ui.unit.Density](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density) |---|---|---| | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.[roundToPx](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.Dp).roundToPx())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit.[roundToPx](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.TextUnit).roundToPx())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html.[toDp](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Int).toDp())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html.[toDp](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Float).toDp())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size.[toDpSize](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.geometry.Size).toDpSize())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.[toPx](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.Dp).toPx())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit.[toPx](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.TextUnit).toPx())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Rect` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpRect.[toRect](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.DpRect).toRect())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/DpSize.[toSize](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(androidx.compose.ui.unit.DpSize).toSize())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-int/index.html.[toSp](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Int).toSp())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html.[toSp](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#(kotlin.Float).toSp())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | |
| From [androidx.compose.ui.unit.FontScaling](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling) |---|---|---| | `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit.[toDp](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling#(androidx.compose.ui.unit.TextUnit).toDp())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `open https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/TextUnit` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Dp.[toSp](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling#(androidx.compose.ui.unit.Dp).toSp())()` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | |
| From [androidx.compose.ui.input.pointer.PointerInputScope](https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/PointerInputScope) |---|---|---| | `suspend R` | `<R : https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-any/index.html?> [awaitPointerEventScope](https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/PointerInputScope#awaitPointerEventScope(kotlin.coroutines.SuspendFunction1))(block: suspend https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/AwaitPointerEventScope.() -> R)` **This function is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | |

| ### Inherited properties |
|---|
| From [androidx.compose.ui.unit.Density](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density) |---|---|---| | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/Density#density()` **This property is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | |
| From [androidx.compose.ui.unit.FontScaling](https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling) |---|---|---| | `https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-float/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/FontScaling#fontScale()` **This property is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | |
| From [androidx.compose.ui.input.pointer.PointerInputScope](https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/PointerInputScope) |---|---|---| | `open https://developer.android.com/reference/kotlin/androidx/compose/ui/geometry/Size` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/PointerInputScope#extendedTouchPadding()` **This property is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `open https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-boolean/index.html` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/PointerInputScope#interceptOutOfBoundsChildEvents()` **This property is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `https://developer.android.com/reference/kotlin/androidx/compose/ui/unit/IntSize` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/PointerInputScope#size()` **This property is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | | `https://developer.android.com/reference/kotlin/androidx/compose/ui/platform/ViewConfiguration` | `https://developer.android.com/reference/kotlin/androidx/compose/ui/input/pointer/PointerInputScope#viewConfiguration()` **This property is deprecated.** Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself | android | |

## Public functions

### startTransfer

android Added in [1.6.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.6.0) Deprecated in [1.8.0](https://developer.android.com/jetpack/androidx/releases/compose-foundation#1.8.0)

```
fun [startTransfer](https://developer.android.com/reference/kotlin/androidx/compose/foundation/draganddrop/DragAndDropSourceScope#startTransfer(androidx.compose.ui.draganddrop.DragAndDropTransferData))(transferData: DragAndDropTransferData): Unit
```

> [!CAUTION]
> **This function is deprecated.**   
> Replaced by a callback for obtain a transfer data,start detection is performed by Compose itself

Starts a drag and drop session with `https://developer.android.com/reference/kotlin/androidx/compose/foundation/draganddrop/DragAndDropSourceScope#startTransfer(androidx.compose.ui.draganddrop.DragAndDropTransferData)` as the data to be transferred on gesture completion