diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-11-01 15:47:58 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2017-11-01 15:47:58 -0400 |
commit | 4f73498b78645728ff23adfbf9b650a1b66b66bb (patch) | |
tree | db4c1a84bd66da1530ba33ec6781f75b7456b36b /examples | |
parent | 19f24e5530625f4b7cafb6cbcdbb71fe69c2288c (diff) |
Move shared example code
Diffstat (limited to 'examples')
-rw-r--r-- | examples/meson.build | 3 | ||||
-rw-r--r-- | examples/multi-pointer.c | 6 | ||||
-rw-r--r-- | examples/output-layout.c | 6 | ||||
-rw-r--r-- | examples/pointer.c | 6 | ||||
-rw-r--r-- | examples/rotation.c | 6 | ||||
-rw-r--r-- | examples/simple.c | 2 | ||||
-rw-r--r-- | examples/support/README | 2 | ||||
-rw-r--r-- | examples/support/cat.c (renamed from examples/cat.c) | 0 | ||||
-rw-r--r-- | examples/support/cat.h (renamed from examples/cat.h) | 0 | ||||
-rw-r--r-- | examples/support/config.c (renamed from examples/config.c) | 0 | ||||
-rw-r--r-- | examples/support/config.h (renamed from examples/config.h) | 0 | ||||
-rw-r--r-- | examples/support/ini.c (renamed from examples/ini.c) | 0 | ||||
-rw-r--r-- | examples/support/ini.h (renamed from examples/ini.h) | 0 | ||||
-rw-r--r-- | examples/support/shared.c (renamed from examples/shared.c) | 0 | ||||
-rw-r--r-- | examples/support/shared.h (renamed from examples/shared.h) | 0 | ||||
-rw-r--r-- | examples/tablet.c | 4 | ||||
-rw-r--r-- | examples/touch.c | 4 |
17 files changed, 21 insertions, 18 deletions
diff --git a/examples/meson.build b/examples/meson.build index 3402441b..89fc6211 100644 --- a/examples/meson.build +++ b/examples/meson.build @@ -1,7 +1,8 @@ lib_shared = static_library( 'shared', - ['shared.c', 'cat.c', 'ini.c', 'config.c'], + ['support/shared.c', 'support/cat.c', 'support/ini.c', 'support/config.c'], dependencies: wlroots, + include_directories: include_directories('support') ) executable('simple', 'simple.c', dependencies: wlroots, link_with: lib_shared) diff --git a/examples/multi-pointer.c b/examples/multi-pointer.c index e0993987..e29a69db 100644 --- a/examples/multi-pointer.c +++ b/examples/multi-pointer.c @@ -22,9 +22,9 @@ #include <wlr/types/wlr_cursor.h> #include <wlr/util/log.h> #include <wlr/types/wlr_list.h> -#include "shared.h" -#include "config.h" -#include "cat.h" +#include "support/shared.h" +#include "support/config.h" +#include "support/cat.h" struct sample_state; diff --git a/examples/output-layout.c b/examples/output-layout.c index 771ccd77..084bd7df 100644 --- a/examples/output-layout.c +++ b/examples/output-layout.c @@ -21,9 +21,9 @@ #include <wlr/types/wlr_output.h> #include <wlr/types/wlr_keyboard.h> #include <math.h> -#include "shared.h" -#include "config.h" -#include "cat.h" +#include "support/shared.h" +#include "support/config.h" +#include "support/cat.h" struct sample_state { struct example_config *config; diff --git a/examples/pointer.c b/examples/pointer.c index 8927314e..1bcd7349 100644 --- a/examples/pointer.c +++ b/examples/pointer.c @@ -22,9 +22,9 @@ #include <wlr/types/wlr_cursor.h> #include <wlr/util/log.h> #include <wlr/types/wlr_list.h> -#include "shared.h" -#include "config.h" -#include "cat.h" +#include "support/shared.h" +#include "support/config.h" +#include "support/cat.h" struct sample_state { struct compositor_state *compositor; diff --git a/examples/rotation.c b/examples/rotation.c index d7892723..276b6255 100644 --- a/examples/rotation.c +++ b/examples/rotation.c @@ -18,9 +18,9 @@ #include <wlr/types/wlr_keyboard.h> #include <wlr/util/log.h> #include <math.h> -#include "shared.h" -#include "config.h" -#include "cat.h" +#include "support/shared.h" +#include "support/config.h" +#include "support/cat.h" struct sample_state { struct example_config *config; diff --git a/examples/simple.c b/examples/simple.c index ba1ac289..ad1b0792 100644 --- a/examples/simple.c +++ b/examples/simple.c @@ -11,7 +11,7 @@ #include <wlr/types/wlr_output.h> #include <wlr/util/log.h> #include <xkbcommon/xkbcommon.h> -#include "shared.h" +#include "support/shared.h" struct sample_state { float color[3]; diff --git a/examples/support/README b/examples/support/README new file mode 100644 index 00000000..c32c873e --- /dev/null +++ b/examples/support/README @@ -0,0 +1,2 @@ +Support code for the examples. Code that's not relevant to the principle each +example demonstrates is largely offloaded to this directory. diff --git a/examples/cat.c b/examples/support/cat.c index cc1403d8..cc1403d8 100644 --- a/examples/cat.c +++ b/examples/support/cat.c diff --git a/examples/cat.h b/examples/support/cat.h index 46dc50f6..46dc50f6 100644 --- a/examples/cat.h +++ b/examples/support/cat.h diff --git a/examples/config.c b/examples/support/config.c index 0ef025c0..0ef025c0 100644 --- a/examples/config.c +++ b/examples/support/config.c diff --git a/examples/config.h b/examples/support/config.h index e26531c2..e26531c2 100644 --- a/examples/config.h +++ b/examples/support/config.h diff --git a/examples/ini.c b/examples/support/ini.c index 6be9c44a..6be9c44a 100644 --- a/examples/ini.c +++ b/examples/support/ini.c diff --git a/examples/ini.h b/examples/support/ini.h index 2804255b..2804255b 100644 --- a/examples/ini.h +++ b/examples/support/ini.h diff --git a/examples/shared.c b/examples/support/shared.c index 07614d86..07614d86 100644 --- a/examples/shared.c +++ b/examples/support/shared.c diff --git a/examples/shared.h b/examples/support/shared.h index cf75f5fe..cf75f5fe 100644 --- a/examples/shared.h +++ b/examples/support/shared.h diff --git a/examples/tablet.c b/examples/tablet.c index 4b565d3d..4eaa204a 100644 --- a/examples/tablet.c +++ b/examples/tablet.c @@ -19,8 +19,8 @@ #include <wlr/types/wlr_tablet_pad.h> #include <wlr/util/log.h> #include <math.h> -#include "shared.h" -#include "cat.h" +#include "support/shared.h" +#include "support/cat.h" struct sample_state { struct wlr_renderer *renderer; diff --git a/examples/touch.c b/examples/touch.c index 3f0c4867..df6c6c48 100644 --- a/examples/touch.c +++ b/examples/touch.c @@ -18,8 +18,8 @@ #include <wlr/backend/session.h> #include <wlr/types/wlr_list.h> #include <wlr/util/log.h> -#include "shared.h" -#include "cat.h" +#include "support/shared.h" +#include "support/cat.h" struct sample_state { struct wlr_renderer *renderer; |