aboutsummaryrefslogtreecommitdiff
path: root/include/focus.h
blob: 10d5182b4b54c0508d1c9f3289a4a2446d57910a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#ifndef _SWAY_FOCUS_H
#define _SWAY_FOCUS_H
enum movement_direction {
	MOVE_LEFT,
	MOVE_RIGHT,
	MOVE_UP,
	MOVE_DOWN,
	MOVE_PARENT
};

#include "container.h"

// focused_container - the container found by following the `focused` pointer
// from a given container to a container with `is_focused` boolean set
// ---
// focused_view - the container found by following the `focused` pointer from a
// given container to a view.
// ---

swayc_t *get_focused_container(swayc_t *parent);
swayc_t *get_focused_view(swayc_t *parent);
swayc_t *get_focused_float(swayc_t *ws);

bool set_focused_container(swayc_t *container);
bool set_focused_container_for(swayc_t *ancestor, swayc_t *container);

// lock focused container/view. locked by windows with OVERRIDE attribute
// and unlocked when they are destroyed

extern bool locked_container_focus;
extern bool locked_view_focus;


bool move_focus(enum movement_direction direction);

#endif