Content deleted Content added
m →Graphic contexts and fonts: Task 16: replaced (1×) / removed (0×) deprecated |dead-url= and |deadurl= with |url-status=; |
Filled in 3 bare reference(s) with reFill 2 |
||
Line 54:
Most requests for graphic operations include a ''graphic context'', which is a structure that contains the parameters of the graphic operations. A graphic context includes the foreground color, the background color, the font of text, and other graphic parameters. When requesting a graphic operation, the client includes a graphic context. Not all parameters of the graphic context affect the operation: for example, the font does not affect drawing a line.
The core protocol specifies the use of server-side fonts.<ref name="font-faq">
[[Image:Xfontsel.png|thumb|450px|The <code>xfontsel</code> program allows the user to view the glyphs of a font.]]
Line 81:
Identifiers are unique to the server, not only to the client; for example, no two windows have the same identifier, even if created by two different clients. A client can access any object given its identifier. In particular, it can also access resources created by any other client, even if their identifiers are outside the set of identifiers it can create.
As a result, two clients connected to the same server can use the same identifier to refer to the same resource. For example, if a client creates a window of identifier <code>0x1e00021</code> and passes this number <code>0x1e00021</code> to another application (via any available means, for example by storing this number in a file that is also accessible to the other application), this other application is able to operate on the very same window. This possibility is for example exploited by the X Window version of [[Ghostview]]: this program creates a subwindow, storing its identifier in an [[environment variable]], and calls [[Ghostscript]]; this program draws the content of the [[PostScript]] file to show in this window.<ref name="ghos-inte">
Resources are normally destroyed when the client that created them closes the connection with the server. However, before closing connection, a client can request the server not to destroy them.
Line 183:
Properties are mostly used for inter-client communication. For example, the property named <code>WM_NAME</code> (the property named by the atom whose associated string is <code>"WM_NAME"</code>) is used for storing the name of windows. [[Window manager]]s typically read this property to display the name of windows in their title bar.
Some types of inter-client communication use properties of the root window. For example, according to the [[freedesktop]] window manager specification,<ref name="free-desk">
The <code>xprop</code> program prints the properties of a given window; <code>xprop -root</code> prints the name, type, and value of each property of the root window.
|