Refactor example output config

Put all the config parsing into shared.h so it is shared among the examples.
This commit is contained in:
Tony Crisci 2017-08-18 17:44:10 -04:00
parent a1551bccc0
commit 769549c652
4 changed files with 119 additions and 178 deletions

View file

@ -12,6 +12,21 @@
#include <wlr/types/wlr_output.h>
#include <wlr/types/wlr_input_device.h>
struct output_config {
char *name;
enum wl_output_transform transform;
int x, y;
struct wl_list link;
};
struct example_config {
struct wl_list outputs;
};
struct example_config *parse_args(int argc, char *argv[]);
void example_config_destroy(struct example_config *config);
struct output_state {
struct compositor_state *compositor;
struct wlr_output *output;