Class: Wnck::Screen
- Inherits:
-
Object
- Object
- Wnck::Screen
- Defined in:
- lib/wnck.rb
Instance Attribute Summary collapse
-
#handle ⇒ Object
readonly
Returns the value of attribute handle.
Class Method Summary collapse
- .count ⇒ Object
- .default ⇒ Object
- .each(&b) ⇒ Object
- .get(i) ⇒ Object
- .new(handle) ⇒ Object
- .screens ⇒ Object
Instance Method Summary collapse
-
#initialize(handle) ⇒ Screen
constructor
A new instance of Screen.
- #net_wm_supports?(atom) ⇒ Boolean
-
#workspace_at(index) ⇒ Object
def force_update() Wnck::wnck_screen_force_update(@handle) end def width() Wnck::wnck_screen_get_width(@handle) end def height() Wnck::wnck_screen_get_height(@handle) end def number() Wnck::wnck_screen_get_number(@handle) end def name() Wnck::wnck_screen_get_window_manager_name(@handle) end def active_window() Window.new(self, Wnck::wnck_screen_get_active_window(@handle)) end def previously_active_window() Window.new(self, Wnck::wnck_screen_get_previously_active_window(@handle)) end def toggle_show_desktop() Wnck::wnck_screen_toggle_showing_desktop(@handle) end.
- #workspace_index(ws) ⇒ Object
Constructor Details
Instance Attribute Details
#handle ⇒ Object (readonly)
Returns the value of attribute handle.
202 203 204 |
# File 'lib/wnck.rb', line 202 def handle @handle end |
Class Method Details
.count ⇒ Object
179 |
# File 'lib/wnck.rb', line 179 def self.count() i = 0; i += 1 while get i; i end |
.default ⇒ Object
178 |
# File 'lib/wnck.rb', line 178 def self.default() Screen.new(Wnck::wnck_screen_get_default) end |
.each(&b) ⇒ Object
181 |
# File 'lib/wnck.rb', line 181 def self.each(&b) screens.each &b end |
.get(i) ⇒ Object
182 183 184 185 |
# File 'lib/wnck.rb', line 182 def self.get(i) h = Wnck::wnck_screen_get(i) (h.null?) ? nil : Screen.new(h) end |
.new(handle) ⇒ Object
172 173 174 175 176 |
# File 'lib/wnck.rb', line 172 def self.new(handle) return get(handle) if handle.kind_of? Integer return nil if handle.null? super handle end |
Instance Method Details
#net_wm_supports?(atom) ⇒ Boolean
204 |
# File 'lib/wnck.rb', line 204 def net_wm_supports?(atom) Wnck::wnck_screen_net_wm_supports(@handle, atom) end |
#workspace_at(index) ⇒ Object
def force_update() Wnck::wnck_screen_force_update(@handle) end def width() Wnck::wnck_screen_get_width(@handle) end def height() Wnck::wnck_screen_get_height(@handle) end def number() Wnck::wnck_screen_get_number(@handle) end def name() Wnck::wnck_screen_get_window_manager_name(@handle) end def active_window() Window.new(self, Wnck::wnck_screen_get_active_window(@handle)) end def previously_active_window() Window.new(self, Wnck::wnck_screen_get_previously_active_window(@handle)) end def toggle_show_desktop() Wnck::wnck_screen_toggle_showing_desktop(@handle) end
223 |
# File 'lib/wnck.rb', line 223 def workspace_at(index) Workspace.new Wnck::wnck_screen_get_workspace(@handle, index) end |
#workspace_index(ws) ⇒ Object
224 |
# File 'lib/wnck.rb', line 224 def workspace_index(ws) Wnck::wnck_screen_get_workspace_index(@handle, ws.handle) end |