Previous: , Up: Starting things up  


2.2 Handling Connections

Function: open-motif-connection (hostname xdisplay-name app-name app-class

Opens a connection to a server on the named host and opens a display connection to the named X display. The app-name and app-class are for defining the application name and class for use in resource specifications. An optional process-id argument can be passed if a local server process has already been created. This returns a MOTIF-CONNECTION object.

Function: close-motif-connection connection

This closes a toolkit connection which was created by OPEN-MOTIF-CONNECTION.

Variable: *motif-connection*

Bound in contexts such as callback handlers to the currently active toolkit connection.

Variable: *x-display*

Bound in contexts such as callback handlers to the currently active CLX display.

Macro: with-motif-connection connection &body forms

This macro establishes the necessary context for invoking toolkit functions outside of callback/event handlers.

Macro: with-clx-requests &body forms

Macro that ensures that all CLX requests made within its body will be flushed to the X server before proceeding so that Motif functions may use the results.

Function: run-motif-application init-function

This is the standard CLM entry point for creating a Motif application. The init-function argument will be called to create and realize the interface. It returns the created MOTIF-CONNECTION object. Available keyword arguments are:

:init-args

list of arguments to pass to init-function

:application-class

application class (default "Lisp")

:application-name

application name (default "lisp")

:server-host

name of Motif server to connect to

:display

name of X display to connect to

Function: quit-application

This is the standard function for closing down a Motif application. You can call it within your callbacks to terminate the application.


Previous: Variables controlling connections, Up: Starting things up