X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=doc%2Ftutorial%2Findex.html;h=f642ebf77454eb23b98c4a52bfb264b2f6fb6c06;hb=2a18842f0f93516ff726a2dfa44348410bb55626;hp=94b59a52bd8737e894ced8c7a3094a02e7aa199f;hpb=34016bcdab9b8373b4a8f9520b01d3179d35a315;p=free-sw%2Fxcb%2Flibxcb diff --git a/doc/tutorial/index.html b/doc/tutorial/index.html index 94b59a5..f642ebf 100644 --- a/doc/tutorial/index.html +++ b/doc/tutorial/index.html @@ -679,7 +679,7 @@ typedef struct { following function:

-XCBSCREENIter XCBConnSetupSuccessRepRootsIter (XCBConnSetupSuccessRep *R);
+XCBSCREENIter XCBSetupRootsIter (XCBSetup *R);
 

Here is a small program that shows how to use this function: @@ -701,7 +701,7 @@ main (int argc, char *argv[]) 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) { @@ -785,7 +785,7 @@ main (int argc, char *argv[]) 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); @@ -931,7 +931,7 @@ main (int argc, char *argv[]) /* 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; @@ -1318,7 +1318,7 @@ main (int argc, char *argv[]) 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; @@ -1966,7 +1966,7 @@ main (int argc, char *argv[]) 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); @@ -2218,7 +2218,7 @@ main (int argc, char *argv[]) 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); @@ -2740,7 +2740,7 @@ main (int argc, char *argv[]) /* 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; @@ -2786,7 +2786,7 @@ main (int argc, char *argv[]) /* 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*/ @@ -2888,7 +2888,7 @@ main (int argc, char *argv[]) /* 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*/ @@ -3088,7 +3088,7 @@ XCBVoidCookie XCBFreePixmap (XCBConnection *c, /* Pointer to the XCBConne return some members of the Display structure. They are obtained by using a function that requires a XCBConnection * or a member of the - XCBConnSetupSuccessRep structure + XCBSetup structure (via the function XCBGetSetup), or a function that requires that structure.

    @@ -3139,7 +3139,7 @@ c = XCBConnect (display_name, &screen_default_nbr); You get the count of screens with the functions XCBGetSetup and - XCBConnSetupSuccessRepRootsIter + XCBSetupRootsIter (if you need to iterate):

    @@ -3148,14 +3148,14 @@ int            screen_count;
     
     /* you init the connection */
     
    -screen_count = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c)).rem;
    +screen_count = XCBSetupRootsIter (XCBGetSetup (c)).rem;
     
     /* screen_count contains now the count of screens */
     

    If you don't want to iterate over the screens, a better way to get that number is to use - XCBConnSetupSuccessRepRootsLength: + XCBSetupRootsLength:

     XCBConnection *c;
    @@ -3163,7 +3163,7 @@ int            screen_count;
     
     /* you init the connection */
     
    -screen_count = XCBConnSetupSuccessRepRootsLength (XCBGetSetup (c));
    +screen_count = XCBSetupRootsLength (XCBGetSetup (c));
     
     /* screen_count contains now the count of screens */
     
    @@ -3173,7 +3173,7 @@ screen_count = XCBConnSetupSuccessRepRootsLength (XCBGetSetup (c)); the functions XCBGetSetup and XCBConnSetupSuccessRepVendor. Beware + class="code">XCBSetupVendor. Beware that, unlike Xlib, the string returned by XCB is not necessarily null-terminaled:

    @@ -3183,10 +3183,10 @@ char *vendor = NULL; 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 */ @@ -3194,7 +3194,7 @@ vendor[length] = '\0';
  1. ProtocolVersion

    You get the major version of the protocol in the - XCBConnSetupSuccessRep + XCBSetup structure, with the function XCBGetSetup:

    @@ -3210,7 +3210,7 @@ protocol_major_version = XCBGetSetup (c)->protocol_major_version;
               
  2. ProtocolRevision

    You get the minor version of the protocol in the - XCBConnSetupSuccessRep + XCBSetup structure, with the function XCBGetSetup:

    @@ -3226,7 +3226,7 @@ protocol_minor_version = XCBGetSetup (c)->protocol_minor_version;
               
  3. VendorRelease

    You get the number of the release of the server hardware in the - XCBConnSetupSuccessRep + XCBSetup structure, with the function XCBGetSetup:

    @@ -3247,7 +3247,7 @@ release_number = XCBGetSetup (c)->release_number;
               
  4. BitmapUnit

    You get the bitmap scanline unit in the - XCBConnSetupSuccessRep + XCBSetup structure, with the function XCBGetSetup:

    @@ -3263,7 +3263,7 @@ bitmap_format_scanline_unit = XCBGetSetup (c)->bitmap_format_scanline_unit;
               
  5. BitmapBitOrder

    You get the bitmap bit order in the - XCBConnSetupSuccessRep + XCBSetup structure, with the function XCBGetSetup:

    @@ -3279,7 +3279,7 @@ bitmap_format_bit_order = XCBGetSetup (c)->bitmap_format_bit_order;
               
  6. BitmapPad

    You get the bitmap scanline pad in the - XCBConnSetupSuccessRep + XCBSetup structure, with the function XCBGetSetup:

    @@ -3295,7 +3295,7 @@ bitmap_format_scanline_pad = XCBGetSetup (c)->bitmap_format_scanline_pad;
               
  7. ImageByteOrder

    You get the image byte order in the - XCBConnSetupSuccessRep + XCBSetup structure, with the function XCBGetSetup:

    @@ -3346,7 +3346,7 @@ XCBSCREEN *ScreenOfDisplay (XCBConnection *c,
     {
       XCBSCREENIter iter;
     
    -  iter = XCBConnSetupSuccessRepRootsIter (XCBGetSetup (c));
    +  iter = XCBSetupRootsIter (XCBGetSetup (c));
       for (; iter.rem; --screen, XCBSCREENNext (&iter))
         if (screen == 0)
           return iter.data;