util: add wlr_ prefix to log symbols

This commit is contained in:
emersion 2018-07-09 22:49:54 +01:00
parent ffc8780893
commit 7cbef15206
No known key found for this signature in database
GPG key ID: 0FDE7BE0E88F5E48
98 changed files with 631 additions and 629 deletions

View file

@ -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;

View file

@ -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;

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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) {

View file

@ -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);
}

View file

@ -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);
}

View file

@ -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);
}