[Xcb] xcb and Xt

Ian Osgood iano at quirkster.com
Thu Jul 3 11:15:27 PDT 2008


Xt is standard and with no external xorg dependencies (the same way  
that ed is the Standard Editor for Unix). Unfortunately, Xt uses all  
the Xlib types, like Display. The majority of the standard X apps use  
Xt for their minimal, ugly UI chrome, which makes it difficult to  
port them to XCB.  At one time there was a push to clean up the X  
apps, so xorg would only ship the bare minimum command line tools  
required for X maintenance (e.g. xrandr), dropping the more  
complicated Xt apps which are either obsolete (e.g. server fonts) or  
already better written in higher level toolkits (e.g. xclock, xload).  
I don't know the current status of that.

Xt also provides a wrapper for X resource databases, which are used  
for settings and such.  Porting just that layer to an XCB util  
library would be of immediate benefit to other XCB projects, like  
cairo and toolkits, for access to standard font settings.

Ian

On Jul 3, 2008, at 9:27 AM, Barton C Massey wrote:

> I think it would be interesting, but I'm also not sure if
> it's worth it.
>
> Xt as it stands is pretty Xlib-integrated---a typical Xt
> application makes quite a few Xlib calls.  So if you want to
> support legacy apps, you probably are stuck with Xlib/XCB
> indefinitely.  This is not a bad thing, necessarily, and
> actually we would love to have apps that exercise and test
> the Xlib/XCB mixed mode.
>
> I think if you want to write new apps in pure XCB, though,
> you'd be better off just creating a new toolkit.  I'm one of
> these mutants who doesn't believe that the last word has
> been written on toolkits, even in C.  Also, I think C (and
> its cousin C++) is a horrible language in which to write
> applications.  :-)
>
> Let us know how we can help with whatever you decide to do.
>
> 	Bart
>
> In message  
> <80d224fa0807010144s25688e3ew6bb45b26a3d1d007 at mail.gmail.com> you  
> wrote:
>>  Hi,
>>
>>  What's the general feeling/opinion on Xt ( C toolkit ) and xcb ?
>>
>>  I am thinking about porting it to XCB and perhaps doing a bit of a
>> rewrite in the process ...
>>
>>  I think Xt is a bit too complicated for what it does, and perhaps it
>> could be rewritten in a simpler fashion, so I was thinking of trying
>> to refactor it into simpler components on which the existing Xt could
>> be implemented.
>>
>>  I don't know if I will have the time or motivation, but I have been
>> considering it for a while. So I thought I should ask if it's a waste
>> of time or would do any good.
>>
>>  Would it be any good, or is Xt as a toolkit just 'legacy'  ?
>>
>>  / regards, Lars Segerlund.
>> _______________________________________________
>> Xcb mailing list
>> Xcb at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/xcb
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb




More information about the Xcb mailing list