コード例 #1
0
static DBusMessage *
impl_GetAttributeValue (DBusConnection * bus, DBusMessage * message,
                        void *user_data)
{
  AtkDocument *document = (AtkDocument *) user_data;
  gchar *attributename;
  const gchar *atr;
  DBusMessage *reply;

  g_return_val_if_fail (ATK_IS_DOCUMENT (user_data),
                        droute_not_yet_handled_error (message));
  if (!dbus_message_get_args
      (message, NULL, DBUS_TYPE_STRING, &attributename, DBUS_TYPE_INVALID))
    {
      return droute_invalid_arguments_error (message);
    }
  atr = atk_document_get_attribute_value (document, attributename);
  if (!atr)
    atr = "";
  reply = dbus_message_new_method_return (message);
  if (reply)
    {
      dbus_message_append_args (reply, DBUS_TYPE_STRING, &atr,
                                DBUS_TYPE_INVALID);
    }
  return reply;
}
コード例 #2
0
JSStringRef AccessibilityUIElement::documentURI()
{
    AtkRole role = atk_object_get_role(ATK_OBJECT(m_element));
    if (role != ATK_ROLE_DOCUMENT_FRAME)
        return JSStringCreateWithCharacters(0, 0);

    return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element), "URI"));
}
コード例 #3
0
JSRetainPtr<JSStringRef> AccessibilityUIElement::documentEncoding()
{
    if (!ATK_IS_DOCUMENT(m_element.get()))
        return JSStringCreateWithCharacters(0, 0);

    AtkRole role = atk_object_get_role(ATK_OBJECT(m_element.get()));
    if (role != ATK_ROLE_DOCUMENT_FRAME)
        return JSStringCreateWithCharacters(0, 0);

    return JSStringCreateWithUTF8CString(atk_document_get_attribute_value(ATK_DOCUMENT(m_element.get()), "Encoding"));
}
コード例 #4
0
ファイル: document.c プロジェクト: GNOME/at-spi
static CORBA_string 
impl_getAttributeValue (PortableServer_Servant servant,
			const CORBA_char *attributename,
			CORBA_Environment *ev){

  const gchar *atr;
  
  AtkDocument *document = get_document_from_servant (servant);
   
  g_return_val_if_fail (document != NULL, "");

  atr = atk_document_get_attribute_value (document, attributename);

  if (atr)
    return CORBA_string_dup (atr);
  else
    return CORBA_string_dup ("");
}
コード例 #5
0
static VALUE
rbatk_document_get_attribute_value(VALUE self, VALUE name)
{
    return CSTR2RVAL(atk_document_get_attribute_value(_SELF(self), 
                                                      RVAL2CSTR(name)));
}