Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtLoadResourceFile(3)	   Library Functions Manual	XmtLoadResourceFile(3)

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

SYNOPSIS
       #include	<Xmt/Include.h>

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

       void XmtLoadResourceFileList(Widget w, String list)

ARGUMENTS
       INPUTS

	    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	brack-
		   ets or double quotes.

       RETURNS

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

DESCRIPTION
       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 XmtFind-
       File()  to look for the named resource file in several standard places.
       If the resourceFilePath application  resource  is  specified,  XmtLoad-
       ResourceFile()  will look in the	places it specifies.  If that resource
       is not specified, or if the file	is not found  there,  XmtLoadResource-
       File() 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	XmtCreateChil-
       dren()  and related functions.  The list	argument is a whitespace-sepa-
       rate 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	direc-
       tives:  ``#override''  and  ``#augment''.  By default, XmtLoadResource-
       FileList() calls	XmtLoadResourceFile() with override set	 to  True.  If
       the #augment directive is encountered in	the file list, then any	subse-
       quent files will	be loaded with	override  False,  until	 an  #override
       directive is found.

SEE ALSO
       Chapter 6, Managing Auxiliary Files,
       Chapter 11, Automatic Widget Creation,
       XmtCreateChildren(), XmtFindFile().

Xmt				  Motif	Tools		XmtLoadResourceFile(3)

NAME | SYNOPSIS | ARGUMENTS | DESCRIPTION | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=XmtLoadResourceFile&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help