src/commands.c File Reference

#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"
Include dependency graph for commands.c:

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 Documentation

#define CHECK_COLROW_BOUNDARIES
Value:
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().


Enumeration Type Documentation

enum thing_t
Enumerator:
THING_WINDOW 
THING_CONTAINER 
THING_SCREEN 

Definition at line 64 of file commands.c.


Function Documentation

static void focus_thing ( xcb_connection_t *  conn,
direction_t  direction,
thing_t  thing 
) [static]
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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

static void move_current_container ( xcb_connection_t *  conn,
direction_t  direction 
) [static]
static void move_current_window ( xcb_connection_t *  conn,
direction_t  direction 
) [static]
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().

Here is the call graph for this function:

static void move_current_window_to_workspace ( xcb_connection_t *  conn,
int  workspace 
) [static]
static void move_floating_window_to_workspace ( xcb_connection_t *  conn,
Client client,
int  workspace 
) [static]
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().

Here is the call graph for this function:

void parse_command ( xcb_connection_t *  conn,
const char *  command 
)
static void parse_resize_command ( xcb_connection_t *  conn,
Client last_focused,
const char *  command 
) [static]
static void snap_current_container ( xcb_connection_t *  conn,
direction_t  direction 
) [static]
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().

Here is the call graph for this function:


Generated on 16 Apr 2010 for i3 by  doxygen 1.6.1