Version française
Home     About     Download     Resources     Contact us    
Browse thread
Contrib: toplevel for native code
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Fabrice Le Fessant <fabrice.le_fessant@i...>
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/main.ml
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:

GwML:
=====
* 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

Xlib:
=====
* 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/pacman.ml 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
       Xpm.createPixmapFromData).

-----------------------------------------------------------------------
Sources: 
  http://pauillac.inria.fr/para/cdrom/prog/unix/efuns/efuns-006.src.tar.gz

Efuns page:
  http://pauillac.inria.fr/para/cdrom/prog/unix/efuns



- Fabrice LE FESSANT

Homepage: http://pauillac.inria.fr/~lefessan