Bug 865447 - Expose Accessfu input object for scripting purposes. r=yzen

This commit is contained in:
Eitan Isaacson 2013-04-25 09:16:10 -07:00
Родитель 2923d32e66
Коммит 60ca5af6d1
1 изменённых файлов: 8 добавлений и 7 удалений

Просмотреть файл

@ -56,7 +56,7 @@ this.AccessFu = {
this._notifyOutput = false; this._notifyOutput = false;
} }
Input.quickNavMode.updateModes(this.prefsBranch); this.Input.quickNavMode.updateModes(this.prefsBranch);
this._enableOrDisable(); this._enableOrDisable();
}, },
@ -107,7 +107,7 @@ this.AccessFu = {
Utils.win.document.insertBefore(stylesheet, Utils.win.document.firstChild); Utils.win.document.insertBefore(stylesheet, Utils.win.document.firstChild);
this.stylesheet = Cu.getWeakReference(stylesheet); this.stylesheet = Cu.getWeakReference(stylesheet);
Input.start(); this.Input.start();
Output.start(); Output.start();
TouchAdapter.start(); TouchAdapter.start();
@ -142,7 +142,7 @@ this.AccessFu = {
this._removeMessageListeners(mm); this._removeMessageListeners(mm);
} }
Input.stop(); this.Input.stop();
Output.stop(); Output.stop();
TouchAdapter.stop(); TouchAdapter.stop();
@ -188,7 +188,7 @@ this.AccessFu = {
this._output(aMessage.json, aMessage.target); this._output(aMessage.json, aMessage.target);
break; break;
case 'AccessFu:Input': case 'AccessFu:Input':
Input.setEditState(aMessage.json); this.Input.setEditState(aMessage.json);
break; break;
} }
}, },
@ -250,10 +250,10 @@ this.AccessFu = {
this._enableOrDisable(); this._enableOrDisable();
break; break;
case 'Accessibility:NextObject': case 'Accessibility:NextObject':
Input.moveCursor('moveNext', 'Simple', 'gesture'); this.Input.moveCursor('moveNext', 'Simple', 'gesture');
break; break;
case 'Accessibility:PreviousObject': case 'Accessibility:PreviousObject':
Input.moveCursor('movePrevious', 'Simple', 'gesture'); this.Input.moveCursor('movePrevious', 'Simple', 'gesture');
break; break;
case 'Accessibility:Focus': case 'Accessibility:Focus':
this._focused = JSON.parse(aData); this._focused = JSON.parse(aData);
@ -270,7 +270,7 @@ this.AccessFu = {
this._enableOrDisable(); this._enableOrDisable();
break; break;
case 'quicknav_modes': case 'quicknav_modes':
Input.quickNavMode.updateModes(this.prefsBranch); this.Input.quickNavMode.updateModes(this.prefsBranch);
break; break;
case 'notify_output': case 'notify_output':
this._notifyOutput = this.prefsBranch.getBoolPref('notify_output'); this._notifyOutput = this.prefsBranch.getBoolPref('notify_output');
@ -713,3 +713,4 @@ var Input = {
_currentIndex: -1 _currentIndex: -1
} }
}; };
AccessFu.Input = Input;