All Manuals > CAPI User Guide and Reference Manual > 19 Host Window System-specific issues

NextPrevUpTopContentsIndex

19.3 GTK+-specific issues

19.3.1 The break gesture

If a CAPI/GTK+ window is busy and unresponsive you can use the break gesture Meta+Ctrl+C to regain control.

On GTK+ you can use the function set-interactive-break-gestures both to find and to set the keys that are used interactively as break gestures. When the system detects a break gesture it tries to interrupt any running process, to allow the user to deal with runaway processes.

19.3.2 Matching resources for GTK+

You can configure the LispWorks IDE and your application to use resources on GTK+. The applicable resources determine the default fonts, colors and certain other properties used in CAPI elements.

The element initarg widget-name is used to match resources. CAPI gives a name for the main widget that it creates for each element that has a representation in the library. This name is then included in the "path" that GTK+ uses to match resources for each widget.

19.3.2.1 Resources on GTK+

By default, the name of the widget is the name of the class of the element, downcased (except top level interfaces, see next paragraph). You can override the name by either passing widget-name when making the element, or by calling (setf element-widget-name) before displaying the element.

To make it easier to define resources specific to the application, the CAPI GTK+ library, when using the default name, prepends the application-class (see convert-to-screen) followed by a dot. So for an interface of class my-interface which is displayed in a screen with application-class "my-application", the default widget-name is:

my-application.my-interface

Example GTK+ resource files are in your LispWorks installation directory under examples/gtk/:

gtkrc-break-gestures gtkrc-font gtkrc-parameters gtkrc-styles
19.3.2.2 Resources for CAPI/GTK+ applications

Delivered applications which need fallback resources should pass the :application-class and :fallback-resources keys described in the manual page for convert-to-screen.

This example shows how to make a CAPI GUI configurable by GTK+ resources:

(example-edit-file "capi/elements/gtk-resources")

To construct custom resources for your CAPI/GTK+ application, see the example resource files in your LispWorks installation directory under examples/gtk/.

19.3.2.3 X resources for in-place completion windows

The special window described in In-place completion has interface with name "non-focus-list-prompter". This name can be used to define resources specific to the in-place completion window. The completion list is a list-panel and the filter is a text-input-pane.


CAPI User Guide and Reference Manual (Unix version) - 25 Feb 2015

NextPrevUpTopContentsIndex