### Method

# WPEPlatform ScreenSyncObserver set_callback

#### Declaration [src]

    void
    wpe_screen_sync_observer_set_callback (
      WPEScreenSyncObserver* observer,
      WPEScreenSyncObserverSyncFunc sync_func,
      gpointer user_data,
      GDestroyNotify destroy_notify
    )

#### Description [src]

Add a `sync_func` to be called from a secondary thread when the screen sync is triggered. The callback must be set only once and before calling wpe_screen_sync_start().

#### Parameters

`sync_func`

  Type: `WPEScreenSyncObserverSyncFunc`

  A `WPEScreenSyncObserverSyncFunc`.

`user_data`

  Type: `gpointer`

  Data to pass to `sync_func`.

  The argument can be `NULL`.
  The data is owned by the caller of the method.

`destroy_notify`

  Type: `GDestroyNotify`

  Function for freeing `user_data` or `NULL`.

  The argument can be `NULL`.