The cl-tk Reference Manual

This is the cl-tk Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 05:27:40 2024 GMT+0.

Table of Contents


1 Systems

The main system appears first, followed by any subsystem dependency.


1.1 cl-tk

Minimal bridge to Tcl/Tk

Author

Marijn Haverbeke <>

License

BSD

Dependency

cffi (system).

Source

cl-tk.asd.

Child Components

2 Files

Files are sorted by type and then listed depth-first from the systems components trees.


2.1 Lisp


2.1.1 cl-tk/cl-tk.asd

Source

cl-tk.asd.

Parent Component

cl-tk (system).

ASDF Systems

cl-tk.


2.1.2 cl-tk/package.lisp

Source

cl-tk.asd.

Parent Component

cl-tk (system).

Packages

cl-tk.


2.1.3 cl-tk/base.lisp

Dependency

package.lisp (file).

Source

cl-tk.asd.

Parent Component

cl-tk (system).

Public Interface
Internals

2.1.4 cl-tk/wish.lisp

Dependency

base.lisp (file).

Source

cl-tk.asd.

Parent Component

cl-tk (system).

Public Interface
Internals

2.1.5 cl-tk/cffi.lisp

Dependency

base.lisp (file).

Source

cl-tk.asd.

Parent Component

cl-tk (system).

Internals

2.1.6 cl-tk/ffi.lisp

Dependency

cffi.lisp (file).

Source

cl-tk.asd.

Parent Component

cl-tk (system).

Public Interface
Internals

3 Packages

Packages are listed by definition order.


3.1 cl-tk

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

4 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


4.1 Public Interface


4.1.1 Special variables

Special Variable: *tk*
Package

cl-tk.

Source

base.lisp.

Special Variable: *wname*
Package

cl-tk.

Source

base.lisp.


4.1.2 Macros

Macro: bind-event (tag event (&rest fields) &body body)

For example (bind-event "." "<1>" ((x #x) (y #y)) (format t "clicked ~a,~a" x y))

Package

cl-tk.

Source

base.lisp.

Macro: event-handler* (&body body)
Package

cl-tk.

Source

base.lisp.

Macro: with-local-events (&body body)
Package

cl-tk.

Source

base.lisp.

Macro: with-tk ((&optional back-end) &body body)
Package

cl-tk.

Source

base.lisp.

Macro: with-wname (name &body body)
Package

cl-tk.

Source

base.lisp.


4.1.3 Ordinary functions

Function: alive-p ()
Package

cl-tk.

Source

base.lisp.

Function: clear-events (snapshot)
Package

cl-tk.

Source

base.lisp.

Function: destroy ()
Package

cl-tk.

Source

base.lisp.

Function: doevent (&optional block)
Package

cl-tk.

Source

base.lisp.

Function: doevents ()
Package

cl-tk.

Source

base.lisp.

Function: event-handler (func &optional fields)
Package

cl-tk.

Source

base.lisp.

Function: event-snapshot ()
Package

cl-tk.

Source

base.lisp.

Function: lit (val)
Package

cl-tk.

Source

base.lisp.

Function: mainloop ()
Package

cl-tk.

Source

base.lisp.

Function: tcl (command &rest args)
Package

cl-tk.

Source

base.lisp.

Function: tcl-error (control &rest args)
Package

cl-tk.

Source

base.lisp.

Function: tcl-escape (str)
Package

cl-tk.

Source

base.lisp.

Function: tcl[ (command &rest args)
Package

cl-tk.

Source

base.lisp.

Function: tcl{ (command &rest args)
Package

cl-tk.

Source

base.lisp.

Function: toplevel-tk (&optional back-end)
Package

cl-tk.

Source

base.lisp.

Function: unregister-event (id)
Package

cl-tk.

Source

base.lisp.

Function: wname (name &optional id)
Package

cl-tk.

Source

base.lisp.

Function: wname-car (name)
Package

cl-tk.

Source

base.lisp.

Function: wname-cdr (name)
Package

cl-tk.

Source

base.lisp.

Function: wname-cons (name base)
Package

cl-tk.

Source

base.lisp.


4.1.4 Standalone methods

Method: initialize-instance :after ((tk ffi-tk) &key &allow-other-keys)
Source

ffi.lisp.

Method: initialize-instance :after ((tk wish-tk) &key &allow-other-keys)
Source

wish.lisp.


4.1.5 Conditions

Condition: tcl-error
Package

cl-tk.

Source

base.lisp.

Direct superclasses

simple-error.


4.1.6 Classes

Class: ffi-tk
Package

cl-tk.

Source

ffi.lisp.

Direct superclasses

tk.

Direct methods
Direct slots
Slot: interp
Readers

@interp.

Writers

This slot is read-only.

Slot: alive
Initform

t

Readers

@alive.

Writers

(setf @alive).

Class: wish-tk
Package

cl-tk.

Source

wish.lisp.

Direct superclasses

tk.

Direct methods
Direct slots
Slot: stream
Package

common-lisp.

Readers

@stream.

Writers

This slot is read-only.

Slot: binary
Initform

(quote ("wish8.5" "wish85" "wish"))

Initargs

:binary

Readers

@binary.

Writers

This slot is read-only.

Slot: queue
Readers

@queue.

Writers

(setf @queue).

Slot: alive
Initform

t

Readers

@alive.

Writers

(setf @alive).


4.2 Internals


4.2.1 Constants

Constant: +tcl-dont-wait+
Package

cl-tk.

Source

ffi.lisp.

Constant: +tcl-error+
Package

cl-tk.

Source

ffi.lisp.

Constant: +tcl-ok+
Package

cl-tk.

Source

ffi.lisp.


4.2.2 Ordinary functions

Function: copy-literal-string (instance)
Package

cl-tk.

Source

base.lisp.

Function: create-interp ()
Package

cl-tk.

Source

cffi.lisp.

Function: delete-interp (interp)
Package

cl-tk.

Source

cffi.lisp.

Function: do-one-event (flags)
Package

cl-tk.

Source

cffi.lisp.

Function: get-string-result (interp)
Package

cl-tk.

Source

cffi.lisp.

Function: handle-event (tk id args)
Package

cl-tk.

Source

base.lisp.

Function: input-pending-p (stream)
Package

cl-tk.

Source

wish.lisp.

Function: literal-string-p (object)
Package

cl-tk.

Source

base.lisp.

Reader: literal-string-val (instance)
Writer: (setf literal-string-val) (instance)
Package

cl-tk.

Source

base.lisp.

Target Slot

val.

Function: load-libs ()
Package

cl-tk.

Source

cffi.lisp.

Function: null-pointer-p (ptr)
Package

cl-tk.

Source

cffi.lisp.

Function: read-wish-message (stream &optional type)
Package

cl-tk.

Source

wish.lisp.

Function: register-event (handler)
Package

cl-tk.

Source

base.lisp.

Function: start-tk (&optional back-end)
Package

cl-tk.

Source

base.lisp.

Function: tcl-eval (interp script)
Package

cl-tk.

Source

cffi.lisp.

Function: tcl-form (val)
Package

cl-tk.

Source

base.lisp.

Function: tcl-init (interp)
Package

cl-tk.

Source

cffi.lisp.

Function: tk-init (interp)
Package

cl-tk.

Source

cffi.lisp.

Function: try-wish-binaries (binaries)
Package

cl-tk.

Source

wish.lisp.

Function: wish-stream (binary-name)
Package

cl-tk.

Source

wish.lisp.


4.2.3 Generic functions

Generic Reader: @alive (object)
Package

cl-tk.

Methods
Reader Method: @alive ((ffi-tk ffi-tk))

automatically generated reader method

Source

ffi.lisp.

Target Slot

alive.

Reader Method: @alive ((wish-tk wish-tk))

automatically generated reader method

Source

wish.lisp.

Target Slot

alive.

Generic Writer: (setf @alive) (object)
Package

cl-tk.

Methods
Writer Method: (setf @alive) ((ffi-tk ffi-tk))

automatically generated writer method

Source

ffi.lisp.

Target Slot

alive.

Writer Method: (setf @alive) ((wish-tk wish-tk))

automatically generated writer method

Source

wish.lisp.

Target Slot

alive.

Generic Reader: @binary (object)
Package

cl-tk.

Methods
Reader Method: @binary ((wish-tk wish-tk))

automatically generated reader method

Source

wish.lisp.

Target Slot

binary.

Generic Reader: @interp (object)
Package

cl-tk.

Methods
Reader Method: @interp ((ffi-tk ffi-tk))

automatically generated reader method

Source

ffi.lisp.

Target Slot

interp.

Generic Reader: @next-id (object)
Package

cl-tk.

Methods
Reader Method: @next-id ((tk tk))

automatically generated reader method

Source

base.lisp.

Target Slot

next-id.

Generic Writer: (setf @next-id) (object)
Package

cl-tk.

Methods
Writer Method: (setf @next-id) ((tk tk))

automatically generated writer method

Source

base.lisp.

Target Slot

next-id.

Generic Reader: @queue (object)
Package

cl-tk.

Methods
Reader Method: @queue ((wish-tk wish-tk))

automatically generated reader method

Source

wish.lisp.

Target Slot

queue.

Generic Writer: (setf @queue) (object)
Package

cl-tk.

Methods
Writer Method: (setf @queue) ((wish-tk wish-tk))

automatically generated writer method

Source

wish.lisp.

Target Slot

queue.

Generic Reader: @stream (object)
Package

cl-tk.

Methods
Reader Method: @stream ((wish-tk wish-tk))

automatically generated reader method

Source

wish.lisp.

Target Slot

stream.

Generic Reader: @table (object)
Package

cl-tk.

Methods
Reader Method: @table ((tk tk))

automatically generated reader method

Source

base.lisp.

Target Slot

event-table.

Generic Function: tcl-send (tk command &optional get-result)
Package

cl-tk.

Source

base.lisp.

Methods
Method: tcl-send ((tk ffi-tk) command &optional get-result)
Source

ffi.lisp.

Method: tcl-send ((tk wish-tk) command &optional get-result)
Source

wish.lisp.

Generic Function: tk-alive-p (tk)
Package

cl-tk.

Source

base.lisp.

Methods
Method: tk-alive-p ((tk ffi-tk))
Source

ffi.lisp.

Method: tk-alive-p ((tk wish-tk))
Source

wish.lisp.

Generic Function: tk-destroy (tk)
Package

cl-tk.

Source

base.lisp.

Methods
Method: tk-destroy ((tk ffi-tk))
Source

ffi.lisp.

Method: tk-destroy ((tk wish-tk))
Source

wish.lisp.

Generic Function: tk-doevent (tk &optional block)
Package

cl-tk.

Source

base.lisp.

Methods
Method: tk-doevent ((tk ffi-tk) &optional block)
Source

ffi.lisp.

Method: tk-doevent ((tk wish-tk) &optional block)
Source

wish.lisp.


4.2.4 Structures

Structure: literal-string
Package

cl-tk.

Source

base.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: val
Readers

literal-string-val.

Writers

(setf literal-string-val).


4.2.5 Classes

Class: tk
Package

cl-tk.

Source

base.lisp.

Direct subclasses
Direct methods
Direct slots
Slot: event-table
Initform

(make-hash-table :test (quote eql))

Readers

@table.

Writers

This slot is read-only.

Slot: next-id
Initform

0

Readers

@next-id.

Writers

(setf @next-id).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   (   @  
A   B   C   D   E   F   G   H   I   L   M   N   R   S   T   U   W  
Index Entry  Section

(
(setf @alive): Private generic functions
(setf @alive): Private generic functions
(setf @alive): Private generic functions
(setf @next-id): Private generic functions
(setf @next-id): Private generic functions
(setf @queue): Private generic functions
(setf @queue): Private generic functions
(setf literal-string-val): Private ordinary functions

@
@alive: Private generic functions
@alive: Private generic functions
@alive: Private generic functions
@binary: Private generic functions
@binary: Private generic functions
@interp: Private generic functions
@interp: Private generic functions
@next-id: Private generic functions
@next-id: Private generic functions
@queue: Private generic functions
@queue: Private generic functions
@stream: Private generic functions
@stream: Private generic functions
@table: Private generic functions
@table: Private generic functions

A
alive-p: Public ordinary functions

B
bind-event: Public macros

C
clear-events: Public ordinary functions
copy-literal-string: Private ordinary functions
create-interp: Private ordinary functions

D
delete-interp: Private ordinary functions
destroy: Public ordinary functions
do-one-event: Private ordinary functions
doevent: Public ordinary functions
doevents: Public ordinary functions

E
event-handler: Public ordinary functions
event-handler*: Public macros
event-snapshot: Public ordinary functions

F
Function, (setf literal-string-val): Private ordinary functions
Function, alive-p: Public ordinary functions
Function, clear-events: Public ordinary functions
Function, copy-literal-string: Private ordinary functions
Function, create-interp: Private ordinary functions
Function, delete-interp: Private ordinary functions
Function, destroy: Public ordinary functions
Function, do-one-event: Private ordinary functions
Function, doevent: Public ordinary functions
Function, doevents: Public ordinary functions
Function, event-handler: Public ordinary functions
Function, event-snapshot: Public ordinary functions
Function, get-string-result: Private ordinary functions
Function, handle-event: Private ordinary functions
Function, input-pending-p: Private ordinary functions
Function, lit: Public ordinary functions
Function, literal-string-p: Private ordinary functions
Function, literal-string-val: Private ordinary functions
Function, load-libs: Private ordinary functions
Function, mainloop: Public ordinary functions
Function, null-pointer-p: Private ordinary functions
Function, read-wish-message: Private ordinary functions
Function, register-event: Private ordinary functions
Function, start-tk: Private ordinary functions
Function, tcl: Public ordinary functions
Function, tcl-error: Public ordinary functions
Function, tcl-escape: Public ordinary functions
Function, tcl-eval: Private ordinary functions
Function, tcl-form: Private ordinary functions
Function, tcl-init: Private ordinary functions
Function, tcl[: Public ordinary functions
Function, tcl{: Public ordinary functions
Function, tk-init: Private ordinary functions
Function, toplevel-tk: Public ordinary functions
Function, try-wish-binaries: Private ordinary functions
Function, unregister-event: Public ordinary functions
Function, wish-stream: Private ordinary functions
Function, wname: Public ordinary functions
Function, wname-car: Public ordinary functions
Function, wname-cdr: Public ordinary functions
Function, wname-cons: Public ordinary functions

G
Generic Function, (setf @alive): Private generic functions
Generic Function, (setf @next-id): Private generic functions
Generic Function, (setf @queue): Private generic functions
Generic Function, @alive: Private generic functions
Generic Function, @binary: Private generic functions
Generic Function, @interp: Private generic functions
Generic Function, @next-id: Private generic functions
Generic Function, @queue: Private generic functions
Generic Function, @stream: Private generic functions
Generic Function, @table: Private generic functions
Generic Function, tcl-send: Private generic functions
Generic Function, tk-alive-p: Private generic functions
Generic Function, tk-destroy: Private generic functions
Generic Function, tk-doevent: Private generic functions
get-string-result: Private ordinary functions

H
handle-event: Private ordinary functions

I
initialize-instance: Public standalone methods
initialize-instance: Public standalone methods
input-pending-p: Private ordinary functions

L
lit: Public ordinary functions
literal-string-p: Private ordinary functions
literal-string-val: Private ordinary functions
load-libs: Private ordinary functions

M
Macro, bind-event: Public macros
Macro, event-handler*: Public macros
Macro, with-local-events: Public macros
Macro, with-tk: Public macros
Macro, with-wname: Public macros
mainloop: Public ordinary functions
Method, (setf @alive): Private generic functions
Method, (setf @alive): Private generic functions
Method, (setf @next-id): Private generic functions
Method, (setf @queue): Private generic functions
Method, @alive: Private generic functions
Method, @alive: Private generic functions
Method, @binary: Private generic functions
Method, @interp: Private generic functions
Method, @next-id: Private generic functions
Method, @queue: Private generic functions
Method, @stream: Private generic functions
Method, @table: Private generic functions
Method, initialize-instance: Public standalone methods
Method, initialize-instance: Public standalone methods
Method, tcl-send: Private generic functions
Method, tcl-send: Private generic functions
Method, tk-alive-p: Private generic functions
Method, tk-alive-p: Private generic functions
Method, tk-destroy: Private generic functions
Method, tk-destroy: Private generic functions
Method, tk-doevent: Private generic functions
Method, tk-doevent: Private generic functions

N
null-pointer-p: Private ordinary functions

R
read-wish-message: Private ordinary functions
register-event: Private ordinary functions

S
start-tk: Private ordinary functions

T
tcl: Public ordinary functions
tcl-error: Public ordinary functions
tcl-escape: Public ordinary functions
tcl-eval: Private ordinary functions
tcl-form: Private ordinary functions
tcl-init: Private ordinary functions
tcl-send: Private generic functions
tcl-send: Private generic functions
tcl-send: Private generic functions
tcl[: Public ordinary functions
tcl{: Public ordinary functions
tk-alive-p: Private generic functions
tk-alive-p: Private generic functions
tk-alive-p: Private generic functions
tk-destroy: Private generic functions
tk-destroy: Private generic functions
tk-destroy: Private generic functions
tk-doevent: Private generic functions
tk-doevent: Private generic functions
tk-doevent: Private generic functions
tk-init: Private ordinary functions
toplevel-tk: Public ordinary functions
try-wish-binaries: Private ordinary functions

U
unregister-event: Public ordinary functions

W
wish-stream: Private ordinary functions
with-local-events: Public macros
with-tk: Public macros
with-wname: Public macros
wname: Public ordinary functions
wname-car: Public ordinary functions
wname-cdr: Public ordinary functions
wname-cons: Public ordinary functions