awesome/widgets
Pierre Habouzit 924078c898 Streamline xcolor_t.
Do not have a ->name char * field, but a char[32] instead.  This isn't a
big problem, the longest color in /etc/X11/rgb.txt is 23 chars long, and
if it becomes a problem one day, one could just strip the name and
generate an hexadecimal representation on the fly instead. But allocating
the name is asking for a lot of trouble.

Since we do not allocate anything anymore, just don't allocate anything
anymore at all, it avoids the mess of xcolor_copy/_wipe and fixes a lot of
sleeping bugs (p_dup were used e.g., which is wrong).

Pass xcolor_t *, xcolor_t becomes too big to be passed by value. Add
consts at some places.

xcolor_new allocates nothing, hence is renamed xcolor_init, has xcolor_t
as a first argument (OO-style, this is self), and doesn't touch the
structure at all if it returns false, which allow us to skip a lot of
intermediates values.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-02 10:36:46 +02:00
..
graph.c Streamline xcolor_t. 2008-07-02 10:36:46 +02:00
progressbar.c Streamline xcolor_t. 2008-07-02 10:36:46 +02:00
systray.c atoms: add all used atoms 2008-06-30 18:55:14 +02:00
taglist.c Streamline xcolor_t. 2008-07-02 10:36:46 +02:00
tasklist.c Streamline xcolor_t. 2008-07-02 10:36:46 +02:00
textbox.c widgets: don't tokenize twice 2008-07-01 15:27:41 +02:00