Talk:WebAPI/KeboardIME: Difference between revisions
Jump to navigation
Jump to search
(→mozInputMethod API to Keyboard Apps: update manager) |
CodingFree (talk | contribs) (Erratum) |
||
(2 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
== Erratum == | |||
When it is said: | |||
"[Line 9-30] a "entry_points" field specifies supported layouts." | |||
Maybe it's not "entry_points", maybe it is referring to the "inputs" field. | |||
== Proposed API (July 17 WIP) == | == Proposed API (July 17 WIP) == | ||
Line 41: | Line 47: | ||
Here are some signals necessary to Keyboard Manager in System app in order for it to do minimal interaction with keyboard app and text field. | Here are some signals necessary to Keyboard Manager in System app in order for it to do minimal interaction with keyboard app and text field. | ||
* <code> | * <code>inputmethod-contextchange</code>: should also expose the nsIDOMInputContext object here | ||
* <code> | * <code>inputmethod-next</code> | ||
* <code> | * <code>inputmethod-showall</code> | ||
=== mozbrowser API extension === | === mozbrowser API extension === | ||
* <code>setInputMethodActive(boolean)</code>: Depend on what we want, we might not want to re-use <code>setVisible()</code> to block/unblock a background/foreground keyboard app to interact with the text fields. | * <code>setInputMethodActive(boolean)</code>: Depend on what we want, we might not want to re-use <code>setVisible()</code> to block/unblock a background/foreground keyboard app to interact with the text fields. |
Latest revision as of 14:36, 23 January 2014
Erratum
When it is said: "[Line 9-30] a "entry_points" field specifies supported layouts."
Maybe it's not "entry_points", maybe it is referring to the "inputs" field.
Proposed API (July 17 WIP)
mozInputMethod API to Keyboard Apps
partial interface Navigator { readonly attribute nsIDOMInputMethod mozInputMethod; };
interface nsIDOMInputMethod: nsIDOMEventTarget { // Input Method Manager contain a few global methods expose to apps readonly attribute nsIDOMInputMethodManager mgmt; // An "input context" is mapped to a text field that the app is allow to mutate. // this attribute should be null when there is no text field currently focused. attribute nsIDOMInputContext|null inputcontext; // Fired when the input context changes, include changes from and to null. attribute nsIDOMEventListener oninputcontextchange; };
interface nsIDOMInputMethodManager { // Ask the OS to switch away from the current active Keyboard app. // OS should ignore this request if we are currently not the active one. void next(); // Ask the OS to show a list of available IMEs for users to switch from. // OS should ignore this request if we are currently not the active one. void showAll(); };
interface nsIDOMInputContext { // an "input context" gets void when the app is no longer allowed to interact with the text field, // e.g., the text field is no longer exists, the app is being switched to background, etc. // All the properties and methods necessary to work with a specific text field should be here. .... }
mozChromeEvents to System apps
Here are some signals necessary to Keyboard Manager in System app in order for it to do minimal interaction with keyboard app and text field.
inputmethod-contextchange
: should also expose the nsIDOMInputContext object hereinputmethod-next
inputmethod-showall
mozbrowser API extension
setInputMethodActive(boolean)
: Depend on what we want, we might not want to re-usesetVisible()
to block/unblock a background/foreground keyboard app to interact with the text fields.