include/table.h File Reference

#include <stdbool.h>
#include <xcb/xcb.h>
#include "data.h"
Include dependency graph for table.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define CUR_TABLE   (c_ws->table)
#define CUR_CELL   (CUR_TABLE[current_col][current_row])

Functions

 TAILQ_HEAD (workspaces_head, Workspace)*workspaces
void init_table ()
 Initialize table.
void expand_table_rows (Workspace *workspace)
 Add one row to the table.
void expand_table_rows_at_head (Workspace *workspace)
 Adds one row at the head of the table.
void expand_table_cols (Workspace *workspace)
 Add one column to the table.
void expand_table_cols_at_head (Workspace *workspace)
 Inserts one column at the table’s head.
bool cell_exists (Workspace *ws, int col, int row)
 Performs simple bounds checking for the given column/row.
void cleanup_table (xcb_connection_t *conn, Workspace *workspace)
 Shrinks the table by "compacting" it, that is, removing completely empty rows/columns.
void fix_colrowspan (xcb_connection_t *conn, Workspace *workspace)
 Fixes col/rowspan (makes sure there are no overlapping windows).
void dump_table (xcb_connection_t *conn, Workspace *workspace)
 Prints the table’s contents in human-readable form for debugging.

Variables

Workspacec_ws
int current_col
int current_row

Define Documentation

#define CUR_CELL   (CUR_TABLE[current_col][current_row])
#define CUR_TABLE   (c_ws->table)

Definition at line 20 of file table.h.

Referenced by move_current_container(), move_current_window(), and snap_current_container().


Function Documentation

bool cell_exists ( Workspace ws,
int  col,
int  row 
)

Performs simple bounds checking for the given column/row.

Definition at line 245 of file table.c.

References Workspace::rows.

Referenced by fix_colrowspan(), floating_mod_on_tiled_client(), focus_thing(), handle_button_press(), parse_resize_command(), and snap_current_container().

void cleanup_table ( xcb_connection_t *  conn,
Workspace workspace 
)
void dump_table ( xcb_connection_t *  conn,
Workspace workspace 
)

Prints the table’s contents in human-readable form for debugging.

Definition at line 299 of file table.c.

References Client::child, CIRCLEQ_FOREACH, Container::currently_focused, DLOG, FOR_TABLE, Client::name, and Workspace::table.

void expand_table_cols ( Workspace workspace  ) 

Add one column to the table.

Definition at line 127 of file table.c.

References Workspace::cols, config, Config::container_mode, global_conn, new_container(), Workspace::rows, scalloc(), switch_layout_mode(), Workspace::table, and Workspace::width_factor.

Referenced by main(), move_current_container(), move_current_window(), and workspace_get().

Here is the call graph for this function:

void expand_table_cols_at_head ( Workspace workspace  ) 

Inserts one column at the table’s head.

Definition at line 147 of file table.c.

References Container::col, Workspace::cols, DLOG, new_container(), Workspace::rows, scalloc(), Workspace::table, and Workspace::width_factor.

Referenced by move_current_container(), and move_current_window().

Here is the call graph for this function:

void expand_table_rows ( Workspace workspace  ) 

Add one row to the table.

Definition at line 73 of file table.c.

References Workspace::cols, config, Config::container_mode, global_conn, Workspace::height_factor, new_container(), Workspace::rows, switch_layout_mode(), and Workspace::table.

Referenced by main(), move_current_container(), move_current_window(), and workspace_get().

Here is the call graph for this function:

void expand_table_rows_at_head ( Workspace workspace  ) 

Adds one row at the head of the table.

Definition at line 95 of file table.c.

References Workspace::cols, DLOG, Workspace::height_factor, new_container(), Container::row, Workspace::rows, and Workspace::table.

Referenced by move_current_container(), and move_current_window().

Here is the call graph for this function:

void fix_colrowspan ( xcb_connection_t *  conn,
Workspace workspace 
)

Fixes col/rowspan (makes sure there are no overlapping windows).

Definition at line 384 of file table.c.

References cell_exists(), Container::colspan, Container::currently_focused, DLOG, FOR_TABLE, Container::rowspan, and Workspace::table.

Referenced by handle_unmap_notify_event(), move_current_container(), move_current_window(), and parse_command().

Here is the call graph for this function:

void init_table (  ) 

Initialize table.

Definition at line 44 of file table.c.

References scalloc(), TAILQ_INIT, TAILQ_INSERT_TAIL, workspace_set_name(), and workspaces.

Referenced by main().

Here is the call graph for this function:

TAILQ_HEAD ( workspaces_head  ,
Workspace   
)

Variable Documentation


Generated on 2 Jul 2010 for i3 by  doxygen 1.6.1