Version: 1.7#74 (2001/3/26, 12:12:29 CEST)
Version of last change: 0.9#79 (1999/5/4, 20:18:41 MEST)
The
tcltk low level
library permit obtain the results of the
tcltk
. This module defines a low level interface to be used by the library Tcl/Tk. Includes all the code related directly to the handling of sockets. This library should not be used by any user program, because is a low-level connection to Tcl/Tk.
Two sockets are created in Tcl/Tk to connect the TclInterpreter and the prolog process, the event_socket and the term_socket. There are two global variables: prolog_variables and terms. The value of any of the variables in the goal that is bound to a term will be stored in the array prolog_variables with the variable name as index. The string which contains the printed representation of prolog terms is Terms. There are Tcl/Tk procedures used to develop the interface:
prolog
prolog_event
prolog_delete_event
prolog_list_events
prolog_cmd
prolog_one_event
prolog_thread_event
convert_variables
unify_term
tcltk_low_level
):- use_module(library(tcltk_low_level)).
tcltk_low_level
)
Usage: new_interp(-TclInterpreter)
-TclInterpreter
is a reference to a Tcl interpreter.
(tcltk_low_level:tclInterpreter/1
)
Usage: new_interp(-TclInterpreter,+Options)
Options
.
-TclInterpreter
is a reference to a Tcl interpreter.
(tcltk_low_level:tclInterpreter/1
)
+Options
is currently instantiated to an atom.
(term_typing:atom/1
)
Usage: new_interp_file(+FileName,-TclInterpreter)
FileName
. FileName
is treated as a name of a sript file
+FileName
is a string (a list of character codes).
(basic_props:string/1
)
-TclInterpreter
is a reference to a Tcl interpreter.
(tcltk_low_level:tclInterpreter/1
)
Usage: tcltk(+Code,+TclInterpreter)
Code
converted to string to the TclInterpreter
+Code
is a Tcl command.
(tcltk_low_level:tclCommand/1
)
+TclInterpreter
is a reference to a Tcl interpreter.
(tcltk_low_level:tclInterpreter/1
)
Usage: tcltk_raw_code(+String,+TclInterpreter)
Stream
to the TclInterpreter
+String
is a string (a list of character codes).
(basic_props:string/1
)
+TclInterpreter
is a reference to a Tcl interpreter.
(tcltk_low_level:tclInterpreter/1
)
Usage: receive_result(-Result,+TclInterpreter)
Result
of the last TclCommand into the TclInterpreter
. If the TclCommand is not correct the wish process is terminated and a message appears showing the error
-Result
is a string (a list of character codes).
(basic_props:string/1
)
+TclInterpreter
is a reference to a Tcl interpreter.
(tcltk_low_level:tclInterpreter/1
)
Usage: send_term(+String,+TclInterpreter)
TclInterpreter
. String
has the predicate with unified variables
+String
is a string (a list of character codes).
(basic_props:string/1
)
+TclInterpreter
is a reference to a Tcl interpreter.
(tcltk_low_level:tclInterpreter/1
)
Usage: receive_event(-Event,+TclInterpreter)
Event
from the event socket of the TclInterpreter
.
-Event
is a list.
(basic_props:list/1
)
+TclInterpreter
is a reference to a Tcl interpreter.
(tcltk_low_level:tclInterpreter/1
)
Usage: receive_list(-List,+TclInterpreter)
List
from the event socket of the TclInterpreter
.The List
has all the predicates that have been inserted from Tcl/Tk with the command prolog_event. It is a list of terms.
-List
is a list.
(basic_props:list/1
)
+TclInterpreter
is a reference to a Tcl interpreter.
(tcltk_low_level:tclInterpreter/1
)
Usage: receive_confirm(-String,+TclInterpreter)
String
from the event socket of the TclInterpreter
when a term inserted into the event queue is managed.
-String
is a string (a list of character codes).
(basic_props:string/1
)
+TclInterpreter
is a reference to a Tcl interpreter.
(tcltk_low_level:tclInterpreter/1
)
Usage: delete(+TclInterpreter)
TclInterpreter
from the system
+TclInterpreter
is a reference to a Tcl interpreter.
(tcltk_low_level:tclInterpreter/1
)
tcltk_low_level
)
Usage: core(+String)
core/1
is a set of facts which contain String
s to be sent to the Tcl/Tk interpreter on startup. They implement miscelaneous Tcl/Tk procedures which are used by the Tcl/Tk interface.
+String
is a string (a list of character codes).
(basic_props:string/1
)
Go to the first, previous, next, last section, table of contents.