File: socket.ml

package info (click to toggle)
lablgtk2 2.6.0-7
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 3,032 kB
  • ctags: 5,191
  • sloc: ml: 27,719; ansic: 7,662; makefile: 532; sh: 83
file content (16 lines) | stat: -rw-r--r-- 500 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(* $Id: socket.ml,v 1.4 2004/01/13 05:49:52 garrigue Exp $ *)

open GMain

let main () =
  let w = GWindow.window ~title:"Socket example" () in
  w#connect#destroy ~callback:Main.quit;
  let vbox = GPack.vbox ~packing:w#add () in
  let label = GMisc.label ~packing:vbox#pack () in
  w#show ();
  let socket = GWindow.socket ~packing:vbox#add ~height:40 () in
  label#set_text ("XID to plug into this socket: 0x" ^ 
                  Int32.format "%x" socket#xwindow);
  Main.main ()

let _ = main ()