From 0142f0efc93209d4978048f20357fed040844f80 Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Fri, 23 May 2008 13:33:57 +0200 Subject: [PATCH] [layout] Rename LayoutArrange to layout_t Signed-off-by: Julien Danjou --- build-utils/layoutgen.sh | 2 +- client.c | 2 +- layout.c | 6 +++--- layout.h | 4 ++-- layouts/fibonacci.h | 4 ++-- layouts/floating.h | 2 +- layouts/max.h | 2 +- layouts/tile.h | 8 ++++---- mouse.c | 4 ++-- placement.c | 2 +- structs.h | 2 +- tag.c | 4 ++-- tag.h | 2 +- 13 files changed, 22 insertions(+), 22 deletions(-) diff --git a/build-utils/layoutgen.sh b/build-utils/layoutgen.sh index e772b4dc..5edf381a 100755 --- a/build-utils/layoutgen.sh +++ b/build-utils/layoutgen.sh @@ -7,7 +7,7 @@ echo "{" for file in ${top_srcdir}/layouts/*.h do 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 shortname=$(echo $layout | cut -d _ -f2-) echo " {\"$shortname\", $layout}," diff --git a/client.c b/client.c index c453b0d3..48c1de22 100644 --- a/client.c +++ b/client.c @@ -491,7 +491,7 @@ client_resize(client_t *c, area_t geometry, bool hints) { int new_screen; area_t area; - LayoutArrange *layout = layout_get_current(c->screen); + layout_t *layout = layout_get_current(c->screen); bool resized = false; if(!c->ismoving && !c->isfloating && layout != layout_floating) diff --git a/layout.c b/layout.c index 0dc9b4ce..385e5e53 100644 --- a/layout.c +++ b/layout.c @@ -43,7 +43,7 @@ static void arrange(int screen) { client_t *c; - LayoutArrange *curlay = layout_get_current(screen); + layout_t *curlay = layout_get_current(screen); int phys_screen = screen_virttophys(screen); xcb_query_pointer_cookie_t qp_c; xcb_query_pointer_reply_t *qp_r; @@ -109,10 +109,10 @@ layout_refresh(void *v __attribute__ ((unused))) * \param screen Virtual screen number. * \return layout used on that screen */ -LayoutArrange * +layout_t * layout_get_current(int screen) { - LayoutArrange *l = NULL; + layout_t *l = NULL; tag_t **curtags = tags_get_current(screen); if(curtags[0]) diff --git a/layout.h b/layout.h index 7986b66f..4b4451cd 100644 --- a/layout.h +++ b/layout.h @@ -25,9 +25,9 @@ #include "common/list.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 *); #endif diff --git a/layouts/fibonacci.h b/layouts/fibonacci.h index cc1c4616..2a0286f6 100644 --- a/layouts/fibonacci.h +++ b/layouts/fibonacci.h @@ -24,8 +24,8 @@ #include "layout.h" -LayoutArrange layout_spiral; -LayoutArrange layout_dwindle; +layout_t layout_spiral; +layout_t layout_dwindle; #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/layouts/floating.h b/layouts/floating.h index a0337057..1b4c60d4 100644 --- a/layouts/floating.h +++ b/layouts/floating.h @@ -25,7 +25,7 @@ #include "layout.h" -LayoutArrange layout_floating; +layout_t layout_floating; #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/layouts/max.h b/layouts/max.h index 2960387b..07107eb4 100644 --- a/layouts/max.h +++ b/layouts/max.h @@ -24,7 +24,7 @@ #include "layout.h" -LayoutArrange layout_max; +layout_t layout_max; #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/layouts/tile.h b/layouts/tile.h index a7f3e169..72b91bbe 100644 --- a/layouts/tile.h +++ b/layouts/tile.h @@ -25,10 +25,10 @@ #include "layout.h" -LayoutArrange layout_tile; -LayoutArrange layout_tileleft; -LayoutArrange layout_tilebottom; -LayoutArrange layout_tiletop; +layout_t layout_tile; +layout_t layout_tileleft; +layout_t layout_tilebottom; +layout_t layout_tiletop; #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/mouse.c b/mouse.c index a6feefef..a35e7c17 100644 --- a/mouse.c +++ b/mouse.c @@ -196,7 +196,7 @@ mouse_client_move(int snap) int ocx, ocy, newscreen; area_t geometry; client_t *c = globalconf.focus->client, *target; - LayoutArrange *layout; + layout_t *layout; simple_window_t *sw = NULL; draw_context_t *ctx; xcb_generic_event_t *ev = NULL; @@ -322,7 +322,7 @@ mouse_client_resize(void) xcb_motion_notify_event_t *ev_motion = NULL; client_t *c = globalconf.focus->client; tag_t **curtags; - LayoutArrange *layout; + layout_t *layout; area_t area = { 0, 0, 0, 0, NULL, NULL }, geometry = { 0, 0, 0, 0, NULL, NULL }; double mwfact; simple_window_t *sw = NULL; diff --git a/placement.c b/placement.c index 88c86711..cfe748b4 100644 --- a/placement.c +++ b/placement.c @@ -72,7 +72,7 @@ placement_smart(client_t *c) area_t newgeometry = { 0, 0, 0, 0, NULL, NULL }; area_t *screen_geometry, *arealist = NULL, *r; bool found = false; - LayoutArrange *layout; + layout_t *layout; screen_geometry = p_new(area_t, 1); diff --git a/structs.h b/structs.h index eb24ac13..e833038e 100644 --- a/structs.h +++ b/structs.h @@ -290,7 +290,7 @@ struct _tag_t /** true if selected */ bool selected; /** Current tag layout */ - LayoutArrange *layout; + layout_t *layout; /** Master width factor */ double mwfact; /** Number of master windows */ diff --git a/tag.c b/tag.c index 49d54fff..07449be4 100644 --- a/tag.c +++ b/tag.c @@ -59,7 +59,7 @@ tag_view(tag_t *tag, bool view) * \return a new tag with all these parameters */ 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; @@ -298,7 +298,7 @@ luaA_tag_new(lua_State *L) int ncol, nmaster; const char *name, *lay; double mwfact; - LayoutArrange *layout; + layout_t *layout; luaA_checktable(L, 1); diff --git a/tag.h b/tag.h index fec70b14..346be636 100644 --- a/tag.h +++ b/tag.h @@ -29,7 +29,7 @@ #define IS_TILED(client, screen) (client && !client->isfloating && client_isvisible(client, screen)) /* 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 tag_delete(tag_t **tag)