X-Git-Url: http://git.annexia.org/?a=blobdiff_plain;f=window.mli;h=b2877bb6d4d853e0b5b677687fad89f020f5f8bc;hb=c79fc07ff71926b3bf956ff296336f6f71bb3b1e;hp=916bb151ba44baf0d35a02e5af52f17fda3fa945;hpb=b07102fda0034da5840a9f33bd6d404a195b8cc9;p=guestfs-browser.git diff --git a/window.mli b/window.mli index 916bb15..b2877bb 100644 --- a/window.mli +++ b/window.mli @@ -19,31 +19,31 @@ (** The Window module handles all aspects of the main window, menus, dialogs and so on. *) -type display_state = { - window : GWindow.window; - throbber_busy : unit -> unit; - throbber_idle : unit -> unit; - set_statusbar : string -> unit; - clear_statusbar : unit -> unit; - set_vmlist : string list -> unit; - clear_vmlist : unit -> unit; - clear_notebook : unit -> unit; - filesystem : GPack.box; - notebook : GPack.notebook; -} - (** This structure describes various variables and functions - for the main window. It is returned from {!open_main_window} - and passed around to various other functions. *) - -val open_main_window : unit -> display_state +type window_state + +val open_main_window : unit -> window_state (** Open the main Gtk window, set up the menus, callbacks and so on. *) -val failure : display_state -> exn -> unit +val failure : window_state -> exn -> unit (** This is the global error handling function. It is invoked in the main thread for failures in the slave thread (see {!Slave.set_failure_hook}). *) -val run_cli_request : display_state -> Cmdline.cli_request -> unit +val throbber_busy : window_state -> unit -> unit +val throbber_idle : window_state -> unit -> unit + (** These are callbacks from the slave thread (invoked in the main + thread) which are called whenever the throbber should be + animated/busy or idle. *) + +val set_statusbar : window_state -> string -> unit + (** This callback from the slave thread (invoked in the main thread) + updates the status bar when some slave operation starts or + stops. *) + +val progress : window_state -> int64 * int64 -> unit + (** This called whenever the progress bar should move. *) + +val run_cli_request : window_state -> Cmdline.cli_request -> unit (** This function performs the {!Cmdline.cli_request} operation. The actual operation happens asynchronously after this function has returned. *)