[Xcb] Initialisation of GC etc.

Maciej Piechotka uzytkownik2 at gmail.com
Mon Mar 31 09:31:15 PDT 2008


On Mon, Mar 31, 2008 at 6:18 PM, Peter Harris
<peter.harris at hummingbird.com> wrote:
> Maciej Piechotka wrote:
>  > I have a question:
>  > xcb_gcontext_t gc = xcb_generate_id(conn);
>  > xcb_void_cookie_t cookie = xcb_create_gc(conn, gc, window, ...);
>
>  Actually, you need to call xcb_create_gc_checked if you want an error
>  checking cookie, since create_gc doesn't normally have a reply.
>
>  Normally, you would just call xcb_create_gc without saving the cookie.
>

Ok.

>  > // 1
>  > // Do something with gc
>  >
>  > 1. Do I have to wait/flush connection before I use gc?
>
>  No.
>
>  > 2. Can I wait for confirmation of creation?
>
>  If you really want to.
>
>  You don't usually want to, however, as the GC will only fail to be
>  created if you passed invalid arguments to create_gc, or if the X server
>  is out of memory (in which case, you can't do much of anything anyway).
>
>  > 3. Can I check if it was created without blocking?
>
>  No. If you need a response from the X server, you will have to wait
>  (block) until the response arrives.
>


Ok.

>  Peter Harris

Thank you for respond.

Regards


More information about the Xcb mailing list