|
i3
|
#include <stdbool.h>#include <stdio.h>#include <stdlib.h>#include <assert.h>#include <unistd.h>#include <string.h>#include <xcb/xcb.h>#include "util.h"#include "data.h"#include "table.h"#include "layout.h"#include "i3.h"#include "randr.h"#include "client.h"#include "floating.h"#include "xcb.h"#include "config.h"#include "workspace.h"#include "commands.h"#include "resize.h"#include "log.h"#include "sighandler.h"#include "manage.h"#include "ipc.h"
Go to the source code of this file.
Defines | |
| #define | CHECK_COLROW_BOUNDARIES |
Enumerations | |
| enum | thing_t { THING_WINDOW, THING_CONTAINER, THING_SCREEN } |
Functions | |
| bool | focus_window_in_container (xcb_connection_t *conn, Container *container, direction_t direction) |
| static void | jump_to_mark (xcb_connection_t *conn, const char *mark) |
| static void | focus_thing (xcb_connection_t *conn, direction_t direction, thing_t thing) |
| static bool | move_current_window_in_container (xcb_connection_t *conn, Client *client, direction_t direction) |
| static void | move_current_window (xcb_connection_t *conn, direction_t direction) |
| static void | move_current_container (xcb_connection_t *conn, direction_t direction) |
| static void | snap_current_container (xcb_connection_t *conn, direction_t direction) |
| static void | move_floating_window_to_workspace (xcb_connection_t *conn, Client *client, int workspace) |
| static void | move_current_window_to_workspace (xcb_connection_t *conn, int workspace) |
| static void | jump_to_window (xcb_connection_t *conn, const char *arguments) |
| static void | jump_to_container (xcb_connection_t *conn, const char *arguments) |
| static void | travel_focus_stack (xcb_connection_t *conn, const char *arguments) |
| static void | next_previous_workspace (xcb_connection_t *conn, int direction) |
| static void | parse_resize_command (xcb_connection_t *conn, Client *last_focused, const char *command) |
| void | parse_command (xcb_connection_t *conn, const char *command) |
| Parses a command, see file CMDMODE for more information. | |
| #define CHECK_COLROW_BOUNDARIES |
do { \ if (new_col >= t_ws->cols) \ new_col = (t_ws->cols - 1); \ if (new_row >= t_ws->rows) \ new_row = (t_ws->rows - 1); \ } while (0)
Referenced by focus_thing().
| enum thing_t |
Definition at line 64 of file commands.c.
| static void focus_thing | ( | xcb_connection_t * | conn, |
| direction_t | direction, | ||
| thing_t | thing | ||
| ) | [static] |
Definition at line 84 of file commands.c.
References c_ws, cell_exists(), CHECK_COLROW_BOUNDARIES, Container::col, Workspace::cols, Container::colspan, Stack_Window::container, CUR_CELL, current_col, current_row, xoutput::current_workspace, Container::currently_focused, D_DOWN, D_LEFT, D_RIGHT, D_UP, DLOG, ELOG, focus_window_in_container(), Workspace::fullscreen_client, get_output_containing(), get_output_most(), Container::height, Rect::height, LOG, Workspace::num, Workspace::output, xoutput::rect, Container::row, Workspace::rows, Container::rowspan, set_focus(), Workspace::table, THING_SCREEN, THING_WINDOW, Container::width, Rect::width, Container::workspace, workspace_show(), Container::x, Rect::x, Container::y, and Rect::y.
Referenced by parse_command().

| bool focus_window_in_container | ( | xcb_connection_t * | conn, |
| Container * | container, | ||
| direction_t | direction | ||
| ) |
Definition at line 38 of file commands.c.
References CIRCLEQ_FIRST, CIRCLEQ_LAST, CIRCLEQ_NEXT_OR_NULL, CIRCLEQ_PREV_OR_NULL, Container::currently_focused, D_DOWN, D_UP, ELOG, and set_focus().
Referenced by button_press_stackwin(), and focus_thing().

| static void jump_to_container | ( | xcb_connection_t * | conn, |
| const char * | arguments | ||
| ) | [static] |
Definition at line 738 of file commands.c.
References c_ws, Workspace::cols, Container::currently_focused, DLOG, ELOG, LOG, Workspace::rows, set_focus(), Workspace::table, and workspace_show().
Referenced by parse_command().

| static void jump_to_mark | ( | xcb_connection_t * | conn, |
| const char * | mark | ||
| ) | [static] |
Definition at line 66 of file commands.c.
References ELOG, LOG, Client::mark, Workspace::num, set_focus(), SLIST_FOREACH, TAILQ_FOREACH, Client::workspace, workspace_show(), and workspaces.
Referenced by parse_command().

| static void jump_to_window | ( | xcb_connection_t * | conn, |
| const char * | arguments | ||
| ) | [static] |
Definition at line 713 of file commands.c.
References ELOG, get_matching_client(), Workspace::num, set_focus(), sstrdup(), Client::workspace, and workspace_show().
Referenced by parse_command().

| static void move_current_container | ( | xcb_connection_t * | conn, |
| direction_t | direction | ||
| ) | [static] |
Definition at line 406 of file commands.c.
References c_ws, cleanup_table(), Container::col, Workspace::cols, Stack_Window::container, CUR_CELL, CUR_TABLE, current_col, current_row, D_DOWN, D_LEFT, D_RIGHT, D_UP, DLOG, expand_table_cols(), expand_table_cols_at_head(), expand_table_rows(), expand_table_rows_at_head(), fix_colrowspan(), LOG, render_layout(), Container::row, Workspace::rows, and Container::workspace.
Referenced by parse_command().

| static void move_current_window | ( | xcb_connection_t * | conn, |
| direction_t | direction | ||
| ) | [static] |
Definition at line 312 of file commands.c.
References c_ws, CIRCLEQ_INSERT_AFTER, CIRCLEQ_INSERT_TAIL, CIRCLEQ_NEXT_OR_NULL, CIRCLEQ_PREV_OR_NULL, cleanup_table(), client_remove_from_container(), Workspace::cols, Client::container, Stack_Window::container, CUR_CELL, CUR_TABLE, current_col, current_row, Container::currently_focused, D_DOWN, D_LEFT, D_RIGHT, D_UP, Client::dock, expand_table_cols(), expand_table_cols_at_head(), expand_table_rows(), expand_table_rows_at_head(), fix_colrowspan(), get_last_focused_client(), LOG, move_current_window_in_container(), Workspace::output, render_workspace(), Workspace::rows, set_focus(), SLIST_INSERT_HEAD, Container::workspace, and Client::workspace.
Referenced by parse_command(), and snap_current_container().

| static bool move_current_window_in_container | ( | xcb_connection_t * | conn, |
| Client * | client, | ||
| direction_t | direction | ||
| ) | [static] |
Definition at line 287 of file commands.c.
References CIRCLEQ_END, CIRCLEQ_INSERT_AFTER, CIRCLEQ_INSERT_BEFORE, CIRCLEQ_NEXT, CIRCLEQ_PREV, CIRCLEQ_REMOVE, Client::container, D_UP, DLOG, and render_layout().
Referenced by move_current_window().

| static void move_current_window_to_workspace | ( | xcb_connection_t * | conn, |
| int | workspace | ||
| ) | [static] |
Definition at line 638 of file commands.c.
References CIRCLEQ_INSERT_TAIL, CIRCLEQ_NEXT_OR_NULL, CIRCLEQ_PREV_OR_NULL, cleanup_table(), client_enter_fullscreen(), client_remove_from_container(), client_unmap(), client_warp_pointer_into(), Client::container, Stack_Window::container, CUR_CELL, Workspace::current_col, Workspace::current_row, Container::currently_focused, DLOG, ELOG, Client::fullscreen, Workspace::fullscreen_client, LOG, Workspace::output, render_layout(), set_focus(), SLIST_INSERT_HEAD, Workspace::table, Client::workspace, Container::workspace, workspace_get(), workspace_initialize(), and workspace_is_visible().
Referenced by parse_command().

| static void move_floating_window_to_workspace | ( | xcb_connection_t * | conn, |
| Client * | client, | ||
| int | workspace | ||
| ) | [static] |
Definition at line 566 of file commands.c.
References c_ws, client_enter_fullscreen(), client_is_floating(), client_unmap(), client_warp_pointer_into(), DLOG, ELOG, floating_assign_to_workspace(), Client::frame, Client::fullscreen, Workspace::fullscreen_client, LOG, Workspace::output, Workspace::rect, Client::rect, render_layout(), reposition_client(), set_focus(), SLIST_END, SLIST_FOREACH, Client::workspace, workspace_get(), workspace_initialize(), workspace_is_visible(), Rect::x, and Rect::y.
Referenced by parse_command().

| static void next_previous_workspace | ( | xcb_connection_t * | conn, |
| int | direction | ||
| ) | [static] |
Definition at line 831 of file commands.c.
References c_ws, Workspace::num, Workspace::output, TAILQ_END, TAILQ_FIRST, TAILQ_LAST, TAILQ_NEXT, TAILQ_PREV, workspace_show(), and workspaces.
Referenced by parse_command().

| void parse_command | ( | xcb_connection_t * | conn, |
| const char * | command | ||
| ) |
Parses a command, see file CMDMODE for more information.
Definition at line 950 of file commands.c.
References Workspace::auto_float, Client::borderless, c_ws, cleanup_table(), client_change_border(), client_is_floating(), client_kill(), client_leave_fullscreen(), client_mark(), client_toggle_fullscreen(), client_toggle_fullscreen_global(), Client::container, CUR_CELL, D_DOWN, D_LEFT, D_RIGHT, D_UP, DLOG, ELOG, fix_colrowspan(), floating_focus_direction(), floating_move(), floating_toggle_hide(), focus_thing(), Client::fullscreen, global_conn, i3_restart(), ipc_send_event(), ipc_shutdown(), jump_to_container(), jump_to_mark(), jump_to_window(), load_configuration(), LOG, move_current_container(), move_current_window(), move_current_window_to_workspace(), move_floating_window_to_workspace(), next_previous_workspace(), Workspace::output, parse_resize_command(), render_layout(), render_workspace(), restore_geometry(), set_focus(), SLIST_END, SLIST_FIRST, snap_current_container(), Container::stack_limit, Container::stack_limit_value, start_application(), STARTS_WITH, switch_layout_mode(), switch_mode(), THING_CONTAINER, THING_SCREEN, THING_WINDOW, Client::titlebar_position, toggle_floating_mode(), travel_focus_stack(), Client::workspace, and workspace_show().
Referenced by handle_key_press(), and IPC_HANDLER().

| static void parse_resize_command | ( | xcb_connection_t * | conn, |
| Client * | last_focused, | ||
| const char * | command | ||
| ) | [static] |
Definition at line 869 of file commands.c.
References cell_exists(), client_is_floating(), Container::col, Workspace::cols, Container::colspan, Client::container, DLOG, ELOG, Rect::height, O_HORIZONTAL, O_VERTICAL, Client::rect, resize_client(), resize_container(), Container::row, Workspace::rows, Container::rowspan, STARTS_WITH, Rect::width, Client::workspace, Rect::x, and Rect::y.
Referenced by parse_command().

| static void snap_current_container | ( | xcb_connection_t * | conn, |
| direction_t | direction | ||
| ) | [static] |
Definition at line 484 of file commands.c.
References cell_exists(), Container::col, Container::colspan, Stack_Window::container, CUR_CELL, CUR_TABLE, D_DOWN, D_LEFT, D_RIGHT, D_UP, DLOG, ELOG, LOG, move_current_window(), render_layout(), Container::row, Container::rowspan, and Container::workspace.
Referenced by parse_command().

| static void travel_focus_stack | ( | xcb_connection_t * | conn, |
| const char * | arguments | ||
| ) | [static] |
Definition at line 780 of file commands.c.
References c_ws, client_is_floating(), CUR_CELL, DLOG, ELOG, set_focus(), SLIST_END, SLIST_FIRST, and SLIST_FOREACH.
Referenced by parse_command().

1.7.3