Julien Danjou
486ef71a7f
screen: replace screens pointer by a screen_t array
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-17 16:14:09 +02:00
Matus Telgarsky
1c147a6d76
graph: fix for missing allocation
...
resizing graph widgets (by setting the width parameter) was failing to
update the caches draw_to and draw_from. I have attached a 2-line patch
remedying this. The bug wasn't caught earlier because the default size,
80, is bigger than what people typically use.
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-15 11:36:11 +02:00
Julien Danjou
b1a59aca07
widget: widget are now full Lua object
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-12 15:11:33 +02:00
Uli Schlachter
95457c5ab7
Move the definition of globalconf into a header file
...
Pretty much every single source file needs this struct, so it makes sense to
define it in a common header instead of in every single .c file.
Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-04-10 16:32:42 +02:00
Julien Danjou
527e6308c3
graph: return if size is 0 (FS#466)
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-02 17:43:14 +01:00
Julien Danjou
ab0220274e
graph: check width value (FS#465)
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-03-02 14:20:08 +01:00
Julien Danjou
8f9cc9a262
widgets: use integer instead of int8_t
...
The computer is smart, and the compiler also.
Should fix:
widgets/progressbar.c:451: warning: array subscript has type `char'
Signed-off-by: Julien Danjou <julien@danjou.info>
2009-01-18 11:03:13 +01:00
Julien Danjou
ccc6452d49
widget: change widget initialization code
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou
f556c04868
widget: remove common_new()
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-12-12 16:51:41 +01:00
Julien Danjou
25bf12868a
widgets: use a geometry callback
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-22 17:32:17 +02:00
Julien Danjou
0178a75c7d
graph, progressbar: fix bar/plot additions
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-10-22 10:30:20 +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
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
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
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
23707aafcf
graph: add documentation
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-08-29 13:48:47 +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
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
80b79717ba
various documentation update for _index()
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-07-28 16:03:38 +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
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
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
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
3ebca2181c
draw: really copy colors
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-29 12:14:09 +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
4bf6d2df62
widgets: add documentation support
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 23:32:33 +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
094d0ebc50
widget: new widget index method
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-26 16:35:07 +02:00
Julien Danjou
425c8ea635
util: tokenize a_strtobool()
2008-06-23 18:06:00 +02:00
Julien Danjou
ab5119732d
use more tokenizer, with len
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-23 14:01:33 +02:00
Pierre Habouzit
8d7f45d76a
And more gperf.
...
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
2008-06-23 07:41:22 +02:00
Julien Danjou
f5314dbc9e
widgets: add destructors functions
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-14 22:56:05 +02:00
Julien Danjou
3fa072504f
graph: draw everything in one loop
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-12 16:14:51 +02:00
Julien Danjou
4b6ba11360
graph: allow graphs to overlap
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-12 16:10:12 +02:00
Julien Danjou
30a19041c9
graph: use round()
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-12 14:59:06 +02:00
Julien Danjou
b6eea1788f
[graph] Rewrite with linked list
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-11 17:39:24 +02:00
Julien Danjou
ebb25ba2d4
[graph] Rename Data to graph_data_t
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-11 16:44:18 +02:00
marco candrian
265fc187a9
[graph] rename 'max' to 'max_value' (like in the progressbar)
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-07 10:41:19 +02:00
Julien Danjou
807c5bf208
[widget] Remove useless drawing args
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-03 16:08:33 +02:00
marco candrian
007787107c
[graph] re-add draw_style ('bottom', 'top' and 'line')
...
e.g.: graph:set("draw_style", "data-title line")
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-03 07:58:45 +02:00
Julien Danjou
d8a5b43f26
[widgets] Make draw functions statusbar-less dependents
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-06-02 12:18:17 +02:00
marco candrian
878b4de509
[graph] lua transition
...
no 'draw_style' yet.
2008-05-31 14:53:56 +02:00
Julien Danjou
c332971b21
[draw] Rename draw_color_new() to xcolor_new()
...
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-05-30 12:34:38 +02:00