Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(windows): move windows Engine help in-repo #12600

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions resources/build/help-keyman-com.sh
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ function upload_keyman_help {
windows)
# Note: `/windows/src/desktop/help/build.sh web` must be run first
upload windows/bin/help/md/desktop products/windows/$VERSION_RELEASE
upload windows/help/engine developer/engine/windows/$VERSION_RELEASE
;;
developer)
# Note: `/developer/build.sh api` must be run first - covers both uploads
Expand Down
18 changes: 18 additions & 0 deletions windows/docs/engine/api/IKeyman/Apply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: IKeyman::Apply Method
---

## Introduction

The `IKeyman::Apply` method applies the changes which have been made
through the current API instantiation to the Keyman Engine. If
[`IKeyman::AutoApply`](AutoApply) is set to `False`, `Apply` must be
called after making changes through the Keyman API. The documentation
for each method that makes changes documents whether or not `Apply`
needs to be called.

## Specification

``` clike
void Apply(void)
```
21 changes: 21 additions & 0 deletions windows/docs/engine/api/IKeyman/AutoApply.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: IKeyman::AutoApply Property
---

## Introduction

The `IKeyman::AutoApply` property determines if the API will apply
changes automatically to the Keyman Engine after each change is made.
Some changes are applied immediately, such as installing a keyboard
layout. However other changes will not be applied unless the
[`Apply`](Apply) method is called, or unless `AutoApply` is set to
`True`. The documentation for each method that makes changes documents
whether or not `Apply` needs to be called.

`AutoApply` defaults to `True`.

## Specification

``` clike
bool AutoApply
```
16 changes: 16 additions & 0 deletions windows/docs/engine/api/IKeyman/Control.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: IKeyman::Control Property
---

## Introduction

The `IKeyman::Control` property returns the Keyman
[`IKeymanControl`](../IKeymanControl) interface which provides methods
to control various aspects of the Keyman process and user interface
interactions.

## Specification

``` clike
readonly IKeymanControl* Control
```
18 changes: 18 additions & 0 deletions windows/docs/engine/api/IKeyman/Errors.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
title: IKeyman::Errors Property
---

## Introduction

The `IKeyman::Errors` property returns the Keyman
[`IKeymanErrors`](../IKeymanErrors) interface which provides a list of
errors encountered by the Keyman API, for example when installing a
keyboard or package. When the Keyman API raises an exception, e.g. when
trying to install a corrupt package file, there may be additional
details available in the `Errors` collection.

## Specification

``` clike
readonly IKeymanErrors* Errors
```
17 changes: 17 additions & 0 deletions windows/docs/engine/api/IKeyman/Hotkeys.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: IKeyman::Hotkeys Property
---

## Introduction

The `IKeyman::Hotkeys` property returns the Keyman
[`IKeymanHotkeys`](../IKeymanHotkeys) interface which provides a list of
configured user interface hotkeys. Hotkeys for activating a specific
keyboard layout are not listed here; these are visible under the
[`IKeymanLanguage::Hotkey`](../IKeymanLanguage/Hotkey) property.

## Specification

``` clike
readonly IKeymanHotkeys* Hotkeys
```
15 changes: 15 additions & 0 deletions windows/docs/engine/api/IKeyman/Keyboards.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: IKeyman::Keyboards Property
---

## Introduction

The `IKeyman::Keyboards` property returns the Keyman
[`IKeymanKeyboardsInstalled`](../IKeymanKeyboardsInstalled) interface
which provides a list of installed Keyman keyboards.

## Specification

``` clike
readonly IKeymanKeyboardsInstalled* Keyboards
```
15 changes: 15 additions & 0 deletions windows/docs/engine/api/IKeyman/Languages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: IKeyman::Languages Property
---

## Introduction

The `IKeyman::Languages` property returns the Keyman
[`IKeymanLanguages`](../IKeymanLanguages) interface which provides a
list of all currently available Windows languages and input methods.

## Specification

``` clike
readonly IKeymanLanguages* Languages
```
15 changes: 15 additions & 0 deletions windows/docs/engine/api/IKeyman/Options.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: IKeyman::Options Property
---

## Introduction

The `IKeyman::Options` property returns the Keyman
[`IKeymanOptions`](../IKeymanOptions) interface which provides a list of
configuration settings and values in Keyman Engine for Windows.

## Specification

``` clike
readonly IKeymanOptions* Options
```
15 changes: 15 additions & 0 deletions windows/docs/engine/api/IKeyman/Packages.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: IKeyman::Packages Property
---

## Introduction

The `IKeyman::Packages` property returns the Keyman
[`IKeymanPackagesInstalled`](../IKeymanPackagesInstalled) interface
which provides a list of installed Keyman keyboard packages.

## Specification

``` clike
readonly IKeymanPackagesInstalled* Packages
```
19 changes: 19 additions & 0 deletions windows/docs/engine/api/IKeyman/Refresh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
title: IKeyman::Refresh Method
---

## Introduction

When the `CoKeyman` object is instantiated, the Keyman API takes a
snapshot of the installed keyboards and various settings in Keyman
Engine. The `IKeyman::Refresh` method refreshes this snapshot with the
current Keyman and system configuration. After `Refresh` is called, any
references to interfaces held by the API consumer must be discarded, as
the API implementation releases them and creates new instances, even if
the object in question has had no changes.

## Specification

``` clike
void Refresh(void)
```
15 changes: 15 additions & 0 deletions windows/docs/engine/api/IKeyman/SystemInfo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
title: IKeyman::SystemInfo Property
---

## Introduction

The `IKeyman::SystemInfo` property returns the Keyman
[`IKeymanSystemInfo`](../IKeymanSystemInfo) interface which describes
the current system configuration.

## Specification

``` clike
readonly IKeymanSystemInfo* SystemInfo
```
92 changes: 92 additions & 0 deletions windows/docs/engine/api/IKeyman/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
---
title: IKeyman Interface
---

## Introduction

The `IKeyman` interface is the top-level interface for the Keyman Engine
for Windows API. The `IKeyman` interface can be instantiated with the
`CoKeyman` coclass; it will also be returned from a call to
`CreateObject("kmcomapi.Keyman")`.

## Interface Hierarchy

`IDispatch`

> [`IKeymanObject`](../IKeymanObject)
>
> > **`IKeyman`**

## Properties

[`AutoApply`](AutoApply)
: Determines whether settings changes are applied to Keyman Engine
automatically as they are made.

[`Control`](Control) <span class="readonly">read only</span>
: Returns an [`IKeymanControl`](../IKeymanControl) interface that
provides methods for controlling the Keyman process and user
interface.

[`Errors`](Errors) <span class="readonly">read only</span>
: Returns an [`IKeymanErrors`](../IKeymanErrors) interface that lists
errors that the API incurred when undertaking various processes.

[`Hotkeys`](Hotkeys) <span class="readonly">read only</span>
: Returns an [`IKeymanHotkeys`](../IKeymanHotkeys) interface that
lists all of the configured interface hotkeys.

[`Keyboards`](Keyboards) <span class="readonly">read only</span>
: Returns an
[`IKeymanKeyboardsInstalled`](../IKeymanKeyboardsInstalled)
interface that lists all of the currently installed Keyman
keyboards.

[`Languages`](Languages) <span class="readonly">read only</span>
: Returns an [`IKeymanLanguages`](../IKeymanLanguages) interface that
lists all of the currently avilable Windows languages and input
methods.

[`Options`](Options) <span class="readonly">read only</span>
: Returns an [`IKeymanOptions`](../IKeymanOptions) interface that
lists all of the configuration settings and values for Keyman
Engine.

[`Packages`](Packages) <span class="readonly">read only</span>
: Returns an [`IKeymanPackagesInstalled`](../IKeymanPackagesInstalled)
interface that lists all of the currently installed Keyman packages.

[`SystemInfo`](SystemInfo) <span class="readonly">read only</span>
: Returns an [`IKeymanSystemInfo`](../IKeymanSystemInfo) interface
that describes the current system configuration.

## Methods

[`Apply()`](Apply)
: Apply all settings changes to Keyman Engine.

[`Refresh()`](Refresh)
: Refresh the snapshot of keyboards and settings which is captured
when the object is instantiated.

## Examples

### VBScript

This example can be saved with a .vbs extension to run through Windows
Scripting. This is similar to the uninstall script that Keyman Desktop
generates for packages which have a Start Menu Uninstall entry.

``` basic
dim kmcom, package
Set kmcom = CreateObject("keymanapi.Keyman")
n = kmcom.Packages.IndexOf("SamplePackage")
if n >= 0 then
Set package = kmcom.Packages(n)
if msgbox("Uninstall package "+package.Description+"?", vbOKCancel, "Keyman Desktop") = vbOK then
package.Uninstall(True)
end if
else
msgbox "The package SamplePackage could not be found."
end if
```
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
title: IKeymanBCP47Canonicalization::GetCanonicalTag Method
---

## Introduction

The `IKeymanBCP47Canonicalization::GetCanonicalTag` method returns a
canonical tag according to data from [SIL
langtags.json](https://github.com/silnrsi/langtags). The method will
convert ISO639-3 language tags, ISO639-1 language tags, remove
suppressed script tags, and append a default region if one is not
present.

**Note:** This tag may not always be identical to a Windows canonical
tag. A region subtag may be present in the canonical tag which may later
be removed by Windows, if Windows believes the language is used in only
one region.

## Specification

``` clike
string GetCanonicalTag(string Tag)
```

## Parameters

`Tag`
: The BCP 47 tag to canonicalize.
26 changes: 26 additions & 0 deletions windows/docs/engine/api/IKeymanBCP47Canonicalization/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
title: IKeymanBCP47Canonicalization Interface
---

## Introduction

The `IKeymanBCP47Canonicalization` interface adds functions for
canonicalizing BCP 47 tags.

## Interface Hierarchy

`IDispatch`

> [`IKeymanObject`](../IKeymanObject)
>
> > **`IKeymanBCP47Canonicalization`**


## Methods

[`GetCanonicalTag()`](GetCanonicalTag)
: Finds a canonical tag according to data from SIL langtags.json.

## History

Added in Keyman Engine for Windows 14.0.
14 changes: 14 additions & 0 deletions windows/docs/engine/api/IKeymanCollection/Count.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
title: IKeymanCollection::Count Property
---

## Introduction

The `IKeymanCollection::Count` property returns the number of elements
in the collection.

## Specification

``` clike
readonly long Count
```
21 changes: 21 additions & 0 deletions windows/docs/engine/api/IKeymanCollection/Refresh.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
title: IKeymanCollection::Refresh() Method
---

## Introduction

The `IKeymanCollection::Refresh()` method refreshes the collection. All
existing elements in the collection are invalidated, even if nothing has
changed.

Generally, it is better to call the top-level
[`IKeyman::Refresh`](../IKeyman/Refresh) as that will ensure that the
Keyman API snapshot is internally consistent. See
[`IKeyman::Refresh`](../IKeyman/Refresh) for more information on Keyman
API snapshots.

## Specification

``` clike
void Refresh(void)
```
Loading
Loading