Class: X11::Display

Inherits:
Object
  • Object
show all
Includes:
Singleton
Defined in:
lib/firewatir/x11.rb

Overview

X11 Display. Singleton – assumes single display. Assumes the current display is the same as the one running FireFox. Represented by memory pointer (which we treat in-code as an unsigned long).

Instance Method Summary collapse

Constructor Details

#initializeDisplay

Returns a new instance of Display.



76
77
78
# File 'lib/firewatir/x11.rb', line 76

def initialize
	@xdisplay = X11.xOpenDisplay("");
end

Instance Method Details

#screensObject

Array of screens associated with this display.



81
82
83
84
# File 'lib/firewatir/x11.rb', line 81

def screens
	nScreens = X11.xScreenCount(@xdisplay);
	(0...nScreens).collect{|n| Screen.new(n,@xdisplay)}
end