Go to the first, previous, next, last section, table of contents.


Low level Interface between Prolog and blt

This module exports some predicates to interact with Tcl-tk, particularly with the bltwish program. Bltwish is a windowing shell consisting of the Tcl command languaje, the Tk toolkit plus the additional commands that comes with the BLT library and a main program that reads commands. It creates a main window and then processes Tcl commands.

Usage and interface (bltclass)

Documentation on exports (bltclass)

PREDICATE: new_interp/1:

new_interp(Interp)

Creates a bltwish interprter and returns a socket. The socket allows the comunication between Prolog and Tcl-tk. Thus, bltwish receives the commands through the socket.

PREDICATE: tcltk_raw_code/2:

tcltk_raw_code(Command_Line,Interp)

Sends a command line to the interpreter. Tcl-tk parses and executes it.

REGTYPE: bltwish_interp/1:

bltwish_interp(Interp)

This type defines a bltwish interpreter. In fact, the bltwish interpreter receives the commands through the socket created.

bltwish_interp(Interp) :-
        stream(Interp).

PREDICATE: interp_file/2:

interp_file(File,Interp)

Sends the script file (File) to the interpreter through the socket. A script file is a file that contains commands that Tcl-tk can execute.


Go to the first, previous, next, last section, table of contents.