[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Project proposal, CTK

From: John Smith
Subject: Project proposal, CTK
Date: Tue, 13 May 2003 08:53:19 +0000

I have an idea for a project (called "CTK") that I would like to embark. I have just started it. Let me know if it's already "taken". Else, I would like for people with more experience than myself to help me out.

The idea is to create a curses-based, event-driven, object-oriented widget set (ran out of buzzwords). In essence a mix of ncurses, GTK+ and CDK.

Those familiar with GTK+ will know that GLib which is part of GTK+ have nothing to do with X11 but can be used for other projects. GLib provides among other things one of the better available main loops, a sophisticated type and object framework for building object structures (complete with inheritance and polymorphism) a signal system, portability wrappers, a host of data structures, etc. GTK+ consists of three parts: GTK+, GDK and GLIb. These correspond in CTK to: CTK (~GTK+), ncurses (~GDK) and GLib.

CDK is a great toolkit as I see it. But I found it cumbersome to use and extend. The problem is that you "execute" the widgets so that processing is in one widget at a time. CTK would work asynchronously, like a regular Window based application: processing is in a main loop which constantly waits to receive events (keypresses, mouseclicks, etc.) which it then forwards to the appropriate widgets. It should also be easy to extend it, by subclassing existing widgets.

In X programming the X server generates events which are forwarded to the appropriate client (application). In CTK you would probably not run several apps in one terminal window so it is perhaps better to just let the event source be inside the application in a separate thread. In any case that is what I've tried so far. I created an input-thread in the application which constantly waits to receive keypresses from the root window. In the main thread the program just sits and waits for keypress events from the input-thread. So far it's not doing any more magic than this, but it showes that this could work.

It would be great if anybody would join in the efforts, since my experience is limited. It would be especially nice if someone with experience from CDK would join, since it would be nice if we could take all the good stuff from CDK and convert it.

Add photos to your messages with MSN 8. Get 2 months FREE*. http://join.msn.com/?page=features/featuredemail

reply via email to

[Prev in Thread] Current Thread [Next in Thread]