From 0ce77459de409de45c7110b6e0f3ee423e8b23d8 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 28 Aug 2009 17:44:51 +0200 Subject: [PATCH] strut: import strut_has_value() Signed-off-by: Julien Danjou --- client.h | 21 --------------------- strut.h | 26 ++++++++++++++++++++++++-- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/client.h b/client.h index 0bc9b3de8..72a251e95 100644 --- a/client.h +++ b/client.h @@ -287,26 +287,5 @@ client_isvisible(client_t *c, screen_t *screen) return (!c->hidden && !c->minimized && client_maybevisible(c, screen)); } -/** Check if a client has strut information. - * \param c A client. - * \return A boolean value, true if the client has strut information. - */ -static inline bool -client_hasstrut(client_t *c) -{ - return (c->strut.left - || c->strut.right - || c->strut.top - || c->strut.bottom - || c->strut.left_start_y - || c->strut.left_end_y - || c->strut.right_start_y - || c->strut.right_end_y - || c->strut.top_start_x - || c->strut.top_end_x - || c->strut.bottom_start_x - || c->strut.bottom_end_x); -} - #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/strut.h b/strut.h index 8b5a9fed5..8be531543 100644 --- a/strut.h +++ b/strut.h @@ -19,11 +19,12 @@ * */ -#ifndef AWESOME_STRUTS_H -#define AWESOME_STRUTS_H +#ifndef AWESOME_STRUT_H +#define AWESOME_STRUT_H #include #include +#include /* Strut */ typedef struct @@ -35,6 +36,27 @@ typedef struct uint16_t bottom_start_x, bottom_end_x; } strut_t; +/** Check if a strut has information. + * \param strut A strut structure. + * \return A boolean value, true if the strut has strut information. + */ +static inline bool +strut_has_value(strut_t *strut) +{ + return (strut->left + || strut->right + || strut->top + || strut->bottom + || strut->left_start_y + || strut->left_end_y + || strut->right_start_y + || strut->right_end_y + || strut->top_start_x + || strut->top_end_x + || strut->bottom_start_x + || strut->bottom_end_x); +} + int luaA_pushstrut(lua_State *, strut_t); void luaA_tostrut(lua_State *, int, strut_t *);