# EGLHandle

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

*** ** * ** ***


```
public interface EGLHandle
```

<br />

Known direct subclasses [EGLImageKHR](https://developer.android.com/reference/androidx/opengl/EGLImageKHR), [EGLSyncKHR](https://developer.android.com/reference/androidx/opengl/EGLSyncKHR)

|---|---|
| `https://developer.android.com/reference/androidx/opengl/EGLImageKHR` | EGLImageKHR is an object which can be used to create EGLImage target resources (inside client APIs). |
| `https://developer.android.com/reference/androidx/opengl/EGLSyncKHR` | EGLHandle to wrap native EGLSync objects. |

*** ** * ** ***

Interface used to wrap native EGL objects to create type safe objects

## Summary

| ### Public methods |
|---|---|
| `abstract long` | `https://developer.android.com/reference/androidx/opengl/EGLHandle#getNativeHandle()()` Returns the native handle of the wrapped EGL object. |

## Public methods

### getNativeHandle

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

```
abstract long getNativeHandle()
```

Returns the native handle of the wrapped EGL object. This handle can be cast to the corresponding native type on the native side.

For example, EGLDisplay dpy = (EGLDisplay)handle;

| Returns |
|---|---|
| `long` | the native handle of the wrapped EGL object. |