Commit Graph

476 Commits

Author SHA1 Message Date
Julien Danjou 7b6ba906d4 imagebox: fix luadoc fields
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-21 18:32:48 +02:00
Julien Danjou c0f75c2ed8 widgets: clear private struct
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-21 15:07:41 +02:00
Julien Danjou fba1a96737 progressbar: use bar array rather than linked list
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-21 14:48:49 +02:00
Julien Danjou 96929faa69 graph: use array instead of linked list
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-21 12:04:19 +02:00
Julien Danjou 862fe193ee Rewrite {tag,task}list in Lua.
This removes the C implementation of taglist and tasklist widgets and
use a Lua one.

This works by letting .widgets property of wiboxes to be a table with
table, and setting a special metatable on them which notify awesome on
newindex events, updating wiboxes.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-20 20:06:09 +02:00
Julien Danjou 674f522229 imagebox: add support for background color
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-20 15:56:56 +02:00
Julien Danjou 4fb114172f taglist: set correctly area height
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-01 14:16:16 +02:00
Julien Danjou 5709435392 wibox: rework, merge titlebar
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-26 15:00:42 +02:00
Julien Danjou 0feb7de68e wibox: merge statusbars and titlebars Lua objects
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 14:34:43 +02:00
Julien Danjou 34fe130307 wibox: merge statusbar and titlebar types
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:56 +02:00
Julien Danjou 2e17f8a662 swindow: do not store phys_screen; store border color
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:56 +02:00
Julien Danjou b11c068b96 statusbar: remove phys_screen attribute
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:56 +02:00
Julien Danjou 6ac0c4130c image: merge draw_image_t and image_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou 71ac6710e5 widgets: replace appicon by imagebox
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou 856192fa99 client: merge icon_path and netwm icon
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou 2fad185fcf ewmh: store netwm icon as draw_image_t
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou 6a5ad6af9b common: move draw, xscreen and swindow out
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou e0d3da455b client: split minimized out of hidden
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou c66e28c7d9 tasklist: ignore some windows type
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:55 +02:00
Julien Danjou cfa9de3126 client: remove useless skip attribute
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:54 +02:00
Julien Danjou 3b895d84ed mouse: rework mouse buttons API, support release events
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:53 +02:00
Radosław Szkodziński ad9c8cfd16 tasklist: add support for backward ordering - tasklist.invert
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-22 11:11:53 +02:00
Julien Danjou 2da065329b textbox: do not invalidate on _index
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-11 15:43:15 +02:00
Julien Danjou 022879e8be textbox: reinit draw parser data
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-09-02 14:03:11 +02:00
Julien Danjou 1d1eee5f3c taglist: fix memory leak with array area
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-30 10:40:43 +02:00
Julien Danjou c3f0335cd2 progressbar: add fake struct to build doc
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-29 13:55:09 +02:00
Julien Danjou 033d7c82bc progressbar: fix vertical type and document fields
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-29 13:52:25 +02:00
Julien Danjou 23707aafcf graph: add documentation
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-29 13:48:47 +02:00
Julien Danjou 2dda972561 textbox: overwrite extents to 0 on nil
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-15 01:11:39 +02:00
Julien Danjou 5ad9b2025c textbox: stop parsing text on each draw
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-14 00:06:38 +02:00
Julien Danjou 57b7d39cdb textbox: allow nil as value for text
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-12 18:13:23 +02:00
Kanru Chen 553b03809f graph: fix xcolor reqs index.
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-12 16:29:01 +02:00
Arnaud Fontaine 193a73c5d9 draw: make xcolor_init() asynchronous. 2008-08-12 14:53:57 +02:00
Julien Danjou 1fbe4f0d5e ewmh: store NET_WM icon
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-11 23:10:02 +02:00
Arnaud Fontaine b655f6348c xutil: rename xutil functions according to the rest of code. 2008-08-11 18:05:35 +02:00
Julien Danjou 9f503e5a13 lua: rename luaA_function to luaA_ref
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-11 10:12:36 +02:00
Julien Danjou 4b452510ba taglist: append area even if function fails
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-10 16:15:15 +02:00
Julien Danjou e7871ff8f8 statusbar: support systray kick out
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-05 17:23:37 +02:00
Julien Danjou 189157843a systray: remove has_systray
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-05 17:03:14 +02:00
Julien Danjou 254a39b6d3 statusbar: handle systray invisibility
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-05 16:59:54 +02:00
Julien Danjou 5b63807a15 systray: fix visible attribute
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-05 15:29:16 +02:00
Julien Danjou 9b364d0009 textbox: fix first drawing
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-01 17:44:51 +02:00
Julien Danjou 81ae462a70 focus: remove focus history
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-31 17:30:01 +02:00
Julien Danjou 76274065be taglist: fix width with background image
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-30 09:40:54 +02:00
Julien Danjou 3db9f29453 appicon: new widget, used in titlebar
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-29 16:51:21 +02:00
Julien Danjou bf209f87bb ewmh: introduce and use netwm_icon_delete()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-29 16:44:57 +02:00
Julien Danjou 731b309c85 textbox: fix background size computing
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-29 15:43:00 +02:00
Julien Danjou c4a01031c4 tasklist: add tags as cache element (FS#227)
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-29 12:05:27 +02:00
Julien Danjou 4ba2e22bae widget: add detach callbacks
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-29 11:50:40 +02:00
Julien Danjou 5d063874b1 taglist: factorize tda lookup
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-29 11:38:56 +02:00
Julien Danjou 84ff146083 ta{g,sk}list: check dofunction return value
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-29 11:03:57 +02:00
Julien Danjou 80b79717ba various documentation update for _index()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-28 16:03:38 +02:00
Julien Danjou 09fd61fdfa tasklist: use label to determine which objects are drawn
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-28 15:57:17 +02:00
Julien Danjou 88891a21e8 taglist: remove show_empty attribute
This is doable in Lua.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-28 15:56:59 +02:00
Julien Danjou 1a539712d1 tasklist: use common markup parsing
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 17:11:37 +02:00
Julien Danjou 5fc500a861 draw: draw_text takes len as arg
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 15:35:19 +02:00
Julien Danjou 36fd44d1a0 draw: add char len as arg of xcolor_init()
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 15:30:16 +02:00
Julien Danjou 750040be68 draw: text extents now gets len as arg
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 15:06:09 +02:00
Julien Danjou ad58260243 tasklist: use len and set it to 0 if no text
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 11:02:11 +02:00
Julien Danjou 354f37ef6c taglist: use callback function to get print text
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 11:02:11 +02:00
Julien Danjou f28b4c07b2 tasklist: stop using client markup
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-10 11:02:11 +02:00
Julien Danjou 3f46ec2152 tasklist: use a callback for label
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-09 12:12:52 +02:00
Julien Danjou 64e390e2a3 textbox: documente index
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-02 17:59:06 +02:00
marco candrian 2b767c2352 widgets: use vector_t for the color-gradients course.
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-02 13:59:30 +02:00
marco candrian 3074c3fdf4 progressbar: cosmetic
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-02 13:59:25 +02:00
Pierre Habouzit 46ea7c45aa Get rid of the color name, and generate a #RGBA value on the fly if needed.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-02 11:09:10 +02:00
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
marco candrian 0c4b56a065 add fg_off to set + fix copy/paste typo
- widgets/progressbar.c |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-02 08:10:46 +02:00
Julien Danjou 5bb431fc4a widgets: don't tokenize twice
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-01 15:27:41 +02:00
Julien Danjou 9b74cdbc0a draw: iso2utf now gets len as arg
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-01 14:44:19 +02:00
Pierre Habouzit 1bdf22f631 Add stricter warnings wrt prototypes.
And add the missing static's it found.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-01 08:12:22 +02:00
Byron Clark 1e4641389c progressbar: fix newindex
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-30 19:30:09 +02:00
Julien Danjou b584b19104 atoms: add all used atoms
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-30 18:55:14 +02:00
Julien Danjou 15111d8584 progressbar: use newindex API
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-30 17:42:36 +02:00
Julien Danjou 3ebca2181c draw: really copy colors
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-29 12:14:09 +02:00
Pierre Habouzit b63f768f00 MIN/MAX multi-evaluate their arguments.
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-29 11:28:10 +02:00
Julien Danjou 912b9cd28a graph: add bg and border color on __index
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-28 13:31:33 +02:00
Julien Danjou 35e948f53b draw: xcolor_t store color name
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-28 13:30:17 +02:00
Julien Danjou 823ed27b82 graph: use newindex API
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-28 13:02:42 +02:00
Julien Danjou 09647eef9b taglist: use newindex API
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-27 22:25:31 +02:00
Julien Danjou e9b6c33be3 tasklist: bug fix in show
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-27 22:21:10 +02:00
Julien Danjou c4cc8da645 tasklist: use newindex API
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-27 22:15:54 +02:00
Julien Danjou 5aa2768861 textbox: use newindex API
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-27 20:24:30 +02:00
Julien Danjou 39e1fc7011 textbox: use newindex
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-27 12:49:24 +02:00
Julien Danjou 4bf6d2df62 widgets: add documentation support
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 23:32:33 +02:00
Pierre Habouzit cde80ab49a Move CLEANMASK to xutil.h, remove useless #Includes
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-26 22:47:56 +02:00
Julien Danjou 2cdfb71f15 textbox: remove wrong comment
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 22:06:47 +02:00
Michael Gehring f56f34d715 widgets: remove unnecessary #includes 2008-06-26 19:33:43 +02:00
Julien Danjou 25f795b04f graph: add comments
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 17:22:01 +02:00
Julien Danjou c9311efd5b widgets: s/lstack/luastack/
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 17:13:02 +02:00
Julien Danjou 37e8b95ad9 widgets: handle image size in text data
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 16:53:58 +02:00
Julien Danjou 094d0ebc50 widget: new widget index method
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 16:35:07 +02:00
Julien Danjou 68f0eda193 iconbox: remove
This can be replaced by textbox.

Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-25 16:37:16 +02:00
Julien Danjou ec414ae39b systray: set orientation
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-24 19:56:10 +02:00
Pierre Habouzit 17744fc81d Be more on the safe side.
it's useless to escape anything if text_len is 0, also some clients seem
to have a NULL name, so use NONULL(p->priv).

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-23 18:55:29 +02:00
Julien Danjou 425c8ea635 util: tokenize a_strtobool() 2008-06-23 18:06:00 +02:00
Pierre Habouzit 14f4e02e66 Replace tag_t lists with arrays.
This improves lots of code efficiency (we *know* how many tags we have
now, YA'RLY).

Also fix a \todo in client.c: since knowing the number of tags is cheap,
ignore props that don't match it.

Use many p_alloca for things that depends on the number of tags (no sane
user will have *thousands* of tags. This saves a few more mallocs.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-23 17:37:19 +02:00
Pierre Habouzit 3116c0d381 Add draw_parser_data_{init,wipe}.
Use it everywhere needed instead of wrong p_clear's, this fixes memory
leaks.

Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-23 15:23:49 +02:00
Julien Danjou 4711f4631f systray: restack on client raise
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-23 14:53:31 +02:00
Julien Danjou 446df09acc cosmetic
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-23 14:14:47 +02:00