[Xcb] xid

Vincent Torri vtorri at univ-evry.fr
Wed Oct 11 22:31:32 PDT 2006


On Thu, 12 Oct 2006, Russell Shaw wrote:

> Hi,
> I see that:
>
> typedef uint32_t xcb_cursor_t;
> typedef uint32_t xcb_font_t;
> typedef uint32_t xcb_gcontext_t;
> typedef uint32_t xcb_colormap_t;
> ...
>
> are just a substitute for uin32_t xid.
>
> Wouldn't it be cleaner, simpler, and more logical just to use
> "typedef uint32_t xcbid" everywhere?

I was finding the old structure more difficult to use, but it allowed me 
to not assign wrong types in the port of evas. Now, these structures have 
gone, which make XCB a bit like Xlib. I recall that there was a 
description in xcb web page that mentioned that these structures were a 
good thing, compared to the id of Xlib...

With just xid instead of a clean name, we will not be able to distinct 
clearly the type of a variable. In addition, I find that it's not logical 
at all. Simpler ? instead of writing 3 letters, you write a max of 14 
letters. Not a big deal.

So, it's a 'no' for me.

Vincent


More information about the Xcb mailing list