Selection.hx 619 B

12345678910111213141516171819202122
  1. package flash;
  2. typedef SelectionListener = {
  3. var onSetFocus: TextField -> TextField -> Void;
  4. }
  5. extern class Selection
  6. {
  7. static function getBeginIndex():Int;
  8. static function getEndIndex():Int;
  9. static function getCaretIndex():Int;
  10. static function getFocus():String;
  11. static function setFocus(newFocus:Dynamic):Bool;
  12. static function setSelection(beginIndex:Int, endIndex:Int):Void;
  13. static function addListener(listener:SelectionListener):Void;
  14. static function removeListener(listener:SelectionListener):Bool;
  15. private static function __init__() : Void untyped {
  16. flash.Selection = _global["Selection"];
  17. }
  18. }