123456789101112131415161718192021222324252627282930313233343536373839404142# 1 "src/unix/graphicsX11.ml"(**************************************************************************)(* *)(* OCaml *)(* *)(* Pierre Weis and Jun Furuse, projet Cristal, INRIA Rocquencourt *)(* *)(* Copyright 2001 Institut National de Recherche en Informatique et *)(* en Automatique. *)(* *)(* All rights reserved. This file is distributed under the terms of *)(* the GNU Lesser General Public License version 2.1, with the *)(* special exception on linking described in the file LICENSE. *)(* *)(**************************************************************************)(* Module [GraphicsX11]: additional graphics primitives for
the X Windows system *)typewindow_id=stringexternalwindow_id:unit->window_id="caml_gr_window_id"letsubwindows=Hashtbl.create13externalopen_subwindow:int->int->int->int->window_id="caml_gr_open_subwindow"externalclose_subwindow:window_id->unit="caml_gr_close_subwindow"letopen_subwindow~x~y~width~height=letwid=open_subwindowxywidthheightinHashtbl.addsubwindowswid();widletclose_subwindowwid=ifHashtbl.memsubwindowswidthen(close_subwindowwid;Hashtbl.removesubwindowswid)elseraise(Graphics.Graphic_failure("close_subwindow: no such subwindow: "^wid))