Resource Files

This forum is read only. No new submissions are accepted.

Questions about motif? Contact us

2 posts / 0 new
Last post
Resource Files

Submitted by Anonymous on Mon, 02/19/2001 - 20:53. Developers
Can anybody provide me links to info about use of resource files? Do I need to make a parser to read the resource file or is there a way that the values are loaded automatically? I guess it`s the former but I don`t want to spend too much time developing a parser if there`s a better way to do it. Thanks a lot.

ICS_support

Xlib and Xt do a lot of the work for you, using the Xrm portion of Xlib (pretty much a separate library, but bundled with Xlib). In fact, if you use Xt, essentially all of the work is done for you. You need to provide a file -- or not, as the user can set one up. When Xt starts up, it builds a database out of the file(s) pointed to by various environment variables, command-line options, and such; then the database is consulted for information on fonts, colors, the language to be used, and so on.

There`s a piece in the comp.windows.x FAQ on where this database is pieced together from and on how you can use it. See www.faqs.org to trace downward to it. Alternatively, use the copy at ftp//ftp.x.org/contrib/faqs/FAQ , which is pointed to by the list of FAQS at http//www.motifzone.com/resources/other.html . You want questions 38 and 39.

And in the older X distributions, there is a nice file called "resources.txt". I think you`ll find a pointer to it from the resources pages at
http//www.motifzone.com/resources/xresources.html . If not, there are other articles there.