Removed $Id$ everywhere.
[virt-top.git] / mlvirtmanager / mlvirtmanager_helpers.mli
1 (* virt-manager-like graphical management tool.
2    (C) Copyright 2007 Richard W.M. Jones, Red Hat Inc.
3    http://libvirt.org/
4
5    Helper functions.
6 *)
7
8 (** Given two lists, xs and ys, return a list of items which have been
9     added to ys, items which are the same, and items which have been
10     removed from ys.
11     Returns a triplet (list of added, list of same, list of removed).
12 *)
13 val differences : 'a list -> 'a list -> 'a list * 'a list * 'a list
14
15 (** Convert libvirt domain state to a string. *)
16 val string_of_domain_state : Libvirt.Domain.state -> string
17
18 (** Filter top level rows (only) in a GtkTreeStore.  If function f returns
19     true then the row remains, but if it returns false then the row is
20     removed.
21 *)
22 val filter_top_level_rows : GTree.tree_store -> (Gtk.tree_iter -> bool) -> unit
23
24 (** Filter rows in a tree_store at a particular level. *)
25 val filter_rows : GTree.tree_store -> (Gtk.tree_iter -> bool) -> Gtk.tree_iter -> unit
26
27 (** Find the first top level row matching predicate and return it. *)
28 val find_top_level_row : GTree.tree_store -> (Gtk.tree_iter -> bool) -> Gtk.tree_iter
29
30 (** Find the first row matching predicate f at a particular level. *)
31 val find_row : GTree.tree_store -> (Gtk.tree_iter -> bool) -> Gtk.tree_iter -> Gtk.tree_iter
32
33 (** Iterate over top level rows (only) in a GtkTreeStore. *)
34 val iter_top_level_rows : GTree.tree_store -> (Gtk.tree_iter -> unit) -> unit
35
36 (** Iterate over rows in a tree_store at a particular level. *)
37 val iter_rows : GTree.tree_store -> (Gtk.tree_iter -> unit) -> Gtk.tree_iter -> unit