i3
fake_outputs.c File Reference
#include "all.h"
Include dependency graph for fake_outputs.c:

Go to the source code of this file.

Functions

static Outputget_screen_at (unsigned int x, unsigned int y)
 
void fake_outputs_init (const char *output_spec)
 Creates outputs according to the given specification.
 

Variables

static int num_screens
 

Function Documentation

◆ fake_outputs_init()

void fake_outputs_init ( const char * output_spec)

Creates outputs according to the given specification.

The specification must be in the format wxh+x+y, for example 1024x768+0+0, with multiple outputs separated by commas: 1900x1200+0+0,1280x1024+1900+0

Definition at line 38 of file fake_outputs.c.

References xoutput::active, DLOG, ELOG, get_screen_at(), Rect::height, init_ws_for_output(), min(), output_name::name, num_screens, output_init_con(), output_primary_name(), outputs, primary, xoutput::primary, xoutput::rect, sasprintf(), scalloc(), SLIST_INIT, SLIST_INSERT_HEAD, TAILQ_INSERT_HEAD, TAILQ_INSERT_TAIL, Rect::width, Rect::x, Rect::y, and y.

Referenced by main().

Here is the call graph for this function:

◆ get_screen_at()

static Output * get_screen_at ( unsigned int x,
unsigned int y )
static

Definition at line 19 of file fake_outputs.c.

References outputs, xoutput::rect, TAILQ_FOREACH, Rect::x, Rect::y, and y.

Referenced by fake_outputs_init().

Variable Documentation

◆ num_screens

int num_screens
static

Definition at line 13 of file fake_outputs.c.

Referenced by fake_outputs_init().