Re: [dev] SWK: The simple widget kit

From: Uriel <lost.goblin_AT_gmail.com>
Date: Mon, 10 May 2010 02:05:58 +0200

Does suckless really need a WIMP-toolkit? I hope not.

That aside, I made some comments to garbeam regarding the code in
#cat-v last week, I don't remember much but I was not impressed,
specially with the whole event/callbacks system, which is a really
retarded way to build GUIs.

So far it looks like a really crappy version of GTK.

uriel

On Sat, May 8, 2010 at 3:00 PM, <pancake_AT_youterm.com> wrote:
> Anselm and me have been talking to get a proper initial design
> to bring a minimalistic widget toolkit to the masses.
>
> After few months of thinking, typing test programs and so on
> I have managed to get a working state for the project, so I'm
> exposing the results of this work in this mail looking for
> people who is interested on helping to the project with ideas,
> patches and so on.
>
> SWK is a comprehensive widget kit that aims to be simple,
> lightweight and support many graphical backends (SDL, x11..)
>
> At the moment I have focused the development on SDL, and I have
> managed to use it in desktop, n900 and a dingoo console. But
> there's still bugs to fix, things to optimize, missing features
> and other stuff that is not yet done..but described in TODO.
>
> The current set of widgets:
>
>        void swk_button(SwkEvent *e);
>        void swk_label(SwkEvent *e);
>        void swk_entry(SwkEvent *e);
>        void swk_password(SwkEvent *e);
>        void swk_filler(SwkEvent *e);
>        void swk_option(SwkEvent *e);
>        void swk_separator(SwkEvent *e);
>        void swk_progress(SwkEvent *e);
>        void swk_image(SwkEvent *e);
>        void swk_sketch(SwkEvent *e);
>
> Text processing is pretty basic, no formatting, no cursor support, etc..
> The creation of new widgets is as simple as defining such a event
> handler function and embed it into an array of SwkBox'es to the
> SwkWindow in use.
>
> Some of the basics of the design are:
>
>  - 1 window per-app
>  - automatic scrolling area, so no hidden elements
>  - clean/separated graphical API
>  - no trees, just plain 1 dimensional array of widgets
>  - rows are defined by NEWLINE elements
>  - automatic alignment based of minimum values and swk layout
>  - <2KLOC :) (now is 800LOC)
>
> I would explain so many things more about the library, but I
> think is better if you give a look at the source and try the
> examples.
>
> Feel free to give me feedback and dont be shy to send patches.
>
> To build the current version you need:
>
>  sdl, sdl-ttf and sdl-image
>
> Try it and let me know what do you think about it
>
>  hg clone http://hg.suckless.org/swk
>
> Happy hacking
>
> --pancake
Received on Mon May 10 2010 - 00:05:58 UTC

This archive was generated by hypermail 2.2.0 : Mon May 10 2010 - 00:12:03 UTC