void vik_layer_emit_update ( VikLayer *vl ) { if ( vl->visible ) { vik_window_set_redraw_trigger(vl); g_signal_emit ( G_OBJECT(vl), layer_signals[VL_UPDATE_SIGNAL], 0 ); } }
/** * Draw specified layer */ void vik_layer_emit_update ( VikLayer *vl ) { if ( vl->visible && vl->realized ) { vik_window_set_redraw_trigger(vl); // Only ever draw when there is time to do so if ( g_thread_self() != vik_window_get_thread (VIK_WINDOW(VIK_GTK_WINDOW_FROM_LAYER(vl))) ) // Drawing requested from another (background) thread, so handle via the gdk thread method gdk_threads_add_idle ( (GSourceFunc) idle_draw, vl ); else g_idle_add ( (GSourceFunc) idle_draw, vl ); } }
/** * should only be done by VikLayersPanel (hence never used from the background) * need to redraw and record trigger when we make a layer invisible. */ void vik_layer_emit_update_although_invisible ( VikLayer *vl ) { vik_window_set_redraw_trigger(vl); g_idle_add ( (GSourceFunc) idle_draw, vl ); }