ClapperGtk.get_player_from_ancestor
Description: Reference for ClapperGtk.get_player_from_ancestor

### Function

# ClapperGtkget_player_from_ancestor

#### Declaration [src]

    ClapperPlayer*
    clapper_gtk_get_player_from_ancestor (
      GtkWidget* widget
    )

#### Description [src]

Get `ClapperPlayer` used by `ClapperGtkVideo` ancestor of `widget`.

This utility is a convenience wrapper for calling `gtk_widget_get_ancestor()` of type `CLAPPER_GTK_TYPE_VIDEO` and `clapper_gtk_video_get_player()` with additional `NULL` checking and type casting.

This is meant to be used mainly for custom widget development as an easy access to the underlying parent `ClapperPlayer` object. If you want to get the player from `ClapperGtkVideo` widget itself, use `clapper_gtk_video_get_player()` instead.

Rememeber that this function will return `NULL` when widget does not have a `ClapperGtkVideo` ancestor in widget hierarchy (widget is not yet placed).

#### Parameters

`widget`

  Type: `GtkWidget`

  A `GtkWidget`.

  The data is owned by the caller of the function.

#### Return value

Type: `ClapperPlayer`

A `ClapperPlayer` from ancestor of a `widget`.

The data is owned by the called function.
The return value can be `NULL`.