2003-12-01 Bill Haneman <billh@gnome.org>
+ Fix for bug/rfe #127463.
+
+ * idl/Accessibility_Accessible.idl:
+ (getLocalizedRoleName): New.
+ (unimplemented4): Removed (replaced by above).
+
+ * libspi/accessible.c:
+ (impl_accessibility_accessible_get_local_role_name): New.
+ (spi_accessible_class_init): Add getLocalizedRoleName entry to
+ epv.
+
+ * cspi/spi.h:
+ (Accessible_getLocalizedRoleName): New.
+
+ * cspi/spi_accessible.c:
+ (Accessible_getLocalizedRoleName): New.
+
+2003-12-01 Bill Haneman <billh@gnome.org>
+
Fix for bug #118581.
* idl/Accessibility_Text.idl:
(getDefaultAttributes): New.
AccessibleRelation **Accessible_getRelationSet (Accessible *obj);
AccessibleRole Accessible_getRole (Accessible *obj);
char * Accessible_getRoleName (Accessible *obj);
+char * Accessible_getLocalizedRoleName (Accessible *obj);
AccessibleStateSet * Accessible_getStateSet (Accessible *obj);
/* Interface query methods */
}
/**
+ * Accessible_getLocalizedRoleName:
+ * @obj: a pointer to the #Accessible object on which to operate.
+ *
+ * Get a UTF-8 string describing the (localized) role this object plays in the UI.
+ * This method will return useful values for roles that fall outside the
+ * enumeration used in Accessible_getRole ().
+ *
+ * Returns: a UTF-8 string specifying the role of this #Accessible object.
+ *
+ **/
+char *
+Accessible_getLocalizedRoleName (Accessible *obj)
+{
+ char *retval;
+
+ cspi_return_val_if_fail (obj != NULL, CORBA_string_dup ("invalid"));
+
+ retval =
+ Accessibility_Accessible_getLocalizedRoleName (CSPI_OBJREF (obj), cspi_ev ());
+
+ cspi_return_val_if_ev ("getLocalizedRoleName", CORBA_string_dup ("invalid"));
+
+ return retval;
+}
+
+/**
* Accessible_getStateSet:
* @obj: a pointer to the #Accessible object on which to operate.
*
string getRoleName ();
/**
+ * getLocalizedRoleName:
+ * Get a string indicating the type of UI role played by this object,
+ * translated to the current locale.
+ *
+ * Returns: a UTF-8 string indicating the type of UI role played by this object.
+ **/
+ string getLocalizedRoleName ();
+
+ /**
* getState:
*
* Get the current state of the object as a @StateSet.
void unImplemented ();
void unImplemented2 ();
void unImplemented3 ();
- void unImplemented4 ();
};
};
return CORBA_string_dup ("");
}
+/*
+ * CORBA Accessibility::Accessible::getLocalizedRole method implementation
+ */
+static CORBA_char *
+impl_accessibility_accessible_get_local_role_name (PortableServer_Servant servant,
+ CORBA_Environment *ev)
+{
+ const gchar *role_name;
+ AtkRole role;
+ AtkObject *object = get_atkobject_from_servant (servant);
+
+ g_return_val_if_fail (object != NULL, 0);
+
+ role = atk_object_get_role (object);
+
+ role_name = atk_role_get_localized_name (role);
+ if (role_name)
+ return CORBA_string_dup (role_name);
+ else
+ return CORBA_string_dup ("");
+}
+
static void
spi_accessible_class_init (SpiAccessibleClass *klass)
{
epv->getState = impl_accessibility_accessible_get_state;
epv->getRole = impl_accessibility_accessible_get_role;
epv->getRoleName = impl_accessibility_accessible_get_role_name;
+ epv->getLocalizedRoleName = impl_accessibility_accessible_get_local_role_name;
}
static void