This file is indexed.

/usr/share/doc/x11proto-xext-dev/appgrp.html is in x11proto-xext-dev 7.2.0-3.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>Application Group Extension to the X Protocol</title><link rel="stylesheet" href="/usr/share/sgml/X11/xorg.css" type="text/css" /><meta name="generator" content="DocBook XSL Stylesheets V1.75.2" /><meta name="description" content="The Application Group Extension to the X protocol is intended to provide a framework to allow more than one program to manage X applications on the desktop. The initial use of this extension will be to insert or embed the windows of X programs into the windows of another program, such as a web browser. This extension is not intended to address larger embedding issues that, for example, OpenDoc does, such as shared menu bars, etc." /></head><body><div class="article" title="Application Group Extension to the X Protocol"><div class="titlepage"><div><div><h2 class="title"><a id="appgrp"></a>Application Group Extension to the X Protocol</h2></div><div><h3 class="subtitle"><i>X Consortium Standard</i></h3></div><div><div class="authorgroup"><div class="author"><h3 class="author"><span class="firstname">Kaleb</span> <span class="othername">S.</span> <span class="surname">KEITHLEY</span></h3><div class="affiliation"><span class="orgname">X Consortium, Inc<br /></span></div><code class="email">&lt;<a class="email" href="mailto:kaleb@x.org">kaleb@x.org</a>&gt;</code></div></div></div><div><p class="releaseinfo">X Version 11, Release 6.4</p></div><div><div class="legalnotice" title="Legal Notice"><a id="idp3361280"></a><p>
Copyright © 1996 X Consortium, Inc. All Rights Reserved.
</p><p>
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM,
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OF OR OTHER DEALINGS IN THE SOFTWARE.
</p><p>
Except as contained in this notice, the name of the X Consortium shall not be used in advertising
or otherwise to promote the sale, use or other dealings in this Software without prior written
authorization from the X Consortium.
</p></div></div><div><div class="abstract" title="Abstract"><p>
The Application Group Extension to the X protocol is intended to provide a framework to allow
more than one program to manage X applications on the desktop. The initial use of this extension
will be to insert or embed the windows of X programs into the windows of another program, such
as a web browser. This extension is not intended to address larger embedding issues that, for
example, OpenDoc does, such as shared menu bars, etc.
</p></div></div></div><hr /></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><span class="sect1"><a href="#purpose_and_goals">Purpose and Goals</a></span></dt><dt><span class="sect1"><a href="#overview_of_the_protocol">Overview of the protocol.</a></span></dt><dt><span class="sect1"><a href="#requests">Requests</a></span></dt><dt><span class="sect1"><a href="#changes_to_existing_requests">Changes to Existing Requests</a></span></dt><dd><dl><dt><span class="sect2"><a href="#mapwindow">MapWindow</a></span></dt><dt><span class="sect2"><a href="#configurewindow">ConfigureWindow</a></span></dt><dt><span class="sect2"><a href="#createwindow">CreateWindow</a></span></dt><dt><span class="sect2"><a href="#changewindowattributes">ChangeWindowAttributes</a></span></dt></dl></dd><dt><span class="sect1"><a href="#changes_to_existing_events">Changes to Existing Events</a></span></dt><dd><dl><dt><span class="sect2"><a href="#maprequest">MapRequest</a></span></dt><dt><span class="sect2"><a href="#configurerequest">ConfigureRequest</a></span></dt></dl></dd><dt><span class="sect1"><a href="#errors">Errors</a></span></dt><dd><dl><dt><span class="sect2"><a href="#appgroupqueryversion">AppGroupQueryVersion</a></span></dt><dt><span class="sect2"><a href="#appgroupcreate">AppGroupCreate</a></span></dt><dt><span class="sect2"><a href="#appgroupdestroy">AppGroupDestroy</a></span></dt><dt><span class="sect2"><a href="#appgroupgetattr">AppGroupGetAttr</a></span></dt><dt><span class="sect2"><a href="#appgroupquery">AppGroupQuery</a></span></dt><dt><span class="sect2"><a href="#appgroupcreateassociation">AppGroupCreateAssociation</a></span></dt><dt><span class="sect2"><a href="#appgroupdestroyassociation">AppGroupDestroyAssociation</a></span></dt></dl></dd><dt><span class="sect1"><a href="#encoding">Encoding</a></span></dt><dt><span class="sect1"><a href="#library_api">Library API</a></span></dt><dt><span class="appendix"><a href="#system_window_encodings">A. System Window Encodings</a></span></dt></dl></div><div class="sect1" title="Purpose and Goals"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="purpose_and_goals"></a>Purpose and Goals</h2></div></div></div><p>
The Application Group Extension to the X protocol is intended to provide
a framework to allow more than one program to manage X applications on
the desktop. The initial use of this extension will be to insert or embed
the windows of X programs into the windows of another program, such as a
web browser. This extension is not intended to address larger embedding
issues that, for example, OpenDoc does, such as shared menu bars, etc.
Using X programs on the World Wide Web allows for greater control of the
presentation and takes advantage of the existing body of X programs rather
than re-implement them in another language. In addition it allows the
embedding of non-X programs into web browsers by using third party products
like Wabi, MAE, and WinCenter.
<sup>[<a id="idp3361880" href="#ftn.idp3361880" class="footnote">1</a>]</sup>
</p></div><div class="sect1" title="Overview of the protocol."><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="overview_of_the_protocol"></a>Overview of the protocol.</h2></div></div></div><p>
This extension introduces the concept of an Application Group. An Application Group is a set of one or more applications that are primarily managed by a special application known as the Application Group Leader, which, for example, might be a web browser. The primary purpose of Application Groups is to provide a means of sharing the Substructure-Redirect attribute of the root window between the window manager and one or more Application Group Leaders.
</p><p>
To join an Application Group an application must present the proper authorization during the connection setup. Authorizations are generated by the X server at the request of an Application Group Leader, and are then stored for the application to use to establish its connection to the X server. To generate an authorization the Application Group Leader sends a request to the server naming the Application Group to which the authorization will be bound, and any applications that connect using that authorization  will automatically become part of the associated Application Group. The protocol to generate an authorization is defined in the Security Extension specification.
</p><p>
As a member of an Application Group, when an application creates and maps a window as a child of the root window, the MapRequest and ConfigureRequest events are delivered to the Application Group Leader instead of the window manager. The Application Group Leader may then reparent the window into its own window hierarchy; or reissue the map request, in which case the window comes under the control of the window manager.
</p></div><div class="sect1" title="Requests"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="requests"></a>Requests</h2></div></div></div><p><span class="bold"><strong>AppGroupQueryVersion</strong></span></p><div class="informaltable"><table border="1"><colgroup><col /></colgroup><tbody><tr><td>client_major_version: CARD16</td></tr><tr><td>client_minor_version: CARD16</td></tr><tr><td>=&gt;</td></tr><tr><td>server_major_version: CARD16</td></tr><tr><td>server_minor_version: CARD16</td></tr></tbody></table></div><p>
If supplied, the client_major_version and client_minor_version indicate what version of the protocol the application wants the server to implement. The server version numbers returned indicate the version of the protocol the X server actually supports. This may not match the versions requested by the application. An implementation may (but need not) support more than one version simultaneously. The server_major_version and server_minor_version numbers are a mechanism to support any future revisions of the Application Group extension protocol which may be necessary. In general, the major version would increment for incompatible changes, and the minor version would increment for small, upward-compatible changes. X servers that support the protocol defined in this document will return a server_major_version of 1 and a server_minor_version of 0.
</p><p><span class="bold"><strong>AppGroupCreate</strong></span></p><div class="informaltable"><table border="1"><colgroup><col /></colgroup><tbody><tr><td>app_group: APPGROUP</td></tr><tr><td>value_mask: BITMASK</td></tr><tr><td>value_list: LISTofVALUE</td></tr></tbody></table></div><p>
This request creates an Application Group using app_group as the Application Group ID.
</p><p>
 
</p><p>
The value_mask and value_list specify attributes of the Application Group that are to be explicitly initialized. The attributes, their types, and the default values are:
</p><div class="informaltable"><table border="1"><colgroup><col /><col /><col /></colgroup><tbody><tr><td>Attribute</td><td>Type</td><td>Default</td></tr><tr><td>app_group_leader</td><td>Bool</td><td>True</td></tr><tr><td>single_screen</td><td>Bool</td><td>True</td></tr><tr><td>default_root</td><td>Window</td><td>None</td></tr><tr><td>root_visual</td><td>VisualID</td><td>None</td></tr><tr><td>default_colormap</td><td>Colormap</td><td>None</td></tr><tr><td>black_pixel</td><td>Pixel</td><td>0</td></tr><tr><td>white_pixel</td><td>Pixel</td><td>0</td></tr></tbody></table></div><p>
If the single_screen attribute is True then the number of video screens returned to a program in the Application Group in the connection setup message is one, irrespective of how many video screens the server actually has. If a server supports both video and print screens, then all print screens will always be returned. If single_screen is specified as True then the connection setup message will contain only the information about the video screen which has default_root as its root window, plus any print screens.
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
The intent is to allow an embedding manager to ensure that it will be able to reparent any top-level windows that Application Group members create. By hiding the fact that there are other screens it can be reasonably assured that applications will only create top-level windows on the same screen that it itself appears on. An embedding manager should take care not to supply an invalid display, e.g. :0.1, to a program that will be in an Application Group where the single_screen attribute is True.
</p></div><p>
If single_screen is set to True default_root specifies which screen will be returned as screen zero in the connection setup message for applications in the Application Group. If set to None, then the real screen zero is used, otherwise the screen which has default_root as its root window will be used.
</p><p>
If single_screen is set to True the  root_visual and default_colormap attributes may be used to over-ride the default values that are returned in the connection setup information returned to new programs in the Application Group. If None is specified for root_visual or default_colormap then the normal default values for the screen (possibly spedified by default_root) are used, otherwise the specified values are used. If root_visual and/or default_colormap are specified they must be valid, i.e. root_visual must be a visual type available on the screen, and the colormap, if specified, must be a valid colormap for the visual that is used.
</p><p>
IF single_screen is set to True and default_colormap is not specified as None, the black_pixel and white_pixel attributes must be specified, and they will over-ride the default values that are returned in the connection setup returned to new programs in the Application Group. If default_colormap is specified as None and black_pixel and/or white_pixel are specified, they will be ignored.
</p><p>
The app_group_leader attribute is used to identify the Application Group Leader program for the app_group. By specifying True the server will identify the program making the request as the Application Group Leader for the application group. The Application Group Leader receives MapRequest and ConfigureRequest events from the server when an attempt is made to map or configure top-level windows of a program in an Application Group, instead of being sent to a window manager that has selected SubstructureRedirect events on the root window. The parent window field in these events will contain the Application Group ID.
</p><p><span class="bold"><strong>AppGroupDestroy</strong></span></p><p>app_group: APPGROUP</p><p>
This request destroys the app_group. If the app_group_leader attribute for the app_group is True, then any applications in the Application Group that are still connected will be killed as if a KillClient request had been received for that application.
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
If the application that created a non-embedded Application Group exits, and therefore any Authorizations to be cancelled, and any applications  that attempt to open new connections to the X server using one of those Authorizations will be unable to do so.
</p></div><p><span class="bold"><strong>AppGroupGetAttr</strong></span></p><div class="informaltable"><table border="1"><colgroup><col /></colgroup><tbody><tr><td>&gt;app_group: APPGROUP</td></tr><tr><td>=&gt;</td></tr><tr><td>LISTofVALUE</td></tr></tbody></table></div><p>
This request returns the application group attributes for app_group.
</p><p><span class="bold"><strong>AppGroupQuery</strong></span></p><div class="informaltable"><table border="1"><colgroup><col /></colgroup><tbody><tr><td>resource: XID</td></tr><tr><td>=&gt;</td></tr><tr><td>app_group: APPGROUP</td></tr></tbody></table></div><p>
This request returns the Application Group ID of the application that created resource or None if that application is not associated with any Application Group. The resource value may be the resource base of the application.
</p><p><span class="bold"><strong>AppGroupCreateAssociation</strong></span></p><div class="informaltable"><table border="1"><colgroup><col /></colgroup><tbody><tr><td>window: WINDOW</td></tr><tr><td>window_type: CARD32</td></tr><tr><td>system_window: LISTofCARD8</td></tr></tbody></table></div><p>
This request associates window with system_window. The window_type indicates the native window system of the application making the request. For non-X window_types both the embedding manager and the server must be executing on the same host. When system_window is Microsoft Windows or OS/2 Presentation Manager, the system_window is an HWND; when the native window system is Macintosh, the system_window is a WindowPtr and a Rect. The window may be used for any X request that takes a Window.
</p><p><span class="bold"><strong>AppGroupDestroyAssociation</strong></span></p><div class="informaltable"><table border="1"><colgroup><col /></colgroup><tbody><tr><td>window: WINDOW</td></tr></tbody></table></div><p>
This request destroys the association created with AppGroupCreateAssociation. The window is destroyed. The system_window that was specified in the AppGroupCreateAssociation request is not affected.
</p></div><div class="sect1" title="Changes to Existing Requests"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="changes_to_existing_requests"></a>Changes to Existing Requests</h2></div></div></div><div class="sect2" title="MapWindow"><div class="titlepage"><div><div><h3 class="title"><a id="mapwindow"></a>MapWindow</h3></div></div></div><p>
If the override-redirect attribute of the window is False and if the window is a child of a root window and if the window belongs to an application that is in an application group and if some other application is the application group leader for that group, then a MapRequest event is generated and the window remains unmapped. Otherwise, the core protocol semantics apply.
</p></div><div class="sect2" title="ConfigureWindow"><div class="titlepage"><div><div><h3 class="title"><a id="configurewindow"></a>ConfigureWindow</h3></div></div></div><p>
If the override-redirect attribute of the window is False and if the window is a child of a root window and if the window belongs to an application that is in an application group and if some other application is the application group leader for that group, then a ConfigureRequest event is generated and the window remains unchanged. Otherwise, the core protocol semantics apply.
</p></div><div class="sect2" title="CreateWindow"><div class="titlepage"><div><div><h3 class="title"><a id="createwindow"></a>CreateWindow</h3></div></div></div><p>
When a program in an Application Group creates a window that is a child of a root window and specifies CopyFromParent for the Visual, if the single_screen attribute is True and the root_visual attribute is set to something other than None, then the window will be created using the Application Group’s root_visual, otherwise core protocol semantics apply.
</p><p>
When a program in an Application Group creates a window that is a child of a root window and specifies CopyFromParent for the Colormap, if the single_screen attribute is True, the default_colormap attribute is set to something other than None, and the window’s Visual is the same as the Application Group’s root_visual attribute, then the window will be created using the Application Group’s default_colormap, otherwise core protocol semantics apply.
</p></div><div class="sect2" title="ChangeWindowAttributes"><div class="titlepage"><div><div><h3 class="title"><a id="changewindowattributes"></a>ChangeWindowAttributes</h3></div></div></div><p>
When a program in an Application Group changes the attributes of a window that is a child of a root window and specifies CopyFromParent for the Colormap, if the single_screen attribute is True, the default_colormap attribute is set to something other than None, and the window’s Visual is the same as the Application Group’s root_visual attribute, then the window will be created using the Application Group’s default_colormap, otherwise core protocol semantics apply.
</p></div></div><div class="sect1" title="Changes to Existing Events"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="changes_to_existing_events"></a>Changes to Existing Events</h2></div></div></div><p>
When the top-level window of an application that is a member of an Application Group  is the target of a MapWindow or ConfigureWindow request, if there is an Application Group Leader then MapRequest and ConfigureRequest events are automatically delivered to it, otherwise the core protocol semantics apply, i.e. they are delivered to the client, if any, that has SubstructureRedirect set in its root-window event mask, e.g. the window manager.
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
The Application Group Leader must not select SubstructuRedirect events on a root window as doing so would result in a core protocol error; only one client is permitted to do so, and that is usually the window manager.
</p></div><div class="sect2" title="MapRequest"><div class="titlepage"><div><div><h3 class="title"><a id="maprequest"></a>MapRequest</h3></div></div></div><p>
When a MapWindow request is received for a window whose override-redirect attribut is set to False and whose parent is the root window and the window belongs to an application that is in an application group and there is an application group leader for the group, then this event is delivered to the Application Group Leader with the parent field in the event set to the AppGroup ID. Otherwise the core protocol semantics apply.
</p></div><div class="sect2" title="ConfigureRequest"><div class="titlepage"><div><div><h3 class="title"><a id="configurerequest"></a>ConfigureRequest</h3></div></div></div><p>
When a ConfigureWindow request is received for a window whose override-redirect attribut is set to False and whose parent is the root window and the window belongs to an application that is in an application group and there is an application group leader for the group, then this event is delivered to the Application Group Leader with the parent field in the event set to the AppGroup ID. Otherwise the core protocol semantics apply.
</p></div></div><div class="sect1" title="Errors"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="errors"></a>Errors</h2></div></div></div><div class="sect2" title="AppGroupQueryVersion"><div class="titlepage"><div><div><h3 class="title"><a id="appgroupqueryversion"></a>AppGroupQueryVersion</h3></div></div></div><p>
There are no errors for AppGroupQueryVersion.
</p></div><div class="sect2" title="AppGroupCreate"><div class="titlepage"><div><div><h3 class="title"><a id="appgroupcreate"></a>AppGroupCreate</h3></div></div></div><p>
A Window error is returned if default_root is specified and is not a valid root window..
</p><p>
A Color error is returned default_colormap is specified but default_colormap is not a valid colormap for the screen of default_root.
</p><p>
A Match error is returned if root_visual and default_colormap are both specified, but
</p><p>
default_colormap’s visual is not root_visual.
</p><p>
A Match error is returned if root_visual does not exist for the screen of the default_root.
</p></div><div class="sect2" title="AppGroupDestroy"><div class="titlepage"><div><div><h3 class="title"><a id="appgroupdestroy"></a>AppGroupDestroy</h3></div></div></div><p>
An AppGroup error is returned if app_group is not a valid Application Group.
</p><p>
An Access error is returned if an untrusted application attempts to destroy an Application Group created by a trusted application.
</p></div><div class="sect2" title="AppGroupGetAttr"><div class="titlepage"><div><div><h3 class="title"><a id="appgroupgetattr"></a>AppGroupGetAttr</h3></div></div></div><p>
An AppGroup error is returned if app_group is not a valid Application Group.
</p><p>
An Access error is returned if an untrusted application attempts to get the attributes of an Application Group created by a trusted application.
</p></div><div class="sect2" title="AppGroupQuery"><div class="titlepage"><div><div><h3 class="title"><a id="appgroupquery"></a>AppGroupQuery</h3></div></div></div><p>
An Access error is returned if an untrusted application attempts to query the Application Group of a trusted application.
</p></div><div class="sect2" title="AppGroupCreateAssociation"><div class="titlepage"><div><div><h3 class="title"><a id="appgroupcreateassociation"></a>AppGroupCreateAssociation</h3></div></div></div><p>
A Match error is returned if the X server does not support the window_type.
</p><p>
An Access error may be returned if the X server only supports the window_type on the local host and the program making the request is on a non-local host.
</p><p>
A Window error may be returned for system-specific errors related to system_window, e.g. system_window does not represent a valid native window.
</p></div><div class="sect2" title="AppGroupDestroyAssociation"><div class="titlepage"><div><div><h3 class="title"><a id="appgroupdestroyassociation"></a>AppGroupDestroyAssociation</h3></div></div></div><p>
A Window error is returned if window was not specified in a previous AppGroupCreateAssociation request.
</p></div></div><div class="sect1" title="Encoding"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="encoding"></a>Encoding</h2></div></div></div><p>
Please refer to the X11 Protocol encoding document as this document uses conventions established there.
</p><p>
The name of this extension is XC-APPGROUP
</p><pre class="literallayout">
<span class="bold"><strong>AppGroupQueryVersion</strong></span>
      1      CARD8        opcode
      1      0            XC-APPGROUP opcode
      2      3            length
      2      CARD16       client_major_version
      2      CARD16       client_minor_version
=&gt;
      1      1            Reply
      1                   unused
      2      CARD16       sequence_number
      4      0            length
      2      CARD16       server_major_version
      2      CARD16       server_minor_version
      20                  unused
</pre><pre class="literallayout">
<span class="bold"><strong>AppGroupCreate</strong></span>
      1      CARD8            opcode
      1      1                XC-APPGROUP opcode
      2      8+n              length
      4      XID              app_group
      4      BITMASK          attrib_mask
             #x00000001   app_group_leader
             #x00000002   single_screen
             #0x0000004   default_root
             #x00000008   root_visual
             #x00000010   default_colormap
             #x00000020   black_pixel
             #x00000040   white_pixel
      n      LISTofVALUE      value-list
VALUEs
      4      BOOL             app_group_leader
      4      BOOL             single_screen
      4      WINDOW           default_root
      4      VISUALID         root_visual
      4      COLORMAP         default_colormap
      4      CARD32           black_pixel
      4      CARD32           white_pixel
</pre><pre class="literallayout">
<span class="bold"><strong>AppGroupDestroy</strong></span>
      1      CARD8            opcode
      1      2                XC-APPGROUP opcode
      2      2                length
      4      XID              app_group
</pre><pre class="literallayout">
<span class="bold"><strong>AAppGroupGetAttr</strong></span>
      1      CARD8            opcode
      1      4                XC-APPGROUP opcode
      2      2                length
      4      XID              app_group
=&gt;
      1      1                Reply
      1                       unused
      2      CARD16           sequence_number
      4      0                length
      4      WINDOW           default_root
      4      VISUALID         root_visual
      4      COLORMAP         default_colormap
      4      CARD32           black_pixel
      4      CARD32           whte_pixel
      1      BOOL             single_screen
      1      BOOL             app_group_leader
      2                       unused
</pre><pre class="literallayout">
<span class="bold"><strong>AppGroupQuery</strong></span>
      1      CARD8            opcode
      1      5                XC-APPGROUP opcode
      2      2                length
      4      XID              resource
=&gt;
      1      1                Reply
      1                       unused
      2      CARD16           sequence_number
      4      0                length
      4      XID              app_group
      20                      unused
</pre><pre class="literallayout">
<span class="bold"><strong>AppGroupCreateAssoc</strong></span>
      1      CARD8            opcode
      1      6                XC-APPGROUP opcode
      2      n                length
      4      WINDOW           window
      2      CARD16           window_type
             #0      X11
             #1      Macintosh
             #2      Win32, OS/2 PM 2.x
             #3      Win16, OS/2 PM 1.x
      2      n                system_window_len
      n      LISTofCARD8      system_window
</pre><pre class="literallayout">
<span class="bold"><strong>AppGroupDestroyAssoc</strong></span>
      1      CARD8            opcode
      1      7                XC-APPGROUP opcode
      2      2                length
      4      WINDOW           window
</pre></div><div class="sect1" title="Library API"><div class="titlepage"><div><div><h2 class="title" style="clear: both"><a id="library_api"></a>Library API</h2></div></div></div><div class="informaltable"><table border="0"><colgroup><col /></colgroup><tbody><tr><td class="functiondecl">
Status <span class="emphasis"><em>XagQueryVersion</em></span> (<span class="emphasis"><em> xkb, keycode</em></span>)                              /* macro */
    </td></tr><tr><td class="functionargdecl">
Display            <span class="emphasis"><em>dpy</em></span>;
    </td></tr><tr><td class="functionargdecl">
int *            <span class="emphasis"><em>major_version_return</em></span>;
    </td></tr><tr><td class="functionargdecl">
int *            <span class="emphasis"><em>minor_version_return</em></span>;
    </td></tr></tbody></table></div><p>
XagQueryVersion sets major_version_return and minor_version_return to the major and minor Application Group protocol version supported by the server. If the Xag library is compatible with the version returned by the server it returns non-zero. If dpy does not support the Application Group extension, or if the server and library protocol versions are incompatible, or if there was an error during communication with the server, it returns zero. No other Xag functions may be called before this function. If a program violates this rule, the effects of all subsequent Xag calls that it makes are undefined.
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
An embedding manager in, e.g. a Personal Computer Web Browser, will need to open a connection to the Personal Computer X server by calling XOpenDisplay() before using the Application Group extension.
</p></div><p>
An embedding manager such as a web browser that intends to embed programs in an Application Group should create the Application Group with XagCreateEmbeddedApplicationGroup.
</p><div class="informaltable"><table border="0"><colgroup><col /></colgroup><tbody><tr><td class="functiondecl">
Status XagCreateEmbeddedApplicationGroup(
    </td></tr><tr><td class="functionargdecl">
      Display*      dpy,
    </td></tr><tr><td class="functionargdecl">
      VisualID      root_visual,
    </td></tr><tr><td class="functionargdecl">
      Colormap      default_colormap,
    </td></tr><tr><td class="functionargdecl">
      unsigned long      black_pixel,
    </td></tr><tr><td class="functionargdecl">
      unsigned long      white_pixel,
    </td></tr><tr><td class="functionargdecl">
      XAppGroup*      app_group_return);
    </td></tr></tbody></table></div><p>
XagCreateEmbeddedApplicationGroup creates an Application Group for an embedding manager with the attributes specified. It also sets the default_root attribute to DefaultRoot(dpy, DefaultsScreen(dpy)) and the single_screen and app_group_leader attributes to True. It returns the Application Group ID in app_group_return.
</p><p>
You can create an Application Group without intending to do embedding. One reason for doing this is to give a group of clients their own font-path.
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
A special font-path can be created by creating an Application Group, getting an Authorization using XSecurityGenerateAuthorization, and then running ‘xset fp+ &lt;new font path&gt;’ as a member of the Application Group. Font-path elements added in this way will be "private" to the Application Group.
</p></div><div class="informaltable"><table border="0"><colgroup><col /></colgroup><tbody><tr><td class="functiondecl">
Status XagCreateNonembeddedApplicationGroup(
    </td></tr><tr><td class="functionargdecl">
      Display*      dpy,
    </td></tr><tr><td class="functionargdecl">
      XAppGroup*      app_group_return);
    </td></tr></tbody></table></div><p>
An Application Group created with XagCreateNonembeddedApplicationGroup will have the default_root, root_visual, and default_colormap attributes all set to None; the single_screen and app_group_leader attributes are set to False, and the black_pixel and white_pixel attributes are not used since the default_colormap attribute is None.
</p><p>
To destroy an Application Group use XagDestroyApplicationGroup.
</p><div class="informaltable"><table border="0"><colgroup><col /></colgroup><tbody><tr><td class="functiondecl">
Status XagDestroyApplicationGroup(
    </td></tr><tr><td class="functionargdecl">
      Display*      dpy,
    </td></tr><tr><td class="functionargdecl">
      XAppGroup      app_group);
    </td></tr></tbody></table></div><p>
The Application Group specified by app_group is destroyed. If the Application Group was created using XagCreateEmbeddingApplicationGroup, i.e. and therefore the app_group_leader attribute is True, all programs that are members of the Application Group are killed as if a KillClient request had been issued.
</p><p>
To retrieve the attributes of an Application Group use XagGetApplicationGroupAttributes.
</p><div class="informaltable"><table border="0"><colgroup><col /></colgroup><tbody><tr><td class="functiondecl">
Status XagGetApplicationGroupAttributes(
    </td></tr><tr><td class="functionargdecl">
      Display*      dpy,
    </td></tr><tr><td class="functionargdecl">
      XAppGroup      app_group,
    </td></tr><tr><td class="functionargdecl">
      ...);
    </td></tr></tbody></table></div><p>
XagGetApplicationGroupAttributes is a varargs function that retrieves the Application Group’s attributes specified in the vararg parameter list.
</p><p>
The attributes that may be specified are: XagNappGroupLeader, XagNsingleScreen, XagNdefaultRoot, XagNrootVisual, XagNdefaultColormap, XagNblackPixel, and XagNwhitePixel; which correspond to app_group_leader, single_screen, default_root, root_visual, default_colormap, black_pixel, and white_pixel respectively. See AppGroupCreate in Section 3 for a description of each attribute.
</p><p>
The types for each of the parameters are pointers to the following:
</p><div class="literallayout"><p><br />
      single_screen          Bool<br />
      default_root           Window<br />
      root_visual            VisualID<br />
      default_colormap       Colormap<br />
      black_pixel            unsigned long<br />
      white_pixel            unsigned long<br />
      app_group_leader       Bool<br />
</p></div><pre class="programlisting">
Example:
      ...
      Boolean app_group_leader, single_screen;
      Window default_root;
      VisualID root_visual;
      Colormap default_colormap;
      Pixel black_pixel, white_pixel;
      ...
      status = XagGetApplicationGroupAttributes(dpy, app_group,
            XagNappGroupLeader, &amp;app_group_leader,
            XagNsingleScreen, &amp;single_screen,
            XagNdefault_root, &amp;default_root,
            XagNrootVisual, &amp;root_visual,
            XagNdefaultColormap, &amp;default_colormap,
            XagNblackPixel, &amp;black_pixel,
            XagNwhitePixel, &amp;white_pixel,
            NULL);
      ...
</pre><p>
To determine which Application Group a resource (such as a window) belongs to, use XagQueryApplicationGroup.
</p><div class="informaltable"><table border="0"><colgroup><col /></colgroup><tbody><tr><td class="functiondecl">
Status XagQueryApplicationGroup(
    </td></tr><tr><td class="functionargdecl">
      Display*      dpy,
    </td></tr><tr><td class="functionargdecl">
      XID      resource,
    </td></tr><tr><td class="functionargdecl">
      XAppGroup*      app_group_return);
    </td></tr></tbody></table></div><p>
The Application Group is returned in app_group_return, if the resource is not in any Application Group then app_group_return will be set to None.
</p><p>
To associate an X Window ID with a system-specific window ID, such as a HWND or a WindowPtr, use XagCreateAssociation.
</p><div class="informaltable"><table border="0"><colgroup><col /></colgroup><tbody><tr><td class="functiondecl">
Status XagCreateAssociation(
    </td></tr><tr><td class="functionargdecl">
      Display*      dpy,
    </td></tr><tr><td class="functionargdecl">
      Window*      window_return,
    </td></tr><tr><td class="functionargdecl">
      void*      system_window);
    </td></tr></tbody></table></div><p>
The window_ret may be used as the target for a ReparentWindow request.
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Because XReparentWindow is not constrained in the same way that Win32’s  SetParent and the Macintosh are, there is no reason to call XagCreateAssociation in an X-based embedding manager. As such if XagCreateAssociation is called in a native X program, the window_return will be the same as the system_window, and the implementation may even elect to not generate any protocol.
</p></div><p>To create an association on the Macintosh:</p><pre class="programlisting">
      struct {
          WindowPtr win;
          Rect rect;
      } system_window;
      system_window.win = win_ptr;
      system_window.rect.top = system_window.rect.left = 20;
      system_window.rect.bottom = 180;
      system_window.rect.right = 380;
</pre><pre class="programlisting">
      status = XagCreateAssociation (dpy, &amp;window, (void*)&amp;system_window);
</pre><p>
To create an association using a Win16, Win32, or OS/2 PM:
</p><pre class="programlisting">
      HWND system_window;
      status = XagCreateAssociation (dpy, &amp;window, (void*)&amp;system_window);
</pre><p>
To destroy the association created with XagCreateAssociation use XagDestroyAssociation.
</p><div class="informaltable"><table border="0"><colgroup><col /></colgroup><tbody><tr><td class="functiondecl">
Status XagDestroyAssociation(
    </td></tr><tr><td class="functionargdecl">
      Display*      dpy,
    </td></tr><tr><td class="functionargdecl">
      Window      window);
    </td></tr></tbody></table></div><p>
After calling XagDestroyAssociation the window may no longer be used to
reparent windows with XReparentWindow.
</p><div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3><p>
Like XagCreateAssociation, if the native window system is X11 the implementation may elect  to not generate any protocol as a result of this function call in order to avoid unintentionally destroying the the system_window that was specified in the prior XagCreateAssociation call.
</p></div></div><div class="appendix" title="A. System Window Encodings"><h2 class="title" style="clear: both"><a id="system_window_encodings"></a>A. System Window Encodings</h2><p>
The AppGroupCreateAssoc request has the following possible variations:
</p><div class="literallayout"><p><br />
<span class="bold"><strong>AppGroupCreateAssoc (X11)</strong></span><br />
      1      CARD8            opcode<br />
      1      6                XC-APPGROUP opcode<br />
      2      n                length<br />
      4      WINDOW           window<br />
      2      0                window_type<br />
      2      4                system_window_len<br />
      4      WINDOW           Window<br />
</p></div><div class="literallayout"><p><br />
<span class="bold"><strong>AppGroupCreateAssoc (Macintosh)</strong></span><br />
      1      CARD8            opcode<br />
      1      6                XC-APPGROUP opcode<br />
      2      n                length<br />
      4      WINDOW           window<br />
      2      1                window_type<br />
      2      12               system_window_len<br />
      4      CARD32           WindowPtr<br />
      2      INT16            Rect.top<br />
      2      INT16            Rect.left<br />
      2      INT16            Rect.bottom<br />
      2      INT16            Rect.right<br />
</p></div><div class="literallayout"><p><br />
<span class="bold"><strong>AppGroupCreateAssoc (Win32)</strong></span><br />
      1      CARD8            opcode<br />
      1      6                XC-APPGROUP opcode<br />
      2      n                length<br />
      4      WINDOW           window<br />
      2      2                window_type<br />
      2      4                system_window_len<br />
      4      CARD32           HWND<br />
</p></div><div class="literallayout"><p><br />
<span class="bold"><strong>AppGroupCreateAssoc (Win16)</strong></span><br />
      1      CARD8            opcode<br />
      1      6                XC-APPGROUP opcode<br />
      2      n                length<br />
      4      WINDOW           window<br />
      2      3                window_type<br />
      2      4                system_window_len<br />
      2      CARD16           HWND offset<br />
      2      CARD16           HWND segment<br />
</p></div></div><div class="footnotes"><br /><hr width="100" align="left" /><div class="footnote"><p><sup>[<a id="ftn.idp3361880" href="#idp3361880" class="para">1</a>] </sup>
Wabi is a trademark of Sun Microsystems, Inc. MAE is a trademark of Apple
Computer, Inc. WinCenter is a trademark of Network Computing Devices, Inc.
</p></div></div></div></body></html>