diff --git a/awesome-menu.c b/awesome-menu.c index a3aecfd9..43967a4b 100644 --- a/awesome-menu.c +++ b/awesome-menu.c @@ -116,7 +116,7 @@ exit_help(int exit_code) static int config_parse(int screen, const char *confpatharg, - const char *menu_title, Area *geometry) + const char *menu_title, area_t *geometry) { int ret, i; char *confpath; @@ -366,7 +366,7 @@ static void redraw(void) { item_t *item; - Area geometry = { 0, 0, 0, 0, NULL, NULL }; + area_t geometry = { 0, 0, 0, 0, NULL, NULL }; Bool selected_item_is_drawn = False; int len, prompt_len, x_of_previous_item; style_t style; @@ -589,7 +589,7 @@ main(int argc, char **argv) char *configfile = NULL, *cmd; ssize_t len; const char *shell = getenv("SHELL"); - Area geometry = { 0, 0, 0, 0, NULL, NULL }; + area_t geometry = { 0, 0, 0, 0, NULL, NULL }; ScreensInfo *si; unsigned int ui; Window dummy; diff --git a/awesome-message.c b/awesome-message.c index 53d87102..56083909 100644 --- a/awesome-message.c +++ b/awesome-message.c @@ -121,7 +121,7 @@ main(int argc, char **argv) SimpleWindow *sw; DrawCtx *ctx; XEvent ev; - Area geometry = { 0, 0, 200, 50, NULL, NULL }, + area_t geometry = { 0, 0, 200, 50, NULL, NULL }, icon_geometry = { -1, -1, -1, -1, NULL, NULL }; int opt, i, x, y, ret, screen = 0, delay = 0; unsigned int ui; diff --git a/client.c b/client.c index 191f2e70..2db6b641 100644 --- a/client.c +++ b/client.c @@ -256,7 +256,7 @@ client_manage(Window w, XWindowAttributes *wa, int screen) XWindowChanges wc; Tag *tag; Rule *rule; - Area screen_geom; + area_t screen_geom; int phys_screen = get_phys_screen(screen); long flags; @@ -394,11 +394,11 @@ client_manage(Window w, XWindowAttributes *wa, int screen) * \param return True if resize has been done */ Bool -client_resize(Client *c, Area geometry, Bool sizehints) +client_resize(Client *c, area_t geometry, Bool sizehints) { int new_screen; double dx, dy, max, min, ratio; - Area area; + area_t area; XWindowChanges wc; if(sizehints) @@ -815,7 +815,7 @@ uicb_client_moveresize(int screen, char *arg) int mx, my, dx, dy, nmx, nmy; unsigned int dui; Window dummy; - Area area; + area_t area; Client *sel = globalconf.focus->client; Layout *curlay = layout_get_current(screen); @@ -892,7 +892,7 @@ uicb_client_kill(int screen __attribute__ ((unused)), char *arg __attribute__ (( } static void -client_maximize(Client *c, Area geometry) +client_maximize(Client *c, area_t geometry) { if((c->ismax = !c->ismax)) @@ -932,7 +932,7 @@ void uicb_client_togglemax(int screen, char *arg __attribute__ ((unused))) { Client *sel = globalconf.focus->client; - Area area = screen_get_area(screen, + area_t area = screen_get_area(screen, globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding); @@ -953,7 +953,7 @@ void uicb_client_toggleverticalmax(int screen, char *arg __attribute__ ((unused))) { Client *sel = globalconf.focus->client; - Area area = screen_get_area(screen, + area_t area = screen_get_area(screen, globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding); @@ -976,7 +976,7 @@ void uicb_client_togglehorizontalmax(int screen, char *arg __attribute__ ((unused))) { Client *sel = globalconf.focus->client; - Area area = screen_get_area(screen, + area_t area = screen_get_area(screen, globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding); diff --git a/client.h b/client.h index f07fd5b5..4e43923d 100644 --- a/client.h +++ b/client.h @@ -31,7 +31,7 @@ void client_focus(Client *, int, Bool); void client_ban(Client *); void client_unban(Client *); void client_manage(Window, XWindowAttributes *, int); -Bool client_resize(Client *, Area, Bool); +Bool client_resize(Client *, area_t, Bool); void client_unmanage(Client *); void client_updatewmhints(Client *); long client_updatesizehints(Client *); diff --git a/common/draw.c b/common/draw.c index fe937eaa..275b140c 100644 --- a/common/draw.c +++ b/common/draw.c @@ -127,7 +127,7 @@ draw_context_delete(DrawCtx *ctx) */ void draw_text(DrawCtx *ctx, - Area area, + area_t area, Alignment align, int padding, char *text, @@ -225,7 +225,7 @@ draw_text(DrawCtx *ctx, * \return pat pattern or NULL; needs to get cairo_pattern_destroy()'ed; */ static cairo_pattern_t * -draw_setup_cairo_color_source(DrawCtx *ctx, Area rect, +draw_setup_cairo_color_source(DrawCtx *ctx, area_t rect, XColor *pcolor, XColor *pcolor_center, XColor *pcolor_end) { cairo_pattern_t *pat = NULL; @@ -263,7 +263,7 @@ draw_setup_cairo_color_source(DrawCtx *ctx, Area rect, * \param color color to use */ void -draw_rectangle(DrawCtx *ctx, Area geometry, Bool filled, XColor color) +draw_rectangle(DrawCtx *ctx, area_t geometry, Bool filled, XColor color) { cairo_set_antialias(ctx->cr, CAIRO_ANTIALIAS_NONE); cairo_set_line_width(ctx->cr, 1.0); @@ -290,8 +290,8 @@ draw_rectangle(DrawCtx *ctx, Area geometry, Bool filled, XColor color) * \param pcolor_end color at pattern_start + pattern_width */ void -draw_rectangle_gradient(DrawCtx *ctx, Area geometry, Bool filled, - Area pattern_rect, XColor *pcolor, XColor *pcolor_center, XColor *pcolor_end) +draw_rectangle_gradient(DrawCtx *ctx, area_t geometry, Bool filled, + area_t pattern_rect, XColor *pcolor, XColor *pcolor_center, XColor *pcolor_end) { cairo_pattern_t *pat; @@ -340,8 +340,8 @@ draw_graph_setup(DrawCtx *ctx) * \param pcolor_end color at the right */ void -draw_graph(DrawCtx *ctx, Area rect, int *from, int *to, int cur_index, - Area patt_rect, XColor *pcolor, XColor *pcolor_center, XColor *pcolor_end) +draw_graph(DrawCtx *ctx, area_t rect, int *from, int *to, int cur_index, + area_t patt_rect, XColor *pcolor, XColor *pcolor_center, XColor *pcolor_end) { int i, x, y, w; cairo_pattern_t *pat; @@ -381,8 +381,8 @@ draw_graph(DrawCtx *ctx, Area rect, int *from, int *to, int cur_index, * \param pcolor_end color at the right */ void -draw_graph_line(DrawCtx *ctx, Area rect, int *to, int cur_index, - Area patt_rect, XColor *pcolor, XColor *pcolor_center, XColor *pcolor_end) +draw_graph_line(DrawCtx *ctx, area_t rect, int *to, int cur_index, + area_t patt_rect, XColor *pcolor, XColor *pcolor_center, XColor *pcolor_end) { int i, x, y, w; int flag = 0; /* used to prevent drawing a line from 0 to 0 values */ @@ -528,12 +528,12 @@ draw_image(DrawCtx *ctx, int x, int y, int wanted_h, const char *filename) /** Get an imag size (PNG format only) * \param filename file name - * \return Area structure with width and height set to image size + * \return area_t structure with width and height set to image size */ -Area +area_t draw_get_image_size(const char *filename) { - Area size = { -1, -1, -1, -1, NULL, NULL }; + area_t size = { -1, -1, -1, -1, NULL, NULL }; cairo_surface_t *surface; cairo_status_t cairo_st; @@ -706,9 +706,9 @@ draw_style_init(Display *disp, int phys_screen, cfg_t *cfg, * \param elem area to remove */ void -area_list_remove(Area **head, Area *elem) +area_list_remove(area_t **head, area_t *elem) { - Area *r, inter, *extra, *rnext; + area_t *r, inter, *extra, *rnext; for(r = *head; r; r = rnext) { @@ -722,7 +722,7 @@ area_list_remove(Area **head, Area *elem) if(AREA_LEFT(inter) > AREA_LEFT(*r)) { - extra = p_new(Area, 1); + extra = p_new(area_t, 1); extra->x = r->x; extra->y = r->y; extra->width = AREA_LEFT(inter) - r->x; @@ -732,7 +732,7 @@ area_list_remove(Area **head, Area *elem) if(AREA_TOP(inter) > AREA_TOP(*r)) { - extra = p_new(Area, 1); + extra = p_new(area_t, 1); extra->x = r->x; extra->y = r->y; extra->width = r->width; @@ -742,7 +742,7 @@ area_list_remove(Area **head, Area *elem) if(AREA_RIGHT(inter) < AREA_RIGHT(*r)) { - extra = p_new(Area, 1); + extra = p_new(area_t, 1); extra->x = AREA_RIGHT(inter); extra->y = r->y; extra->width = AREA_RIGHT(*r) - AREA_RIGHT(inter); @@ -752,7 +752,7 @@ area_list_remove(Area **head, Area *elem) if(AREA_BOTTOM(inter) < AREA_BOTTOM(*r)) { - extra = p_new(Area, 1); + extra = p_new(area_t, 1); extra->x = r->x; extra->y = AREA_BOTTOM(inter); extra->width = r->width; diff --git a/common/draw.h b/common/draw.h index ce1d75ff..d86fea5d 100644 --- a/common/draw.h +++ b/common/draw.h @@ -41,18 +41,18 @@ typedef enum AlignAuto } Alignment; -typedef struct Area Area; -struct Area +typedef struct area_t area_t; +struct area_t { /** Co-ords of upper left corner */ int x; int y; int width; int height; - Area *prev, *next; + area_t *prev, *next; }; -DO_SLIST(Area, area, p_delete) +DO_SLIST(area_t, area, p_delete) #define AREA_LEFT(a) ((a).x) #define AREA_TOP(a) ((a).y) @@ -60,7 +60,7 @@ DO_SLIST(Area, area, p_delete) #define AREA_BOTTOM(a) ((a).y + (a).height) static inline Bool -area_intersect_area(Area a, Area b) +area_intersect_area(area_t a, area_t b) { return (b.x < a.x + a.width && b.x + b.width > a.x @@ -68,10 +68,10 @@ area_intersect_area(Area a, Area b) && b.y + b.height > a.y); } -static inline Area -area_get_intersect_area(Area a, Area b) +static inline area_t +area_get_intersect_area(area_t a, area_t b) { - Area g; + area_t g; g.x = MAX(a.x, b.x); g.y = MAX(a.y, b.y); @@ -113,24 +113,24 @@ typedef struct DrawCtx *draw_context_new(Display *, int, int, int, Drawable); void draw_context_delete(DrawCtx *); -void draw_text(DrawCtx *, Area, Alignment, int, char *, style_t); -void draw_rectangle(DrawCtx *, Area, Bool, XColor); -void draw_rectangle_gradient(DrawCtx *, Area, Bool, Area, XColor *, XColor *, XColor *); +void draw_text(DrawCtx *, area_t, Alignment, int, char *, style_t); +void draw_rectangle(DrawCtx *, area_t, Bool, XColor); +void draw_rectangle_gradient(DrawCtx *, area_t, Bool, area_t, XColor *, XColor *, XColor *); void draw_graph_setup(DrawCtx *); -void draw_graph(DrawCtx *, Area, int *, int *, int, Area, XColor *, XColor *, XColor *); -void draw_graph_line(DrawCtx *, Area, int *, int, Area, XColor *, XColor *, XColor *); +void draw_graph(DrawCtx *, area_t, int *, int *, int, area_t, XColor *, XColor *, XColor *); +void draw_graph_line(DrawCtx *, area_t, int *, int, area_t, XColor *, XColor *, XColor *); void draw_circle(DrawCtx *, int, int, int, Bool, XColor); void draw_image(DrawCtx *, int, int, int, const char *); void draw_image_from_argb_data(DrawCtx *, int, int, int, int, int, unsigned char *); -Area draw_get_image_size(const char *filename); +area_t draw_get_image_size(const char *filename); Drawable draw_rotate(DrawCtx *, int, double, int, int); unsigned short draw_textwidth(Display *, XftFont *, char *); Alignment draw_get_align(const char *); Bool draw_color_new(Display *, int, const char *, XColor *); void draw_style_init(Display *, int, cfg_t *, style_t *, style_t *); -void area_list_remove(Area **, Area *); +void area_list_remove(area_t **, area_t *); #endif // vim: filetype=c:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=80 diff --git a/common/swindow.h b/common/swindow.h index a0931fe9..fede59e8 100644 --- a/common/swindow.h +++ b/common/swindow.h @@ -30,7 +30,7 @@ typedef struct SimpleWindow Display *display; Window window; Drawable drawable; - Area geometry; + area_t geometry; } SimpleWindow; SimpleWindow * simplewindow_new(Display *, int, int, int, unsigned int, unsigned int, unsigned int); diff --git a/common/xscreen.c b/common/xscreen.c index 2988b1da..568ae559 100644 --- a/common/xscreen.c +++ b/common/xscreen.c @@ -46,10 +46,10 @@ screen_get_bycoord(ScreensInfo *si, int screen, int x, int y) return screen; } -static inline Area +static inline area_t screen_xsi_to_area(XineramaScreenInfo si) { - Area a; + area_t a; a.x = si.x_org; a.y = si.y_org; @@ -80,7 +80,7 @@ screensinfo_new(Display *disp) if((si->xinerama_is_active = XineramaIsActive(disp))) { xsi = XineramaQueryScreens(disp, &xinerama_screen_number); - si->geometry = p_new(Area, xinerama_screen_number); + si->geometry = p_new(area_t, xinerama_screen_number); si->nscreen = 0; /* now check if screens overlaps (same x,y): if so, we take only the biggest one */ @@ -106,8 +106,8 @@ screensinfo_new(Display *disp) /* realloc smaller if xinerama_screen_number != screen registered */ if(xinerama_screen_number != si->nscreen) { - Area *newgeometry = p_new(Area, si->nscreen); - memcpy(newgeometry, si->geometry, si->nscreen * sizeof(Area)); + area_t *newgeometry = p_new(area_t, si->nscreen); + memcpy(newgeometry, si->geometry, si->nscreen * sizeof(area_t)); p_delete(&si->geometry); si->geometry = newgeometry; } @@ -117,7 +117,7 @@ screensinfo_new(Display *disp) else { si->nscreen = ScreenCount(disp); - si->geometry = p_new(Area, si->nscreen); + si->geometry = p_new(area_t, si->nscreen); for(screen = 0; screen < si->nscreen; screen++) { si->geometry[screen].x = 0; diff --git a/common/xscreen.h b/common/xscreen.h index cb69ab0c..5968ad22 100644 --- a/common/xscreen.h +++ b/common/xscreen.h @@ -28,7 +28,7 @@ typedef struct { int nscreen; Bool xinerama_is_active; - Area *geometry; + area_t *geometry; } ScreensInfo; int screen_get_bycoord(ScreensInfo *, int, int, int); diff --git a/event.c b/event.c index 324919fc..25424821 100644 --- a/event.c +++ b/event.c @@ -161,7 +161,7 @@ event_handle_configurerequest(XEvent * e) XConfigureRequestEvent *ev = &e->xconfigurerequest; XWindowChanges wc; int old_screen; - Area geometry; + area_t geometry; if((c = client_get_bywin(globalconf.clients, ev->window))) { diff --git a/ewmh.c b/ewmh.c index e1da86ed..24f3f2f1 100644 --- a/ewmh.c +++ b/ewmh.c @@ -251,7 +251,7 @@ ewmh_process_state_atom(Client *c, Atom state, int set) } else if(state == net_wm_state_fullscreen) { - Area geometry = c->geometry; + area_t geometry = c->geometry; if(set == _NET_WM_STATE_REMOVE) { /* restore geometry */ diff --git a/layouts/fibonacci.c b/layouts/fibonacci.c index 70d50393..3607b278 100644 --- a/layouts/fibonacci.c +++ b/layouts/fibonacci.c @@ -32,7 +32,7 @@ layout_fibonacci(int screen, int shape) { int n = 0, i = 0; Client *c; - Area geometry, area; + area_t geometry, area; geometry = area = screen_get_area(screen, globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding); diff --git a/layouts/max.c b/layouts/max.c index f9809abe..0fada7c4 100644 --- a/layouts/max.c +++ b/layouts/max.c @@ -31,7 +31,7 @@ void layout_max(int screen) { Client *c; - Area area = screen_get_area(screen, + area_t area = screen_get_area(screen, globalconf.screens[screen].statusbar, &globalconf.screens[screen].padding); diff --git a/layouts/tile.c b/layouts/tile.c index 91c00f74..45ff30d6 100644 --- a/layouts/tile.c +++ b/layouts/tile.c @@ -133,7 +133,7 @@ _tile(int screen, const Position position) unsigned int mw = 0, mh = 0; int n, i, masterwin = 0, otherwin = 0; int real_ncol = 1, win_by_col = 1, current_col = 0; - Area area, geometry = { 0, 0, 0, 0, NULL, NULL }; + area_t area, geometry = { 0, 0, 0, 0, NULL, NULL }; Client *c; Tag **curtags = tags_get_current(screen); diff --git a/mouse.c b/mouse.c index a532f90f..1963e2a2 100644 --- a/mouse.c +++ b/mouse.c @@ -48,7 +48,7 @@ uicb_client_movemouse(int screen, char *arg __attribute__ ((unused))) unsigned int dui; Window dummy, child; XEvent ev; - Area area, geometry; + area_t area, geometry; Client *c = globalconf.focus->client, *target; Layout *layout = layout_get_current(screen); @@ -150,7 +150,7 @@ uicb_client_resizemouse(int screen, char *arg __attribute__ ((unused))) Client *c = globalconf.focus->client; Tag **curtags = tags_get_current(screen); Layout *layout = curtags[0]->layout; - Area area = { 0, 0, 0, 0, NULL, NULL }, geometry; + area_t area = { 0, 0, 0, 0, NULL, NULL }, geometry; double mwfact; /* only handle floating and tiled layouts */ diff --git a/placement.c b/placement.c index 791e03c6..7927fb4f 100644 --- a/placement.c +++ b/placement.c @@ -32,10 +32,10 @@ name_func_link_t FloatingPlacementList[] = { NULL, NULL } }; -static Area -placement_fix_offscreen(Area geometry, int screen, int border) +static area_t +placement_fix_offscreen(area_t geometry, int screen, int border) { - Area screen_geometry, newgeometry = geometry; + area_t screen_geometry, newgeometry = geometry; screen_geometry = screen_get_area(screen, globalconf.screens[screen].statusbar, @@ -60,15 +60,15 @@ placement_fix_offscreen(Area geometry, int screen, int border) * \param screen screen used * \return new geometry */ -Area -placement_smart(Area geometry, int border, int screen) +area_t +placement_smart(area_t geometry, int border, int screen) { Client *c; - Area newgeometry = { 0, 0, 0, 0, NULL, NULL }; - Area *screen_geometry, *arealist = NULL, *r; + area_t newgeometry = { 0, 0, 0, 0, NULL, NULL }; + area_t *screen_geometry, *arealist = NULL, *r; Bool found = False; - screen_geometry = p_new(Area, 1); + screen_geometry = p_new(area_t, 1); *screen_geometry = screen_get_area(screen, globalconf.screens[screen].statusbar, @@ -116,13 +116,13 @@ placement_smart(Area geometry, int border, int screen) return newgeometry; } -Area -placement_under_mouse(Area geometry, int border, int screen) +area_t +placement_under_mouse(area_t geometry, int border, int screen) { Window dummy; unsigned int m; int x, y, d; - Area finalgeometry = geometry; + area_t finalgeometry = geometry; if(XQueryPointer(globalconf.display, RootWindow(globalconf.display, get_phys_screen(screen)), &dummy, &dummy, &x, &y, &d, &d, &m)) diff --git a/screen.c b/screen.c index 6e54ea08..0be9cb66 100644 --- a/screen.c +++ b/screen.c @@ -31,12 +31,12 @@ extern AwesomeConf globalconf; * \param screen Screen number * \param statusbar statusbar * \param padding Padding - * \return Area + * \return area_t */ -Area +area_t screen_get_area(int screen, Statusbar *statusbar, Padding *padding) { - Area area = globalconf.screens_info->geometry[screen]; + area_t area = globalconf.screens_info->geometry[screen]; Statusbar *sb; /* make padding corrections */ @@ -72,12 +72,12 @@ screen_get_area(int screen, Statusbar *statusbar, Padding *padding) * \param screen Screen number * \param statusbar the statusbar * \param padding Padding - * \return Area + * \return area_t */ -Area +area_t get_display_area(int screen, Statusbar *statusbar, Padding *padding) { - Area area = { 0, 0, 0, 0, NULL, NULL }; + area_t area = { 0, 0, 0, 0, NULL, NULL }; Statusbar *sb; area.width = DisplayWidth(globalconf.display, screen); @@ -124,7 +124,7 @@ move_client_to_screen(Client *c, int new_screen, Bool doresize) { Tag *tag; int old_screen = c->screen; - Area from, to; + area_t from, to; for(tag = globalconf.screens[old_screen].tags; tag; tag = tag->next) untag_client(c, tag); @@ -137,7 +137,7 @@ move_client_to_screen(Client *c, int new_screen, Bool doresize) /* resize the windows if it's floating */ if(doresize && old_screen != c->screen) { - Area new_geometry, new_f_geometry; + area_t new_geometry, new_f_geometry; new_f_geometry = c->f_geometry; to = screen_get_area(c->screen, NULL, NULL); @@ -212,7 +212,7 @@ move_mouse_pointer_to_screen(int phys_screen) { if(globalconf.screens_info->xinerama_is_active) { - Area area = screen_get_area(phys_screen, NULL, NULL); + area_t area = screen_get_area(phys_screen, NULL, NULL); XWarpPointer(globalconf.display, None, DefaultRootWindow(globalconf.display), diff --git a/screen.h b/screen.h index 0fbea984..6a79f930 100644 --- a/screen.h +++ b/screen.h @@ -24,8 +24,8 @@ #include "structs.h" -Area screen_get_area(int, Statusbar *, Padding *); -Area get_display_area(int, Statusbar *, Padding *); +area_t screen_get_area(int, Statusbar *, Padding *); +area_t get_display_area(int, Statusbar *, Padding *); int get_phys_screen(int); void move_client_to_screen(Client *, int, Bool); diff --git a/statusbar.c b/statusbar.c index b422bfc6..b45dce31 100644 --- a/statusbar.c +++ b/statusbar.c @@ -33,7 +33,7 @@ extern AwesomeConf globalconf; static void statusbar_update_position(Statusbar *statusbar) { - Area area; + area_t area; XMapRaised(globalconf.display, statusbar->sw->window); @@ -74,7 +74,7 @@ statusbar_draw(Statusbar *statusbar) int phys_screen = get_phys_screen(statusbar->screen); Widget *widget; int left = 0, right = 0; - Area rectangle = { 0, 0, 0, 0, NULL, NULL }; + area_t rectangle = { 0, 0, 0, 0, NULL, NULL }; Drawable d; /* don't waste our time */ @@ -178,7 +178,7 @@ statusbar_init(Statusbar *statusbar) { Statusbar *sb; int phys_screen = get_phys_screen(statusbar->screen); - Area area = screen_get_area(statusbar->screen, + area_t area = screen_get_area(statusbar->screen, globalconf.screens[statusbar->screen].statusbar, &globalconf.screens[statusbar->screen].padding); diff --git a/structs.h b/structs.h index 8d084a5a..385c4940 100644 --- a/structs.h +++ b/structs.h @@ -126,8 +126,8 @@ struct Widget /** True if user supplied coords */ Bool user_supplied_x; Bool user_supplied_y; - /** Area */ - Area area; + /** area_t */ + area_t area; /** Buttons bindings */ Button *buttons; /** Cache */ @@ -170,11 +170,11 @@ struct Client /** Client name */ char name[256]; /** Window geometry */ - Area geometry; + area_t geometry; /** Floating window geometry */ - Area f_geometry; + area_t f_geometry; /** Max window geometry */ - Area m_geometry; + area_t m_geometry; int basew, baseh, incw, inch, maxw, maxh, minw, minh; int minax, maxax, minay, maxay; int border, oldborder; @@ -257,7 +257,7 @@ typedef struct int right; } Padding; -typedef Area (FloatingPlacement)(Area, int, int); +typedef area_t (FloatingPlacement)(area_t, int, int); typedef struct { /** Number of pixels to snap windows */ diff --git a/widgets/focusicon.c b/widgets/focusicon.c index fbdd7285..de1395eb 100644 --- a/widgets/focusicon.c +++ b/widgets/focusicon.c @@ -32,7 +32,7 @@ static int focusicon_draw(Widget *widget, DrawCtx *ctx, int offset, int used __attribute__ ((unused))) { - Area area; + area_t area; Rule* r; Client *sel = focus_get_current_client(widget->statusbar->screen); NetWMIcon *icon; diff --git a/widgets/graph.c b/widgets/graph.c index 48b18514..af6d0026 100644 --- a/widgets/graph.c +++ b/widgets/graph.c @@ -86,7 +86,7 @@ graph_draw(Widget *widget, DrawCtx *ctx, int offset, int margin_top, left_offset; int z, y, x, tmp, cur_index, test_index; Data *d = widget->data; - Area rectangle, pattern_area; + area_t rectangle, pattern_area; if(!d->data_items) return 0; diff --git a/widgets/iconbox.c b/widgets/iconbox.c index e48b668d..201b5c4f 100644 --- a/widgets/iconbox.c +++ b/widgets/iconbox.c @@ -35,7 +35,7 @@ iconbox_draw(Widget *widget, DrawCtx *ctx, int offset, int used __attribute__ ((unused))) { Data *d = widget->data; - Area area = draw_get_image_size(d->image); + area_t area = draw_get_image_size(d->image); /* image not valid */ if(area.width < 0 || area.height < 0) diff --git a/widgets/layoutinfo.c b/widgets/layoutinfo.c index 460978cb..fbc61844 100644 --- a/widgets/layoutinfo.c +++ b/widgets/layoutinfo.c @@ -34,7 +34,7 @@ layoutinfo_draw(Widget *widget, int used __attribute__ ((unused))) { Tag **curtags = tags_get_current(widget->statusbar->screen); - Area area = draw_get_image_size(curtags[0]->layout->image); + area_t area = draw_get_image_size(curtags[0]->layout->image); if(!widget->user_supplied_x) widget->area.x = widget_calculate_offset(widget->statusbar->width, diff --git a/widgets/progressbar.c b/widgets/progressbar.c index 7682ab13..7e5365f1 100644 --- a/widgets/progressbar.c +++ b/widgets/progressbar.c @@ -63,7 +63,7 @@ progressbar_draw(Widget *widget, DrawCtx *ctx, int offset, int used __attribute__ ((unused))) { int i, pb_x, pb_y, pb_height, pb_width, pb_progress, pb_offset = 0; - Area rectangle, pattern_rect; + area_t rectangle, pattern_rect; Data *d = widget->data; diff --git a/widgets/taglist.c b/widgets/taglist.c index ad62eb75..d45aed79 100644 --- a/widgets/taglist.c +++ b/widgets/taglist.c @@ -80,7 +80,7 @@ taglist_draw(Widget *widget, VirtScreen vscreen = globalconf.screens[widget->statusbar->screen]; int w = 0, flagsize; style_t style; - Area area; + area_t area; flagsize = (vscreen.styles.normal.font->height + 2) / 3; @@ -119,7 +119,7 @@ taglist_draw(Widget *widget, if(isoccupied(tag)) { - Area rectangle = { widget->area.x + widget->area.width, + area_t rectangle = { widget->area.x + widget->area.width, widget->area.y, flagsize, flagsize, diff --git a/widgets/tasklist.c b/widgets/tasklist.c index df965265..d9f4baef 100644 --- a/widgets/tasklist.c +++ b/widgets/tasklist.c @@ -82,7 +82,7 @@ tasklist_draw(Widget *widget, DrawCtx *ctx, int offset, int used) Data *d = widget->data; Client *sel = focus_get_current_client(widget->statusbar->screen); Rule *r; - Area area; + area_t area; style_t style; int n = 0, i = 0, box_width = 0, icon_width = 0, box_width_rest = 0; NetWMIcon *icon; diff --git a/window.c b/window.c index 9d6ea2eb..77250205 100644 --- a/window.c +++ b/window.c @@ -74,7 +74,7 @@ window_getstate(Window w) * \return the XSendEvent() status */ Status -window_configure(Window win, Area geometry, int border) +window_configure(Window win, area_t geometry, int border) { XConfigureEvent ce; diff --git a/window.h b/window.h index e25e36e6..1febf3f9 100644 --- a/window.h +++ b/window.h @@ -26,7 +26,7 @@ int window_setstate(Window, long); long window_getstate(Window); -Status window_configure(Window, Area, int); +Status window_configure(Window, area_t, int); void window_grabbuttons(int, Window); void window_root_grabbuttons(int); void window_root_grabkeys(int);