2012-05-13 11:48:24 -07:00
|
|
|
module X11
|
|
|
|
class Screen
|
|
|
|
attr_reader :display
|
|
|
|
|
|
|
|
def initialize(display, data)
|
|
|
|
@display = display
|
|
|
|
@internal = data
|
|
|
|
end
|
|
|
|
|
2023-08-01 20:16:22 +01:00
|
|
|
def root
|
|
|
|
@internal.root
|
|
|
|
end
|
|
|
|
|
|
|
|
def root_depth
|
|
|
|
@internal.root_depth
|
|
|
|
end
|
|
|
|
|
2023-09-25 18:55:00 +01:00
|
|
|
def root_visual
|
|
|
|
@internal.root_visual
|
|
|
|
end
|
|
|
|
|
2012-05-13 11:48:24 -07:00
|
|
|
def width
|
2012-05-19 13:14:47 -07:00
|
|
|
@internal.width_in_pixels
|
2012-05-13 11:48:24 -07:00
|
|
|
end
|
|
|
|
|
|
|
|
def height
|
2012-05-19 13:14:47 -07:00
|
|
|
@internal.height_in_pixels
|
|
|
|
end
|
|
|
|
|
|
|
|
def to_s
|
|
|
|
"#<X11::Screen(#{id}) width=#{width} height=#{height}>"
|
2012-05-13 11:48:24 -07:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|