Re: [dev] SWK: The simple widget kit

2010-05-10 Thread Mate Nagy
On Sun, May 09, 2010 at 08:42:48PM -0700, Robert Ransom wrote:
 You need a definition of 'suckless user interface' before you start
 specifying guidelines for how to produce one.
 
 Here's a draft:
 
   A suckless user interface is:
 
   * useful,
   * usable,
   * transparent,
   * either discoverable or well-documented,
   * reliable,
   * as simple as possible, and no simpler, and
   * customizable.

 you forget the most important point:
 you don't design suckless software for the user. You educate the user
first, then design software for the new, enlightened man.

 furthermore, as simple as possible, and no simpler and customizable
are very very arguable (in b4 shitstorm)

Mate



Re: [dev] SWK: The simple widget kit

2010-05-10 Thread pancake

- 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,  panc...@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




Re: [dev] SWK: The simple widget kit

2010-05-10 Thread Antoni Grzymala
Mate Nagy dixit (2010-05-10, 09:47):

  you don't design suckless software for the user. You educate the user
 first, then design software for the new, enlightened man.

Sounds like we've had that history lesson in the thirties...

-- 
[a]



Re: [dev] SWK: The simple widget kit

2010-05-10 Thread Dieter Plaetinck
On Mon, 10 May 2010 10:00:12 +0200
pancake panc...@youterm.com wrote:

 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.

+1

Dieter



Re: [dev] SWK: The simple widget kit

2010-05-10 Thread Gregor Best
On Mon, May 10, 2010 at 10:20:33AM +0200, pancake wrote:
 [...]
  * support for right-to-left scripts,
 Point this understand dont I.
 [...]

There are languages (such as arabic) that are not written in the latin
left-to-right fashion but exactly the other way round (i.e. you have to
start reading at the right end of a line and end at the left).

Gregor Best


pgpWGaONyAqHm.pgp
Description: PGP signature


Re: [dev] SWK: The simple widget kit

2010-05-10 Thread Mate Nagy
On Mon, May 10, 2010 at 10:31:29AM +0200, Gregor Best wrote:
 There are languages (such as arabic) that are not written in the latin
 left-to-right fashion but exactly the other way round (i.e. you have to
 start reading at the right end of a line and end at the left).
 indeed! let's depend on pango so we can support these issues elegantly,
out of the box! whee

Mate



Re: [dev] SWK: The simple widget kit

2010-05-10 Thread pancake

On 05/10/10 10:31, Gregor Best wrote:

On Mon, May 10, 2010 at 10:20:33AM +0200, pancake wrote:
   

[...]
 

* support for right-to-left scripts,
   

Point this understand dont I.
[...]
 

There are languages (such as arabic) that are not written in the latin
left-to-right fashion but exactly the other way round (i.e. you have to
start reading at the right end of a line and end at the left).

 Gregor Best
   

I was not planning to add support to this in the library itself.

If we add support to this we should add support for top-down,
and other forms like rotated text, etc..

The thing is that , as Mate said, that pango already does that, and
this can be integrated with SWK as external optional dependency.

--pancake



Re: [dev] [surf] fix for running script.js

2010-05-10 Thread Sean Whitton
Hi,

On Sun, May 09, 2010 at 07:27:25PM +0200, Troels Henriksen wrote:
 script.js will not be run unless the site you are visiting (or has
 visited in the past?) uses Javascript.  This is bad.  The attached patch
 makes surf run script.js in every newly created web view.
 

Nice job - I see that this has been integrated into hg.

Scripts still don't work if you have page JavaScript turned off, though.  
Is there any way around this?

S

-- 
Sean Whitton / s...@silentflame.com
OpenPGP KeyID: 0x3B6D411B
http://seanwhitton.com/




[dev] Disconnect signals when closing web view

2010-05-10 Thread Troels Henriksen
The attached patch fixes a crashing bug in surf.

There's still plenty of crashing bugs left, though, so the difference is
probably only academic at this point (and this feels ugly anyway -
what's going on with GTK signal processing?)

diff -r d9957625b700 surf.c
--- a/surf.c	Sun May 09 22:51:26 2010 +0200
+++ b/surf.c	Mon May 10 21:17:25 2010 +0200
@@ -234,6 +234,9 @@
 	int i;
 	Client *p;
 
+/* We don't want signals to pop up while we are in mid-destruction */
+	g_signal_handlers_disconnect_matched(GTK_WIDGET(c-view), G_SIGNAL_MATCH_DATA, 0, 0, 0, 0, c);
+
 	gtk_widget_destroy(c-indicator);
 	gtk_widget_destroy(GTK_WIDGET(c-view));
 	gtk_widget_destroy(c-scroll);

-- 
\  Troels
/\ Henriksen


Re: [dev] about handling the event loop of wmii

2010-05-10 Thread Suraj Kurapati
On Wed, May 5, 2010 at 8:14 AM, Emmanuel Oga emmanuel...@gmail.com wrote:
 I'm doing some experiments on scripting  wmii with the help of eventmachine.
 I mounted the wmii fs [...] Then, I came up with this:
 http://gist.github.com/390396

Why not talk directly to wmii via 9P instead of going through a
mount (which will invalidate any benefits you might gain from
eventmachine)?

 In a way EM feels like a natural way of handling an event loop.

Agreed.  I would suggest grabbing Rumai's message library[1] and
building your own transport layer[2] using EventMachine on top.

However, note that Rumai already uses a single-threaded re-entrant
transport strategy following the XCB cookie approach[3], so I don't
know how much more benefit EventMachine will provide.

[1] http://github.com/sunaku/rumai/blob/master/lib/rumai/ixp/message.rb
[2] http://github.com/sunaku/rumai/blob/master/lib/rumai/ixp/transport.rb#L116
[3] http://www.x.org/releases/X11R7.5/doc/libxcb/tutorial/#requestsreplies

 this voice on the back of my mind that keeps telling my this might be
 overkill ...

EM = mounted 9P = wmii(overkill)
EM= wmii(maybe not)