Class: Gdk::Screen

Inherits:
Object
  • Object
show all
Defined in:
lib/gdk3/screen.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.defaultObject



21
22
23
# File 'lib/gdk3/screen.rb', line 21

def default
  @@default ||= default_raw
end

.default_rawObject



20
# File 'lib/gdk3/screen.rb', line 20

alias_method :default_raw, :default

Instance Method Details

#get_monitor(window_or_x, y = nil) ⇒ Object



37
38
39
40
41
42
43
44
45
# File 'lib/gdk3/screen.rb', line 37

def get_monitor(window_or_x, y=nil)
  if window_or_x.is_a?(Window)
    window = window_or_x
    get_monitor_at_window(window)
  else
    x = window_or_x
    get_monitor_at_point(x, y)
  end
end

#get_setting(key, type = nil) ⇒ Object



27
28
29
30
31
32
33
34
35
# File 'lib/gdk3/screen.rb', line 27

def get_setting(key, type=nil)
  value = GLib::Value.new(type || GLib::Type::STRING)
  found = get_setting_raw(key, value)
  if found
    value
  else
    nil
  end
end

#get_setting_rawObject



26
# File 'lib/gdk3/screen.rb', line 26

alias_method :get_setting_raw, :get_setting