(***********************************************************************) (* *) (* Objective Caml *) (* *) (* Xavier Leroy, projet Cristal, INRIA Rocquencourt *) (* *) (* Copyright 1996 Institut National de Recherche en Informatique et *) (* en Automatique. All rights reserved. This file is distributed *) (* under the terms of the GNU Library General Public License, with *) (* the special exception on linking described in file ../../LICENSE. *) (* *) (***********************************************************************) (* $Id: graphics.ml,v 1.24 2002/07/23 07:46:22 xleroy Exp $ *) exception Graphic_failure of string (* Initializations *) let _ = Callback.register_exception "Graphics.Graphic_failure" (Graphic_failure "") external raw_open_root_graph: string -> unit = "gr_open_root_graph" external raw_close_root_graph: unit -> unit = "gr_close_root_graph" external sigio_signal: unit -> int = "gr_sigio_signal" external sigio_handler: int -> unit = "gr_sigio_handler" let open_root_graph arg = Sys.set_signal (sigio_signal()) (Sys.Signal_handle sigio_handler); raw_open_root_graph arg let close_root_graph () = Sys.set_signal (sigio_signal()) Sys.Signal_ignore; raw_close_root_graph ()