aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-07-09 16:12:20 -0700
committerGitHub <noreply@github.com>2018-07-09 16:12:20 -0700
commit2518de655c7278728736d22549656c639e4c92f0 (patch)
treeacd08ceb9709eb25541fa02fbc533a7c6a99dbad /examples
parente78d72f42e10b43a76ef5ba6b8c4b3b470b25245 (diff)
parent7cbef152063e1fbb24e6204339ff4587a74be04b (diff)
Merge pull request #1126 from emersion/wlr-log-prefix
util: add wlr_ prefix to log symbols
Diffstat (limited to 'examples')
-rw-r--r--examples/idle.c2
-rw-r--r--examples/layer-shell.c12
-rw-r--r--examples/multi-pointer.c12
-rw-r--r--examples/output-layout.c6
-rw-r--r--examples/pointer.c10
-rw-r--r--examples/rotation.c12
-rw-r--r--examples/screenshot.c2
-rw-r--r--examples/simple.c8
-rw-r--r--examples/tablet.c8
-rw-r--r--examples/touch.c10
10 files changed, 41 insertions, 41 deletions
diff --git a/examples/idle.c b/examples/idle.c
index b65a81cf..30e106db 100644
--- a/examples/idle.c
+++ b/examples/idle.c
@@ -109,7 +109,7 @@ void *main_loop(void *data) {
}
int main(int argc, char *argv[]) {
- wlr_log_init(L_DEBUG, NULL);
+ wlr_log_init(WLR_DEBUG, NULL);
if (parse_args(argc, argv) != 0) {
return -1;
diff --git a/examples/layer-shell.c b/examples/layer-shell.c
index 21ef3e93..70ae21f0 100644
--- a/examples/layer-shell.c
+++ b/examples/layer-shell.c
@@ -179,7 +179,7 @@ static const struct xdg_surface_listener xdg_surface_listener = {
static void xdg_popup_configure(void *data, struct xdg_popup *xdg_popup,
int32_t x, int32_t y, int32_t width, int32_t height) {
- wlr_log(L_DEBUG, "Popup configured %dx%d@%d,%d",
+ wlr_log(WLR_DEBUG, "Popup configured %dx%d@%d,%d",
width, height, x, y);
popup_width = width;
popup_height = height;
@@ -199,7 +199,7 @@ static void popup_destroy(void) {
}
static void xdg_popup_done(void *data, struct xdg_popup *xdg_popup) {
- wlr_log(L_DEBUG, "Popup done");
+ wlr_log(WLR_DEBUG, "Popup done");
popup_destroy();
}
@@ -378,17 +378,17 @@ static void wl_keyboard_keymap(void *data, struct wl_keyboard *wl_keyboard,
static void wl_keyboard_enter(void *data, struct wl_keyboard *wl_keyboard,
uint32_t serial, struct wl_surface *surface, struct wl_array *keys) {
- wlr_log(L_DEBUG, "Keyboard enter");
+ wlr_log(WLR_DEBUG, "Keyboard enter");
}
static void wl_keyboard_leave(void *data, struct wl_keyboard *wl_keyboard,
uint32_t serial, struct wl_surface *surface) {
- wlr_log(L_DEBUG, "Keyboard leave");
+ wlr_log(WLR_DEBUG, "Keyboard leave");
}
static void wl_keyboard_key(void *data, struct wl_keyboard *wl_keyboard,
uint32_t serial, uint32_t time, uint32_t key, uint32_t state) {
- wlr_log(L_DEBUG, "Key event: %d %d", key, state);
+ wlr_log(WLR_DEBUG, "Key event: %d %d", key, state);
}
static void wl_keyboard_modifiers(void *data, struct wl_keyboard *wl_keyboard,
@@ -474,7 +474,7 @@ static const struct wl_registry_listener registry_listener = {
};
int main(int argc, char **argv) {
- wlr_log_init(L_DEBUG, NULL);
+ wlr_log_init(WLR_DEBUG, NULL);
char *namespace = "wlroots";
int exclusive_zone = 0;
int32_t margin_right = 0, margin_bottom = 0, margin_left = 0;
diff --git a/examples/multi-pointer.c b/examples/multi-pointer.c
index c5b2048f..58689649 100644
--- a/examples/multi-pointer.c
+++ b/examples/multi-pointer.c
@@ -73,7 +73,7 @@ struct sample_keyboard {
void configure_cursor(struct wlr_cursor *cursor, struct wlr_input_device *device,
struct sample_state *sample) {
struct sample_output *output;
- wlr_log(L_ERROR, "Configuring cursor %p for device %p", cursor, device);
+ wlr_log(WLR_ERROR, "Configuring cursor %p for device %p", cursor, device);
// reset mappings
wlr_cursor_map_to_output(cursor, NULL);
@@ -237,7 +237,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
rules.options = getenv("XKB_DEFAULT_OPTIONS");
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
if (!context) {
- wlr_log(L_ERROR, "Failed to create XKB context");
+ wlr_log(WLR_ERROR, "Failed to create XKB context");
exit(1);
}
wlr_keyboard_set_keymap(device->keyboard, xkb_map_new_from_names(context,
@@ -277,7 +277,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
}
int main(int argc, char *argv[]) {
- wlr_log_init(L_DEBUG, NULL);
+ wlr_log_init(WLR_DEBUG, NULL);
struct wl_display *display = wl_display_create();
struct sample_state state = {
.default_color = { 0.25f, 0.25f, 0.25f, 1 },
@@ -303,17 +303,17 @@ int main(int argc, char *argv[]) {
struct wlr_xcursor_theme *theme = wlr_xcursor_theme_load("default", 16);
if (!theme) {
- wlr_log(L_ERROR, "Failed to load cursor theme");
+ wlr_log(WLR_ERROR, "Failed to load cursor theme");
return 1;
}
state.xcursor = wlr_xcursor_theme_get_cursor(theme, "left_ptr");
if (!state.xcursor) {
- wlr_log(L_ERROR, "Failed to load left_ptr cursor");
+ wlr_log(WLR_ERROR, "Failed to load left_ptr cursor");
return 1;
}
if (!wlr_backend_start(wlr)) {
- wlr_log(L_ERROR, "Failed to start backend");
+ wlr_log(WLR_ERROR, "Failed to start backend");
wlr_backend_destroy(wlr);
exit(1);
}
diff --git a/examples/output-layout.c b/examples/output-layout.c
index bdc8d352..2bfc5923 100644
--- a/examples/output-layout.c
+++ b/examples/output-layout.c
@@ -236,7 +236,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
rules.options = getenv("XKB_DEFAULT_OPTIONS");
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
if (!context) {
- wlr_log(L_ERROR, "Failed to create XKB context");
+ wlr_log(WLR_ERROR, "Failed to create XKB context");
exit(1);
}
wlr_keyboard_set_keymap(device->keyboard, xkb_map_new_from_names(context,
@@ -250,7 +250,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
int main(int argc, char *argv[]) {
- wlr_log_init(L_DEBUG, NULL);
+ wlr_log_init(WLR_DEBUG, NULL);
struct wl_display *display = wl_display_create();
struct sample_state state = {
.x_vel = 500,
@@ -277,7 +277,7 @@ int main(int argc, char *argv[]) {
cat_tex.pixel_data);
if (!wlr_backend_start(wlr)) {
- wlr_log(L_ERROR, "Failed to start backend");
+ wlr_log(WLR_ERROR, "Failed to start backend");
wlr_backend_destroy(wlr);
exit(1);
}
diff --git a/examples/pointer.c b/examples/pointer.c
index d6b4ed1c..e0f009b3 100644
--- a/examples/pointer.c
+++ b/examples/pointer.c
@@ -208,7 +208,7 @@ static void handle_touch_motion(struct wl_listener *listener, void *data) {
}
static void handle_touch_cancel(struct wl_listener *listener, void *data) {
- wlr_log(L_DEBUG, "TODO: touch cancel");
+ wlr_log(WLR_DEBUG, "TODO: touch cancel");
}
static void handle_tablet_tool_axis(struct wl_listener *listener, void *data) {
@@ -302,7 +302,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
rules.options = getenv("XKB_DEFAULT_OPTIONS");
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
if (!context) {
- wlr_log(L_ERROR, "Failed to create XKB context");
+ wlr_log(WLR_ERROR, "Failed to create XKB context");
exit(1);
}
wlr_keyboard_set_keymap(device->keyboard, xkb_map_new_from_names(context,
@@ -316,7 +316,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
int main(int argc, char *argv[]) {
- wlr_log_init(L_DEBUG, NULL);
+ wlr_log_init(WLR_DEBUG, NULL);
struct wl_display *display = wl_display_create();
struct sample_state state = {
.default_color = { 0.25f, 0.25f, 0.25f, 1 },
@@ -375,7 +375,7 @@ int main(int argc, char *argv[]) {
state.xcursor_manager = wlr_xcursor_manager_create("default", 24);
if (!state.xcursor_manager) {
- wlr_log(L_ERROR, "Failed to load left_ptr cursor");
+ wlr_log(WLR_ERROR, "Failed to load left_ptr cursor");
return 1;
}
@@ -385,7 +385,7 @@ int main(int argc, char *argv[]) {
clock_gettime(CLOCK_MONOTONIC, &state.last_frame);
if (!wlr_backend_start(wlr)) {
- wlr_log(L_ERROR, "Failed to start backend");
+ wlr_log(WLR_ERROR, "Failed to start backend");
wlr_backend_destroy(wlr);
exit(1);
}
diff --git a/examples/rotation.c b/examples/rotation.c
index 9e9e059a..2d2fb179 100644
--- a/examples/rotation.c
+++ b/examples/rotation.c
@@ -186,7 +186,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
rules.options = getenv("XKB_DEFAULT_OPTIONS");
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
if (!context) {
- wlr_log(L_ERROR, "Failed to create XKB context");
+ wlr_log(WLR_ERROR, "Failed to create XKB context");
exit(1);
}
wlr_keyboard_set_keymap(device->keyboard, xkb_map_new_from_names(context,
@@ -220,14 +220,14 @@ int main(int argc, char *argv[]) {
} else if (strcmp(optarg, "flipped-270") == 0) {
transform = WL_OUTPUT_TRANSFORM_FLIPPED_270;
} else {
- wlr_log(L_ERROR, "got unknown transform value: %s", optarg);
+ wlr_log(WLR_ERROR, "got unknown transform value: %s", optarg);
}
break;
default:
break;
}
}
- wlr_log_init(L_DEBUG, NULL);
+ wlr_log_init(WLR_DEBUG, NULL);
struct wl_display *display = wl_display_create();
struct sample_state state = {
.display = display,
@@ -248,7 +248,7 @@ int main(int argc, char *argv[]) {
state.renderer = wlr_backend_get_renderer(wlr);
if (!state.renderer) {
- wlr_log(L_ERROR, "Could not start compositor, OOM");
+ wlr_log(WLR_ERROR, "Could not start compositor, OOM");
wlr_backend_destroy(wlr);
exit(EXIT_FAILURE);
}
@@ -256,12 +256,12 @@ int main(int argc, char *argv[]) {
WL_SHM_FORMAT_ABGR8888, cat_tex.width * 4, cat_tex.width, cat_tex.height,
cat_tex.pixel_data);
if (!state.cat_texture) {
- wlr_log(L_ERROR, "Could not start compositor, OOM");
+ wlr_log(WLR_ERROR, "Could not start compositor, OOM");
exit(EXIT_FAILURE);
}
if (!wlr_backend_start(wlr)) {
- wlr_log(L_ERROR, "Failed to start backend");
+ wlr_log(WLR_ERROR, "Failed to start backend");
wlr_backend_destroy(wlr);
exit(1);
}
diff --git a/examples/screenshot.c b/examples/screenshot.c
index fb37f32c..aa4dcaa0 100644
--- a/examples/screenshot.c
+++ b/examples/screenshot.c
@@ -200,7 +200,7 @@ static void write_image(const char *filename, int width, int height,
}
int main(int argc, char *argv[]) {
- wlr_log_init(L_DEBUG, NULL);
+ wlr_log_init(WLR_DEBUG, NULL);
struct wl_display * display = wl_display_connect(NULL);
if (display == NULL) {
diff --git a/examples/simple.c b/examples/simple.c
index cbe60c98..f161dc22 100644
--- a/examples/simple.c
+++ b/examples/simple.c
@@ -37,7 +37,7 @@ struct sample_keyboard {
};
void output_frame_notify(struct wl_listener *listener, void *data) {
- wlr_log(L_DEBUG, "Output removed");
+ wlr_log(WLR_DEBUG, "Output removed");
struct sample_output *sample_output = wl_container_of(listener, sample_output, frame);
struct sample_state *sample = sample_output->sample;
struct timespec now;
@@ -131,7 +131,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
rules.options = getenv("XKB_DEFAULT_OPTIONS");
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
if (!context) {
- wlr_log(L_ERROR, "Failed to create XKB context");
+ wlr_log(WLR_ERROR, "Failed to create XKB context");
exit(1);
}
wlr_keyboard_set_keymap(device->keyboard, xkb_map_new_from_names(context,
@@ -144,7 +144,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
}
int main(void) {
- wlr_log_init(L_DEBUG, NULL);
+ wlr_log_init(WLR_DEBUG, NULL);
struct wl_display *display = wl_display_create();
struct sample_state state = {
.color = { 1.0, 0.0, 0.0 },
@@ -163,7 +163,7 @@ int main(void) {
clock_gettime(CLOCK_MONOTONIC, &state.last_frame);
if (!wlr_backend_start(wlr)) {
- wlr_log(L_ERROR, "Failed to start backend");
+ wlr_log(WLR_ERROR, "Failed to start backend");
wlr_backend_destroy(wlr);
exit(1);
}
diff --git a/examples/tablet.c b/examples/tablet.c
index e734ca84..7332afe0 100644
--- a/examples/tablet.c
+++ b/examples/tablet.c
@@ -295,7 +295,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
rules.options = getenv("XKB_DEFAULT_OPTIONS");
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
if (!context) {
- wlr_log(L_ERROR, "Failed to create XKB context");
+ wlr_log(WLR_ERROR, "Failed to create XKB context");
exit(1);
}
wlr_keyboard_set_keymap(device->keyboard, xkb_map_new_from_names(context,
@@ -340,7 +340,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
int main(int argc, char *argv[]) {
- wlr_log_init(L_DEBUG, NULL);
+ wlr_log_init(WLR_DEBUG, NULL);
struct wl_display *display = wl_display_create();
struct sample_state state = {
.display = display,
@@ -362,11 +362,11 @@ int main(int argc, char *argv[]) {
state.renderer = wlr_backend_get_renderer(wlr);
if (!state.renderer) {
- wlr_log(L_ERROR, "Could not start compositor, OOM");
+ wlr_log(WLR_ERROR, "Could not start compositor, OOM");
exit(EXIT_FAILURE);
}
if (!wlr_backend_start(wlr)) {
- wlr_log(L_ERROR, "Failed to start backend");
+ wlr_log(WLR_ERROR, "Failed to start backend");
wlr_backend_destroy(wlr);
exit(1);
}
diff --git a/examples/touch.c b/examples/touch.c
index 0e77b48e..9954cdbd 100644
--- a/examples/touch.c
+++ b/examples/touch.c
@@ -208,7 +208,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
rules.options = getenv("XKB_DEFAULT_OPTIONS");
struct xkb_context *context = xkb_context_new(XKB_CONTEXT_NO_FLAGS);
if (!context) {
- wlr_log(L_ERROR, "Failed to create XKB context");
+ wlr_log(WLR_ERROR, "Failed to create XKB context");
exit(1);
}
wlr_keyboard_set_keymap(device->keyboard, xkb_map_new_from_names(context,
@@ -236,7 +236,7 @@ void new_input_notify(struct wl_listener *listener, void *data) {
int main(int argc, char *argv[]) {
- wlr_log_init(L_DEBUG, NULL);
+ wlr_log_init(WLR_DEBUG, NULL);
struct wl_display *display = wl_display_create();
struct sample_state state = {
.display = display
@@ -258,19 +258,19 @@ int main(int argc, char *argv[]) {
state.renderer = wlr_backend_get_renderer(wlr);
if (!state.renderer) {
- wlr_log(L_ERROR, "Could not start compositor, OOM");
+ wlr_log(WLR_ERROR, "Could not start compositor, OOM");
exit(EXIT_FAILURE);
}
state.cat_texture = wlr_texture_from_pixels(state.renderer,
WL_SHM_FORMAT_ARGB8888, cat_tex.width * 4, cat_tex.width, cat_tex.height,
cat_tex.pixel_data);
if (!state.cat_texture) {
- wlr_log(L_ERROR, "Could not start compositor, OOM");
+ wlr_log(WLR_ERROR, "Could not start compositor, OOM");
exit(EXIT_FAILURE);
}
if (!wlr_backend_start(wlr)) {
- wlr_log(L_ERROR, "Failed to start backend");
+ wlr_log(WLR_ERROR, "Failed to start backend");
wlr_backend_destroy(wlr);
exit(1);
}