diff --git a/README.md b/README.md index c95ca92..42fd2b1 100644 --- a/README.md +++ b/README.md @@ -1,23 +1,23 @@ # openfx-uia -Full UIA Support for OpenJFX +Full [UIA](https://learn.microsoft.com/en-us/windows/win32/winauto/uiauto-uiautomationoverview) Support for OpenJFX -# Getting It +## Getting It - https://maven.bestsolution.at/repos/releases/ - Group ID: at.bestsolution.openfx-uia +\ +Group ID: [`at.bestsolution.openfx-uia`](https://mvnrepository.com/artifact/at.bestsolution.openfx-uia) - You need the artifacts `UIAPlatform` and `UIAPlatform.agent` to develop an application. +ou need the artifacts `UIAPlatform` and `UIAPlatform.agent` to develop an application. - The agent adds `UIAPlatform.core` to the ext classpath and hooks the Accessible creation mechanism of javafx, while `UIAPlatform` contains the library and provides the API. +he agent adds `UIAPlatform.core` to the ext classpath and hooks the Accessible creation mechanism of javafx, while `UIAPlatform` contains the library and provides the API. - `UIAPlatform.sample` contains some samples and - `UIAPlatform.fullsample` contains a self running jar launcher for the samples with all dependencies. It only needs the environment variable `JDK8FX` set to your java 8 + fx home. +`UIAPlatform.sample` contains some samples and +`UIAPlatform.fullsample` contains a self running jar launcher for the samples with all dependencies. It only needs the environment variable `JDK8FX` set to your java 8 + fx home. -# Usage +## Usage - * add `UIAPlatform.jar` to your classpath - * launch your application with `-javaagent:UIAPlatform.agent.jar` +* add `UIAPlatform.jar` to your classpath +* launch your application with `-javaagent:UIAPlatform.agent.jar` To create an UIA Element you have to implement a `IUIAElement` for it. There is also a `IUIAVirtualRootElement` for virtual roots and a `IUIAVirtaulElement` for virtual children. A virtual root is a JavaFX node with virtual children (the javafx children are no longer visible for the a11y). This can be used for example if you render on a canvas and want to add a11y information to the rendered content. @@ -41,9 +41,9 @@ For how to use UIA look at the Microsoft documentation (here is a link to the [C ## Logging - to enable logging add `-Duia.log=true` +to enable logging add `-Duia.log=true` -# Supported Providers +## Supported Providers | Provider | | ------------------------ | @@ -77,10 +77,11 @@ For how to use UIA look at the Microsoft documentation (here is a link to the [C | IVirtualizedItemProvider | | IWindowProvider | -# HRESULT Support +## HRESULT Support + `HRESULT` is now supported by throwing a `HResultException`. Any other exception thrown is handled as an `HRESULT` of the type `E_JAVAEXCEPTION` which is defined by javafx as `MAKE_HRESULT(SEVERITY_ERROR, 0xDE, 1)` (`0x80de0001`). -# Differences between UIA and openfx-uia +## Differences between UIA and openfx-uia * The simple interfaces (`IRawElementPoviderSimple`, ...) are not supported and replaced by the `IUIAElement` and `IUIAVirtualRootElement` * `IRawElementPRoviderFragment#Navigate()` cannot be implementeted, instead `IUIAVirtualRootElement#getChildren()` `IUIAVirtualElement#getChildren()` and `IUIAVirtualElement#getParent()` is provided. @@ -88,13 +89,13 @@ For how to use UIA look at the Microsoft documentation (here is a link to the [C * Events are encapsulated in `IEvent` objects which can be obtained from the initialze method in the providers (There are also Context objects in the providers which provider the default events) * Property Change events are encapsulated in `IProperty` objects which can be obtained from the initialize method in the providers (Those are also provided by the Context objects) +## Development Notes - # Development Notes - When launching via gradle the `--no-daemon` flag helps with the initial focus of the launched application. If omitted it behaves differently compared to starting by double clicking an icon. +When launching via gradle the `--no-daemon` flag helps with the initial focus of the launched application. If omitted it behaves differently compared to starting by double clicking an icon. +## Dev environment - # Dev environment +### jdk - ## jdk `winget install Azul.ZuluFX.8.JDK` -`$env:JDK8FX="C:\Program Files\Zulu\zulu-8"` \ No newline at end of file +`$env:JDK8FX="C:\Program Files\Zulu\zulu-8"`