core :: union_find
union–find algorithm using an efficient disjoint-set data structure
# Services from GDK
module gdk is pkgconfig "gtk+-3.0"
import gtk_core
`{
#ifdef Task_gdk_main
// Callback to Task::gdk_main
gboolean nit_gdk_callback_task(gpointer user_data) {
Task_decr_ref(user_data);
return Task_gdk_main(user_data);
}
#endif
`}
redef class Task
# Small unit of code executed by the GDK loop when idle
#
# Returns `true` if this object should be invoked again.
fun gdk_main: Bool
do
main
return false
end
end
# Add a callback to execute whenever there are no higher priority events pending
fun gdk_threads_add_idle(task: Task): Int import Task.gdk_main `{
Task_incr_ref(task);
return gdk_threads_add_idle(&nit_gdk_callback_task, task);
`}
lib/gtk/v3_4/gdk.nit:15,1--46,2