blob: f22749273f11e063c123884b01d745904fcdb6f9 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
namespace Caribou {
public interface IKeyboardObject : Object {
public abstract IKeyboardObject[] get_children ();
public signal void key_activated (KeyModel key);
public virtual KeyModel[] get_keys () {
Gee.ArrayList<KeyModel> keys = new Gee.ArrayList<KeyModel> ();
foreach (IKeyboardObject obj in get_children ()) {
KeyModel[] obj_keys = obj.get_keys();
foreach (KeyModel key in obj_keys) {
keys.add(key);
}
}
return (KeyModel[]) keys.to_array ();
}
}
}
|