(** The Window module handles all aspects of the main window, menus,
dialogs and so on. *)
-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 : 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 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. *)
+class window :
+object
+ method failure : 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}). *)
+
+ method throbber_busy : unit -> unit
+ method throbber_idle : 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. *)
+
+ method set_statusbar : string -> unit
+ (** This callback from the slave thread (invoked in the main thread)
+ updates the status bar when some slave operation starts or
+ stops. *)
+
+ method progress : int64 * int64 -> unit
+ (** This called whenever the progress bar should move. *)
+
+ method run_cli_request : Cmdline.cli_request -> unit
+ (** This function performs the {!Cmdline.cli_request} operation.
+ The actual operation happens asynchronously after this function
+ has returned. *)
+
+end