Exemple #1
0
/*
 * It loads the atk-bridge if required. It checks:
 *  * If the proper gsetting key is set
 *  * If clutter has already enabled the accessibility
 *
 * You need to ensure that the atk-bridge was not loaded before this
 * call, because in that case the application would be already
 * registered on at-spi using the AtkUtil implementation on that
 * moment (if any, although without anyone the application would
 * crash). Anyway this is the reason of NO_AT_BRIDGE.
 *
 */
void
cinnamon_a11y_init (void)
{
  char *bridge_path = NULL;

  if (!should_enable_a11y ())
    return;

  if (clutter_get_accessibility_enabled () == FALSE)
    {
      g_warning ("Accessibility: clutter has no accessibility enabled"
                 " skipping the atk-bridge load");
      return;
    }

  bridge_path = get_atk_bridge_path ();

  if (a11y_invoke_module (bridge_path) == FALSE)
    {
      g_warning ("Accessibility: error loading the atk-bridge. Although the"
                 " accessibility on the system is enabled and clutter"
                 " accessibility is also enabled, accessibility support on"
                 " Cinnamon will not work");
    }

  /* NOTE: We avoid to load gail module, as gail-cally interaction is
   * not fully supported right now.
   */

  g_free (bridge_path);
}
Exemple #2
0
static void
cinnamon_a11y_init (void)
{
  if (clutter_get_accessibility_enabled () == FALSE)
    {
      g_warning ("Accessibility: clutter has no accessibility enabled"
                 " skipping the atk-bridge load");
    }
  else
    {
      atk_bridge_adaptor_init (NULL, NULL);
    }
}