mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-21 22:52:20 +00:00
Move shared example code
This commit is contained in:
parent
19f24e5530
commit
4f73498b78
@ -1,7 +1,8 @@
|
|||||||
lib_shared = static_library(
|
lib_shared = static_library(
|
||||||
'shared',
|
'shared',
|
||||||
['shared.c', 'cat.c', 'ini.c', 'config.c'],
|
['support/shared.c', 'support/cat.c', 'support/ini.c', 'support/config.c'],
|
||||||
dependencies: wlroots,
|
dependencies: wlroots,
|
||||||
|
include_directories: include_directories('support')
|
||||||
)
|
)
|
||||||
|
|
||||||
executable('simple', 'simple.c', dependencies: wlroots, link_with: lib_shared)
|
executable('simple', 'simple.c', dependencies: wlroots, link_with: lib_shared)
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
#include <wlr/types/wlr_cursor.h>
|
#include <wlr/types/wlr_cursor.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#include <wlr/types/wlr_list.h>
|
#include <wlr/types/wlr_list.h>
|
||||||
#include "shared.h"
|
#include "support/shared.h"
|
||||||
#include "config.h"
|
#include "support/config.h"
|
||||||
#include "cat.h"
|
#include "support/cat.h"
|
||||||
|
|
||||||
struct sample_state;
|
struct sample_state;
|
||||||
|
|
||||||
|
@ -21,9 +21,9 @@
|
|||||||
#include <wlr/types/wlr_output.h>
|
#include <wlr/types/wlr_output.h>
|
||||||
#include <wlr/types/wlr_keyboard.h>
|
#include <wlr/types/wlr_keyboard.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "shared.h"
|
#include "support/shared.h"
|
||||||
#include "config.h"
|
#include "support/config.h"
|
||||||
#include "cat.h"
|
#include "support/cat.h"
|
||||||
|
|
||||||
struct sample_state {
|
struct sample_state {
|
||||||
struct example_config *config;
|
struct example_config *config;
|
||||||
|
@ -22,9 +22,9 @@
|
|||||||
#include <wlr/types/wlr_cursor.h>
|
#include <wlr/types/wlr_cursor.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#include <wlr/types/wlr_list.h>
|
#include <wlr/types/wlr_list.h>
|
||||||
#include "shared.h"
|
#include "support/shared.h"
|
||||||
#include "config.h"
|
#include "support/config.h"
|
||||||
#include "cat.h"
|
#include "support/cat.h"
|
||||||
|
|
||||||
struct sample_state {
|
struct sample_state {
|
||||||
struct compositor_state *compositor;
|
struct compositor_state *compositor;
|
||||||
|
@ -18,9 +18,9 @@
|
|||||||
#include <wlr/types/wlr_keyboard.h>
|
#include <wlr/types/wlr_keyboard.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "shared.h"
|
#include "support/shared.h"
|
||||||
#include "config.h"
|
#include "support/config.h"
|
||||||
#include "cat.h"
|
#include "support/cat.h"
|
||||||
|
|
||||||
struct sample_state {
|
struct sample_state {
|
||||||
struct example_config *config;
|
struct example_config *config;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
#include <wlr/types/wlr_output.h>
|
#include <wlr/types/wlr_output.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#include <xkbcommon/xkbcommon.h>
|
#include <xkbcommon/xkbcommon.h>
|
||||||
#include "shared.h"
|
#include "support/shared.h"
|
||||||
|
|
||||||
struct sample_state {
|
struct sample_state {
|
||||||
float color[3];
|
float color[3];
|
||||||
|
2
examples/support/README
Normal file
2
examples/support/README
Normal file
@ -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.
|
@ -19,8 +19,8 @@
|
|||||||
#include <wlr/types/wlr_tablet_pad.h>
|
#include <wlr/types/wlr_tablet_pad.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include "shared.h"
|
#include "support/shared.h"
|
||||||
#include "cat.h"
|
#include "support/cat.h"
|
||||||
|
|
||||||
struct sample_state {
|
struct sample_state {
|
||||||
struct wlr_renderer *renderer;
|
struct wlr_renderer *renderer;
|
||||||
|
@ -18,8 +18,8 @@
|
|||||||
#include <wlr/backend/session.h>
|
#include <wlr/backend/session.h>
|
||||||
#include <wlr/types/wlr_list.h>
|
#include <wlr/types/wlr_list.h>
|
||||||
#include <wlr/util/log.h>
|
#include <wlr/util/log.h>
|
||||||
#include "shared.h"
|
#include "support/shared.h"
|
||||||
#include "cat.h"
|
#include "support/cat.h"
|
||||||
|
|
||||||
struct sample_state {
|
struct sample_state {
|
||||||
struct wlr_renderer *renderer;
|
struct wlr_renderer *renderer;
|
||||||
|
Loading…
Reference in New Issue
Block a user