aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/types/wlr_box.h16
-rw-r--r--include/wlr/types/wlr_output.h2
-rw-r--r--include/wlr/types/wlr_output_layout.h3
-rw-r--r--include/wlr/util/log.h4
4 files changed, 14 insertions, 11 deletions
diff --git a/include/wlr/types/wlr_box.h b/include/wlr/types/wlr_box.h
index 5290ada5..0588201c 100644
--- a/include/wlr/types/wlr_box.h
+++ b/include/wlr/types/wlr_box.h
@@ -8,18 +8,18 @@ struct wlr_box {
int width, height;
};
-void wlr_box_closest_point(struct wlr_box *box, double x, double y,
- double *dest_x, double *dest_y);
+void wlr_box_closest_point(const struct wlr_box *box, double x, double y,
+ double *dest_x, double *dest_y);
-bool wlr_box_intersection(struct wlr_box *box_a,
- struct wlr_box *box_b, struct wlr_box **dest);
+bool wlr_box_intersection(const struct wlr_box *box_a,
+ const struct wlr_box *box_b, struct wlr_box *dest);
-bool wlr_box_contains_point(struct wlr_box *box, double x, double y);
+bool wlr_box_contains_point(const struct wlr_box *box, double x, double y);
-bool wlr_box_empty(struct wlr_box *box);
+bool wlr_box_empty(const struct wlr_box *box);
enum wl_output_transform;
-void wlr_box_transform(struct wlr_box *box, enum wl_output_transform transform,
- struct wlr_box *dest);
+void wlr_box_transform(const struct wlr_box *box,
+ enum wl_output_transform transform, struct wlr_box *dest);
#endif
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 8e4f5446..6374ae9b 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -55,7 +55,7 @@ struct wlr_output {
float transform_matrix[16];
- /* Note: some backends may have zero modes */
+ // Note: some backends may have zero modes
struct wl_list modes;
struct wlr_output_mode *current_mode;
diff --git a/include/wlr/types/wlr_output_layout.h b/include/wlr/types/wlr_output_layout.h
index a99debf6..9187b377 100644
--- a/include/wlr/types/wlr_output_layout.h
+++ b/include/wlr/types/wlr_output_layout.h
@@ -1,6 +1,7 @@
#ifndef WLR_TYPES_WLR_OUTPUT_LAYOUT_H
#define WLR_TYPES_WLR_OUTPUT_LAYOUT_H
+#include <wlr/types/wlr_box.h>
#include <wlr/types/wlr_output.h>
#include <wayland-util.h>
#include <stdbool.h>
@@ -61,7 +62,7 @@ bool wlr_output_layout_contains_point(struct wlr_output_layout *layout,
struct wlr_output *reference, int x, int y);
bool wlr_output_layout_intersects(struct wlr_output_layout *layout,
- struct wlr_output *reference, int x1, int y1, int x2, int y2);
+ struct wlr_output *reference, const struct wlr_box *target_box);
/**
* Get the closest point on this layout from the given point from the reference
diff --git a/include/wlr/util/log.h b/include/wlr/util/log.h
index b017cc96..3d3f25f9 100644
--- a/include/wlr/util/log.h
+++ b/include/wlr/util/log.h
@@ -16,7 +16,9 @@ typedef enum {
typedef void (*log_callback_t)(log_importance_t importance, const char *fmt, va_list args);
-void wlr_log_init(log_callback_t callback);
+// Will log all messages less than or equal to `verbosity`
+// If `callback` is NULL, wlr will use its default logger.
+void wlr_log_init(log_importance_t verbosity, log_callback_t callback);
#ifdef __GNUC__
#define ATTRIB_PRINTF(start, end) __attribute__((format(printf, start, end)))