Screen.hx 889 B

1234567891011121314151617181920212223242526272829303132
  1. package nw;
  2. typedef IndividualScreen = {
  3. var id : Int;
  4. // physical screen resolution, can be negative, not necessarily start from 0,depending on screen arrangement
  5. var bounds : {
  6. x : Int,
  7. y : Int,
  8. width : Int,
  9. height : Int,
  10. };
  11. // useable area within the screen bound
  12. var work_area : {
  13. x : Int,
  14. y : Int,
  15. width : Int,
  16. height : Int,
  17. };
  18. var scaleFactor : Float;
  19. var isBuiltIn : Bool;
  20. var rotation : Int;
  21. var touchSupport : Int;
  22. }
  23. extern class Screen {
  24. public static var screens(default, never) : Array<IndividualScreen>;
  25. public static function Init() : Void;
  26. public static function on( event : String, callb : IndividualScreen -> Void ) : Void;
  27. public static function chooseDesktopMedia(sources : Array<String>, callb : Dynamic -> Void) : Void;
  28. }