Re: [dev] SWK: The simple widget kit

From: Steen Engholm <>
Date: Thu, 13 May 2010 20:33:28 +0200

I'm curious .

On 5/13/10, pancake <> wrote:
> On 05/13/10 11:29, Anselm R Garbe wrote:
>> On 13 May 2010 10:04, Szabolcs Nagy<> wrote:
>>> On 5/12/10, Rory Rory<> wrote:
>>>> Right now it's not obvious what the widgets actually are. The
>>>> textboxes look identical to the buttons and it's hard to know where to
>>>> type into.
>>> don't care about the visual representation
>>> that's the last thing you wish to design
>>> the question is if the programming model is simple and powerful enough
>>> * there is "box" and "event"
>>> * each box has an event handler and that's the only thing that
>>> determines the behaviour of the box (visual behaviour and internal
>>> state).
>>> * the event handler gets called with events that occured over the area
>>> of the box.
>>> * there is no parent/child of a box so you cannot pass events around
>>> (as in most toolkits), you have to handle or ignore them
>>> * the area of a box is determined by the toolkit, only the box layout
>>> should be described (boxes per rows), so not just fixed resolution
>>> pixel based representation is possible
>>> btw if there is strictly one window per application (the container of
>>> boxes) then the window can be a global variable, you don't have to
>>> pass it around in every swk function and struct.
>> I agree, SwkWindow could be removed from the signatures and be
>> declared as global.
>> Apart from that I agree with the question you raise and I don't have
>> the answer either yet. I agreed with pancake that we go with this
>> approach in the beginning to get a feeling if it's right. I think this
>> thread is supposed to gain further insight and opinions from others as
>> well.
>> The main question is if the box/event model is right.
>> Cheers,
>> Anselm
> Just for the curious people. A friend of me talked about another widget
> kit i didnt knew. It's not suckless, but it is not as bloated as qt or gtk
> are. Here's the url:
> Back to SWK discussion..
> Check t/ui.c and you will understand why SwkWindow is not global variable.
> Do somebody noticed this file? I mean..the UI can be done not only by code..
> also in ascii art. About the other questions..I think i'm not the right
> person
> to reply those questions :)
> --pancake
Received on Thu May 13 2010 - 18:33:28 UTC

This archive was generated by hypermail 2.2.0 : Thu May 13 2010 - 18:36:02 UTC