2020-03-27 20:15:31 +03:00
|
|
|
/* -*- Mode: C; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
%{C++
|
2020-05-13 02:28:34 +03:00
|
|
|
#include <objc/objc.h>
|
|
|
|
|
2020-03-27 20:15:31 +03:00
|
|
|
#define NS_ACCESSIBLE_MAC_EVENT_TOPIC "accessible-mac-event"
|
|
|
|
%}
|
|
|
|
|
2020-07-03 00:24:39 +03:00
|
|
|
/**
|
|
|
|
* A generic NSISupports wrapper for native NSObjects.
|
|
|
|
*/
|
|
|
|
[scriptable, builtinclass, uuid(4582bb77-de03-4ed1-a9b4-d482d97c0129)]
|
|
|
|
interface nsIAccessibleMacNSObjectWrapper : nsISupports
|
|
|
|
{
|
|
|
|
%{C++
|
|
|
|
virtual id GetNativeObject() const = 0;
|
|
|
|
%}
|
|
|
|
};
|
|
|
|
|
2020-03-27 20:15:31 +03:00
|
|
|
[scriptable, builtinclass, uuid(9d27cf21-66fc-47dc-8a07-98edb18707b1)]
|
|
|
|
interface nsIAccessibleMacInterface : nsISupports
|
|
|
|
{
|
|
|
|
/**
|
2020-06-02 07:20:38 +03:00
|
|
|
* List of available attribute names for the object.
|
2020-03-27 20:15:31 +03:00
|
|
|
* Emulates `AXUIElementCopyAttributeNames`.
|
|
|
|
*/
|
|
|
|
readonly attribute Array<AString> attributeNames;
|
|
|
|
|
2020-06-02 07:20:38 +03:00
|
|
|
/**
|
|
|
|
* List of available parameterized attribute names for the object.
|
|
|
|
* Emulates `AXUIElementCopyParameterizedAttributeNames`.
|
|
|
|
*/
|
|
|
|
readonly attribute Array<AString> parameterizedAttributeNames;
|
|
|
|
|
2020-03-27 20:15:31 +03:00
|
|
|
/**
|
|
|
|
* List of available action names for tthe object.
|
|
|
|
* Emulates `AXUIElementCopyActionNames`.
|
|
|
|
*/
|
|
|
|
readonly attribute Array<AString> actionNames;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns the value of an attribute.
|
|
|
|
* Emulates `AXUIElementCopyAttributeValue`.
|
|
|
|
*/
|
|
|
|
[implicit_jscontext]
|
|
|
|
jsval getAttributeValue(in AString attributeName);
|
|
|
|
|
2020-06-02 07:20:38 +03:00
|
|
|
/**
|
|
|
|
* Returns the value of an attribute given a name and a parameter.
|
|
|
|
* Emulates `AXUIElementCopyParameterizedAttributeValue`.
|
|
|
|
**/
|
|
|
|
[implicit_jscontext]
|
|
|
|
jsval getParameterizedAttributeValue(in AString attributeName, in jsval parameter);
|
|
|
|
|
2020-03-27 20:15:31 +03:00
|
|
|
/**
|
|
|
|
* Requests that the accessibility object perform the specified action.
|
|
|
|
* Emulatets `AXUIElementPerformAction`.
|
|
|
|
*/
|
|
|
|
void performAction(in AString actionName);
|
2020-05-13 02:28:34 +03:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Returns true if the given attribute is settable on the object.
|
|
|
|
* Emulates `AXUIElementIsAttributeSettable`.
|
|
|
|
**/
|
|
|
|
bool isAttributeSettable(in AString attributeName);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Sets the given attribute with the given value on the object.
|
|
|
|
* Emulates `AXUIElementSetAttributeValue`.
|
|
|
|
**/
|
|
|
|
[implicit_jscontext]
|
|
|
|
void setAttributeValue(in AString attributeName, in jsval attributeValue);
|
2020-03-27 20:15:31 +03:00
|
|
|
};
|
2020-07-22 02:03:02 +03:00
|
|
|
|
|
|
|
[scriptable, builtinclass, uuid(6153f07b-2260-495b-9899-9699d9fe323e)]
|
|
|
|
interface nsIAccessibleMacEvent : nsISupports
|
|
|
|
{
|
|
|
|
readonly attribute nsIAccessibleMacInterface macIface;
|
|
|
|
|
|
|
|
[implicit_jscontext]
|
|
|
|
readonly attribute jsval data;
|
|
|
|
};
|