util: import orientation

Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
Julien Danjou 2008-09-20 18:59:14 +02:00
parent 44ef511aed
commit 69d06723df
2 changed files with 9 additions and 9 deletions

View File

@ -35,6 +35,12 @@
#include "tokenize.h" #include "tokenize.h"
typedef enum
{
Horizontal,
Vertical
} orientation_t;
/** A list of possible position, not sex related */ /** A list of possible position, not sex related */
typedef enum typedef enum
{ {

View File

@ -27,12 +27,6 @@
extern awesome_t globalconf; extern awesome_t globalconf;
typedef enum
{
HORIZONTAL,
VERTICAL
} orientation_t;
static void static void
layout_fair(int screen, const orientation_t orientation) layout_fair(int screen, const orientation_t orientation)
{ {
@ -60,7 +54,7 @@ layout_fair(int screen, const orientation_t orientation)
for(c = globalconf.clients; c; c = c->next) for(c = globalconf.clients; c; c = c->next)
if(IS_TILED(c, screen)) if(IS_TILED(c, screen))
{ {
if (orientation == HORIZONTAL) if (orientation == Horizontal)
{ {
geometry.width = area.width / u_divisions; geometry.width = area.width / u_divisions;
geometry.height = area.height / v_divisions; geometry.height = area.height / v_divisions;
@ -92,13 +86,13 @@ layout_fair(int screen, const orientation_t orientation)
void void
layout_fairh(int screen) layout_fairh(int screen)
{ {
layout_fair(screen, HORIZONTAL); layout_fair(screen, Horizontal);
} }
void void
layout_fairv(int screen) layout_fairv(int screen)
{ {
layout_fair(screen, VERTICAL); layout_fair(screen, Vertical);
} }
// vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80