Class: Gdk::Screen
- Inherits:
-
Object
- Object
- Gdk::Screen
- Defined in:
- lib/gdk3/screen.rb
Class Method Summary collapse
Instance Method Summary collapse
- #get_monitor(window_or_x, y = nil) ⇒ Object
- #get_setting(key, type = nil) ⇒ Object
- #get_setting_raw ⇒ Object
Class Method Details
.default ⇒ Object
21 22 23 |
# File 'lib/gdk3/screen.rb', line 21 def default @@default ||= default_raw end |
.default_raw ⇒ Object
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_raw ⇒ Object
26 |
# File 'lib/gdk3/screen.rb', line 26 alias_method :get_setting_raw, :get_setting |