Browse Source

strict listener.

Nicolas Cannasse 18 years ago
parent
commit
2502bc275e
1 changed files with 6 additions and 2 deletions
  1. 6 2
      std/flash/Selection.hx

+ 6 - 2
std/flash/Selection.hx

@@ -1,5 +1,9 @@
 package flash;
 package flash;
 
 
+typedef SelectionListener = {
+	var onSetFocus: TextField -> TextField -> Void;
+}
+
 extern class Selection
 extern class Selection
 {
 {
 	static function getBeginIndex():Int;
 	static function getBeginIndex():Int;
@@ -8,8 +12,8 @@ extern class Selection
 	static function getFocus():String;
 	static function getFocus():String;
 	static function setFocus(newFocus:Dynamic):Bool;
 	static function setFocus(newFocus:Dynamic):Bool;
 	static function setSelection(beginIndex:Int, endIndex:Int):Void;
 	static function setSelection(beginIndex:Int, endIndex:Int):Void;
-	static function addListener(listener:Dynamic):Void;
-	static function removeListener(listener:Dynamic):Bool;
+	static function addListener(listener:SelectionListener):Void;
+	static function removeListener(listener:SelectionListener):Bool;
 
 
 	private static function __init__() : Void untyped {
 	private static function __init__() : Void untyped {
  		flash.Selection = _global["Selection"];
  		flash.Selection = _global["Selection"];