Back to index

unity  6.0.0
Classes | Defines | Functions
unity-result-accessible.cpp File Reference
#include "unity-result-accessible.h"
#include "unity-rvgrid-accessible.h"
#include "unitya11y.h"

Go to the source code of this file.


struct  _UnityResultAccessiblePrivate




static void unity_result_accessible_class_init (UnityResultAccessibleClass *klass)
 SECTION:nux-result-accessible : UnityResultAccessible : Implementation of the ATK interfaces for a #Result : unity::dash::Result.
static void unity_result_accessible_init (UnityResultAccessible *result_accessible)
static void unity_result_accessible_initialize (AtkObject *accessible, gpointer data)
static AtkStateSet * unity_result_accessible_ref_state_set (AtkObject *obj)
 G_DEFINE_TYPE (UnityResultAccessible, unity_result_accessible, ATK_TYPE_OBJECT)
AtkObject * unity_result_accessible_new ()

Class Documentation

struct _UnityResultAccessiblePrivate

Definition at line 56 of file unity-result-accessible.cpp.

Define Documentation


Definition at line 52 of file unity-result-accessible.cpp.

Function Documentation

G_DEFINE_TYPE ( UnityResultAccessible  ,
unity_result_accessible  ,
static void unity_result_accessible_class_init ( UnityResultAccessibleClass *  klass) [static]

SECTION:nux-result-accessible : UnityResultAccessible : Implementation of the ATK interfaces for a #Result : unity::dash::Result.

UnityResultAccessible implements the required ATK interfaces of

nux::Result, in order to represent each one of the elements of a ResultGrid.

The idea is having it as a fly-weight object. Note: it represents it, but it doesn't maintain a reference to it.

Definition at line 61 of file unity-result-accessible.cpp.

  GObjectClass* gobject_class = G_OBJECT_CLASS(klass);
  AtkObjectClass* atk_class = ATK_OBJECT_CLASS(klass);

  /* AtkObject */
  atk_class->initialize = unity_result_accessible_initialize;
  atk_class->ref_state_set = unity_result_accessible_ref_state_set;

  g_type_class_add_private(gobject_class, sizeof(UnityResultAccessiblePrivate));

Here is the call graph for this function:

static void unity_result_accessible_init ( UnityResultAccessible *  result_accessible) [static]

Definition at line 74 of file unity-result-accessible.cpp.

  UnityResultAccessiblePrivate* priv =

  result_accessible->priv = priv;
static void unity_result_accessible_initialize ( AtkObject *  accessible,
gpointer  data 
) [static]

Definition at line 96 of file unity-result-accessible.cpp.

  ATK_OBJECT_CLASS(unity_result_accessible_parent_class)->initialize(accessible, data);

  /* On unity Result is just data, but on the accessible
     implementation we are using this object to represent each icon
     selected on the result grid, so a push button */
  atk_object_set_role(accessible, ATK_ROLE_PUSH_BUTTON);

Here is the caller graph for this function:

Definition at line 83 of file unity-result-accessible.cpp.

  AtkObject* accessible = NULL;

  accessible = ATK_OBJECT(g_object_new(UNITY_TYPE_RESULT_ACCESSIBLE, NULL));

  atk_object_initialize(accessible, NULL);

  return accessible;

Here is the caller graph for this function:

static AtkStateSet * unity_result_accessible_ref_state_set ( AtkObject *  obj) [static]

Definition at line 108 of file unity-result-accessible.cpp.

  AtkStateSet* state_set = NULL;

  g_return_val_if_fail(UNITY_IS_RESULT_ACCESSIBLE(obj), NULL);

  state_set = ATK_OBJECT_CLASS(unity_result_accessible_parent_class)->ref_state_set(obj);

  /* by default, this is a fly-weight/dummy object, so if created we have
     this information */
  atk_state_set_add_state(state_set, ATK_STATE_FOCUSABLE);
  atk_state_set_add_state(state_set, ATK_STATE_ENABLED);
  atk_state_set_add_state(state_set, ATK_STATE_SENSITIVE);

  atk_state_set_add_state(state_set, ATK_STATE_VISIBLE);
  atk_state_set_add_state(state_set, ATK_STATE_SHOWING);

  /* This object is not focused, the focused is the parent
     ResultViewGrid */
  // atk_state_set_add_state(state_set, ATK_STATE_FOCUSED);
  atk_state_set_add_state(state_set, ATK_STATE_SELECTED);
  atk_state_set_add_state(state_set, ATK_STATE_ACTIVE);

  return state_set;

Here is the caller graph for this function: