1 /***********************************************************************/
5 /* Jun Furuse, projet Cristal, INRIA Rocquencourt */
7 /* Copyright 2001 Institut National de Recherche en Informatique et */
8 /* en Automatique. All rights reserved. This file is distributed */
9 /* under the terms of the GNU Library General Public License, with */
10 /* the special exception on linking described in file ../../LICENSE. */
12 /***********************************************************************/
14 /* $Id: subwindow.c 6171 2004-03-24 15:02:06Z starynke $ */
18 value caml_gr_open_subwindow(value vx, value vy, value width, value height)
22 int h = Int_val(height);
23 int w = Int_val(width);
28 win = XCreateSimpleWindow(caml_gr_display, caml_gr_window.win,
30 0, caml_gr_black, caml_gr_background);
31 XMapWindow(caml_gr_display, win);
32 XFlush(caml_gr_display);
33 return (caml_gr_id_of_window (win));
36 value caml_gr_close_subwindow(value wid)
41 sscanf( String_val(wid), "%lu", (unsigned long *)(&win) );
42 XDestroyWindow(caml_gr_display, win);
43 XFlush(caml_gr_display);