0b2acb59a3ba6275a8640a3924cb48ef37a6284d
[guestfs-browser.git] / window.mli
1 (* Guestfs Browser.
2  * Copyright (C) 2010 Red Hat Inc.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License along
15  * with this program; if not, write to the Free Software Foundation, Inc.,
16  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17  *)
18
19 (** The Window module handles all aspects of the main window, menus,
20     dialogs and so on. *)
21
22 class window :
23 object
24   method failure : exn -> unit
25     (** This is the global error handling function.  It is invoked in
26         the main thread for failures in the slave thread (see
27         {!Slave.set_failure_hook}). *)
28
29   method throbber_busy : unit -> unit
30   method throbber_idle : unit -> unit
31     (** These are callbacks from the slave thread (invoked in the main
32         thread) which are called whenever the throbber should be
33         animated/busy or idle.  *)
34
35   method set_statusbar : string -> unit
36     (** This callback from the slave thread (invoked in the main thread)
37         updates the status bar when some slave operation starts or
38         stops. *)
39
40   method progress : int64 * int64 -> unit
41     (** This called whenever the progress bar should move. *)
42
43   method run_cli_request : Cmdline.cli_request -> unit
44     (** This function performs the {!Cmdline.cli_request} operation.
45         The actual operation happens asynchronously after this function
46         has returned. *)
47
48 end