//>>built
define("demos/doGeo/src/wink/ux/window/js/window",["dojo","dijit","dojox"],function(_1,_2,_3){wink.ux.Window=function(){if(wink.isUndefined(wink.ux.Window.singleton)){this.uId=1;this._properties=null;this._handlers=null;this._initialized=false;this._initWindow();this._initListeners();wink.ux.Window.singleton=this;}else{return wink.ux.Window.singleton;}};wink.ux.Window.prototype={VERTICAL_ORIENTATION:"vertical",HORIZONTAL_ORIENTATION:"horizontal",getProperties:function(){return this._properties;},_initWindow:function(){this._properties={};this._updateScreen();this._updateSize();this._initialized=true;},_updateScreen:function(){this._properties.screenWidth=screen.width;this._properties.screenHeight=screen.height;},_updateSize:function(){var _4=false;if(this._properties.width!=window.innerWidth&&window.innerWidth>0){this._properties.width=window.innerWidth;_4=true;}if(this._properties.height!=window.innerHeight&&window.innerHeight>0){this._properties.height=window.innerHeight;_4=true;}if(_4){var _5=false;if(this._properties.screenWidth>=this._properties.width){if(this._properties.orientation!=this.VERTICAL_ORIENTATION){this._properties.orientation=this.VERTICAL_ORIENTATION;_5=true;}}else{if(this._properties.orientation!=this.HORIZONTAL_ORIENTATION){this._properties.orientation=this.HORIZONTAL_ORIENTATION;_5=true;}}if(_5&&this._initialized==true){wink.publish("/window/events/orientationchange",this._properties);}}return _4;},_handleResize:function(e){if(this._updateSize()){wink.publish("/window/events/resize",this._properties);}},_handleScroll:function(e){if(this._updateSize()){wink.publish("/window/events/resize",this._properties);}},_initListeners:function(){var _6=this;this._handlers={resizeHandler:function(e){_6._handleResize(e);},scrollHandler:function(e){_6._handleScroll(e);}};window.addEventListener("resize",this._handlers.resizeHandler,true);window.addEventListener("scroll",this._handlers.scrollHandler,true);}};});