following function:
</p>
<pre class="code">
-XCBSCREENIter XCBConnSetupSuccessRepRootsIter (XCBConnSetupSuccessRep *R);
+XCBSCREENIter XCBSetupRootsIter (XCBSetup *R);
</pre>
<p>
Here is a small program that shows how to use this function:
c = XCBConnect (NULL, &screen_nbr);
/* Get the screen #screen_nbr */
- iter = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c));
+ iter = XCBSetupRootsIter (XCBGetSetup (c));
for (; iter.rem; --screen_nbr, XCBSCREENNext (&iter))
if (screen_nbr == 0)
{
c = XCBConnect (NULL, NULL);
/* Get the first screen */
- screen = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c)).data;
+ screen = XCBSetupRootsIter (XCBGetSetup (c)).data;
/* Ask for our window's Id */
win.window = XCBWINDOWNew(c);
/* Open the connection to the X server and get the first screen */
c = XCBConnect (NULL, NULL);
- screen = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c)).data;
+ screen = XCBSetupRootsIter (XCBGetSetup (c)).data;
/* Create a black graphic context for drawing in the foreground */
win.window = screen->root;
c = XCBConnect (NULL, NULL);
/* Get the first screen */
- screen = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c)).data;
+ screen = XCBSetupRootsIter (XCBGetSetup (c)).data;
/* Create black (foreground) graphic context */
win.window = screen->root;
c = XCBConnect (NULL, NULL);
/* Get the first screen */
- screen = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c)).data;
+ screen = XCBSetupRootsIter (XCBGetSetup (c)).data;
/* Ask for our window's Id */
win.window = XCBWINDOWNew(c);
c = XCBConnect (NULL, NULL);
/* Get the first screen */
- screen = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c)).data;
+ screen = XCBSetupRootsIter (XCBGetSetup (c)).data;
/* Ask for our window's Id */
win.window = XCBWINDOWNew(c);
/* Open the connection to the X server and get the first screen */
c = XCBConnect (NULL, NULL);
- screen = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c)).data;
+ screen = XCBSetupRootsIter (XCBGetSetup (c)).data;
colormap = screen->default_colormap;
/* Open the connection to the X server and get the first screen */
c = XCBConnect (NULL, NULL);
- screen = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c)).data;
+ screen = XCBSetupRootsIter (XCBGetSetup (c)).data;
/* We create the window win here*/
/* Open the connection to the X server and get the first screen */
c = XCBConnect (NULL, NULL);
- screen = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c)).data;
+ screen = XCBSetupRootsIter (XCBGetSetup (c)).data;
/* We create the window win here*/
return some members of the <span class="code">Display</span>
structure. They are obtained by using a function that requires a
<span class="code">XCBConnection *</span> or a member of the
- <span class="code">XCBConnSetupSuccessRep</span> structure
+ <span class="code">XCBSetup</span> structure
(via the function <span class="code">XCBGetSetup</span>), or
a function that requires that structure.
<ol>
You get the count of screens with the functions
<span class="code">XCBGetSetup</span>
and
- <span class="code">XCBConnSetupSuccessRepRootsIter</span>
+ <span class="code">XCBSetupRootsIter</span>
(if you need to iterate):
</p>
<pre class="code">
/* you init the connection */
-screen_count = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c)).rem;
+screen_count = XCBSetupRootsIter (XCBGetSetup (c)).rem;
/* screen_count contains now the count of screens */
</pre>
<p>
If you don't want to iterate over the screens, a better way
to get that number is to use
- <span class="code">XCBConnSetupSuccessRepRootsLength</span>:
+ <span class="code">XCBSetupRootsLength</span>:
</p>
<pre class="code">
XCBConnection *c;
/* you init the connection */
-screen_count = XCBConnSetupSuccessRepRootsLength (XCBGetSetup (c));
+screen_count = XCBSetupRootsLength (XCBGetSetup (c));
/* screen_count contains now the count of screens */
</pre>
the functions <span class="code">XCBGetSetup</span>
and
<span
- class="code">XCBConnSetupSuccessRepVendor</span>. Beware
+ class="code">XCBSetupVendor</span>. Beware
that, unlike Xlib, the string returned by XCB is not
necessarily null-terminaled:
</p>
int length;
/* you init the connection */
-length = XCBConnSetupSuccessRepVendorLength (XCBGetSetup (c));
+length = XCBSetupVendorLength (XCBGetSetup (c));
vendor = (char *)malloc (length + 1);
if (vendor)
-memcpy (vendor, XCBConnSetupSuccessRepVendor (XCBGetSetup (c)), length);
+memcpy (vendor, XCBSetupVendor (XCBGetSetup (c)), length);
vendor[length] = '\0';
/* vendor contains now the name of the vendor. Must be freed when not used anymore */
<li class="subtitle"><a name="ProtocolVersion"></a>ProtocolVersion
<p>
You get the major version of the protocol in the
- <span class="code">XCBConnSetupSuccessRep</span>
+ <span class="code">XCBSetup</span>
structure, with the function <span class="code">XCBGetSetup</span>:
</p>
<pre class="code">
<li class="subtitle"><a name="ProtocolRevision"></a>ProtocolRevision
<p>
You get the minor version of the protocol in the
- <span class="code">XCBConnSetupSuccessRep</span>
+ <span class="code">XCBSetup</span>
structure, with the function <span class="code">XCBGetSetup</span>:
</p>
<pre class="code">
<li class="subtitle"><a name="VendorRelease"></a>VendorRelease
<p>
You get the number of the release of the server hardware in the
- <span class="code">XCBConnSetupSuccessRep</span>
+ <span class="code">XCBSetup</span>
structure, with the function <span class="code">XCBGetSetup</span>:
</p>
<pre class="code">
<li class="subtitle"><a name="BitmapUnit"></a>BitmapUnit
<p>
You get the bitmap scanline unit in the
- <span class="code">XCBConnSetupSuccessRep</span>
+ <span class="code">XCBSetup</span>
structure, with the function <span class="code">XCBGetSetup</span>:
</p>
<pre class="code">
<li class="subtitle"><a name="BitmapBitOrder"></a>BitmapBitOrder
<p>
You get the bitmap bit order in the
- <span class="code">XCBConnSetupSuccessRep</span>
+ <span class="code">XCBSetup</span>
structure, with the function <span class="code">XCBGetSetup</span>:
</p>
<pre class="code">
<li class="subtitle"><a name="BitmapPad"></a>BitmapPad
<p>
You get the bitmap scanline pad in the
- <span class="code">XCBConnSetupSuccessRep</span>
+ <span class="code">XCBSetup</span>
structure, with the function <span class="code">XCBGetSetup</span>:
</p>
<pre class="code">
<li class="subtitle"><a name="ImageByteOrder"></a>ImageByteOrder
<p>
You get the image byte order in the
- <span class="code">XCBConnSetupSuccessRep</span>
+ <span class="code">XCBSetup</span>
structure, with the function <span class="code">XCBGetSetup</span>:
</p>
<pre class="code">
{
XCBSCREENIter iter;
- iter = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c));
+ iter = XCBSetupRootsIter (XCBGetSetup (c));
for (; iter.rem; --screen, XCBSCREENNext (&iter))
if (screen == 0)
return iter.data;