# ANativeWindow_Buffer

Struct that represents a windows buffer.

## Summary

A pointer can be obtained using [ANativeWindow_lock()](https://developer.android.com/ndk/reference/group/a-native-window#group___a_native_window_1gae08841e6125415ef4c23da62c9b2f9b8).

| ### Public attributes ||
|---|---|
| `https://developer.android.com/ndk/reference/struct/a-native-window-buffer#struct_a_native_window___buffer_1a984cc143283cd0da243014626fa3f4cd` | `void *https://developer.android.com/ndk/reference/group/ndk-binder#group___ndk_binder_1ga0890a8f74983b96e76f6b8748543032d` The actual bits. |
| `https://developer.android.com/ndk/reference/struct/a-native-window-buffer#struct_a_native_window___buffer_1a1e4a110717f1a12db698a225d3ec466b` | `int32_t` The format of the buffer. One of AHardwareBuffer_Format. |
| `https://developer.android.com/ndk/reference/struct/a-native-window-buffer#struct_a_native_window___buffer_1a3823b6b1ade65660cc0047e6e5189864` | `int32_t` The number of pixels that are shown vertically. |
| `https://developer.android.com/ndk/reference/struct/a-native-window-buffer#struct_a_native_window___buffer_1a3baf090d30f64e15b6ed02e6ff607bde[6]` | `uint32_t` Do not touch. |
| `https://developer.android.com/ndk/reference/struct/a-native-window-buffer#struct_a_native_window___buffer_1a4e3cb9ba8a51a3ffd0e63262d2e7a9c4` | `int32_t` The number of *pixels* that a line in the buffer takes in memory. |
| `https://developer.android.com/ndk/reference/struct/a-native-window-buffer#struct_a_native_window___buffer_1a0d003f83b16f22560f1a4b2caa38753b` | `int32_t` The number of pixels that are shown horizontally. |

## Public attributes

### bits

Declared in `android/native_window.h`

```
void *_Nullable ANativeWindow_Buffer::bits
```
The actual bits.

### format

Declared in `android/native_window.h`

```
int32_t ANativeWindow_Buffer::format
```
The format of the buffer. One of AHardwareBuffer_Format.

### height

Declared in `android/native_window.h`

```
int32_t ANativeWindow_Buffer::height
```
The number of pixels that are shown vertically.

### reserved

Declared in `android/native_window.h`

```
uint32_t ANativeWindow_Buffer::reserved[6]
```
Do not touch.

### stride

Declared in `android/native_window.h`

```
int32_t ANativeWindow_Buffer::stride
```
The number of *pixels* that a line in the buffer takes in memory.

This may be \>= width.

### width

Declared in `android/native_window.h`

```
int32_t ANativeWindow_Buffer::width
```
The number of pixels that are shown horizontally.