Back to index

unity  6.0.0
Functions
unitya11y.h File Reference
#include <atk/atk.h>
#include <Nux/Nux.h>
#include <Nux/WindowThread.h>
#include <NuxCore/Object.h>
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void unity_a11y_preset_environment (void)
void unity_a11y_init (nux::WindowThread *wt)
void unity_a11y_finalize (void)
AtkObject * unity_a11y_get_accessible (nux::Object *object)
gboolean unity_a11y_initialized (void)
GHashTable * _unity_a11y_get_accessible_table ()

Function Documentation

Definition at line 406 of file unitya11y.cpp.

{
  return accessible_table;
}

Here is the caller graph for this function:

void unity_a11y_finalize ( void  )

Definition at line 240 of file unitya11y.cpp.

{
  if (accessible_table != NULL)
  {
    g_hash_table_unref(accessible_table);
    accessible_table = NULL;
  }
  a11y_initialized = FALSE;
}

Here is the caller graph for this function:

AtkObject* unity_a11y_get_accessible ( nux::Object *  object)

Definition at line 363 of file unitya11y.cpp.

{
  AtkObject* accessible_object = NULL;

  g_return_val_if_fail(object != NULL, NULL);

  if (accessible_table == NULL)
  {
    accessible_table = g_hash_table_new(g_direct_hash, g_direct_equal);
  }

  accessible_object = ATK_OBJECT(g_hash_table_lookup(accessible_table, object));
  if (accessible_object == NULL)
  {
    accessible_object = unity_a11y_create_accessible(object);

    g_hash_table_insert(accessible_table, object, accessible_object);

    /* there are two reasons the object should be removed from the
     * table: base object destroyed, or accessible object
     * destroyed
     */
    g_object_weak_ref(G_OBJECT(accessible_object),
                      on_accessible_destroy_cb,
                      object);

    object->OnDestroyed.connect(sigc::bind(sigc::ptr_fun(on_object_destroy_cb),
                                           accessible_object));
  }

  return accessible_object;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void unity_a11y_init ( nux::WindowThread *  wt)

Definition at line 202 of file unitya11y.cpp.

{
  gchar* bridge_path = NULL;

  unity_a11y_restore_environment();

  if (!should_enable_a11y())
    return;

  load_unity_atk_util(wt);

  bridge_path = get_atk_bridge_path();

  if (a11y_invoke_module(bridge_path))
  {
    g_debug("Unity Oneiric accessibility started, using bridge on %s",
            bridge_path);

    atk_get_root();

    a11y_initialized = TRUE;
  }

  g_free(bridge_path);

// NOTE: we run manually the unit tests while developing by
// uncommenting this. Take a look to the explanation on
// unitya11ytests.h header for more information

//  unity_run_a11y_unit_tests ();
}

Here is the call graph for this function:

Here is the caller graph for this function:

gboolean unity_a11y_initialized ( void  )

Definition at line 399 of file unitya11y.cpp.

{
  return a11y_initialized;
}

Definition at line 188 of file unitya11y.cpp.

{
  g_setenv("NO_AT_BRIDGE", "1", TRUE);
  g_setenv("NO_GAIL", "1", TRUE);
}

Here is the caller graph for this function: