Class: X11Client

Inherits:
Object
  • Object
show all
Defined in:
lib/x11_client.rb,
ext/x11_client_ext/x11_client_ext.c

Instance Method Summary collapse

Constructor Details

#initializeObject

Instance Method Details

#close_displayObject

#get_windowObject

#get_window_nameObject

#mouseclickObject

#mousedownObject

#mousemoveObject

#mouseupObject

#open_displayObject

#root_windowObject



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

def root_window
  get_window(root_window_id)
end

#root_window_childrenObject



25
26
27
# File 'lib/x11_client.rb', line 25

def root_window_children
  window_children(root_window_id)
end

#root_window_descendantsObject



29
30
31
# File 'lib/x11_client.rb', line 29

def root_window_descendants
  window_descendants(root_window_id)
end

#root_window_idObject

#startObject

#stopObject

#syncObject

#window_children(window_id) ⇒ Object



4
5
6
7
8
# File 'lib/x11_client.rb', line 4

def window_children(window_id)
  window_children_ids(window_id).map do |child_id|
    get_window(child_id)
  end.compact
end

#window_children_idsObject

#window_descendants(window_id) ⇒ Object



10
11
12
13
14
15
16
17
18
19
# File 'lib/x11_client.rb', line 10

def window_descendants(window_id)
  windows = []
  ids = [window_id]
  until ids.empty?
    window = get_window(ids.shift)
    windows << window
    ids += window_children_ids(window['id'])
  end
  windows
end