~ubuntu-branches/debian/sid/ocaml/sid

« back to all changes in this revision

Viewing changes to otherlibs/graph/graphicsX11.ml

  • Committer: Bazaar Package Importer
  • Author(s): Stéphane Glondu
  • Date: 2011-04-21 21:35:08 UTC
  • mfrom: (1.1.11 upstream) (12.1.14 sid)
  • Revision ID: james.westby@ubuntu.com-20110421213508-kg34453aqmb0moha
* Fixes related to -output-obj with g++ (in debian/patches):
  - add Declare-primitive-name-table-as-const-char
  - add Avoid-multiple-declarations-in-generated-.c-files-in
  - fix Embed-bytecode-in-C-object-when-using-custom: the closing
    brace for extern "C" { ... } was missing in some cases

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
(*                                                                     *)
12
12
(***********************************************************************)
13
13
 
14
 
(* $Id: graphicsX11.ml 6171 2004-03-24 15:02:06Z starynke $ *)
 
14
(* $Id: graphicsX11.ml 9547 2010-01-22 12:48:24Z doligez $ *)
15
15
 
16
16
(* Module [GraphicsX11]: additional graphics primitives for the X Windows system *)
17
17
 
21
21
 
22
22
let subwindows = Hashtbl.create 13
23
23
 
24
 
external open_subwindow : int -> int -> int -> int -> window_id 
 
24
external open_subwindow : int -> int -> int -> int -> window_id
25
25
    = "caml_gr_open_subwindow"
26
26
external close_subwindow : window_id -> unit
27
27
    = "caml_gr_close_subwindow"
31
31
  Hashtbl.add subwindows wid ();
32
32
  wid
33
33
;;
34
 
  
 
34
 
35
35
let close_subwindow wid =
36
36
  if Hashtbl.mem subwindows wid then begin
37
37
    close_subwindow wid;
39
39
  end else
40
40
    raise (Graphics.Graphic_failure ("close_subwindow: no such subwindow: " ^ wid))
41
41
;;
42