i3
load_layout.c File Reference
#include "all.h"
#include <locale.h>
#include <yajl/yajl_parse.h>
Include dependency graph for load_layout.c:

Go to the source code of this file.

Data Structures

struct  pending_marks
 
struct  focus_mapping
 

Functions

static TAILQ_HEAD (focus_mappings_head, focus_mapping)
 
static int json_end_map (void *ctx)
 
static int json_end_array (void *ctx)
 
static int json_key (void *ctx, const unsigned char *val, size_t len)
 
static int json_string (void *ctx, const unsigned char *val, size_t len)
 
static int json_int (void *ctx, long long val)
 
static int json_bool (void *ctx, int val)
 
static int json_double (void *ctx, double val)
 
static int json_determine_content_deeper (void *ctx)
 
static int json_determine_content_shallower (void *ctx)
 
static int json_determine_content_string (void *ctx, const unsigned char *val, size_t len)
 
bool json_validate (const char *buf, const size_t len)
 Returns true if the provided JSON could be parsed by yajl.
 
json_content_t json_determine_content (const char *buf, const size_t len)
 
void tree_append_json (Con *con, const char *buf, const size_t len, char **errormsg)
 

Variables

static char * last_key
 
static int incomplete
 
static Conjson_node
 
static Conto_focus
 
static bool parsing_gaps
 
static bool parsing_swallows
 
static bool parsing_rect
 
static bool parsing_actual_deco_rect
 
static bool parsing_deco_rect
 
static bool parsing_window_rect
 
static bool parsing_geometry
 
static bool parsing_focus
 
static bool parsing_marks
 
struct Matchcurrent_swallow
 
static bool swallow_is_empty
 
static int num_marks
 
struct pending_marksmarks
 
static json_content_t content_result
 
static int content_level
 

Function Documentation

◆ json_bool()

static int json_bool ( void * ctx,
int val )
static

◆ json_determine_content()

json_content_t json_determine_content ( const char * buf,
const size_t len )

◆ json_determine_content_deeper()

static int json_determine_content_deeper ( void * ctx)
static

Definition at line 603 of file load_layout.c.

References content_level.

Referenced by json_determine_content().

◆ json_determine_content_shallower()

static int json_determine_content_shallower ( void * ctx)
static

Definition at line 608 of file load_layout.c.

References content_level.

Referenced by json_determine_content().

◆ json_determine_content_string()

static int json_determine_content_string ( void * ctx,
const unsigned char * val,
size_t len )
static

Definition at line 613 of file load_layout.c.

References content_level, content_result, DLOG, JSON_CONTENT_WORKSPACE, and last_key.

Referenced by json_determine_content().

◆ json_double()

static int json_double ( void * ctx,
double val )
static

Definition at line 592 of file load_layout.c.

References json_node, last_key, LOG, and Con::percent.

Referenced by tree_append_json().

◆ json_end_array()

static int json_end_array ( void * ctx)
static

◆ json_end_map()

◆ json_int()

◆ json_key()

static int json_key ( void * ctx,
const unsigned char * val,
size_t len )
static

◆ json_string()

◆ json_validate()

bool json_validate ( const char * buf,
const size_t len )

Returns true if the provided JSON could be parsed by yajl.

Definition at line 629 of file load_layout.c.

References ELOG.

Referenced by cmd_append_layout().

◆ TAILQ_HEAD()

static TAILQ_HEAD ( focus_mappings_head ,
focus_mapping  )
static

Definition at line 52 of file load_layout.c.

◆ tree_append_json()

Variable Documentation

◆ content_level

◆ content_result

json_content_t content_result
static

Definition at line 600 of file load_layout.c.

Referenced by json_determine_content(), and json_determine_content_string().

◆ current_swallow

struct Match* current_swallow

Definition at line 32 of file load_layout.c.

Referenced by json_bool(), json_int(), and json_string().

◆ incomplete

int incomplete
static

Definition at line 20 of file load_layout.c.

Referenced by json_end_map(), and tree_append_json().

◆ json_node

Con* json_node
static

◆ last_key

char* last_key
static

◆ marks

◆ num_marks

int num_marks
static

Definition at line 34 of file load_layout.c.

Referenced by json_end_map(), json_key(), and json_string().

◆ parsing_actual_deco_rect

bool parsing_actual_deco_rect
static

Definition at line 26 of file load_layout.c.

Referenced by json_end_map(), json_key(), and tree_append_json().

◆ parsing_deco_rect

bool parsing_deco_rect
static

Definition at line 27 of file load_layout.c.

Referenced by json_end_map(), json_key(), and tree_append_json().

◆ parsing_focus

bool parsing_focus
static

Definition at line 30 of file load_layout.c.

Referenced by json_end_array(), json_int(), json_key(), and tree_append_json().

◆ parsing_gaps

bool parsing_gaps
static

Definition at line 23 of file load_layout.c.

Referenced by json_end_map(), json_int(), json_key(), and tree_append_json().

◆ parsing_geometry

bool parsing_geometry
static

Definition at line 29 of file load_layout.c.

Referenced by json_end_map(), json_int(), json_key(), and tree_append_json().

◆ parsing_marks

bool parsing_marks
static

Definition at line 31 of file load_layout.c.

Referenced by json_end_array(), json_key(), json_string(), and tree_append_json().

◆ parsing_rect

bool parsing_rect
static

Definition at line 25 of file load_layout.c.

Referenced by json_end_map(), json_int(), json_key(), and tree_append_json().

◆ parsing_swallows

bool parsing_swallows
static

◆ parsing_window_rect

bool parsing_window_rect
static

Definition at line 28 of file load_layout.c.

Referenced by json_end_map(), json_int(), json_key(), and tree_append_json().

◆ swallow_is_empty

bool swallow_is_empty
static

Definition at line 33 of file load_layout.c.

Referenced by json_bool(), json_end_map(), json_int(), and json_string().

◆ to_focus

Con* to_focus
static

Definition at line 22 of file load_layout.c.

Referenced by get_tree_next_sibling(), json_bool(), tree_append_json(), and x_push_changes().