From: Michael Stapelberg Date: Mon, 14 Feb 2011 22:17:30 +0000 (+0100) Subject: add missing function documentation X-Git-Tag: tree-pr2~55 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=834f4d7bc29cc2e0b4b151c62c8bc468943fa2d7;p=i3%2Fi3 add missing function documentation --- diff --git a/include/con.h b/include/con.h index d5dc74e7..0d4df204 100644 --- a/include/con.h +++ b/include/con.h @@ -42,7 +42,11 @@ Con *con_get_output(Con *con); */ Con *con_get_workspace(Con *con); - +/** + * Searches parenst of the given 'con' until it reaches one with the specified + * 'orientation'. Aborts when it comes across a floating_con. + * + */ Con *con_parent_with_orientation(Con *con, orientation_t orientation); /** diff --git a/include/workspace.h b/include/workspace.h index b902f490..d903ea82 100644 --- a/include/workspace.h +++ b/include/workspace.h @@ -99,6 +99,12 @@ void workspace_map_clients(xcb_connection_t *conn, Workspace *ws); */ void workspace_update_urgent_flag(Con *ws); +/** + * 'Forces' workspace orientation by moving all cons into a new split-con with + * the same orientation as the workspace and then changing the workspace + * orientation. + * + */ void ws_force_orientation(Con *ws, orientation_t orientation); #endif diff --git a/src/con.c b/src/con.c index d36a0da4..92b05fd7 100644 --- a/src/con.c +++ b/src/con.c @@ -230,6 +230,11 @@ Con *con_get_workspace(Con *con) { return result; } +/* + * Searches parenst of the given 'con' until it reaches one with the specified + * 'orientation'. Aborts when it comes across a floating_con. + * + */ Con *con_parent_with_orientation(Con *con, orientation_t orientation) { DLOG("Searching for parent of Con %p with orientation %d\n", con, orientation); Con *parent = con->parent; @@ -759,6 +764,12 @@ void con_set_layout(Con *con, int layout) { con->layout = layout; } +/* + * Callback which will be called when removing a child from the given con. + * Kills the container if it is empty and replaces it with the child if there + * is exactly one child. + * + */ static void con_on_remove_child(Con *con) { DLOG("on_remove_child\n"); diff --git a/src/workspace.c b/src/workspace.c index c17eb7ed..4fcdd747 100644 --- a/src/workspace.c +++ b/src/workspace.c @@ -488,6 +488,12 @@ void workspace_update_urgent_flag(Con *ws) { ipc_send_event("workspace", I3_IPC_EVENT_WORKSPACE, "{\"change\":\"urgent\"}"); } +/* + * 'Forces' workspace orientation by moving all cons into a new split-con with + * the same orientation as the workspace and then changing the workspace + * orientation. + * + */ void ws_force_orientation(Con *ws, orientation_t orientation) { /* 1: create a new split container */ Con *split = con_new(NULL);