Contrib: toplevel for native code

From: Fabrice Le Fessant (
Date: Fri Mar 12 1999 - 16:42:29 MET

From: Fabrice Le Fessant <>
Date: Fri, 12 Mar 1999 16:42:29 +0100 (CET)
Subject: Contrib: toplevel for native code

I have integrated a new library "toplevel" in the Efuns package version 0.06.
This new library can be used in any bytecode or native program to
evaluate ocaml expressions (strings terminated with ;;) in the same
manner as with a toplevel. Look at the interface in
toplevel/dyneval.mli. An example can be found in gwml/
with a function that reads on stdin, looks for ";;",
sends the command to Dyneval.eval and prints the result (using
Utils.printexn (in common/) when it is an exception).

As a consequence, GwML has a new option -talk to
enable the user to enter ocaml expressions on stdin. For
example, you can enter "Stdconfig.auto_raise := false;;" on the
toplevel to suppress the auto-raise.

Here is a list of other changes since version 005:

* New option -talk: Enter ocaml expressions on stdin to be evaluated by Gwml
   (like a toplevel) (* only if build with toplevel library *)
* Virtual: The pager view is modified when windows are moved/resized/unmapped.
* Stdconfig:
  - Placement policies can now be specified with add_placement.
  - Special placement policy "near_mouse" for several popup windows (Netscape,etc).
* Several bug fixed by Jerome Vouillon:
  - size_hints are now correctly read and updated.
  - window size updated on client demand.
  - no setInputFocus when destination window is not visible
  - XV bug partially fixed

* XGraphics: Added new update styles (do not update the screen immediatly.
   Wait for explicit refresh request (either total, or clipped)) with
   two new functions XGraphics.set_update_style and XGraphics.update
   (look at demo/ for an example)
* Xpm: new function "createMLStringFromPixmapData" to
  convert a pixmap data into a caml syntax string
  (to integrate Pixmaps in ocaml sources).
* Time bug (32 bits truncated to 31) fixed.
* New Demo files in efuns/demo:
   - "pacman" game (using the XGraphics module) from Sylvain Conchon.
   - "xpm2ml" to translate .xpm files to .ml files (directly usable with


Efuns page:

- Fabrice LE FESSANT


This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:21 MET