Re: [dev] SWK: The simple widget kit

From: pancake <pancake_AT_youterm.com>
Date: Mon, 10 May 2010 10:00:12 +0200

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

Well...this design is not wimp at all, there's no plans to add menus. And the thing is that curses is broken and depends on quite broken text console interface. The idea was trying to offer a cleaner way to do user interfaces for many platforms without the restrictions of a console interface.

I really prefer to tap my phone than open the keyboard and type a 4 pipe command. Which is not the same situation on desktop...where keyboard is preferible.

And well.. In touchscreens is quite good to use too. A text console sucks more on this kind of devices.

> That aside, I made some comments to garbeam regarding the code in
> #cat-v last week,

Logs or gtfo

> 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.

Can you explain me or design a simpler way allowing same or more extensibility? I give many turns to this idea until implementing this design.

> 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 - 08:00:12 UTC

This archive was generated by hypermail 2.2.0 : Mon May 10 2010 - 08:00:02 UTC