mirror of
https://github.com/swaywm/sway.git
synced 2026-02-18 22:05:45 -05:00
Add support for nested tabbed/stacked containers
This commit is contained in:
parent
3955c66ce8
commit
3e1f78ab26
8 changed files with 234 additions and 78 deletions
|
|
@ -2,9 +2,12 @@
|
|||
#define _SWAY_CONTAINER_H
|
||||
#include <sys/types.h>
|
||||
#include <wlc/wlc.h>
|
||||
|
||||
#include "list.h"
|
||||
|
||||
typedef struct sway_container swayc_t;
|
||||
|
||||
#include "layout.h"
|
||||
extern swayc_t root_container;
|
||||
|
||||
/**
|
||||
* Different kinds of containers.
|
||||
|
|
@ -75,6 +78,12 @@ struct sway_container {
|
|||
*/
|
||||
double x, y;
|
||||
|
||||
/**
|
||||
* Cached geometry used to store view/container geometry when switching
|
||||
* between tabbed/stacked and horizontal/vertical layouts.
|
||||
*/
|
||||
struct wlc_geometry cached_geometry;
|
||||
|
||||
/**
|
||||
* False if this view is invisible. It could be in the scratchpad or on a
|
||||
* workspace that is not shown.
|
||||
|
|
@ -120,7 +129,7 @@ struct sway_container {
|
|||
* If this container is a view, this may be set to the window's decoration
|
||||
* buffer (or NULL).
|
||||
*/
|
||||
unsigned char *border;
|
||||
struct border *border;
|
||||
enum swayc_border_types border_type;
|
||||
struct wlc_geometry border_geometry;
|
||||
struct wlc_geometry title_bar_geometry;
|
||||
|
|
@ -247,6 +256,12 @@ bool swayc_is_child_of(swayc_t *child, swayc_t *parent);
|
|||
*/
|
||||
bool swayc_is_tabbed_stacked(swayc_t *view);
|
||||
|
||||
/**
|
||||
* Returns the top most tabbed or stacked parent container. Returns NULL if
|
||||
* view is not in a tabbed/stacked layout.
|
||||
*/
|
||||
swayc_t *swayc_tabbed_stacked_parent(swayc_t *view);
|
||||
|
||||
/**
|
||||
* Returns the gap (padding) of the container.
|
||||
*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue