Commit Graph

124 Commits

Author SHA1 Message Date
Julien Danjou d59fc62739 draw rectangle take an Area as arg 2008-01-21 16:31:14 +01:00
Julien Danjou feac2caa81 statusbar_draw is static 2008-01-21 16:31:13 +01:00
Julien Danjou 0ccfeb14b5 use info from the right screen 2008-01-19 14:56:18 +01:00
Julien Danjou 3fc3fd9623 use previous statusbar to get screen size 2008-01-16 15:26:48 +01:00
Julien Danjou 542df6a3ab do not try to guess where we should XSync(), XSync after bunch of XEvents 2008-01-11 16:17:15 +01:00
Nikos Ntarmos 956ce4ab8e add nscreen var to store screen count
Signed-off-by: Julien Danjou <julien@danjou.info>
2008-01-11 13:39:48 +01:00
Julien Danjou 2aacaa9320 stop dropping EnterWindow event
and make statusbar_update_position static
2008-01-10 20:53:31 +01:00
Julien Danjou 5c9291ff0b use a cache system for status bar 2008-01-07 18:12:38 +01:00
Julien Danjou d16b11bb30 cosmetic 2008-01-06 22:46:59 +01:00
Julien Danjou af6ff367eb typedef enum Position 2008-01-04 19:12:07 +01:00
Julien Danjou a12ea9441f fix window placement for left positionned statusbar 2008-01-04 13:28:51 +01:00
Julien Danjou 4f65aa8f51 rework headers inclusion 2008-01-01 18:02:36 +01:00
Julien Danjou b9d6a93c59 draw statusbar after init 2007-12-31 10:04:03 +01:00
Julien Danjou f7f6951957 allow to have several statusbar 2007-12-30 21:00:34 +01:00
Julien Danjou 64e44421dd allow to set statusbar width 2007-12-30 18:55:46 +01:00
Julien Danjou 643407b5ea allow to set the statusbar height 2007-12-30 18:54:17 +01:00
Julien Danjou a051c2db09 free old statusbar drawable 2007-12-30 18:13:33 +01:00
Julien Danjou cb0203b0a0 don't display if statusbar off 2007-12-30 14:23:01 +01:00
Julien Danjou 0df27e0f6a split the display part of statusbar_draw(), move it to new statusbar_display(), and call it for expose events 2007-12-30 13:17:26 +01:00
Julien Danjou 1021f86e24 rework draw stuff
- remove display from DrawCtx
- add Drawable in statusbar
2007-12-30 12:26:11 +01:00
Julien Danjou 360d9023a4 allow textbox widgets to have their own font 2007-12-29 16:04:06 +01:00
Aldo Cortesi 5f079ef73e Clean get_screen_info and get_display_info.
Besides making these functions much nicer to use, this fixes a number of
things:

- Clients now don't have to free the returned structures.

- The ScreenInfo allocated by XineramaQueryScreens should be freed with XFree,
  not p_delete.

This patch also introduces an abstract Area type that will be very useful.
2007-12-23 09:53:50 +01:00
Aldo Cortesi 51379e065b Clean interface of statusbar_update_position. 2007-12-23 09:51:44 +01:00
Julien Danjou b0a8522466 rename a bunch of widget functions 2007-12-22 20:55:17 +01:00
Julien Danjou c232576631 rename a bunch of draw functions 2007-12-22 20:17:24 +01:00
Julien Danjou afe32e27f0 renders right widget from last to first 2007-12-22 16:49:21 +01:00
Aldo Cortesi 4d4001b41f Clean interface of statusbar_init. 2007-12-19 10:43:15 +01:00
Aldo Cortesi 7190e4fa48 Change awesome_config -> AwesomeConf.
All other struct definitions in the project follow this naming convention.
2007-12-19 10:43:02 +01:00
Aldo Cortesi 980afac1cf Make sure all uicb_ functions have doxygen annotations.
Also refactor some indentation while I'm there.
2007-12-19 10:42:34 +01:00
Aldo Cortesi ce556ec743 The preferred line length is 80 characters. 2007-12-18 11:27:26 +01:00
Aldo Cortesi 965cbb7e0b Continue to simplify interfaces that require arguments in globalconf.
Today I focus on screen.c.
2007-12-18 11:26:39 +01:00
Aldo Cortesi 205f2c55ca Make "Statusbar statusbar" the in VirtScreen "Statusbar *statusbar". This is
more consistent with the rest of the interface, and will make our life easier
when we have mulitiple statusbars per screen.
2007-12-18 11:26:18 +01:00
Aldo Cortesi 4723ab3627 This patch is a first draft of independently targetable textboxes, and a
protocol to speak to them. Given a textbox widget definition like this:

        textbox mail {
            default = 0
        }
        textbox time {}

We can update the boxes individually by going:

    echo 0 tell_widget mail 10
    echo 0 tell_widget time 12:01

Text boxes will dynamically resize to fit their contents. A textbox can be
cleared by going:

    echo 0 tell_widget name

A text-box containing no text will take up 0 space in the bar, i.e. it will not
be visible at all

Textboxes now supersede statusbar_set_text, so this call has been removed.
2007-12-17 18:22:05 +01:00
Aldo Cortesi b6bfd1a4d0 The arg to uicb_ functions is no longer const. 2007-12-17 18:19:44 +01:00
Aldo Cortesi 5715b70ab3 Make empty status bar look nice.
It's now possible to have unfilled space on the status bar. Fill it with the
background colour on creation.

Normalise line lengths while I'm at it.
2007-12-16 12:58:21 +01:00
Aldo Cortesi 8880a3804e Simplify widget draw interface. 2007-12-16 12:54:42 +01:00
Aldo Cortesi 2f74c079aa Massive, massive interface refactoring.
The big change here is that we now keep our configuration structure in a global
variable called globalconf. This radically simplifies many interfaces, since
passing awesomeconf everywhere is no longer necessary. There are also more
subtle interface effects - now we can reliably identify a screen from just a
screen ID, rather than an awesomeconf, screenid tuple.

Overall, this patch makes most of the interfaces in awesome much nicer to use -
enjoy!

Yes, this is a huge patch, but since a lot of the refactoring was done
systematically using vim macros, splitting this up would have been very hard.
2007-12-16 12:12:48 +01:00
Julien Danjou 602f921559 first try to get widget configurable 2007-12-15 18:21:02 +01:00
Julien Danjou 79749fcc7f remove useless #include 2007-12-15 16:17:57 +01:00
Aldo Cortesi 76ddf235ac Widget-ise the statusbar.
We now have the beginnings of a flexible widget structure for the statusbar.
For now, there is no behavioural change, and the interface is a bit crude, but
watch this space!
2007-12-15 10:15:42 +01:00
Aldo Cortesi c81b5cfc55 Refactor statusbar.c
This a preparatory patch. Refactor statusbar.c to compartmentalise the drawing
of the statusbar "widgets". We can now begin to see what a generalised widget
drawing interface would look like.

Note that at the moment we don't gracefully handle situations where "widgets"
run out of space. That will come as we generalise from here.
2007-12-15 09:48:13 +01:00
Aldo Cortesi f36a56cdcc Refactor draw.c
This is a big patch that does not change any behaviour. We abstract the data
needed by the draw.c functions into a context object, and pass that around
instead of passing each argument every time. This results in a much cleaner API
- most functions lose 3-4 arguments.

This is a preparatory patch for further work on statusbar.
2007-12-15 09:30:29 +01:00
Julien Danjou df2a8e1b1d add a focus history 2007-12-14 21:51:54 +01:00
Julien Danjou aacb020564 rename statusbar functions 2007-12-14 20:10:52 +01:00
Julien Danjou bb1381abc2 make tags a linked list instead of array 2007-12-14 19:05:30 +01:00
Julien Danjou b03cdbd877 remove nlayouts 2007-12-14 17:57:05 +01:00
Julien Danjou 84bb954004 rename statusbar uicb and add uicb_statusbar_set_position 2007-12-14 15:52:52 +01:00
Julien Danjou 078d224b46 use a linked list for handling tag <-> client relationship 2007-12-14 14:29:32 +01:00
Aldo Cortesi 2b5ba1f16f Improve the call signature of get_current_tag and get_current_layout. 2007-12-14 09:29:42 +01:00
Julien Danjou 5fa67c23df split awesomeconf and screen config
a.k.a the big post-2.0 blind commit
2007-12-11 20:56:51 +01:00