Class: X11Client
- Inherits:
-
Object
show all
- Defined in:
- lib/x11_client.rb,
ext/x11_client_ext/x11_client_ext.c
Instance Method Summary
collapse
Constructor Details
#initialize ⇒ Object
Instance Method Details
#close_display ⇒ Object
#get_window ⇒ Object
#get_window_name ⇒ Object
#mouseclick ⇒ Object
#mousedown ⇒ Object
#mousemove ⇒ Object
#mouseup ⇒ Object
#open_display ⇒ Object
#root_window ⇒ Object
21
22
23
|
# File 'lib/x11_client.rb', line 21
def root_window
get_window(root_window_id)
end
|
#root_window_children ⇒ Object
25
26
27
|
# File 'lib/x11_client.rb', line 25
def root_window_children
window_children(root_window_id)
end
|
#root_window_descendants ⇒ Object
29
30
31
|
# File 'lib/x11_client.rb', line 29
def root_window_descendants
window_descendants(root_window_id)
end
|
#root_window_id ⇒ Object
#start ⇒ Object
#stop ⇒ Object
#sync ⇒ Object
#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_ids ⇒ Object
#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
|