[comp.windows.x] Getting the server defaults

austin@lily.ucdavis.edu (Darren Austin) (07/27/89)

Hello XGurus!

	In the book "Xlib Programming Manual" by Adrian Nye
(O'Reilly & Associates, Inc.) on page 345, it is shown how to get
the defaults set by the user (using xrdb) from the server.
Apparently these defaults are a string stored in the
display->xdefaults field.  The book mentions that referencing
this value directly is not a good idea as the name of the field
may change in later releases.  However, it goes on to mention
that there is no macro under X11 release 2 that does this for
you.  Has this been remedied in release 3?  If not, will it been
taken care of in release 4?

Thanks,
--Darren


	
--
--------------------------------------+-------------------------------
Darren Austin                         | Is is a mistake to think you 
UC Davis Division of Computer Science | can solve any major problem
austin@iris.ucdavis.edu	              | just with potatoes.
--------------------------------------+-------------------------------

klee@gilroy.pa.dec.com (Ken Lee) (07/27/89)

In article <AUSTIN.89Jul26145511@lily.ucdavis.edu>, austin@lily.ucdavis.edu (Darren Austin) writes:
> 	In the book "Xlib Programming Manual" by Adrian Nye
> (O'Reilly & Associates, Inc.) on page 345, it is shown how to get
> the defaults set by the user (using xrdb) from the server.
> Apparently these defaults are a string stored in the
> display->xdefaults field.  The book mentions that referencing
> this value directly is not a good idea as the name of the field
> may change in later releases.  However, it goes on to mention
> that there is no macro under X11 release 2 that does this for
> you. 

The X11R3 function XResourceManagerString(display) returns the resource list
set for a particular display.  For most applications, the XGetDefault() function is a simpler interface to the resources.

Ken Lee
DEC Western Software Laboratory, Palo Alto, Calif.
Internet: klee@decwrl.dec.com
uucp: uunet!decwrl!klee