aboutsummaryrefslogtreecommitdiff
path: root/include/wlr
diff options
context:
space:
mode:
Diffstat (limited to 'include/wlr')
-rw-r--r--include/wlr/interfaces/wlr_output.h2
-rw-r--r--include/wlr/types/wlr_keyboard.h12
-rw-r--r--include/wlr/types/wlr_output.h6
-rw-r--r--include/wlr/types/wlr_seat.h1
-rw-r--r--include/wlr/util/edges.h12
-rw-r--r--include/wlr/xcursor.h6
6 files changed, 39 insertions, 0 deletions
diff --git a/include/wlr/interfaces/wlr_output.h b/include/wlr/interfaces/wlr_output.h
index b4f39d35..dc2a867b 100644
--- a/include/wlr/interfaces/wlr_output.h
+++ b/include/wlr/interfaces/wlr_output.h
@@ -9,6 +9,8 @@
struct wlr_output_impl {
void (*enable)(struct wlr_output *output, bool enable);
bool (*set_mode)(struct wlr_output *output, struct wlr_output_mode *mode);
+ bool (*set_custom_mode)(struct wlr_output *output, int32_t width,
+ int32_t height, int32_t refresh);
void (*transform)(struct wlr_output *output,
enum wl_output_transform transform);
bool (*set_cursor)(struct wlr_output *output, const uint8_t *buf,
diff --git a/include/wlr/types/wlr_keyboard.h b/include/wlr/types/wlr_keyboard.h
index e2d50b03..450cd473 100644
--- a/include/wlr/types/wlr_keyboard.h
+++ b/include/wlr/types/wlr_keyboard.h
@@ -52,9 +52,15 @@ struct wlr_keyboard {
} modifiers;
struct {
+ int32_t rate;
+ int32_t delay;
+ } repeat_info;
+
+ struct {
struct wl_signal key;
struct wl_signal modifiers;
struct wl_signal keymap;
+ struct wl_signal repeat_info;
} events;
void *data;
@@ -74,6 +80,12 @@ struct wlr_event_keyboard_key {
void wlr_keyboard_set_keymap(struct wlr_keyboard *kb,
struct xkb_keymap *keymap);
+/**
+ * Sets the keyboard repeat info. `rate` is in key repeats/second and delay is
+ * in milliseconds.
+ */
+void wlr_keyboard_set_repeat_info(struct wlr_keyboard *kb, int32_t rate,
+ int32_t delay);
void wlr_keyboard_led_update(struct wlr_keyboard *keyboard, uint32_t leds);
uint32_t wlr_keyboard_get_modifiers(struct wlr_keyboard *keyboard);
diff --git a/include/wlr/types/wlr_output.h b/include/wlr/types/wlr_output.h
index 04662820..abd7c285 100644
--- a/include/wlr/types/wlr_output.h
+++ b/include/wlr/types/wlr_output.h
@@ -16,6 +16,7 @@ struct wlr_output_cursor {
struct wlr_output *output;
double x, y;
bool enabled;
+ bool visible;
uint32_t width, height;
int32_t hotspot_x, hotspot_y;
struct wl_list link;
@@ -84,6 +85,8 @@ struct wlr_surface;
void wlr_output_enable(struct wlr_output *output, bool enable);
bool wlr_output_set_mode(struct wlr_output *output,
struct wlr_output_mode *mode);
+bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width,
+ int32_t height, int32_t refresh);
void wlr_output_transform(struct wlr_output *output,
enum wl_output_transform transform);
void wlr_output_set_position(struct wlr_output *output, int32_t lx, int32_t ly);
@@ -100,6 +103,9 @@ void wlr_output_set_fullscreen_surface(struct wlr_output *output,
struct wlr_surface *surface);
struct wlr_output_cursor *wlr_output_cursor_create(struct wlr_output *output);
+/**
+ * Sets the cursor image. The image must be already scaled for the output.
+ */
bool wlr_output_cursor_set_image(struct wlr_output_cursor *cursor,
const uint8_t *pixels, int32_t stride, uint32_t width, uint32_t height,
int32_t hotspot_x, int32_t hotspot_y);
diff --git a/include/wlr/types/wlr_seat.h b/include/wlr/types/wlr_seat.h
index fa2df530..00fd8da1 100644
--- a/include/wlr/types/wlr_seat.h
+++ b/include/wlr/types/wlr_seat.h
@@ -146,6 +146,7 @@ struct wlr_seat_keyboard_state {
struct wl_listener keyboard_destroy;
struct wl_listener keyboard_keymap;
+ struct wl_listener keyboard_repeat_info;
struct wl_listener surface_destroy;
struct wl_listener resource_destroy;
diff --git a/include/wlr/util/edges.h b/include/wlr/util/edges.h
new file mode 100644
index 00000000..53268323
--- /dev/null
+++ b/include/wlr/util/edges.h
@@ -0,0 +1,12 @@
+#ifndef WLR_UTIL_EDGES_H
+#define WLR_UTIL_EDGES_H
+
+enum wlr_edges {
+ WLR_EDGE_NONE = 0,
+ WLR_EDGE_TOP = 1,
+ WLR_EDGE_BOTTOM = 2,
+ WLR_EDGE_LEFT = 4,
+ WLR_EDGE_RIGHT = 8,
+};
+
+#endif
diff --git a/include/wlr/xcursor.h b/include/wlr/xcursor.h
index b6362b06..42fcedb9 100644
--- a/include/wlr/xcursor.h
+++ b/include/wlr/xcursor.h
@@ -32,6 +32,7 @@
#define WLR_XCURSOR_H
#include <stdint.h>
+#include <wlr/util/edges.h>
struct wlr_xcursor_image {
uint32_t width; /* actual width */
@@ -65,4 +66,9 @@ struct wlr_xcursor *wlr_xcursor_theme_get_cursor(
int wlr_xcursor_frame(struct wlr_xcursor *cursor, uint32_t time);
+/**
+ * Get the name of the resize cursor image for the given edges.
+ */
+const char *wlr_xcursor_get_resize_name(enum wlr_edges edges);
+
#endif