- return ret;
-}
-
-extern GType g_inotify_directory_monitor_get_type (void);
-
-static gpointer
-get_default_local_directory_monitor (gpointer data)
-{
- GType *monitor_impls, chosen_type;
- guint n_monitor_impls;
- GType *ret = (GType *) data;
- gint i;
-
-#if defined(HAVE_SYS_INOTIFY_H) || defined(HAVE_LINUX_INOTIFY_H)
- /* Register Inotify monitor */
- g_inotify_directory_monitor_get_type ();
-#endif
-
- g_io_modules_ensure_loaded (GIO_MODULE_DIR);
-
- monitor_impls = g_type_children (G_TYPE_LOCAL_DIRECTORY_MONITOR,
- &n_monitor_impls);
-
- chosen_type = G_TYPE_INVALID;
-
- g_qsort_with_data (monitor_impls,
- n_monitor_impls,
- sizeof (GType),
- _compare_monitor_class_by_prio,
- NULL);
-
- for (i = n_monitor_impls - 1; i >= 0 && chosen_type == G_TYPE_INVALID; i--)
- {
- GLocalDirectoryMonitorClass *klass;
-
- klass = G_LOCAL_DIRECTORY_MONITOR_CLASS (g_type_class_ref (monitor_impls[i]));
-
- if (klass->is_supported())
- chosen_type = monitor_impls[i];