From d9c9ca268db5c5966cf2d300325f2269c7c683a5 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Tue, 23 Jan 2018 09:11:38 +0700 Subject: [PATCH] Fixes legacy KeymanWeb object APIs. --- web/source/kmwapi.ts | 5 ----- web/source/kmwbase.ts | 25 ------------------------- web/source/kmwcallback.ts | 24 ++++++++++++++++++++++++ 3 files changed, 24 insertions(+), 30 deletions(-) diff --git a/web/source/kmwapi.ts b/web/source/kmwapi.ts index 34770cf522..d35830dcf7 100644 --- a/web/source/kmwapi.ts +++ b/web/source/kmwapi.ts @@ -23,11 +23,6 @@ // kmwbase.ts goog.exportProperty(keyman, "build", keyman); // Only works on individual instances. goog.exportSymbol("KeymanBase.prototype.isFontAvailable", KeymanBase.prototype.isFontAvailable); -goog.exportSymbol("KeymanBase.prototype.GetLastActiveElement", KeymanBase.prototype.getLastActiveElement); -goog.exportSymbol("KeymanBase.prototype.FocusLastActiveElement", KeymanBase.prototype.focusLastActiveElement); -goog.exportSymbol("KeymanBase.prototype.HideHelp", KeymanBase.prototype.hideHelp); -goog.exportSymbol("KeymanBase.prototype.ShowHelp", KeymanBase.prototype.showHelp); -goog.exportSymbol("KeymanBase.prototype.ShowPinnedHelp", KeymanBase.prototype.showPinnedHelp); // Util.ts diff --git a/web/source/kmwbase.ts b/web/source/kmwbase.ts index c598302a5c..2a93ed7f25 100644 --- a/web/source/kmwbase.ts +++ b/web/source/kmwbase.ts @@ -134,31 +134,6 @@ class KeymanBase { return this.util.checkFont({'family':fName}); } - /** - * Legacy entry points (non-standard names)- included only to allow existing IME keyboards to continue to be used - */ - getLastActiveElement(): HTMLElement { - return this._LastActiveElement; - } - - focusLastActiveElement(): void { - (this)._FocusLastActiveElement(); - } - - //The following entry points are defined but should not normally be used in a keyboard, as OSK display is no longer determined by the keyboard - hideHelp(): void { - this.osk._Hide(true); - } - - showHelp(Px: number, Py: number): void { - this.osk._Show(Px,Py); - } - - showPinnedHelp(): void { - this.osk.userPositioned=true; - this.osk._Show(-1,-1); - } - /** * Function _push * Scope Private diff --git a/web/source/kmwcallback.ts b/web/source/kmwcallback.ts index fe4f398591..e15e0f88d8 100644 --- a/web/source/kmwcallback.ts +++ b/web/source/kmwcallback.ts @@ -882,4 +882,28 @@ class KeyboardInterface { return this.keymanweb.keyboardManager.activeKeyboard['gs'](element, keystroke); } + /** + * Legacy entry points (non-standard names)- included only to allow existing IME keyboards to continue to be used + */ + ['getLastActiveElement'](): HTMLElement { + return this.keymanweb._LastActiveElement; + } + + ['focusLastActiveElement'](): void { + (this)._FocusLastActiveElement(); + } + + //The following entry points are defined but should not normally be used in a keyboard, as OSK display is no longer determined by the keyboard + ['hideHelp'](): void { + this.keymanweb.osk._Hide(true); + } + + ['showHelp'](Px: number, Py: number): void { + this.keymanweb.osk._Show(Px,Py); + } + + ['showPinnedHelp'](): void { + this.keymanweb.osk.userPositioned=true; + this.keymanweb.osk._Show(-1,-1); + } }