diff --git a/src/barwin.c b/src/barwin.c index e006332..cb7b20d 100644 --- a/src/barwin.c +++ b/src/barwin.c @@ -39,7 +39,7 @@ * \param w BarWindow Width * \param h BarWindow Height * \param color BarWindow color - * \param entermask Bool for know if the EnterMask mask is needed + * \param entermask bool for know if the EnterMask mask is needed * \return The BarWindow pointer */ BarWindow* @@ -50,9 +50,9 @@ barwin_create(Window parent, int h, uint bg, char *fg, - Bool entermask, - Bool stipple, - Bool border) + bool entermask, + bool stipple, + bool border) { XSetWindowAttributes at; BarWindow *bw; diff --git a/src/cfactor.c b/src/cfactor.c index 280ce63..f8a3e49 100644 --- a/src/cfactor.c +++ b/src/cfactor.c @@ -104,7 +104,7 @@ cfactor_geo(Geo geo, int fact[4], int *err) *\param ccg Second geo *\param p Direction of resizing */ -Bool +bool cfactor_parentrow(Geo cg, Geo ccg, Position p) { switch(p) @@ -151,7 +151,7 @@ _cfactor_arrange_row(Client *c, Position p, int fac) *\param fac Factor of resizing *\return False in case of error */ -static Bool +static bool _cfactor_check_geo_row(Client *c, Position p, int fac) { Geo cgeo = c->frame_geo; @@ -204,7 +204,7 @@ cfactor_arrange_two(Client *c1, Client *c2, Position p, int fac) *\param p Direction of resizing *\returm 1/0 */ -Bool +bool cfactor_check_2pc(Geo g1, Geo g2, Position p) { if(LDIR(p)) @@ -239,7 +239,7 @@ cfactor_arrange_row(Client *c, Client *gc, Position p, int fac) *\param p Direction of resizing *\param fac Factor of resizing */ -static Bool +static bool cfactor_check_geo(Client *c, Client *g, Position p, int fac) { int e, ee; diff --git a/src/client.c b/src/client.c index 90ec4a5..218d5de 100644 --- a/src/client.c +++ b/src/client.c @@ -246,7 +246,7 @@ client_above(Client *c) void client_focus(Client *c) { - Bool prevwasmax = False; + bool prevwasmax = False; Client *cc; if(sel && sel != c) @@ -311,10 +311,10 @@ client_focus(Client *c) /** Set urgency flag of the client * \param c Client pointer - * \param u Bool + * \param u bool */ void -client_urgent(Client *c, Bool u) +client_urgent(Client *c, bool u) { FLAGAPPLY(c->flags, u, UrgentFlag); FLAGAPPLY(tags[c->screen][c->tag].flags, u, TagUrgentFlag); @@ -483,7 +483,7 @@ client_hide(Client *c) * \param c Client pointer * \return True if the client is hide; False if not */ -Bool +bool ishide(Client *c, int screen) { if(c->screen == screen) @@ -588,8 +588,8 @@ client_set_rules(Client *c) ulong n, il; uchar *data = NULL; char wwrole[256] = { 0 }; - Bool applied_tag_rule = False; - Bool applied_screen_rule = False; + bool applied_tag_rule = False; + bool applied_screen_rule = False; memset(&xch, 0, sizeof(xch)); @@ -679,11 +679,11 @@ client_set_rules(Client *c) /** Manage a client with a window and his attributes * \param w Cient's futur Window * \param wa XWindowAttributes pointer, Window w attributes - * \param ar Do arrange() or not (Bool) + * \param ar Do arrange() or not (bool) * \return The managed client */ Client* -client_manage(Window w, XWindowAttributes *wa, Bool ar) +client_manage(Window w, XWindowAttributes *wa, bool ar) { Client *c, *t = NULL; Window trans, dw; @@ -862,10 +862,10 @@ client_geo_hints(Geo *geo, Client *c) * \param c Client pointer * \param geo Coordinate info for the future size * of the client - * \param r Bool for resize hint or not + * \param r bool for resize hint or not */ void -client_moveresize(Client *c, Geo geo, Bool r) +client_moveresize(Client *c, Geo geo, bool r) { int os, e; int rhx = 0; @@ -1158,7 +1158,7 @@ client_focus_next(Client *c) void client_unmanage(Client *c) { - Bool b = False; + bool b = False; int i; XGrabServer(dpy); @@ -1436,7 +1436,7 @@ uicb_clientlist(uicb_t cmd) { int i, d, u, x, y; int n = 0; - Bool all = False; + bool all = False; Window w; Client *c = NULL; @@ -1490,7 +1490,7 @@ uicb_clientlist(uicb_t cmd) /** Check clientlist menu fake function * \param cmd uicb_t type unused */ -Bool +bool uicb_checkclist(uicb_t cmd) { (void)cmd; diff --git a/src/config.c b/src/config.c index 9ab5eb5..b947534 100644 --- a/src/config.c +++ b/src/config.c @@ -173,10 +173,10 @@ conf_misc_section(void) sec = fetch_section_first(NULL, "misc"); conf.font = fetch_opt_first(sec, "sans-9", "font").str; - conf.raisefocus = fetch_opt_first(sec, "false", "raisefocus").bool; - conf.focus_fmouse = fetch_opt_first(sec, "true", "focus_follow_mouse").bool; - conf.focus_fmov = fetch_opt_first(sec, "false", "focus_follow_movement").bool; - conf.focus_pclick = fetch_opt_first(sec, "true", "focus_pointer_click").bool; + conf.raisefocus = fetch_opt_first(sec, "false", "raisefocus").boolean; + conf.focus_fmouse = fetch_opt_first(sec, "true", "focus_follow_mouse").boolean; + conf.focus_fmov = fetch_opt_first(sec, "false", "focus_follow_movement").boolean; + conf.focus_pclick = fetch_opt_first(sec, "true", "focus_pointer_click").boolean; conf.status_timing = fetch_opt_first(sec, "1", "status_timing").num; conf.status_path = fetch_opt_first(sec, "", "status_path").str; conf.autostart_path = fetch_opt_first(sec, "", "autostart_path").str; @@ -216,7 +216,7 @@ conf_bar_section(void) bar = fetch_section_first(NULL, "bar"); - conf.border.bar = fetch_opt_first(bar, "false", "border").bool; + conf.border.bar = fetch_opt_first(bar, "false", "border").boolean; conf.bars.height = fetch_opt_first(bar, "-1", "height").num; conf.colors.bar = getcolor((barbg = fetch_opt_first(bar, "#000000", "bg").str)); conf.colors.text = fetch_opt_first(bar, "#ffffff", "fg").str; @@ -236,7 +236,7 @@ conf_bar_section(void) if((systray = fetch_section_first(bar, "systray"))) { - conf.systray.active = fetch_opt_first(systray, "true", "active").bool; + conf.systray.active = fetch_opt_first(systray, "true", "active").boolean; if((conf.systray.screen = fetch_opt_first(systray, "0", "screen").num) < 0 || conf.systray.screen >= sc) @@ -300,27 +300,27 @@ conf_client_section(void) sec = fetch_section_first(NULL, "client"); - conf.client_round = fetch_opt_first(sec, "true", "client_round").bool; - conf.client_auto_center = fetch_opt_first(sec, "false", "client_auto_center").bool; - conf.client_tile_raise = fetch_opt_first(sec, "false", "client_tile_raise").bool; + conf.client_round = fetch_opt_first(sec, "true", "client_round").boolean; + conf.client_auto_center = fetch_opt_first(sec, "false", "client_auto_center").boolean; + conf.client_tile_raise = fetch_opt_first(sec, "false", "client_tile_raise").boolean; if ((conf.client.borderheight = fetch_opt_first(sec, "1", "border_height").num) < 1) conf.client.borderheight = 1; - conf.client.border_shadow = fetch_opt_first(sec, "false", "border_shadow").bool; - conf.client.place_at_mouse = fetch_opt_first(sec, "false", "place_at_mouse").bool; + conf.client.border_shadow = fetch_opt_first(sec, "false", "border_shadow").boolean; + conf.client.place_at_mouse = fetch_opt_first(sec, "false", "place_at_mouse").boolean; conf.client.bordernormal = getcolor(fetch_opt_first(sec, "#000000", "border_normal").str); conf.client.borderfocus = getcolor(fetch_opt_first(sec, "#ffffff", "border_focus").str); conf.client.resizecorner_normal = getcolor(fetch_opt_first(sec, "#222222", "resize_corner_normal").str); conf.client.resizecorner_focus = getcolor(fetch_opt_first(sec, "#DDDDDD", "resize_corner_focus").str); conf.client.mod |= char_to_modkey(fetch_opt_first(sec, "Alt", "modifier").str, key_list); - conf.client.set_new_win_master = fetch_opt_first(sec, "true", "set_new_win_master").bool; + conf.client.set_new_win_master = fetch_opt_first(sec, "true", "set_new_win_master").boolean; conf.client.padding = fetch_opt_first(sec, "0", "padding").num; conf.client.autofree = fetch_opt_first(sec, "", "autofree").str; conf.client.automax = fetch_opt_first(sec, "", "automax").str; conf.client.default_open_tag = fetch_opt_first(sec, "0", "default_open_tag").num; conf.client.default_open_screen = fetch_opt_first(sec, "-1", "default_open_screen").num; - conf.client.new_client_get_mouse = fetch_opt_first(sec, "false", "new_client_get_mouse").bool; + conf.client.new_client_get_mouse = fetch_opt_first(sec, "false", "new_client_get_mouse").boolean; conf.colors.client_light_shade = fetch_opt_first(sec, "0.25", "light_shade").fnum; conf.colors.client_dark_shade = fetch_opt_first(sec, "-0.25", "dark_shade").fnum; @@ -341,7 +341,7 @@ conf_client_section(void) conf.titlebar.fg_normal = fetch_opt_first(titlebar, "#ffffff", "fg_normal").str; conf.titlebar.fg_focus = fetch_opt_first(titlebar, "#000000", "fg_focus").str; - conf.titlebar.stipple.active = fetch_opt_first(titlebar, "false", "stipple").bool; + conf.titlebar.stipple.active = fetch_opt_first(titlebar, "false", "stipple").boolean; if(!strcmp((p = fetch_opt_first(titlebar, "-1", "stipple_normal").str), "-1")) conf.titlebar.stipple.colors.normal = getcolor(conf.titlebar.fg_normal); @@ -435,10 +435,10 @@ conf_layout_section(void) layouts = fetch_section_first(NULL, "layouts"); conf.layout_button_width = fetch_opt_first(layouts, "O", "layout_button_width").num; - conf.border.layout = fetch_opt_first(layouts, "false", "border").bool; + conf.border.layout = fetch_opt_first(layouts, "false", "border").boolean; conf.colors.layout_fg = fetch_opt_first(layouts, "#ffffff", "fg").str; conf.colors.layout_bg = getcolor((fetch_opt_first(layouts, "#000000", "bg").str)); - conf.keep_layout_geo = fetch_opt_first(layouts, "false", "keep_layout_geo").bool; + conf.keep_layout_geo = fetch_opt_first(layouts, "false", "keep_layout_geo").boolean; conf.selected_layout_symbol = fetch_opt_first(layouts, "*", "selected_layout_symbol").str; if((tmp = fetch_opt_first(layouts, "menu", "system").str) && !strcmp(tmp, "menu")) @@ -506,17 +506,17 @@ conf_tag_section(void) sec = fetch_section_first(NULL, "tags"); - conf.tag_round = fetch_opt_first(sec, "false", "tag_round").bool; - conf.tag_auto_prev = fetch_opt_first(sec, "true", "tag_auto_prev").bool; + conf.tag_round = fetch_opt_first(sec, "false", "tag_round").boolean; + conf.tag_auto_prev = fetch_opt_first(sec, "true", "tag_auto_prev").boolean; conf.colors.tagselfg = fetch_opt_first(sec, "#ffffff", "sel_fg").str; conf.colors.tagselbg = getcolor(fetch_opt_first(sec, "#000000", "sel_bg").str); conf.colors.tagurfg = fetch_opt_first(sec, "#000000", "urgent_fg").str; conf.colors.tagurbg = getcolor(fetch_opt_first(sec, "#DD1111", "urgent_bg").str); conf.colors.tag_occupied_bg = getcolor(fetch_opt_first(sec, "#222222", "occupied_bg").str); conf.colors.tag_occupied_fg = fetch_opt_first(sec, conf.colors.text, "occupied_fg").str; - conf.border.tag = fetch_opt_first(sec, "false", "border").bool; - conf.tagautohide = fetch_opt_first(sec, "false", "autohide").bool; - conf.tagnamecount = fetch_opt_first(sec, "false", "name_count").bool; + conf.border.tag = fetch_opt_first(sec, "false", "border").boolean; + conf.tagautohide = fetch_opt_first(sec, "false", "autohide").boolean; + conf.tagnamecount = fetch_opt_first(sec, "false", "name_count").boolean; conf.tag_expose_name = fetch_opt_first(sec, "EXPOSE", "expose_name").str; conf.expose_layout = fetch_opt_first(sec, "tile_grid_vertical", "expose_layout").str; @@ -553,11 +553,11 @@ conf_tag_section(void) }; FLAGAPPLY(default_tag.flags, - fetch_opt_first(def_tag, "false", "resizehint").bool, + fetch_opt_first(def_tag, "false", "resizehint").boolean, ResizeHintFlag); FLAGAPPLY(default_tag.flags, - fetch_opt_first(def_tag, "false", "split").bool, + fetch_opt_first(def_tag, "false", "split").boolean, (SplitFlag | FirstArrangeFlag)); conf.default_tag = default_tag; @@ -608,15 +608,15 @@ conf_tag_section(void) tags[k][conf.ntag[k]].mwfact = fetch_opt_first(tag[i], fetch_opt_first(def_tag, "0.65", "mwfact").str, "mwfact").fnum; tags[k][conf.ntag[k]].nmaster = fetch_opt_first(tag[i], fetch_opt_first(def_tag, "1", "nmaster").str, "nmaster").num; FLAGAPPLY(tags[k][conf.ntag[k]].flags, - fetch_opt_first(tag[i], fetch_opt_first(def_tag, "false", "resizehint").str, "resizehint").bool, + fetch_opt_first(tag[i], fetch_opt_first(def_tag, "false", "resizehint").str, "resizehint").boolean, ResizeHintFlag); FLAGAPPLY(tags[k][conf.ntag[k]].flags, - fetch_opt_first(tag[i], "false", "abovefc").bool, + fetch_opt_first(tag[i], "false", "abovefc").boolean, AboveFCFlag); FLAGAPPLY(tags[k][conf.ntag[k]].flags, - fetch_opt_first(tag[i], "false", "split").bool, + fetch_opt_first(tag[i], "false", "split").boolean, (SplitFlag | FirstArrangeFlag)); tmp = fetch_opt_first(tag[i], fetch_opt_first(def_tag, "top", "infobar_position").str, "infobar_position").str; @@ -682,10 +682,10 @@ conf_rule_section(void) conf.rule[i].role = fetch_opt_first(rule[i], "", "role").str; conf.rule[i].screen = fetch_opt_first(rule[i], "-1", "screen").num; conf.rule[i].tag = fetch_opt_first(rule[i], "-1", "tag").num; - conf.rule[i].free = fetch_opt_first(rule[i], "false", "free").bool; - conf.rule[i].max = fetch_opt_first(rule[i], "false", "max").bool; - conf.rule[i].ignoretags = fetch_opt_first(rule[i], "false", "ignoretags").bool; - conf.rule[i].follow_client = fetch_opt_first(rule[i], "false", "follow_client").bool; + conf.rule[i].free = fetch_opt_first(rule[i], "false", "free").boolean; + conf.rule[i].max = fetch_opt_first(rule[i], "false", "max").boolean; + conf.rule[i].ignoretags = fetch_opt_first(rule[i], "false", "ignoretags").boolean; + conf.rule[i].follow_client = fetch_opt_first(rule[i], "false", "follow_client").boolean; } free(rule); @@ -713,7 +713,7 @@ conf_menu_section(void) conf.menu[i].name = fetch_opt_first(set_menu[i], "menu_wname", "name").str; - if(!(conf.menu[i].place_at_mouse = fetch_opt_first(set_menu[i], "true", "place_at_mouse").bool)) + if(!(conf.menu[i].place_at_mouse = fetch_opt_first(set_menu[i], "true", "place_at_mouse").boolean)) { conf.menu[i].x = fetch_opt_first(set_menu[i], "0", "x").num; conf.menu[i].y = fetch_opt_first(set_menu[i], "0", "y").num; diff --git a/src/frame.c b/src/frame.c index 36c342e..7c83c4b 100644 --- a/src/frame.c +++ b/src/frame.c @@ -198,7 +198,7 @@ frame_moveresize(Client *c, Geo geo) *\param c Client pointer */ void -frame_update_color(Client *c, Bool focused) +frame_update_color(Client *c, bool focused) { CHECK(c); diff --git a/src/launcher.c b/src/launcher.c index f458016..3fcc2d3 100644 --- a/src/launcher.c +++ b/src/launcher.c @@ -182,9 +182,9 @@ static void launcher_execute(Launcher *launcher) { BarWindow *bw; - Bool found; - Bool lastwastab = False; - Bool my_guitar_gently_wheeps = True; + bool found; + bool lastwastab = False; + bool my_guitar_gently_wheeps = True; char tmp[32] = { 0 }; char buf[512] = { 0 }; char tmpbuf[512] = { 0 }; diff --git a/src/layout.c b/src/layout.c index 842ae17..0274e5f 100644 --- a/src/layout.c +++ b/src/layout.c @@ -35,7 +35,7 @@ /** Arrange All */ void -arrange(int screen, Bool update_layout) +arrange(int screen, bool update_layout) { Client *c; @@ -102,10 +102,10 @@ freelayout(int screen) } /** Layout switching function - * \param b Bool True : next False : previous + * \param b bool True : next False : previous */ void -layoutswitch(Bool b) +layoutswitch(bool b) { int i; Client *c; @@ -256,7 +256,7 @@ uicb_set_nmaster(uicb_t cmd) /** Grid layout function */ static void -grid(int screen, Bool horizontal) +grid(int screen, bool horizontal) { Client *c; Geo sg = sgeo[screen]; @@ -428,7 +428,7 @@ multi_tile(int screen, Position type) } /* REMAINDER */ - if(i + 1 == n || i + 1 == (n < nmaster ? n : nmaster)) + if(i + 1 == n || i + 1 == (n < nmaster ? n : nmaster)) { if(LDIR(type)) cgeo.height = (sg.y + sg.height) - cgeo.y - BORDH; @@ -457,7 +457,7 @@ multi_tile(int screen, Position type) * \param horizont To specify the mirror mode (vertical/horizontal) */ static void -mirror(int screen, Bool horizontal) +mirror(int screen, bool horizontal) { Client *c; Geo sg = sgeo[screen]; @@ -467,7 +467,7 @@ mirror(int screen, Bool horizontal) uint i, n, tilesize = 0, mwfact; uint nmaster = tags[screen][seltag[screen]].nmaster; int pa, imp; - Bool isp = False; + bool isp = False; memset(nextg, 0, sizeof(nextg)); @@ -892,7 +892,7 @@ layout_set_client_master(Client *c) /** Check the selected client is max * \param cmd uicb_t type unused */ -Bool +bool uicb_checkmax(uicb_t cmd) { (void)cmd; @@ -909,7 +909,7 @@ uicb_checkmax(uicb_t cmd) /** Check the selected client is free * \param cmd uicb_t type unused */ -Bool +bool uicb_checkfree(uicb_t cmd) { (void)cmd; @@ -926,7 +926,7 @@ uicb_checkfree(uicb_t cmd) /** Check layout type * \param cmd uicb_t type layout type */ -Bool +bool uicb_checklayout(uicb_t cmd) { screen_get_sel(); diff --git a/src/menu.c b/src/menu.c index 6473b28..a4082ac 100644 --- a/src/menu.c +++ b/src/menu.c @@ -44,7 +44,7 @@ menu_get_longer_string(MenuItem *mi, int nitem) return l; } -static Bool +static bool menu_get_checkstring_needed(MenuItem *mi, int nitem) { (void)mi; @@ -83,7 +83,7 @@ menu_draw_item_name(Menu *menu, int item, BarWindow *winitem[], int chcklen) return; } -static Bool +static bool menu_activate_item(Menu *menu, int i) { int j, x, y; @@ -143,12 +143,12 @@ menu_focus_item(Menu *menu, int item, BarWindow *winitem[]) return; } -static Bool +static bool menu_manage_event(XEvent *ev, Menu *menu, BarWindow *winitem[]) { int i, c = 0; KeySym ks; - Bool quit = False; + bool quit = False; char acc = 0; switch(ev->type) diff --git a/src/mouse.c b/src/mouse.c index b9e153f..fd3d2b3 100644 --- a/src/mouse.c +++ b/src/mouse.c @@ -190,7 +190,7 @@ mouse_move(Client *c) while(ev.type != ButtonRelease); /* One time again to delete all the trace on the window */ - if(!(c->flags & TileFlag) && !(c->flags & LMaxFlag)) + if(!(c->flags & (TileFlag | LMaxFlag))) { mouse_dragborder(geo, gci); client_moveresize(c, geo, False); @@ -330,7 +330,7 @@ mouse_resize(Client *c) * \param focused For know if c is or not focused */ void -mouse_grabbuttons(Client *c, Bool focused) +mouse_grabbuttons(Client *c, bool focused) { size_t i; uint but[] = {Button1, Button2, Button3, Button4, Button5}; diff --git a/src/parse.c b/src/parse.c index 7b90ef0..d0c4a79 100644 --- a/src/parse.c +++ b/src/parse.c @@ -70,8 +70,8 @@ struct keyword { }; struct state { - bool_t quote; - bool_t comment; + bool quote; + bool comment; char quote_char; }; @@ -162,7 +162,7 @@ parse_keywords(const char *filename) char path[PATH_MAX]; size_t i, j; int line; - bool_t error = False; + bool error = False; if ((fd = open(filename, O_RDONLY)) == -1 || stat(filename, &st) == -1) { diff --git a/src/parse.h b/src/parse.h index dfdedd7..cde14f6 100644 --- a/src/parse.h +++ b/src/parse.h @@ -23,17 +23,11 @@ #define INCLUDE_CMD "@include" #define PARSE_MAX_LIST 32 -#if defined(Bool) -#define bool_t Bool -#else -typedef enum { False, True } bool_t; -#endif /* Bool */ - struct conf_opt { char *name; char *val[PARSE_MAX_LIST]; size_t nval; - bool_t used; + bool used; int line; char *filename; SLIST_ENTRY(conf_opt) entry; @@ -51,7 +45,7 @@ struct conf_sec { struct opt_type { long int num; float fnum; - bool_t bool; + bool boolean; char *str; }; diff --git a/src/parse_api.c b/src/parse_api.c index 904db95..150e9da 100644 --- a/src/parse_api.c +++ b/src/parse_api.c @@ -40,9 +40,9 @@ string_to_opt(char *s) if (!strcmp(s, "true") || !strcmp(s, "True") || !strcmp(s, "TRUE") || !strcmp(s, "1")) - ret.bool = True; + ret.boolean = True; else - ret.bool = False; + ret.boolean = False; ret.str = s; diff --git a/src/split.c b/src/split.c index 47b3a03..8b4412a 100644 --- a/src/split.c +++ b/src/split.c @@ -67,7 +67,7 @@ _split_arrange_size(Geo g, Geo *cg, Position p) /** Check if parent client of last closed client is OK for row resize */ -static Bool +static bool _split_check_row(Geo g1, Geo g2, Position p) { if(LDIR(p)) @@ -124,7 +124,7 @@ split_apply_current(int screen, int tag) *\param p Position *\return True if available */ -static Bool +static bool _split_check_row_dir(Client *c, Client *g, Position p) { int s, cs; @@ -156,7 +156,7 @@ void split_arrange_closed(Client *ghost) { Position p; - Bool b = False; + bool b = False; Geo cgeo; Client *c, *cc; int screen = ghost->screen; @@ -224,7 +224,7 @@ split_arrange_closed(Client *ghost) *\return sgeo Geo of future integrated client */ Geo -split_client(Client *c, Bool p) +split_client(Client *c, bool p) { Geo geo, sgeo; @@ -291,7 +291,7 @@ split_client_fill(Client *c, Geo geo) void split_client_integrate(Client *c, Client *sc, int screen, int tag) { - Bool b = True; + bool b = True; Geo g; if(!c || c->flags & FreeFlag || !(tags[screen][tag].flags & SplitFlag)) diff --git a/src/structs.h b/src/structs.h index 2ede7b9..a2f08ff 100644 --- a/src/structs.h +++ b/src/structs.h @@ -278,7 +278,7 @@ typedef struct Geo geo; int position; char *statustext; - Bool need_update; + bool need_update; } InfoBar; /* Layout Structure */ @@ -324,7 +324,7 @@ typedef struct char *name; void (*func)(uicb_t); uicb_t cmd; - Bool (*check)(uicb_t); + bool (*check)(uicb_t); char *submenu; } MenuItem; @@ -337,7 +337,7 @@ typedef struct */ char *name; /* Placement */ - Bool place_at_mouse; + bool place_at_mouse; int align; int x, y; /* Color */ @@ -388,10 +388,10 @@ typedef struct char *role; int screen; int tag; - Bool free; - Bool max; - Bool ignoretags; - Bool follow_client; + bool free; + bool max; + bool ignoretags; + bool follow_client; } Rule; /* Configuration structure */ @@ -403,13 +403,13 @@ typedef struct /* Misc option */ char *font; uint opacity; - Bool raisefocus; - Bool focus_fmouse; - Bool focus_fmov; - Bool focus_pclick; - Bool ignore_next_client_rules; - Bool tagautohide; - Bool tagnamecount; + bool raisefocus; + bool focus_fmouse; + bool focus_fmov; + bool focus_pclick; + bool ignore_next_client_rules; + bool tagautohide; + bool tagnamecount; Tag default_tag; uint pad; int status_timing; @@ -444,7 +444,7 @@ typedef struct int height; MouseBinding *mouse; int nmouse; - Bool selbar; + bool selbar; } bars; struct { @@ -462,10 +462,10 @@ typedef struct } root; struct { - Bool set_new_win_master; - Bool place_at_mouse; - Bool border_shadow; - Bool new_client_get_mouse; + bool set_new_win_master; + bool place_at_mouse; + bool border_shadow; + bool new_client_get_mouse; int borderheight; char *autofree, *automax; uint bordernormal; @@ -486,7 +486,7 @@ typedef struct char *fg_focus; struct { - Bool active; + bool active; struct { uint normal, focus; } colors; } stipple; MouseBinding *mouse; @@ -496,13 +496,13 @@ typedef struct } titlebar; struct { - Bool bar; - Bool tag; - Bool layout; + bool bar; + bool tag; + bool layout; } border; struct { - Bool active; + bool active; int screen; int spacing; } systray; @@ -514,14 +514,14 @@ typedef struct Launcher *launcher; Rule *rule; int *ntag; - Bool tag_round; - Bool tag_auto_prev; - Bool client_round; - Bool client_auto_center; - Bool client_tile_raise; - Bool layout_system; /* Switch: False, Menu: True. */ - Bool layout_placement; /* Right (normal): False, Left: True. */ - Bool keep_layout_geo; + bool tag_round; + bool tag_auto_prev; + bool client_round; + bool client_auto_center; + bool client_tile_raise; + bool layout_system; /* Switch: False, Menu: True. */ + bool layout_placement; /* Right (normal): False, Left: True. */ + bool keep_layout_geo; char *tag_expose_name; char *expose_layout; char *selected_layout_symbol; diff --git a/src/systray.c b/src/systray.c index ecda7bb..43c92dc 100644 --- a/src/systray.c +++ b/src/systray.c @@ -34,7 +34,7 @@ #define TRAY_DWIDTH (infobar[conf.systray.screen].bar->geo.height + conf.systray.spacing) -Bool +bool systray_acquire(void) { XSetWindowAttributes wattr; diff --git a/src/tag.c b/src/tag.c index 84f5fd9..f55e053 100644 --- a/src/tag.c +++ b/src/tag.c @@ -39,7 +39,7 @@ void tag_set(int tag) { Client *c; - Bool al = False; + bool al = False; int i; if(tag < 0 || tag > MAXTAG) @@ -226,7 +226,7 @@ uicb_tag_next_visible(uicb_t cmd) { int i, tag; Client *c; - Bool is_occupied[MAXTAG]; + bool is_occupied[MAXTAG]; (void)cmd; screen_get_sel(); @@ -270,7 +270,7 @@ uicb_tag_prev_visible(uicb_t cmd) { int i, tag; Client *c; - Bool is_occupied[MAXTAG]; + bool is_occupied[MAXTAG]; (void)cmd; screen_get_sel(); diff --git a/src/viwmfs.c b/src/viwmfs.c index 7b9baf3..1ef90b4 100644 --- a/src/viwmfs.c +++ b/src/viwmfs.c @@ -87,7 +87,7 @@ viwmfs(int argc, char **argv) { size_t i; char *cmd, str[256] = { 0 }; - Bool e; + bool e; if(!argc) return; diff --git a/src/wmfs.c b/src/wmfs.c index a3dfd3f..e1f36e0 100644 --- a/src/wmfs.c +++ b/src/wmfs.c @@ -32,7 +32,7 @@ #include "wmfs.h" -static volatile Bool exiting = False, sig_chld = False; +static volatile bool exiting = False, sig_chld = False; static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER; int @@ -320,7 +320,7 @@ uicb_reload(uicb_t cmd) execute when wmfs will be already running). \return False if wmfs is not running */ -Bool +bool check_wmfs_running(void) { Atom rt; diff --git a/src/wmfs.h b/src/wmfs.h index 098e385..68ee1f9 100644 --- a/src/wmfs.h +++ b/src/wmfs.h @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -119,9 +120,9 @@ BarWindow *barwin_create(Window parent, int x, int y, int w, int h, uint bg, char*fg, - Bool entermask, - Bool stipple, - Bool border); + bool entermask, + bool stipple, + bool border); void barwin_draw_text(BarWindow *bw, int x, int y, char *text); void barwin_draw_image_ofset_text(BarWindow *bw, int x, int y, char *text, int x_image_ofset, int y_image_ofset); void barwin_color_set(BarWindow *bw, uint bg, char *fg); @@ -160,8 +161,8 @@ void uicb_toggle_tagautohide(uicb_t); /* cfactor.c */ void cfactor_clean(Client *c); Geo cfactor_geo(Geo geo, int fact[4], int *err); -Bool cfactor_check_2pc(Geo g1, Geo g2, Position p); -Bool cfactor_parentrow(Geo cg, Geo ccg, Position p); +bool cfactor_check_2pc(Geo g1, Geo g2, Position p); +bool cfactor_parentrow(Geo cg, Geo ccg, Position p); void cfactor_set(Client *c, Position p, int fac); void cfactor_multi_set(Client *c, int fac[4]); /* Generated with macro {{{ */ @@ -189,11 +190,11 @@ Client* client_gb_pos(Client *c, int x, int y); void client_get_name(Client *c); void client_hide(Client *c); void client_kill(Client *c); -Bool ishide(Client *c, int screen); +bool ishide(Client *c, int screen); void client_map(Client *c); -Client* client_manage(Window w, XWindowAttributes *wa, Bool ar); +Client* client_manage(Window w, XWindowAttributes *wa, bool ar); void client_geo_hints(Geo *geo, Client *c); -void client_moveresize(Client *c, Geo geo, Bool r); +void client_moveresize(Client *c, Geo geo, bool r); void client_maximize(Client *c); void client_size_hints(Client *c); void client_swap(Client *c1, Client *c2); @@ -203,7 +204,7 @@ void client_focus_next(Client *c); void client_unmanage(Client *c); void client_unmap(Client *c); void client_update_attributes(Client *c); -void client_urgent(Client *c, Bool u); +void client_urgent(Client *c, bool u); Client* client_get_next_with_direction(Client *bc, Position pos); void uicb_client_raise(uicb_t); /* Generated with macro {{{ */ @@ -228,7 +229,7 @@ void uicb_client_move(uicb_t cmd); void uicb_client_resize(uicb_t cmd); void uicb_ignore_next_client_rules(uicb_t cmd); void uicb_clientlist(uicb_t cmd); -Bool uicb_checkclist(uicb_t); +bool uicb_checkclist(uicb_t); void uicb_client_ignore_tag(uicb_t); void uicb_client_set_master(uicb_t); @@ -248,7 +249,7 @@ void ewmh_manage_window_type(Client *c); void frame_create(Client *c); void frame_delete(Client *c); void frame_moveresize(Client *c, Geo geo); -void frame_update_color(Client *c, Bool focused); +void frame_update_color(Client *c, bool focused); void frame_update(Client *c); /* config.c */ @@ -277,7 +278,7 @@ void uicb_launcher(uicb_t); /* mouse.c */ void mouse_resize(Client *c); -void mouse_grabbuttons(Client *c, Bool focused); +void mouse_grabbuttons(Client *c, bool focused); void uicb_mouse_move(uicb_t); void uicb_mouse_resize(uicb_t); @@ -352,7 +353,7 @@ void uicb_screen_prev_sel(uicb_t); void statustext_handle(int sc, char *str); /* systray.c */ -Bool systray_acquire(void); +bool systray_acquire(void); void systray_add(Window win); void systray_del(Systray *s); void systray_state(Systray *s); @@ -362,11 +363,11 @@ int systray_get_width(void); void systray_update(void); /* layout.c */ -void arrange(int screen, Bool update_layout); +void arrange(int screen, bool update_layout); void layout_func(int screen, int tag); Client *tiled_client(int screen, Client *c); void freelayout(int screen); -void layoutswitch(Bool b); +void layoutswitch(bool b); void maxlayout(int screen); /* tile {{{ */ void tile(int screen); @@ -388,14 +389,14 @@ void uicb_set_layout(uicb_t); void uicb_toggle_resizehint(uicb_t); void uicb_toggle_abovefc(uicb_t cmd); void layout_set_client_master(Client *c); -void layout_split_client(Client *c, Bool p); +void layout_split_client(Client *c, bool p); void layout_split_apply(Client *c); void layout_split_arrange_closed(int screen); void uicb_split_client_vertical(uicb_t); void uicb_split_client_horizontal(uicb_t); -Bool uicb_checkmax(uicb_t); -Bool uicb_checkfree(uicb_t); -Bool uicb_checklayout(uicb_t); +bool uicb_checkmax(uicb_t); +bool uicb_checkfree(uicb_t); +bool uicb_checklayout(uicb_t); /* init.c */ void init(void); @@ -405,7 +406,7 @@ void split_store_geo(int screen, int tag); void split_set_current(Client *nc, Client *ghost); void split_apply_current(int screen, int tag); void split_arrange_closed(Client *ghost); -Geo split_client(Client *c, Bool p); +Geo split_client(Client *c, bool p); void split_client_fill(Client *c, Geo geo); void split_client_integrate(Client *c, Client *sc, int screen, int tag); void split_move_dir(Client *c, Position p); @@ -426,7 +427,7 @@ int errorhandler(Display *d, XErrorEvent *event); int errorhandlerdummy(Display *d, XErrorEvent *event); void quit(void); void *thread_process(void *arg); -Bool check_wmfs_running(void); +bool check_wmfs_running(void); void exec_uicb_function(char *func, char *cmd); void handle_signal(int signum); void uicb_quit(uicb_t); @@ -441,7 +442,7 @@ int selscreen; int prevselscreen; Conf conf; Key *keys; -Bool estatus; +bool estatus; Geo *sgeo; Geo *spgeo; Cursor cursor[CurLast];