Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ appres(1) — DeltaWindows 1.3.3 Release 4 Version 4.3

Media Vault

Software Library

Restoration Projects

Artifacts Sought

 

NAME

appres − list application resource database. 

SYNTAX

appres [[class_name][instance_name]] [options]

DESCRIPTION

The appres client prints the resources seen by an application (or a subhierarchy of an application) with the specified class_name and instance_name.  It is used to help determine which resources a particular program would load from the various sources of resource specifications. 

Note that appres doesn’t really know anything about classes and instances as they may be defined by the client itself.  As a result, it takes no account of conflicts between different resource settings, or their correctness.  It simply loads the resource database into a temporary file and does a string comparison on the strings: [∗.] class_name[∗.] instance_name[∗.] (where [∗.] means either ∗ or .) and then prints out the lines that match. Basically, appres searches for occurrences of any class and/or instance name supplied to it.  In addition, appres searches for resources not assigned to a particular client--i.e., resources beginning with an asterisk or a dot.  (These resources may or may not apply to the client whose class and instance names you supply.) 

For example: % appres XTerm would list the resources that include the classname XTerm, as well as any resources beginning with an asterisk or dot. 

To also match a particular instance name, you can enter both a class and an instance name, as in the following: % appres XTerm myxterm In this case, appres would list the resources that include any of the following terms: the classname XTerm; the instance name myxterm; or an initial asterisk or dot. 

As of Release 5, appres recognizes the X Toolkit option -name.  Thus, the alternative syntax: % appres XTerm -name myxterm is also acceptable and will produce the same output as the preceding example. 

If no application class is specified, the class -AppResTest- (which has no defaults) is used.  (Prior to Release 5, this dummy class name was -NoSuchClass-.) 

Keep in mind the limitations of supplying only one argument (either a class name or an instance name).  For example, if resources are specified in the database for the instance name xterm, typing appres XTerm will not list them; and if they are specified for class name XTerm, typing appres xterm will not list them.  To be safe, you should specify both the class name and the instance name. 

As of Release 5, appres also accepts hierarchical class and instance names as input.  Hypothetically, this allows you to list the resources that match a particular sublevel of an application’s widget hierarchy.  (This could be very useful with a complex application.) 

To list the resources that may apply to part of the widget hierarchy, you provide appres with both a hierarchical class and an instance name.  The number of class and instance components must be equal.  (Note that the instance name should not be specified with the toolkit -name option.)  For example, the command: % appres Xman.TopLevelShell.Form xman.topBox.form will list the resources that may apply to widgets within xman’s topBox hierarchy. 

Note that in attempting to match hierarchical class and instance names, appres suffers from the same limitations it does when attempting to match single class and/or instance names.  The appres client simply compares text strings; it does not distinguish valid from invalid resources.  If you supply multiple components, appres returns any resource that includes any one of the components; or any resource not assigned to a particular client (i.e., any resource beginning with an asterisk or a dot.) 

You can limit the matching to resources that apply to a specific widget in the hierarchy by using the -1 option.  For example, the command: % appres XTerm.VT100 xterm.vt100 -1 will list the resources that may match the xterm vt100 widget. 

In practice, use of the -1 option limits the matching to resource names having the same number of components, or fewer, as the names the user specifies.  In the preceding example, the matching is limited to resources of two components or fewer.  (This practice has nothing to do with the digit 1 in the -1 option; this number is a literal, not a variable.)  Note, however, that limiting the resources that can be matched does not eliminate the problem of appres returning inapplicable resources. 

For more information on the use of appres, see Chapter 11, Setting Resources. 

OPTIONS

Note that options should follow the class_name (and instance_name if any).  appres accepts the following application-specific option:

-1Lists only the resources matching a specific level in the widget hierarchy (the level given on the command line).  (Available as of Release 5.) 

As of Release 5, appres also recognizes all of the standard X Toolkit options (i.e., the program will run); however, since appres is not a window-based application, it uses only the following options:

−name app_name
Specifies the instance name under which resources for the application should be found.  (Available as of Release 5.)

-xrm resource
Specifies that, in addition to the current application resources, appres should return the resource specified as an argument to -xrm, if that resource would apply to the class_name or instance_name.  You must specify both a class_name and an instance_name in order to use the -xrm option.  (Note that -xrm does not actually load any resources.) 

Without any arguments, appres returns those resources that might apply to any application (for example, those beginning with an asterisk in your .Xresources file). 

SEE ALSO

X, xrdb, editres, listres; Chapter 11, Setting Resources. 

AUTHOR

Jim Fulton, MIT X Consortium. 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026