awesome/common
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
..
array.h Calling destructor on splice is wrong, take doesn't want it e.g. 2008-06-25 11:04:56 +02:00
atoms.c atoms: autogenerate atom list 2008-06-30 20:05:53 +02:00
atoms.h atoms: autogenerate atom list 2008-06-30 20:05:53 +02:00
atoms.list atoms: autogenerate atom list 2008-06-30 20:05:53 +02:00
buffer.c buffer: add various code documentation 2008-06-22 18:43:04 +02:00
buffer.h fix typo 2008-06-22 18:58:52 +02:00
configopts.c [xutil] Move xcolor_t into draw 2008-05-30 12:33:08 +02:00
configopts.h [everything] Switch from libconfuse to Lua 2008-05-20 18:01:15 +02:00
draw.c Streamline xcolor_t. 2008-07-02 10:36:46 +02:00
draw.h Streamline xcolor_t. 2008-07-02 10:36:46 +02:00
list.h Fix a couple of warnings. 2008-06-15 23:58:51 +02:00
markup.c Be more on the safe side. 2008-06-23 18:55:29 +02:00
markup.h Finish markup parsing rewrite to avoid mallocs. 2008-06-22 17:45:45 +02:00
refcount.h Make refcounting safer. 2008-06-22 14:22:44 +02:00
socket.c [util] warn() and eprint() now print \n 2008-05-23 22:56:05 +02:00
socket.h Lot of cosmetic changes: proto change, etc. 2008-03-23 15:52:22 +01:00
swindow.c swindow: do not resize if nothing to do 2008-06-18 13:50:50 +02:00
swindow.h Streamline xcolor_t. 2008-07-02 10:36:46 +02:00
tokenize.gperf client: merge titlebar_{set,get} into index 2008-07-01 22:19:23 +02:00
util.c util: position_tostr() return const 2008-07-01 16:33:24 +02:00
util.h util: position_tostr() return const 2008-07-01 16:33:24 +02:00
version.c version: add GdkPixBuf version 2008-06-24 21:01:24 +02:00
version.h cmake: consolidate version strings 2008-06-22 22:13:06 +02:00
xembed.c xembed: remove useless comments 2008-06-30 20:15:46 +02:00
xembed.h xembed: remove useless comments 2008-06-30 20:15:46 +02:00
xscreen.c area_t: make it smaller, use arrays instead of lists. 2008-06-22 22:09:48 +02:00
xscreen.h [screen] Rename ScreensInfo to screen_info_t 2008-05-03 12:01:05 +02:00
xutil.c client: merge class hints into index 2008-07-01 21:56:53 +02:00
xutil.h client: merge class hints into index 2008-07-01 21:56:53 +02:00