Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  XMTLOADRESOURCEFILE (3)


XmtLoadResourceFile(), XmtLoadResourceFileList() - find named resource files and read them into the resource database



   #include <Xmt/Include.h>

   Boolean XmtLoadResourceFile(Widget w, String filename, Boolean user, Boolean override)

   void XmtLoadResourceFileList(Widget w, String list)



w Any widget in the application.
filename The base name of the resource file to be included.
user Whether user directories should be searched for the named resource file, in addition to the regular directories.
override Whether the resources in the named file should override or augment those already in the resource database.
list For XmtLoadResourceFileList(), a whitespace separated list of files to read in, each filename enclosed in angle brackets or double quotes.


XmtLoadResourceFile() returns True if the named file was successfully loaded, and returns False otherwise.


XmtLoadResourceFile() looks for the named resource file in a number of places and merges it into the application resource database. filename specifies the file to read; if it is an absolute filename beginning with ‘‘/’’, or a relative name, beginning with ‘‘./’’ or ‘‘../’’, then the file is simply read. Otherwise, XmtLoadResourceFile() uses XmtFindFile() to look for the named resource file in several standard places. If the resourceFilePath application resource is specified, XmtLoadResourceFile() will look in the places it specifies. If that resource is not specified, or if the file is not found there, XmtLoadResourceFile() also looks in the places specified by the configPath application resource, and in the ‘‘standard Xt path’’ (which on many systems is relative to /usr/lib/X11.) See Chapter 6, Managing Auxiliary Files, for details on how the search for named files is performed.

If the user argument is True, then the function will also look for a user-specific version of the resource file. If it finds such a file, it reads it in so that resource specifications in the user’s file override any conflicting specifications in the application file. If user is True, XmtLoadResourceFile() searches for a user file in the places specified by the userConfigPath application resource, or as specified by the XUSERSEARCHPATH and XAPPLRESDIR environment variables. Again, see Chapter 6, for details.

If override argument is True, then the resources in the specified file will override resources with the same specifica tion in the database. If False, then these new resources will augment those already in the database, but will not override them when conflicts occur. Prior to X11R5, you must specify True for this argument, because in X11R4 it is not possible to augment resource files in this way.

XmtLoadResourceFile() remembers the full name of each resource file it reads, and will not read any file twice. Note that it does not check whether two different filenames refer to the same actual file (through a symbolic link, for example), nor does it check whether a file has been modified since the last time it was read.

XmtLoadResourceFileList() uses XmtLoadResourceFile() to read in a list of resource files. The files are specified in the same way that they are on the xmtRequires pseudo-resource that is read by XmtCreateChildren() and related functions. The list argument is a whitespace-separate list of filenames each of which is enclosed in angle brackets (‘<’ and ‘>’) or in quotation marks.

Each filename in this list is passed (with its angle brackets or quotes removed) as the filename argument in a call to XmtLoadResourceFile(). If it was enclosed in angle-brackets, the user argument will be False, and if it was enclosed in quotation marks the user will be True.

The list of filenames may also be interspersed with two special directives: ‘‘#override’’ and ‘‘#augment’’. By default, XmtLoadResourceFileList() calls XmtLoadResourceFile() with override set to True. If the #augment directive is encountered in the file list, then any subsequent files will be loaded with override False, until an #override directive is found.


Chapter 6, Managing Auxiliary Files,
Chapter 11, Automatic Widget Creation,
XmtCreateChildren(), XmtFindFile().
Search for    or go to Top of page |  Section 3 |  Main Index


Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.