You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.2 KiB
46 lines
1.2 KiB
9 years ago
|
#ifndef _SWAY_FOCUS_H
|
||
|
#define _SWAY_FOCUS_H
|
||
|
enum movement_direction {
|
||
|
MOVE_LEFT,
|
||
|
MOVE_RIGHT,
|
||
|
MOVE_UP,
|
||
|
MOVE_DOWN,
|
||
9 years ago
|
MOVE_PARENT,
|
||
8 years ago
|
MOVE_CHILD,
|
||
|
MOVE_NEXT,
|
||
8 years ago
|
MOVE_PREV,
|
||
|
MOVE_FIRST
|
||
9 years ago
|
};
|
||
|
|
||
9 years ago
|
#include "container.h"
|
||
|
|
||
9 years ago
|
// 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.
|
||
|
// ---
|
||
9 years ago
|
|
||
|
swayc_t *get_focused_container(swayc_t *parent);
|
||
|
swayc_t *get_focused_view(swayc_t *parent);
|
||
9 years ago
|
swayc_t *get_focused_float(swayc_t *ws);
|
||
9 years ago
|
|
||
9 years ago
|
// a special-case function to get the focused view, regardless
|
||
9 years ago
|
// of whether it's tiled or floating
|
||
|
swayc_t *get_focused_view_include_floating(swayc_t *parent);
|
||
|
|
||
9 years ago
|
bool set_focused_container(swayc_t *container);
|
||
|
bool set_focused_container_for(swayc_t *ancestor, swayc_t *container);
|
||
9 years ago
|
|
||
9 years ago
|
// lock focused container/view. locked by windows with OVERRIDE attribute
|
||
|
// and unlocked when they are destroyed
|
||
9 years ago
|
|
||
|
extern bool locked_container_focus;
|
||
|
|
||
9 years ago
|
// Prevents wss from being destroyed on focus switch
|
||
|
extern bool suspend_workspace_cleanup;
|
||
9 years ago
|
|
||
|
bool move_focus(enum movement_direction direction);
|
||
|
|
||
|
#endif
|