1.14.0.5
Hummingbird
A modern user interface library for games
Window Interface Reference

The window of the view and the global object in the scripting environment. More...

+ Inheritance diagram for Window:

Public Member Functions

void scrollBy ([Default=Undefined] optional long x, [Default=Undefined] optional long y)
 Scrolls the document in the window by the given amount. More...
 
void scrollTo ([Default=Undefined] optional long x, [Default=Undefined] optional long y)
 Scrolls to a particular set of coordinates in the document. More...
 
unsigned long setTimeout (AnyCallback handler, [Default=Undefined] optional unsigned long timeout)
 schedule a callback to be executed after timeout milliseconds More...
 
void clearTimeout (unsigned long handle)
 clear a previous scheduled timer More...
 
unsigned long setInterval (AnyCallback handler, unsigned long interval)
 schedule a callback to be executed at timeout milliseconds intervals More...
 
void clearInterval (unsigned long handle)
 clear a previous scheduled repeating timer More...
 
CSSStyleDeclaration getComputedStyle (Element element)
 the last computed style of the element More...
 
void cancelAnimationFrame (long id)
 Cancels an animation frame request previously scheduled through a call to requestAnimationFrame() More...
 

Public Attributes

readonly attribute Document document
 The document in the current window.
 
readonly attribute Console console
 The console API that can be used for logging.
 
readonly attribute long outerHeight
 Gets the height in pixels of the whole browser window. It represents the height of the whole browser window including sidebar (if expanded), window chrome and window resizing borders/handles.
 
readonly attribute long outerWidth
 Gets the width of the outside of the browser window. It represents the width of the whole browser window including sidebar (if expanded), window chrome and window resizing borders/handles.
 
readonly attribute long innerHeight
 Height (in pixels) of the browser window viewport including, if rendered, the horizontal scrollbar.
 
readonly attribute long innerWidth
 Width (in pixels) of the browser window viewport including, if rendered, the vertical scrollbar.
 
readonly attribute long screenX
 Returns the horizontal distance, in CSS pixels, of the left border of the user's browser from the left side of the screen.
 
readonly attribute long screenY
 Returns the vertical distance, in CSS pixels of the top border of the user's browser from the top edge of the screen.
 
readonly attribute long screenLeft
 This is an alias for screenX.
 
readonly attribute long screenTop
 This is an alias for screenY.
 
readonly attribute long scrollX
 Returns the number of pixels that the document has already been scrolled horizontally.
 
readonly attribute long scrollY
 Returns the number of pixels that the document has already been scrolled vertically.
 
readonly attribute long pageXOffset
 This is an alias for scrollX.
 
readonly attribute long pageYOffset
 This is an alias for scrollY.
 
readonly attribute double devicePixelRatio
 Returns the ratio of the CSS pixel size to device pixel size.
 

Detailed Description

The window of the view and the global object in the scripting environment.

Member Function Documentation

◆ cancelAnimationFrame()

void Window::cancelAnimationFrame ( long  id)

Cancels an animation frame request previously scheduled through a call to requestAnimationFrame()

Parameters
idThe ID of the request to cancel.

◆ clearInterval()

void Window::clearInterval ( unsigned long  handle)

clear a previous scheduled repeating timer

Parameters
handlea handle returned from setInterval

◆ clearTimeout()

void Window::clearTimeout ( unsigned long  handle)

clear a previous scheduled timer

Parameters
handlea handle returned from setTimeout

◆ getComputedStyle()

CSSStyleDeclaration Window::getComputedStyle ( Element  element)

the last computed style of the element

Parameters
elementthe element whose style to get

◆ scrollBy()

void Window::scrollBy ( [Default=Undefined] optional long  x,
[Default=Undefined] optional long  y 
)

Scrolls the document in the window by the given amount.

Parameters
xoffset in pixels to scroll horizontally.
yoffset in pixels to scroll vertically.

◆ scrollTo()

void Window::scrollTo ( [Default=Undefined] optional long  x,
[Default=Undefined] optional long  y 
)

Scrolls to a particular set of coordinates in the document.

Parameters
xis the pixel along the horizontal axis of the document that you want displayed in the upper left.
yis the pixel along the vertical axis of the document that you want displayed in the upper left.

◆ setInterval()

unsigned long Window::setInterval ( AnyCallback  handler,
unsigned long  interval 
)

schedule a callback to be executed at timeout milliseconds intervals

The first call to the callback will be after timeout milliseconds

Parameters
handlera callback without arguments
intervalthe delay in milliseconds.
Note
A 0 delay makes the callback to be executed on the next frame
Returns
a handle to the scheduled timer

◆ setTimeout()

unsigned long Window::setTimeout ( AnyCallback  handler,
[Default=Undefined] optional unsigned long  timeout 
)

schedule a callback to be executed after timeout milliseconds

Parameters
handlera callback without arguments
timeoutthe delay in milliseconds.
Note
A 0 delay makes the callback to be executed on the next frame
Returns
a handle to the scheduled timer