Merge branch 'wlroots' into feature/input

This commit is contained in:
Tony Crisci 2017-12-16 07:33:23 -05:00
commit 9fa70ce426
14 changed files with 648 additions and 37 deletions

View file

@ -102,8 +102,11 @@ struct output_config {
char *name;
int enabled;
int width, height;
float refresh_rate;
int x, y;
int scale;
int32_t transform;
char *background;
char *background_option;
};
@ -391,9 +394,8 @@ struct seat_attachment_config *seat_config_get_attachment(
struct seat_config *seat_config, char *identifier);
int output_name_cmp(const void *item, const void *data);
struct output_config *new_output_config();
void merge_output_config(struct output_config *dst, struct output_config *src);
/** Sets up a WLC output handle based on a given output_config.
*/
void apply_output_config(struct output_config *oc, swayc_t *output);
void free_output_config(struct output_config *oc);

View file

@ -58,9 +58,9 @@ enum swayc_border_types {
B_NORMAL, /**< Normal border with title bar */
};
struct sway_root;
struct sway_output;
struct sway_view;
struct wlr_output_layout;
/**
* Stores information about a container.
@ -70,7 +70,7 @@ struct wlr_output_layout;
struct sway_container {
union {
// TODO: Encapsulate state for other node types as well like C_CONTAINER
struct wlr_output_layout *output_layout; // C_ROOT
struct sway_root *sway_root; // C_ROOT
struct sway_output *sway_output; // C_OUTPUT
struct sway_view *sway_view; // C_VIEW
};
@ -137,6 +137,7 @@ swayc_t *new_output(struct sway_output *sway_output);
swayc_t *new_workspace(swayc_t *output, const char *name);
swayc_t *new_view(swayc_t *sibling, struct sway_view *sway_view);
swayc_t *destroy_output(swayc_t *output);
swayc_t *destroy_view(swayc_t *view);
swayc_t *swayc_parent_by_type(swayc_t *container, enum swayc_types type);

View file

@ -1,8 +1,16 @@
#ifndef _SWAY_LAYOUT_H
#define _SWAY_LAYOUT_H
#include <wlr/types/wlr_output_layout.h>
struct sway_container;
struct sway_root {
struct wlr_output_layout *output_layout;
struct wl_listener output_layout_change;
};
void init_layout(void);
void add_child(struct sway_container *parent, struct sway_container *child);
struct sway_container *remove_child(struct sway_container *child);

View file

@ -12,8 +12,8 @@ struct sway_output {
struct sway_container *swayc;
struct sway_server *server;
struct timespec last_frame;
struct wl_listener frame;
struct wl_listener resolution;
};
#endif