mirror of
https://github.com/swaywm/sway.git
synced 2025-11-05 13:29:51 -05:00
Merge branch 'master' of https://github.com/SirCmpwn/sway
This commit is contained in:
commit
5a9ba261bc
26 changed files with 1493 additions and 570 deletions
|
|
@ -11,7 +11,7 @@ enum swayc_types{
|
|||
C_WORKSPACE,
|
||||
C_CONTAINER,
|
||||
C_VIEW,
|
||||
//Keep last
|
||||
// Keep last
|
||||
C_TYPES,
|
||||
};
|
||||
|
||||
|
|
@ -23,7 +23,7 @@ enum swayc_layouts{
|
|||
L_STACKED,
|
||||
L_TABBED,
|
||||
L_FLOATING,
|
||||
//Keep last
|
||||
// Keep last
|
||||
L_LAYOUTS,
|
||||
};
|
||||
|
||||
|
|
@ -45,10 +45,10 @@ struct sway_container {
|
|||
bool is_floating;
|
||||
bool is_focused;
|
||||
|
||||
int weight;
|
||||
|
||||
char *name;
|
||||
|
||||
int gaps;
|
||||
|
||||
list_t *children;
|
||||
list_t *floating;
|
||||
|
||||
|
|
@ -56,6 +56,7 @@ struct sway_container {
|
|||
struct sway_container *focused;
|
||||
};
|
||||
|
||||
// Container Creation
|
||||
|
||||
swayc_t *new_output(wlc_handle handle);
|
||||
swayc_t *new_workspace(swayc_t *output, const char *name);
|
||||
|
|
@ -66,18 +67,29 @@ swayc_t *new_view(swayc_t *sibling, wlc_handle handle);
|
|||
// Creates view as a new floating view which is in the active workspace
|
||||
swayc_t *new_floating_view(wlc_handle handle);
|
||||
|
||||
// Container Destroying
|
||||
|
||||
swayc_t *destroy_output(swayc_t *output);
|
||||
// Destroys workspace if empty and returns parent pointer, else returns NULL
|
||||
swayc_t *destroy_workspace(swayc_t *workspace);
|
||||
// Destroyes container and all parent container if they are empty, returns
|
||||
// topmost non-empty parent. returns NULL otherwise
|
||||
swayc_t *destroy_container(swayc_t *container);
|
||||
// Destroys view and all empty parent containers. return topmost non-empty
|
||||
// parent
|
||||
swayc_t *destroy_view(swayc_t *view);
|
||||
|
||||
// Container Lookup
|
||||
|
||||
swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types);
|
||||
swayc_t *swayc_parent_by_layout(swayc_t *container, enum swayc_layouts);
|
||||
|
||||
swayc_t *find_container(swayc_t *container, bool (*test)(swayc_t *view, void *data), void *data);
|
||||
void container_map(swayc_t *, void (*f)(swayc_t *, void *), void *);
|
||||
|
||||
|
||||
// Mappings
|
||||
void set_view_visibility(swayc_t *view, void *data);
|
||||
void reset_gaps(swayc_t *view, void *data);
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue