Path: utzoo!attcan!uunet!husc6!bloom-beacon!WSL.DEC.COM!haynes From: haynes@WSL.DEC.COM Newsgroups: comp.windows.x Subject: Re: Resource Database - Help! Message-ID: <8805131813.AA12949@gilroy.dec.com> Date: 13 May 88 18:12:59 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 69 > 1. Who owns a resource database? A client? A window? A client. > 2. There are specific references to a resource database loaded into the > server, or stored as a property on the root window. Which is true? They are stored as a property on the root window of the default screen. They are NOT loaded into the server when the server starts, they are changed everytime someone else "logs in". > To quote the Xlib manual: > > Your personal resource database usually is stored in a file > and is loaded onto a server property when you log in. This > database is retrieved automatically by Xlib when a connection > is opened. (10.11) > > Also: > > When an application looks up a resource (for example, a color), > it passes the complete name and complete class of the resource to > a lookup routine. After lookup, the resource manager returns the > resource value and representation type. (10.11) > > And: > > Defaults are usually loaded into the RESOURCE_MANAGER property > on the root window at login. (10.2) > > These quotes make references to _the_database_. Which data base is this? > Is this a property on the root window? Yes. > 3. What does the first quote above mean by "when you log in"? Does that > mean when you fire up the X server? Or does it mean when you open > a display? It means "when you log in". In the model where there is one user per workstation, when that user is authenticated, the program doing the authenticating loads the property onto the server. > 4. Can a client have more than one resource database attached to it? I don't understand this question. There is a database associated with each connection (in the display structure), the Xlib resource database routines take a database parameter. You are free to pass in whatever database you want. > 5. Is the resouce database and the resource manager referred to in the > Xlib manual the same as that used by the toolkit? Yes. The toolkit currently has a single global database for the application that it builds according to the rules specified in the spec. > 6. In section 10.11.2 of the Xlib manual, it says that a resource > database is an opaque type. What does this mean? That means you aren't allowed to look inside it. You treat it as a unique identifier with no additional semantics. > 7. Section 4 of the Inter-client Communication Conventions Manual > discusses resources that are allocated to clients. Are these the > same types of resouces as are discussed in the Xlib manual, chapter 10? I don't know, but I doubt it. "Resource" is a heavily overloaded term. -- Charles