[layout] Rename LayoutArrange to layout_t
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
ccb2a2db77
commit
0142f0efc9
|
@ -7,7 +7,7 @@ echo "{"
|
||||||
for file in ${top_srcdir}/layouts/*.h
|
for file in ${top_srcdir}/layouts/*.h
|
||||||
do
|
do
|
||||||
echo " /* $file */"
|
echo " /* $file */"
|
||||||
grep '^LayoutArrange layout_' $file | cut -d' ' -f2 | cut -d\; -f1 | while read layout
|
grep '^layout_t layout_' $file | cut -d' ' -f2 | cut -d\; -f1 | while read layout
|
||||||
do
|
do
|
||||||
shortname=$(echo $layout | cut -d _ -f2-)
|
shortname=$(echo $layout | cut -d _ -f2-)
|
||||||
echo " {\"$shortname\", $layout},"
|
echo " {\"$shortname\", $layout},"
|
||||||
|
|
2
client.c
2
client.c
|
@ -491,7 +491,7 @@ client_resize(client_t *c, area_t geometry, bool hints)
|
||||||
{
|
{
|
||||||
int new_screen;
|
int new_screen;
|
||||||
area_t area;
|
area_t area;
|
||||||
LayoutArrange *layout = layout_get_current(c->screen);
|
layout_t *layout = layout_get_current(c->screen);
|
||||||
bool resized = false;
|
bool resized = false;
|
||||||
|
|
||||||
if(!c->ismoving && !c->isfloating && layout != layout_floating)
|
if(!c->ismoving && !c->isfloating && layout != layout_floating)
|
||||||
|
|
6
layout.c
6
layout.c
|
@ -43,7 +43,7 @@ static void
|
||||||
arrange(int screen)
|
arrange(int screen)
|
||||||
{
|
{
|
||||||
client_t *c;
|
client_t *c;
|
||||||
LayoutArrange *curlay = layout_get_current(screen);
|
layout_t *curlay = layout_get_current(screen);
|
||||||
int phys_screen = screen_virttophys(screen);
|
int phys_screen = screen_virttophys(screen);
|
||||||
xcb_query_pointer_cookie_t qp_c;
|
xcb_query_pointer_cookie_t qp_c;
|
||||||
xcb_query_pointer_reply_t *qp_r;
|
xcb_query_pointer_reply_t *qp_r;
|
||||||
|
@ -109,10 +109,10 @@ layout_refresh(void *v __attribute__ ((unused)))
|
||||||
* \param screen Virtual screen number.
|
* \param screen Virtual screen number.
|
||||||
* \return layout used on that screen
|
* \return layout used on that screen
|
||||||
*/
|
*/
|
||||||
LayoutArrange *
|
layout_t *
|
||||||
layout_get_current(int screen)
|
layout_get_current(int screen)
|
||||||
{
|
{
|
||||||
LayoutArrange *l = NULL;
|
layout_t *l = NULL;
|
||||||
tag_t **curtags = tags_get_current(screen);
|
tag_t **curtags = tags_get_current(screen);
|
||||||
|
|
||||||
if(curtags[0])
|
if(curtags[0])
|
||||||
|
|
4
layout.h
4
layout.h
|
@ -25,9 +25,9 @@
|
||||||
#include "common/list.h"
|
#include "common/list.h"
|
||||||
#include "common/util.h"
|
#include "common/util.h"
|
||||||
|
|
||||||
typedef void (LayoutArrange)(int);
|
typedef void (layout_t)(int);
|
||||||
|
|
||||||
LayoutArrange * layout_get_current(int);
|
layout_t * layout_get_current(int);
|
||||||
void * layout_refresh(void *);
|
void * layout_refresh(void *);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -24,8 +24,8 @@
|
||||||
|
|
||||||
#include "layout.h"
|
#include "layout.h"
|
||||||
|
|
||||||
LayoutArrange layout_spiral;
|
layout_t layout_spiral;
|
||||||
LayoutArrange layout_dwindle;
|
layout_t layout_dwindle;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// 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
|
||||||
|
|
|
@ -25,7 +25,7 @@
|
||||||
|
|
||||||
#include "layout.h"
|
#include "layout.h"
|
||||||
|
|
||||||
LayoutArrange layout_floating;
|
layout_t layout_floating;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// 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
|
||||||
|
|
|
@ -24,7 +24,7 @@
|
||||||
|
|
||||||
#include "layout.h"
|
#include "layout.h"
|
||||||
|
|
||||||
LayoutArrange layout_max;
|
layout_t layout_max;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// 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
|
||||||
|
|
|
@ -25,10 +25,10 @@
|
||||||
|
|
||||||
#include "layout.h"
|
#include "layout.h"
|
||||||
|
|
||||||
LayoutArrange layout_tile;
|
layout_t layout_tile;
|
||||||
LayoutArrange layout_tileleft;
|
layout_t layout_tileleft;
|
||||||
LayoutArrange layout_tilebottom;
|
layout_t layout_tilebottom;
|
||||||
LayoutArrange layout_tiletop;
|
layout_t layout_tiletop;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
// 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
|
||||||
|
|
4
mouse.c
4
mouse.c
|
@ -196,7 +196,7 @@ mouse_client_move(int snap)
|
||||||
int ocx, ocy, newscreen;
|
int ocx, ocy, newscreen;
|
||||||
area_t geometry;
|
area_t geometry;
|
||||||
client_t *c = globalconf.focus->client, *target;
|
client_t *c = globalconf.focus->client, *target;
|
||||||
LayoutArrange *layout;
|
layout_t *layout;
|
||||||
simple_window_t *sw = NULL;
|
simple_window_t *sw = NULL;
|
||||||
draw_context_t *ctx;
|
draw_context_t *ctx;
|
||||||
xcb_generic_event_t *ev = NULL;
|
xcb_generic_event_t *ev = NULL;
|
||||||
|
@ -322,7 +322,7 @@ mouse_client_resize(void)
|
||||||
xcb_motion_notify_event_t *ev_motion = NULL;
|
xcb_motion_notify_event_t *ev_motion = NULL;
|
||||||
client_t *c = globalconf.focus->client;
|
client_t *c = globalconf.focus->client;
|
||||||
tag_t **curtags;
|
tag_t **curtags;
|
||||||
LayoutArrange *layout;
|
layout_t *layout;
|
||||||
area_t area = { 0, 0, 0, 0, NULL, NULL }, geometry = { 0, 0, 0, 0, NULL, NULL };
|
area_t area = { 0, 0, 0, 0, NULL, NULL }, geometry = { 0, 0, 0, 0, NULL, NULL };
|
||||||
double mwfact;
|
double mwfact;
|
||||||
simple_window_t *sw = NULL;
|
simple_window_t *sw = NULL;
|
||||||
|
|
|
@ -72,7 +72,7 @@ placement_smart(client_t *c)
|
||||||
area_t newgeometry = { 0, 0, 0, 0, NULL, NULL };
|
area_t newgeometry = { 0, 0, 0, 0, NULL, NULL };
|
||||||
area_t *screen_geometry, *arealist = NULL, *r;
|
area_t *screen_geometry, *arealist = NULL, *r;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
LayoutArrange *layout;
|
layout_t *layout;
|
||||||
|
|
||||||
screen_geometry = p_new(area_t, 1);
|
screen_geometry = p_new(area_t, 1);
|
||||||
|
|
||||||
|
|
|
@ -290,7 +290,7 @@ struct _tag_t
|
||||||
/** true if selected */
|
/** true if selected */
|
||||||
bool selected;
|
bool selected;
|
||||||
/** Current tag layout */
|
/** Current tag layout */
|
||||||
LayoutArrange *layout;
|
layout_t *layout;
|
||||||
/** Master width factor */
|
/** Master width factor */
|
||||||
double mwfact;
|
double mwfact;
|
||||||
/** Number of master windows */
|
/** Number of master windows */
|
||||||
|
|
4
tag.c
4
tag.c
|
@ -59,7 +59,7 @@ tag_view(tag_t *tag, bool view)
|
||||||
* \return a new tag with all these parameters
|
* \return a new tag with all these parameters
|
||||||
*/
|
*/
|
||||||
tag_t *
|
tag_t *
|
||||||
tag_new(const char *name, LayoutArrange *layout, double mwfact, int nmaster, int ncol)
|
tag_new(const char *name, layout_t *layout, double mwfact, int nmaster, int ncol)
|
||||||
{
|
{
|
||||||
tag_t *tag;
|
tag_t *tag;
|
||||||
|
|
||||||
|
@ -298,7 +298,7 @@ luaA_tag_new(lua_State *L)
|
||||||
int ncol, nmaster;
|
int ncol, nmaster;
|
||||||
const char *name, *lay;
|
const char *name, *lay;
|
||||||
double mwfact;
|
double mwfact;
|
||||||
LayoutArrange *layout;
|
layout_t *layout;
|
||||||
|
|
||||||
luaA_checktable(L, 1);
|
luaA_checktable(L, 1);
|
||||||
|
|
||||||
|
|
2
tag.h
2
tag.h
|
@ -29,7 +29,7 @@
|
||||||
#define IS_TILED(client, screen) (client && !client->isfloating && client_isvisible(client, screen))
|
#define IS_TILED(client, screen) (client && !client->isfloating && client_isvisible(client, screen))
|
||||||
|
|
||||||
/* Contructor, destructor and referencors */
|
/* Contructor, destructor and referencors */
|
||||||
tag_t * tag_new(const char *, LayoutArrange *, double, int, int);
|
tag_t * tag_new(const char *, layout_t *, double, int, int);
|
||||||
|
|
||||||
static inline void
|
static inline void
|
||||||
tag_delete(tag_t **tag)
|
tag_delete(tag_t **tag)
|
||||||
|
|
Loading…
Reference in New Issue