# View

> Python API events

### AfterFramebufferCreate

```python
def onAfterFramebufferCreate(viewer):
    pass

id = view.addAfterFramebufferCreateCallback(onAfterFramebufferCreate)

...

view.removeAfterFramebufferCreateCallback(id)
```

Parameters

| Type                             | Name   | Description |
| -------------------------------- | ------ | ----------- |
| [Viewer](./view_types.md#viewer) | viewer |             |

### AfterViewerPropertyChanged

```python
def onAfterViewerPropertyChanged(viewer, property):
    pass

id = view.addAfterViewerPropertyChangedCallback(onAfterViewerPropertyChanged)

...

view.removeAfterViewerPropertyChangedCallback(id)
```

Parameters

| Type                             | Name     | Description       |
| -------------------------------- | -------- | ----------------- |
| [Viewer](./view_types.md#viewer) | viewer   | Viewer id.        |
| [String](./core_types.md#string) | property | Property changed. |

### BeforeFramebufferDelete

```python
def onBeforeFramebufferDelete(viewer):
    pass

id = view.addBeforeFramebufferDeleteCallback(onBeforeFramebufferDelete)

...

view.removeBeforeFramebufferDeleteCallback(id)
```

Parameters

| Type                             | Name   | Description |
| -------------------------------- | ------ | ----------- |
| [Viewer](./view_types.md#viewer) | viewer |             |

### BeforeViewerPropertyChanged

```python
def onBeforeViewerPropertyChanged(viewer, property):
    pass

id = view.addBeforeViewerPropertyChangedCallback(onBeforeViewerPropertyChanged)

...

view.removeBeforeViewerPropertyChangedCallback(id)
```

Parameters

| Type                             | Name     | Description       |
| -------------------------------- | -------- | ----------------- |
| [Viewer](./view_types.md#viewer) | viewer   | Viewer id.        |
| [String](./core_types.md#string) | property | Property changed. |

### AnimationPausedOrStopped

```python
def onAnimationPausedOrStopped(animation):
    pass

id = view.addAnimationPausedOrStoppedCallback(onAnimationPausedOrStopped)

...

view.removeAnimationPausedOrStoppedCallback(id)
```

Parameters

| Type                                    | Name      | Description                  |
| --------------------------------------- | --------- | ---------------------------- |
| [Animation](./scene_types.md#animation) | animation | Paused or stopped animation. |

### AnimationPlayedOrResumed

```python
def onAnimationPlayedOrResumed(animation):
    pass

id = view.addAnimationPlayedOrResumedCallback(onAnimationPlayedOrResumed)

...

view.removeAnimationPlayedOrResumedCallback(id)
```

Parameters

| Type                                    | Name      | Description                  |
| --------------------------------------- | --------- | ---------------------------- |
| [Animation](./scene_types.md#animation) | animation | Played or resumed animation. |

### AnimationPlayingStatusChanged

```python
def onAnimationPlayingStatusChanged(animation, playInfo):
    pass

id = view.addAnimationPlayingStatusChangedCallback(onAnimationPlayingStatusChanged)

...

view.removeAnimationPlayingStatusChangedCallback(id)
```

Parameters

| Type                                                       | Name      | Description                  |
| ---------------------------------------------------------- | --------- | ---------------------------- |
| [Animation](./scene_types.md#animation)                    | animation | Paused or stopped animation. |
| [AnimationPlayerInfo](./view_types.md#animationplayerinfo) | playInfo  | Animation info.              |
