Exemplo n.º 1
0
void
_cogl_closure_list_disconnect_all (CoglList *list)
{
  CoglClosure *closure, *next;

  _cogl_list_for_each_safe (closure, next, list, link)
    _cogl_closure_disconnect (closure);
}
Exemplo n.º 2
0
void
_cogl_pipeline_node_foreach_child (CoglNode *node,
                                   CoglNodeChildCallback callback,
                                   void *user_data)
{
  CoglNode *child, *next;

  _cogl_list_for_each_safe (child, next, &node->children, link)
    callback (child, user_data);
}
Exemplo n.º 3
0
static void
_cogl_winsys_egl_onscreen_deinit (CoglOnscreen *onscreen)
{
  CoglOnscreenEGL *egl_onscreen = onscreen->winsys;
  CoglOnscreenWayland *wayland_onscreen = egl_onscreen->platform;
  FrameCallbackData *frame_callback_data, *tmp;

  _cogl_list_for_each_safe (frame_callback_data,
                            tmp,
                            &wayland_onscreen->frame_callbacks,
                            link)
    free_frame_callback_data (frame_callback_data);

  if (wayland_onscreen->wayland_egl_native_window)
    {
      wl_egl_window_destroy (wayland_onscreen->wayland_egl_native_window);
      wayland_onscreen->wayland_egl_native_window = NULL;
    }

  if (!onscreen->foreign_surface)
    {
      /* NB: The wayland protocol docs explicitly state that
       * "wl_shell_surface_destroy() must be called before destroying
       * the wl_surface object." ... */
      if (wayland_onscreen->wayland_shell_surface)
        {
          wl_shell_surface_destroy (wayland_onscreen->wayland_shell_surface);
          wayland_onscreen->wayland_shell_surface = NULL;
        }

      if (wayland_onscreen->wayland_surface)
        {
          wl_surface_destroy (wayland_onscreen->wayland_surface);
          wayland_onscreen->wayland_surface = NULL;
        }
    }

  g_slice_free (CoglOnscreenWayland, wayland_onscreen);
}