Class: Browser::Screen

Inherits:
Object show all
Includes:
Event::Target, NativeCachedWrapper
Defined in:
opal/browser/screen.rb

Overview

Representation of the screen the window is being rendered on.

Defined Under Namespace

Classes: Depth

Instance Attribute Summary collapse

Method Summary

Methods included from Event::Target

#off, #on, #on!, #one, #trigger, #trigger!

Methods included from NativeCachedWrapper

#restricted?, #set_native_reference

Instance Attribute Details

#depthDepth (readonly)



50
51
52
# File 'opal/browser/screen.rb', line 50

def depth
  Depth.new(`#@native.colorDepth`, `#@native.pixelDepth`)
end

#heightInteger (readonly)



23
# File 'opal/browser/screen.rb', line 23

alias_native :height

#orientationString (readonly)



56
# File 'opal/browser/screen.rb', line 56

alias_native :orientation

#positionPosition (readonly)



44
45
46
# File 'opal/browser/screen.rb', line 44

def position
  Position.new(x, y)
end

#sizeSize (readonly)



27
28
29
# File 'opal/browser/screen.rb', line 27

def size
  Size.new(width, height)
end

#widthInteger (readonly)



19
# File 'opal/browser/screen.rb', line 19

alias_native :width

#xInteger (readonly)



34
# File 'opal/browser/screen.rb', line 34

alias_native :x, :top

#yInteger (readonly)



39
# File 'opal/browser/screen.rb', line 39

alias_native :y, :left