aboutsummaryrefslogtreecommitdiff
path: root/examples/shared.h
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-08-18 17:44:10 -0400
committerTony Crisci <tony@dubstepdish.com>2017-08-18 17:44:10 -0400
commit769549c6522943d16e6833c8772a1397349c9137 (patch)
tree887db646cc3e94d6aa45f6ade12ad08cd3daadd6 /examples/shared.h
parenta1551bccc05caeb77ee7ce5e4151de964f29f444 (diff)
Refactor example output config
Put all the config parsing into shared.h so it is shared among the examples.
Diffstat (limited to 'examples/shared.h')
-rw-r--r--examples/shared.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/examples/shared.h b/examples/shared.h
index e2ebadef..87982464 100644
--- a/examples/shared.h
+++ b/examples/shared.h
@@ -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;