mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-01 22:58:38 -04:00
Revert "ELF Visibility"
This commit is contained in:
parent
09cfa39392
commit
1d9be89e2d
56 changed files with 8 additions and 403 deletions
|
|
@ -5,9 +5,7 @@
|
|||
#include <wayland-server-protocol.h>
|
||||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "util/defs.h"
|
||||
|
||||
WLR_API
|
||||
void wlr_box_closest_point(const struct wlr_box *box, double x, double y,
|
||||
double *dest_x, double *dest_y) {
|
||||
// find the closest x point
|
||||
|
|
@ -29,12 +27,10 @@ void wlr_box_closest_point(const struct wlr_box *box, double x, double y,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_box_empty(const struct wlr_box *box) {
|
||||
return box == NULL || box->width <= 0 || box->height <= 0;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_box_intersection(const struct wlr_box *box_a,
|
||||
const struct wlr_box *box_b, struct wlr_box *dest) {
|
||||
bool a_empty = wlr_box_empty(box_a);
|
||||
|
|
@ -61,7 +57,6 @@ bool wlr_box_intersection(const struct wlr_box *box_a,
|
|||
return !wlr_box_empty(dest);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_box_contains_point(const struct wlr_box *box, double x, double y) {
|
||||
if (wlr_box_empty(box)) {
|
||||
return false;
|
||||
|
|
@ -71,7 +66,6 @@ bool wlr_box_contains_point(const struct wlr_box *box, double x, double y) {
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_box_transform(const struct wlr_box *box,
|
||||
enum wl_output_transform transform, int width, int height,
|
||||
struct wlr_box *dest) {
|
||||
|
|
@ -121,7 +115,6 @@ void wlr_box_transform(const struct wlr_box *box,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_box_rotated_bounds(const struct wlr_box *box, float rotation,
|
||||
struct wlr_box *dest) {
|
||||
if (rotation == 0) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include <wlr/types/wlr_region.h>
|
||||
#include <wlr/types/wlr_surface.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static const struct wl_compositor_interface wl_compositor_impl;
|
||||
|
|
@ -87,7 +86,6 @@ static void wl_compositor_bind(struct wl_client *wl_client, void *data,
|
|||
wl_resource_get_link(wl_resource));
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_compositor_destroy(struct wlr_compositor *compositor) {
|
||||
if (compositor == NULL) {
|
||||
return;
|
||||
|
|
@ -172,7 +170,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_compositor_destroy(compositor);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_compositor *wlr_compositor_create(struct wl_display *display,
|
||||
struct wlr_renderer *renderer) {
|
||||
struct wlr_compositor *compositor =
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
struct wlr_cursor_device {
|
||||
|
|
@ -56,7 +55,6 @@ struct wlr_cursor_state {
|
|||
struct wl_listener layout_destroy;
|
||||
};
|
||||
|
||||
WLR_API
|
||||
struct wlr_cursor *wlr_cursor_create() {
|
||||
struct wlr_cursor *cur = calloc(1, sizeof(struct wlr_cursor));
|
||||
if (!cur) {
|
||||
|
|
@ -151,7 +149,6 @@ static void wlr_cursor_device_destroy(struct wlr_cursor_device *c_device) {
|
|||
free(c_device);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_cursor_destroy(struct wlr_cursor *cur) {
|
||||
wlr_cursor_detach_output_layout(cur);
|
||||
|
||||
|
|
@ -235,7 +232,6 @@ static struct wlr_box *get_mapping(struct wlr_cursor *cur,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_cursor_warp(struct wlr_cursor *cur, struct wlr_input_device *dev,
|
||||
double x, double y) {
|
||||
assert(cur->state->layout);
|
||||
|
|
@ -257,7 +253,6 @@ bool wlr_cursor_warp(struct wlr_cursor *cur, struct wlr_input_device *dev,
|
|||
return result;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_cursor_warp_absolute(struct wlr_cursor *cur,
|
||||
struct wlr_input_device *dev, double x_mm, double y_mm) {
|
||||
assert(cur->state->layout);
|
||||
|
|
@ -273,7 +268,6 @@ void wlr_cursor_warp_absolute(struct wlr_cursor *cur,
|
|||
wlr_cursor_warp_unchecked(cur, x, y);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_cursor_move(struct wlr_cursor *cur, struct wlr_input_device *dev,
|
||||
double delta_x, double delta_y) {
|
||||
assert(cur->state->layout);
|
||||
|
|
@ -304,7 +298,6 @@ void wlr_cursor_move(struct wlr_cursor *cur, struct wlr_input_device *dev,
|
|||
wlr_cursor_warp_unchecked(cur, x, y);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels,
|
||||
int32_t stride, uint32_t width, uint32_t height, int32_t hotspot_x,
|
||||
int32_t hotspot_y, float scale) {
|
||||
|
|
@ -320,7 +313,6 @@ void wlr_cursor_set_image(struct wlr_cursor *cur, const uint8_t *pixels,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_cursor_set_surface(struct wlr_cursor *cur, struct wlr_surface *surface,
|
||||
int32_t hotspot_x, int32_t hotspot_y) {
|
||||
struct wlr_cursor_output_cursor *output_cursor;
|
||||
|
|
@ -486,7 +478,6 @@ static struct wlr_cursor_device *wlr_cursor_device_create(
|
|||
return c_device;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_cursor_attach_input_device(struct wlr_cursor *cur,
|
||||
struct wlr_input_device *dev) {
|
||||
if (dev->type != WLR_INPUT_DEVICE_POINTER &&
|
||||
|
|
@ -508,7 +499,6 @@ void wlr_cursor_attach_input_device(struct wlr_cursor *cur,
|
|||
wlr_cursor_device_create(cur, dev);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_cursor_detach_input_device(struct wlr_cursor *cur,
|
||||
struct wlr_input_device *dev) {
|
||||
struct wlr_cursor_device *c_device, *tmp = NULL;
|
||||
|
|
@ -581,7 +571,6 @@ static void handle_layout_change(struct wl_listener *listener, void *data) {
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_cursor_attach_output_layout(struct wlr_cursor *cur,
|
||||
struct wlr_output_layout *l) {
|
||||
wlr_cursor_detach_output_layout(cur);
|
||||
|
|
@ -605,13 +594,11 @@ void wlr_cursor_attach_output_layout(struct wlr_cursor *cur,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_cursor_map_to_output(struct wlr_cursor *cur,
|
||||
struct wlr_output *output) {
|
||||
cur->state->mapped_output = output;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_cursor_map_input_to_output(struct wlr_cursor *cur,
|
||||
struct wlr_input_device *dev, struct wlr_output *output) {
|
||||
struct wlr_cursor_device *c_device = get_cursor_device(cur, dev);
|
||||
|
|
@ -624,7 +611,6 @@ void wlr_cursor_map_input_to_output(struct wlr_cursor *cur,
|
|||
c_device->mapped_output = output;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_cursor_map_to_region(struct wlr_cursor *cur,
|
||||
struct wlr_box *box) {
|
||||
if (box && wlr_box_empty(box)) {
|
||||
|
|
@ -635,7 +621,6 @@ void wlr_cursor_map_to_region(struct wlr_cursor *cur,
|
|||
cur->state->mapped_box = box;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_cursor_map_input_to_region(struct wlr_cursor *cur,
|
||||
struct wlr_input_device *dev, struct wlr_box *box) {
|
||||
if (box && wlr_box_empty(box)) {
|
||||
|
|
@ -654,7 +639,6 @@ void wlr_cursor_map_input_to_region(struct wlr_cursor *cur,
|
|||
c_device->mapped_box = box;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_cursor_absolute_to_layout_coords(struct wlr_cursor *cur,
|
||||
struct wlr_input_device *device, double x_mm, double y_mm,
|
||||
double width_mm, double height_mm, double *lx, double *ly) {
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
#include <wlr/types/wlr_data_device.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
#define ALL_ACTIONS (WL_DATA_DEVICE_MANAGER_DND_ACTION_COPY | \
|
||||
|
|
@ -271,7 +270,6 @@ static struct wlr_data_offer *wlr_data_source_send_offer(
|
|||
return offer;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_client_send_selection(struct wlr_seat_client *seat_client) {
|
||||
if (wl_list_empty(&seat_client->data_devices)) {
|
||||
return;
|
||||
|
|
@ -314,7 +312,6 @@ static void seat_client_selection_data_source_destroy(
|
|||
wlr_signal_emit_safe(&seat->events.selection, seat);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_set_selection(struct wlr_seat *seat,
|
||||
struct wlr_data_source *source, uint32_t serial) {
|
||||
if (source) {
|
||||
|
|
@ -965,14 +962,12 @@ static void data_source_resource_handle_destroy(struct wl_resource *resource) {
|
|||
free(source);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_data_source_init(struct wlr_data_source *source) {
|
||||
wl_array_init(&source->mime_types);
|
||||
wl_signal_init(&source->events.destroy);
|
||||
source->actions = -1;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_data_source_finish(struct wlr_data_source *source) {
|
||||
if (source == NULL) {
|
||||
return;
|
||||
|
|
@ -1064,7 +1059,6 @@ static void data_device_manager_bind(struct wl_client *client,
|
|||
NULL, NULL);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_data_device_manager_destroy(struct wlr_data_device_manager *manager) {
|
||||
if (!manager) {
|
||||
return;
|
||||
|
|
@ -1081,7 +1075,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_data_device_manager_destroy(manager);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_data_device_manager *wlr_data_device_manager_create(
|
||||
struct wl_display *display) {
|
||||
struct wlr_data_device_manager *manager =
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "gamma-control-protocol.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static void resource_destroy(struct wl_client *client,
|
||||
|
|
@ -147,7 +146,6 @@ static void gamma_control_manager_bind(struct wl_client *client, void *data,
|
|||
manager, NULL);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_gamma_control_manager_destroy(
|
||||
struct wlr_gamma_control_manager *manager) {
|
||||
if (!manager) {
|
||||
|
|
@ -168,7 +166,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_gamma_control_manager_destroy(manager);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_gamma_control_manager *wlr_gamma_control_manager_create(
|
||||
struct wl_display *display) {
|
||||
struct wlr_gamma_control_manager *manager =
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include <wlr/types/wlr_idle.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "idle-protocol.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static const struct org_kde_kwin_idle_timeout_interface idle_timeout_impl;
|
||||
|
|
@ -158,7 +157,6 @@ static void idle_bind(struct wl_client *wl_client, void *data,
|
|||
wl_resource_set_implementation(wl_resource, &idle_impl, idle, NULL);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_idle_destroy(struct wlr_idle *idle) {
|
||||
if (!idle) {
|
||||
return;
|
||||
|
|
@ -177,7 +175,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_idle_destroy(idle);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_idle *wlr_idle_create(struct wl_display *display) {
|
||||
struct wlr_idle *idle = calloc(1, sizeof(struct wlr_idle));
|
||||
if (!idle) {
|
||||
|
|
@ -206,7 +203,6 @@ struct wlr_idle *wlr_idle_create(struct wl_display *display) {
|
|||
return idle;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_idle_notify_activity(struct wlr_idle *idle, struct wlr_seat *seat) {
|
||||
wlr_signal_emit_safe(&idle->activity_notify, seat);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,10 +10,8 @@
|
|||
#include <wlr/interfaces/wlr_touch.h>
|
||||
#include <wlr/types/wlr_input_device.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
WLR_API
|
||||
void wlr_input_device_init(struct wlr_input_device *dev,
|
||||
enum wlr_input_device_type type,
|
||||
struct wlr_input_device_impl *impl,
|
||||
|
|
@ -27,7 +25,6 @@ void wlr_input_device_init(struct wlr_input_device *dev,
|
|||
wl_signal_init(&dev->events.destroy);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_input_device_destroy(struct wlr_input_device *dev) {
|
||||
if (!dev) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <wlr/interfaces/wlr_keyboard.h>
|
||||
#include <wlr/types/wlr_keyboard.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
int os_create_anonymous_file(off_t size);
|
||||
|
|
@ -101,7 +100,6 @@ static void keyboard_key_update(struct wlr_keyboard *keyboard,
|
|||
assert(keyboard->num_keycodes <= WLR_KEYBOARD_KEYS_CAP);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_keyboard_notify_modifiers(struct wlr_keyboard *keyboard,
|
||||
uint32_t mods_depressed, uint32_t mods_latched, uint32_t mods_locked,
|
||||
uint32_t group) {
|
||||
|
|
@ -117,7 +115,6 @@ void wlr_keyboard_notify_modifiers(struct wlr_keyboard *keyboard,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard,
|
||||
struct wlr_event_keyboard_key *event) {
|
||||
if (keyboard->xkb_state == NULL) {
|
||||
|
|
@ -139,7 +136,6 @@ void wlr_keyboard_notify_key(struct wlr_keyboard *keyboard,
|
|||
wlr_signal_emit_safe(&keyboard->events.key, event);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_keyboard_init(struct wlr_keyboard *kb,
|
||||
struct wlr_keyboard_impl *impl) {
|
||||
kb->impl = impl;
|
||||
|
|
@ -153,7 +149,6 @@ void wlr_keyboard_init(struct wlr_keyboard *kb,
|
|||
kb->repeat_info.delay = 600;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_keyboard_destroy(struct wlr_keyboard *kb) {
|
||||
if (kb == NULL) {
|
||||
return;
|
||||
|
|
@ -169,14 +164,12 @@ void wlr_keyboard_destroy(struct wlr_keyboard *kb) {
|
|||
free(kb);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_keyboard_led_update(struct wlr_keyboard *kb, uint32_t leds) {
|
||||
if (kb->impl && kb->impl->led_update) {
|
||||
kb->impl->led_update(kb, leds);
|
||||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_keyboard_set_keymap(struct wlr_keyboard *kb,
|
||||
struct xkb_keymap *keymap) {
|
||||
char *keymap_str = NULL;
|
||||
|
|
@ -254,7 +247,6 @@ err:
|
|||
free(keymap_str);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_keyboard_set_repeat_info(struct wlr_keyboard *kb, int32_t rate,
|
||||
int32_t delay) {
|
||||
if (kb->repeat_info.rate == rate && kb->repeat_info.delay == delay) {
|
||||
|
|
@ -265,7 +257,6 @@ void wlr_keyboard_set_repeat_info(struct wlr_keyboard *kb, int32_t rate,
|
|||
wlr_signal_emit_safe(&kb->events.repeat_info, kb);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_keyboard_get_modifiers(struct wlr_keyboard *kb) {
|
||||
xkb_mod_mask_t mask = kb->modifiers.depressed | kb->modifiers.latched;
|
||||
uint32_t modifiers = 0;
|
||||
|
|
|
|||
|
|
@ -5,9 +5,7 @@
|
|||
#include <string.h>
|
||||
#include <sys/types.h>
|
||||
#include <wlr/types/wlr_list.h>
|
||||
#include "util/defs.h"
|
||||
|
||||
WLR_API
|
||||
bool wlr_list_init(struct wlr_list *list) {
|
||||
list->capacity = 10;
|
||||
list->length = 0;
|
||||
|
|
@ -31,19 +29,16 @@ static bool list_resize(struct wlr_list *list) {
|
|||
return true;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_list_finish(struct wlr_list *list) {
|
||||
free(list->items);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_list_for_each(struct wlr_list *list, void (*callback)(void *item)) {
|
||||
for (size_t i = 0; i < list->length; i++) {
|
||||
callback(list->items[i]);
|
||||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
ssize_t wlr_list_push(struct wlr_list *list, void *item) {
|
||||
if (!list_resize(list)) {
|
||||
return -1;
|
||||
|
|
@ -52,7 +47,6 @@ ssize_t wlr_list_push(struct wlr_list *list, void *item) {
|
|||
return list->length;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
ssize_t wlr_list_insert(struct wlr_list *list, size_t index, void *item) {
|
||||
if (!list_resize(list)) {
|
||||
return -1;
|
||||
|
|
@ -64,14 +58,12 @@ ssize_t wlr_list_insert(struct wlr_list *list, size_t index, void *item) {
|
|||
return list->length;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_list_del(struct wlr_list *list, size_t index) {
|
||||
list->length--;
|
||||
memmove(&list->items[index], &list->items[index + 1],
|
||||
sizeof(void *) * (list->length - index));
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void *wlr_list_pop(struct wlr_list *list) {
|
||||
if (list->length == 0) {
|
||||
return NULL;
|
||||
|
|
@ -81,7 +73,6 @@ void *wlr_list_pop(struct wlr_list *list) {
|
|||
return last;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void *wlr_list_peek(struct wlr_list *list) {
|
||||
if (list->length == 0) {
|
||||
return NULL;
|
||||
|
|
@ -89,7 +80,6 @@ void *wlr_list_peek(struct wlr_list *list) {
|
|||
return list->items[list->length - 1];
|
||||
}
|
||||
|
||||
WLR_API
|
||||
ssize_t wlr_list_cat(struct wlr_list *list, const struct wlr_list *source) {
|
||||
size_t old_len = list->length;
|
||||
size_t i;
|
||||
|
|
@ -102,13 +92,11 @@ ssize_t wlr_list_cat(struct wlr_list *list, const struct wlr_list *source) {
|
|||
return list->length;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_list_qsort(struct wlr_list *list,
|
||||
int compare(const void *left, const void *right)) {
|
||||
qsort(list->items, list->length, sizeof(void *), compare);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
ssize_t wlr_list_find(struct wlr_list *list,
|
||||
int compare(const void *item, const void *data), const void *data) {
|
||||
for (size_t i = 0; i < list->length; i++) {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@
|
|||
#include <wlr/types/wlr_surface.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/util/region.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static void wl_output_send_to_resource(struct wl_resource *resource) {
|
||||
|
|
@ -114,7 +113,6 @@ static void wl_output_bind(struct wl_client *wl_client, void *data,
|
|||
wl_output_send_to_resource(wl_resource);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_create_global(struct wlr_output *output) {
|
||||
if (output->wl_global != NULL) {
|
||||
return;
|
||||
|
|
@ -124,7 +122,6 @@ void wlr_output_create_global(struct wlr_output *output) {
|
|||
output->wl_global = wl_global;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_destroy_global(struct wlr_output *output) {
|
||||
if (output->wl_global == NULL) {
|
||||
return;
|
||||
|
|
@ -137,7 +134,6 @@ void wlr_output_destroy_global(struct wlr_output *output) {
|
|||
output->wl_global = NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_update_enabled(struct wlr_output *output, bool enabled) {
|
||||
if (output->enabled == enabled) {
|
||||
return;
|
||||
|
|
@ -152,7 +148,6 @@ static void wlr_output_update_matrix(struct wlr_output *output) {
|
|||
output->transform);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_enable(struct wlr_output *output, bool enable) {
|
||||
if (output->enabled == enable) {
|
||||
return;
|
||||
|
|
@ -163,7 +158,6 @@ void wlr_output_enable(struct wlr_output *output, bool enable) {
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_set_mode(struct wlr_output *output,
|
||||
struct wlr_output_mode *mode) {
|
||||
if (!output->impl || !output->impl->set_mode) {
|
||||
|
|
@ -172,7 +166,6 @@ bool wlr_output_set_mode(struct wlr_output *output,
|
|||
return output->impl->set_mode(output, mode);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width,
|
||||
int32_t height, int32_t refresh) {
|
||||
if (!output->impl || !output->impl->set_custom_mode) {
|
||||
|
|
@ -181,7 +174,6 @@ bool wlr_output_set_custom_mode(struct wlr_output *output, int32_t width,
|
|||
return output->impl->set_custom_mode(output, width, height, refresh);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_update_mode(struct wlr_output *output,
|
||||
struct wlr_output_mode *mode) {
|
||||
output->current_mode = mode;
|
||||
|
|
@ -189,7 +181,6 @@ void wlr_output_update_mode(struct wlr_output *output,
|
|||
mode->refresh);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width,
|
||||
int32_t height, int32_t refresh) {
|
||||
output->width = width;
|
||||
|
|
@ -206,7 +197,6 @@ void wlr_output_update_custom_mode(struct wlr_output *output, int32_t width,
|
|||
wlr_signal_emit_safe(&output->events.mode, output);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_set_transform(struct wlr_output *output,
|
||||
enum wl_output_transform transform) {
|
||||
output->impl->transform(output, transform);
|
||||
|
|
@ -221,7 +211,6 @@ void wlr_output_set_transform(struct wlr_output *output,
|
|||
wlr_signal_emit_safe(&output->events.transform, output);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_set_position(struct wlr_output *output, int32_t lx,
|
||||
int32_t ly) {
|
||||
if (lx == output->lx && ly == output->ly) {
|
||||
|
|
@ -238,7 +227,6 @@ void wlr_output_set_position(struct wlr_output *output, int32_t lx,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_set_scale(struct wlr_output *output, float scale) {
|
||||
if (output->scale == scale) {
|
||||
return;
|
||||
|
|
@ -261,7 +249,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_output_destroy_global(output);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
|
||||
const struct wlr_output_impl *impl, struct wl_display *display) {
|
||||
assert(impl->make_current && impl->swap_buffers && impl->transform);
|
||||
|
|
@ -289,7 +276,6 @@ void wlr_output_init(struct wlr_output *output, struct wlr_backend *backend,
|
|||
output->frame_pending = true;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_destroy(struct wlr_output *output) {
|
||||
if (!output) {
|
||||
return;
|
||||
|
|
@ -321,7 +307,6 @@ void wlr_output_destroy(struct wlr_output *output) {
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_transformed_resolution(struct wlr_output *output,
|
||||
int *width, int *height) {
|
||||
if (output->transform % 2 == 0) {
|
||||
|
|
@ -333,7 +318,6 @@ void wlr_output_transformed_resolution(struct wlr_output *output,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_effective_resolution(struct wlr_output *output,
|
||||
int *width, int *height) {
|
||||
wlr_output_transformed_resolution(output, width, height);
|
||||
|
|
@ -341,7 +325,6 @@ void wlr_output_effective_resolution(struct wlr_output *output,
|
|||
*height /= output->scale;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_make_current(struct wlr_output *output, int *buffer_age) {
|
||||
return output->impl->make_current(output, buffer_age);
|
||||
}
|
||||
|
|
@ -477,7 +460,6 @@ surface_damage_finish:
|
|||
pixman_region32_fini(&surface_damage);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_swap_buffers(struct wlr_output *output, struct timespec *when,
|
||||
pixman_region32_t *damage) {
|
||||
if (output->frame_pending) {
|
||||
|
|
@ -544,7 +526,6 @@ bool wlr_output_swap_buffers(struct wlr_output *output, struct timespec *when,
|
|||
return true;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_send_frame(struct wlr_output *output) {
|
||||
output->frame_pending = false;
|
||||
wlr_signal_emit_safe(&output->events.frame, output);
|
||||
|
|
@ -558,7 +539,6 @@ static void schedule_frame_handle_idle_timer(void *data) {
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_schedule_frame(struct wlr_output *output) {
|
||||
if (output->frame_pending || output->idle_frame != NULL) {
|
||||
return;
|
||||
|
|
@ -570,7 +550,6 @@ void wlr_output_schedule_frame(struct wlr_output *output) {
|
|||
wl_event_loop_add_idle(ev, schedule_frame_handle_idle_timer, output);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_set_gamma(struct wlr_output *output,
|
||||
uint32_t size, uint16_t *r, uint16_t *g, uint16_t *b) {
|
||||
if (output->impl->set_gamma) {
|
||||
|
|
@ -578,7 +557,6 @@ void wlr_output_set_gamma(struct wlr_output *output,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_output_get_gamma_size(struct wlr_output *output) {
|
||||
if (!output->impl->get_gamma_size) {
|
||||
return 0;
|
||||
|
|
@ -586,7 +564,6 @@ uint32_t wlr_output_get_gamma_size(struct wlr_output *output) {
|
|||
return output->impl->get_gamma_size(output);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_update_needs_swap(struct wlr_output *output) {
|
||||
output->needs_swap = true;
|
||||
wlr_signal_emit_safe(&output->events.needs_swap, output);
|
||||
|
|
@ -645,7 +622,6 @@ static void output_fullscreen_surface_handle_destroy(
|
|||
output_fullscreen_surface_reset(output);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_set_fullscreen_surface(struct wlr_output *output,
|
||||
struct wlr_surface *surface) {
|
||||
// TODO: hardware fullscreen
|
||||
|
|
@ -672,7 +648,6 @@ void wlr_output_set_fullscreen_surface(struct wlr_output *output,
|
|||
&output->fullscreen_surface_destroy);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_output *wlr_output_from_resource(struct wl_resource *resource) {
|
||||
assert(wl_resource_instance_of(resource, &wl_output_interface,
|
||||
&wl_output_impl));
|
||||
|
|
@ -699,7 +674,6 @@ static void output_cursor_reset(struct wlr_output_cursor *cursor) {
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
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) {
|
||||
|
|
@ -807,7 +781,6 @@ static void output_cursor_handle_destroy(struct wl_listener *listener,
|
|||
output_cursor_reset(cursor);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_cursor_set_surface(struct wlr_output_cursor *cursor,
|
||||
struct wlr_surface *surface, int32_t hotspot_x, int32_t hotspot_y) {
|
||||
if (surface && strcmp(surface->role, "wl_pointer-cursor") != 0) {
|
||||
|
|
@ -868,7 +841,6 @@ void wlr_output_cursor_set_surface(struct wlr_output_cursor *cursor,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_cursor_move(struct wlr_output_cursor *cursor,
|
||||
double x, double y) {
|
||||
if (cursor->x == x && cursor->y == y) {
|
||||
|
|
@ -896,7 +868,6 @@ bool wlr_output_cursor_move(struct wlr_output_cursor *cursor,
|
|||
return cursor->output->impl->move_cursor(cursor->output, (int)x, (int)y);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_output_cursor *wlr_output_cursor_create(struct wlr_output *output) {
|
||||
struct wlr_output_cursor *cursor =
|
||||
calloc(1, sizeof(struct wlr_output_cursor));
|
||||
|
|
@ -913,7 +884,6 @@ struct wlr_output_cursor *wlr_output_cursor_create(struct wlr_output *output) {
|
|||
return cursor;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_cursor_destroy(struct wlr_output_cursor *cursor) {
|
||||
if (cursor == NULL) {
|
||||
return;
|
||||
|
|
@ -936,7 +906,6 @@ void wlr_output_cursor_destroy(struct wlr_output_cursor *cursor) {
|
|||
}
|
||||
|
||||
|
||||
WLR_API
|
||||
enum wl_output_transform wlr_output_transform_invert(
|
||||
enum wl_output_transform tr) {
|
||||
if ((tr & WL_OUTPUT_TRANSFORM_90) && !(tr & WL_OUTPUT_TRANSFORM_FLIPPED)) {
|
||||
|
|
@ -945,7 +914,6 @@ enum wl_output_transform wlr_output_transform_invert(
|
|||
return tr;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
enum wl_output_transform wlr_output_transform_compose(
|
||||
enum wl_output_transform tr_a, enum wl_output_transform tr_b) {
|
||||
uint32_t flipped = (tr_a ^ tr_b) & WL_OUTPUT_TRANSFORM_FLIPPED;
|
||||
|
|
|
|||
|
|
@ -5,7 +5,6 @@
|
|||
#include <wlr/types/wlr_box.h>
|
||||
#include <wlr/types/wlr_output_damage.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static void output_handle_destroy(struct wl_listener *listener, void *data) {
|
||||
|
|
@ -51,7 +50,6 @@ static void output_handle_frame(struct wl_listener *listener, void *data) {
|
|||
wlr_signal_emit_safe(&output_damage->events.frame, output_damage);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_output_damage *wlr_output_damage_create(struct wlr_output *output) {
|
||||
struct wlr_output_damage *output_damage =
|
||||
calloc(1, sizeof(struct wlr_output_damage));
|
||||
|
|
@ -84,7 +82,6 @@ struct wlr_output_damage *wlr_output_damage_create(struct wlr_output *output) {
|
|||
return output_damage;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_damage_destroy(struct wlr_output_damage *output_damage) {
|
||||
if (output_damage == NULL) {
|
||||
return;
|
||||
|
|
@ -103,7 +100,6 @@ void wlr_output_damage_destroy(struct wlr_output_damage *output_damage) {
|
|||
free(output_damage);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_damage_make_current(struct wlr_output_damage *output_damage,
|
||||
bool *needs_swap, pixman_region32_t *damage) {
|
||||
struct wlr_output *output = output_damage->output;
|
||||
|
|
@ -135,7 +131,6 @@ bool wlr_output_damage_make_current(struct wlr_output_damage *output_damage,
|
|||
return true;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_damage_swap_buffers(struct wlr_output_damage *output_damage,
|
||||
struct timespec *when, pixman_region32_t *damage) {
|
||||
if (!wlr_output_swap_buffers(output_damage->output, when, damage)) {
|
||||
|
|
@ -153,7 +148,6 @@ bool wlr_output_damage_swap_buffers(struct wlr_output_damage *output_damage,
|
|||
return true;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_damage_add(struct wlr_output_damage *output_damage,
|
||||
pixman_region32_t *damage) {
|
||||
int width, height;
|
||||
|
|
@ -166,7 +160,6 @@ void wlr_output_damage_add(struct wlr_output_damage *output_damage,
|
|||
wlr_output_schedule_frame(output_damage->output);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_damage_add_whole(struct wlr_output_damage *output_damage) {
|
||||
int width, height;
|
||||
wlr_output_transformed_resolution(output_damage->output, &width, &height);
|
||||
|
|
@ -177,7 +170,6 @@ void wlr_output_damage_add_whole(struct wlr_output_damage *output_damage) {
|
|||
wlr_output_schedule_frame(output_damage->output);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_damage_add_box(struct wlr_output_damage *output_damage,
|
||||
struct wlr_box *box) {
|
||||
int width, height;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@
|
|||
#include <wlr/types/wlr_output_layout.h>
|
||||
#include <wlr/types/wlr_output.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
struct wlr_output_layout_state {
|
||||
|
|
@ -26,7 +25,6 @@ struct wlr_output_layout_output_state {
|
|||
struct wl_listener output_destroy;
|
||||
};
|
||||
|
||||
WLR_API
|
||||
struct wlr_output_layout *wlr_output_layout_create() {
|
||||
struct wlr_output_layout *layout =
|
||||
calloc(1, sizeof(struct wlr_output_layout));
|
||||
|
|
@ -59,7 +57,6 @@ static void wlr_output_layout_output_destroy(
|
|||
free(l_output);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_layout_destroy(struct wlr_output_layout *layout) {
|
||||
if (!layout) {
|
||||
return;
|
||||
|
|
@ -192,7 +189,6 @@ static struct wlr_output_layout_output *wlr_output_layout_output_create(
|
|||
return l_output;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_layout_add(struct wlr_output_layout *layout,
|
||||
struct wlr_output *output, int x, int y) {
|
||||
struct wlr_output_layout_output *l_output =
|
||||
|
|
@ -212,7 +208,6 @@ void wlr_output_layout_add(struct wlr_output_layout *layout,
|
|||
wlr_signal_emit_safe(&layout->events.add, l_output);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_output_layout_output *wlr_output_layout_get(
|
||||
struct wlr_output_layout *layout, struct wlr_output *reference) {
|
||||
struct wlr_output_layout_output *l_output;
|
||||
|
|
@ -224,7 +219,6 @@ struct wlr_output_layout_output *wlr_output_layout_get(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_layout_contains_point(struct wlr_output_layout *layout,
|
||||
struct wlr_output *reference, int x, int y) {
|
||||
if (reference) {
|
||||
|
|
@ -237,7 +231,6 @@ bool wlr_output_layout_contains_point(struct wlr_output_layout *layout,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_output_layout_intersects(struct wlr_output_layout *layout,
|
||||
struct wlr_output *reference, const struct wlr_box *target_box) {
|
||||
struct wlr_box out_box;
|
||||
|
|
@ -264,7 +257,6 @@ bool wlr_output_layout_intersects(struct wlr_output_layout *layout,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_output *wlr_output_layout_output_at(struct wlr_output_layout *layout,
|
||||
double x, double y) {
|
||||
struct wlr_output_layout_output *l_output;
|
||||
|
|
@ -277,7 +269,6 @@ struct wlr_output *wlr_output_layout_output_at(struct wlr_output_layout *layout,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_layout_move(struct wlr_output_layout *layout,
|
||||
struct wlr_output *output, int x, int y) {
|
||||
struct wlr_output_layout_output *l_output =
|
||||
|
|
@ -292,7 +283,6 @@ void wlr_output_layout_move(struct wlr_output_layout *layout,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_layout_remove(struct wlr_output_layout *layout,
|
||||
struct wlr_output *output) {
|
||||
struct wlr_output_layout_output *l_output =
|
||||
|
|
@ -304,7 +294,6 @@ void wlr_output_layout_remove(struct wlr_output_layout *layout,
|
|||
wlr_output_destroy_global(output);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_layout_output_coords(struct wlr_output_layout *layout,
|
||||
struct wlr_output *reference, double *x, double *y) {
|
||||
assert(layout && reference);
|
||||
|
|
@ -321,7 +310,6 @@ void wlr_output_layout_output_coords(struct wlr_output_layout *layout,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_layout_closest_point(struct wlr_output_layout *layout,
|
||||
struct wlr_output *reference, double x, double y, double *dest_x,
|
||||
double *dest_y) {
|
||||
|
|
@ -355,7 +343,6 @@ void wlr_output_layout_closest_point(struct wlr_output_layout *layout,
|
|||
*dest_y = min_y;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_box *wlr_output_layout_get_box(
|
||||
struct wlr_output_layout *layout, struct wlr_output *reference) {
|
||||
struct wlr_output_layout_output *l_output;
|
||||
|
|
@ -400,7 +387,6 @@ struct wlr_box *wlr_output_layout_get_box(
|
|||
// not reached
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_output_layout_add_auto(struct wlr_output_layout *layout,
|
||||
struct wlr_output *output) {
|
||||
struct wlr_output_layout_output *l_output =
|
||||
|
|
@ -419,7 +405,6 @@ void wlr_output_layout_add_auto(struct wlr_output_layout *layout,
|
|||
wlr_signal_emit_safe(&layout->events.add, l_output);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_output *wlr_output_layout_get_center_output(
|
||||
struct wlr_output_layout *layout) {
|
||||
if (wl_list_empty(&layout->outputs)) {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@
|
|||
#include <wayland-server.h>
|
||||
#include <wlr/interfaces/wlr_pointer.h>
|
||||
#include <wlr/types/wlr_pointer.h>
|
||||
#include "util/defs.h"
|
||||
|
||||
WLR_API
|
||||
void wlr_pointer_init(struct wlr_pointer *pointer,
|
||||
struct wlr_pointer_impl *impl) {
|
||||
pointer->impl = impl;
|
||||
|
|
@ -15,7 +13,6 @@ void wlr_pointer_init(struct wlr_pointer *pointer,
|
|||
wl_signal_init(&pointer->events.axis);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_pointer_destroy(struct wlr_pointer *pointer) {
|
||||
if (pointer && pointer->impl && pointer->impl->destroy) {
|
||||
pointer->impl->destroy(pointer);
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "gtk-primary-selection-protocol.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static const struct gtk_primary_selection_offer_interface offer_impl;
|
||||
|
|
@ -174,7 +173,6 @@ static void source_resource_handle_destroy(struct wl_resource *resource) {
|
|||
}
|
||||
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_client_send_primary_selection(
|
||||
struct wlr_seat_client *seat_client) {
|
||||
if (wl_list_empty(&seat_client->primary_selection_devices)) {
|
||||
|
|
@ -218,7 +216,6 @@ static void seat_client_primary_selection_source_destroy(
|
|||
wlr_signal_emit_safe(&seat->events.primary_selection, seat);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_set_primary_selection(struct wlr_seat *seat,
|
||||
struct wlr_primary_selection_source *source, uint32_t serial) {
|
||||
if (source) {
|
||||
|
|
@ -286,14 +283,13 @@ static void device_resource_handle_destroy(struct wl_resource *resource) {
|
|||
wl_list_remove(wl_resource_get_link(resource));
|
||||
}
|
||||
|
||||
WLR_API
|
||||
|
||||
void wlr_primary_selection_source_init(
|
||||
struct wlr_primary_selection_source *source) {
|
||||
wl_array_init(&source->mime_types);
|
||||
wl_signal_init(&source->events.destroy);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_primary_selection_source_finish(
|
||||
struct wlr_primary_selection_source *source) {
|
||||
if (source == NULL) {
|
||||
|
|
@ -386,7 +382,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_primary_selection_device_manager_destroy(manager);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_primary_selection_device_manager *
|
||||
wlr_primary_selection_device_manager_create(
|
||||
struct wl_display *display) {
|
||||
|
|
@ -409,7 +404,6 @@ struct wlr_primary_selection_device_manager *
|
|||
return manager;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_primary_selection_device_manager_destroy(
|
||||
struct wlr_primary_selection_device_manager *manager) {
|
||||
if (manager == NULL) {
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <stdlib.h>
|
||||
#include <wayland-server.h>
|
||||
#include <wlr/types/wlr_region.h>
|
||||
#include "util/defs.h"
|
||||
|
||||
static void region_add(struct wl_client *client, struct wl_resource *resource,
|
||||
int32_t x, int32_t y, int32_t width, int32_t height) {
|
||||
|
|
@ -39,7 +38,6 @@ static void destroy_region(struct wl_resource *resource) {
|
|||
free(reg);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_region_create(struct wl_client *client, struct wl_resource *res,
|
||||
uint32_t id) {
|
||||
pixman_region32_t *region = calloc(1, sizeof(pixman_region32_t));
|
||||
|
|
@ -61,7 +59,6 @@ void wlr_region_create(struct wl_client *client, struct wl_resource *res,
|
|||
destroy_region);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
pixman_region32_t *wlr_region_from_resource(struct wl_resource *resource) {
|
||||
assert(wl_resource_instance_of(resource, &wl_region_interface,
|
||||
®ion_impl));
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
#include <wlr/types/wlr_screenshooter.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "screenshooter-protocol.h"
|
||||
#include "util/defs.h"
|
||||
|
||||
static struct wlr_screenshot *screenshot_from_resource(
|
||||
struct wl_resource *resource) {
|
||||
|
|
@ -169,7 +168,6 @@ static void screenshooter_bind(struct wl_client *wl_client, void *data,
|
|||
screenshooter, NULL);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_screenshooter_destroy(struct wlr_screenshooter *screenshooter) {
|
||||
if (!screenshooter) {
|
||||
return;
|
||||
|
|
@ -189,7 +187,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_screenshooter_destroy(screenshooter);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_screenshooter *wlr_screenshooter_create(struct wl_display *display) {
|
||||
struct wlr_screenshooter *screenshooter =
|
||||
calloc(1, sizeof(struct wlr_screenshooter));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,6 @@
|
|||
#include <wlr/types/wlr_primary_selection.h>
|
||||
#include <wlr/types/wlr_seat.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static void resource_destroy(struct wl_client *client,
|
||||
|
|
@ -357,7 +356,6 @@ static const struct wlr_touch_grab_interface default_touch_grab_impl = {
|
|||
};
|
||||
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_destroy(struct wlr_seat *seat) {
|
||||
if (!seat) {
|
||||
return;
|
||||
|
|
@ -398,7 +396,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_seat_destroy(seat);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_seat *wlr_seat_create(struct wl_display *display, const char *name) {
|
||||
struct wlr_seat *wlr_seat = calloc(1, sizeof(struct wlr_seat));
|
||||
if (!wlr_seat) {
|
||||
|
|
@ -492,7 +489,6 @@ struct wlr_seat *wlr_seat_create(struct wl_display *display, const char *name) {
|
|||
return wlr_seat;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_seat_client *wlr_seat_client_for_wl_client(struct wlr_seat *wlr_seat,
|
||||
struct wl_client *wl_client) {
|
||||
assert(wlr_seat);
|
||||
|
|
@ -505,7 +501,6 @@ struct wlr_seat_client *wlr_seat_client_for_wl_client(struct wlr_seat *wlr_seat,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_set_capabilities(struct wlr_seat *wlr_seat,
|
||||
uint32_t capabilities) {
|
||||
wlr_seat->capabilities = capabilities;
|
||||
|
|
@ -515,7 +510,6 @@ void wlr_seat_set_capabilities(struct wlr_seat *wlr_seat,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_set_name(struct wlr_seat *wlr_seat, const char *name) {
|
||||
free(wlr_seat->name);
|
||||
wlr_seat->name = strdup(name);
|
||||
|
|
@ -525,7 +519,6 @@ void wlr_seat_set_name(struct wlr_seat *wlr_seat, const char *name) {
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_seat_pointer_surface_has_focus(struct wlr_seat *wlr_seat,
|
||||
struct wlr_surface *surface) {
|
||||
return surface == wlr_seat->pointer_state.focused_surface;
|
||||
|
|
@ -549,7 +542,6 @@ static void pointer_resource_destroy_notify(struct wl_listener *listener,
|
|||
wlr_seat_pointer_clear_focus(state->seat);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_pointer_enter(struct wlr_seat *wlr_seat,
|
||||
struct wlr_surface *surface, double sx, double sy) {
|
||||
assert(wlr_seat);
|
||||
|
|
@ -613,12 +605,10 @@ void wlr_seat_pointer_enter(struct wlr_seat *wlr_seat,
|
|||
// TODO: send focus change event
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_pointer_clear_focus(struct wlr_seat *wlr_seat) {
|
||||
wlr_seat_pointer_enter(wlr_seat, NULL, 0, 0);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_pointer_send_motion(struct wlr_seat *wlr_seat, uint32_t time,
|
||||
double sx, double sy) {
|
||||
struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client;
|
||||
|
|
@ -634,7 +624,6 @@ void wlr_seat_pointer_send_motion(struct wlr_seat *wlr_seat, uint32_t time,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_seat_pointer_send_button(struct wlr_seat *wlr_seat, uint32_t time,
|
||||
uint32_t button, uint32_t state) {
|
||||
struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client;
|
||||
|
|
@ -651,7 +640,6 @@ uint32_t wlr_seat_pointer_send_button(struct wlr_seat *wlr_seat, uint32_t time,
|
|||
return serial;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time,
|
||||
enum wlr_axis_orientation orientation, double value) {
|
||||
struct wlr_seat_client *client = wlr_seat->pointer_state.focused_client;
|
||||
|
|
@ -672,7 +660,6 @@ void wlr_seat_pointer_send_axis(struct wlr_seat *wlr_seat, uint32_t time,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_pointer_start_grab(struct wlr_seat *wlr_seat,
|
||||
struct wlr_seat_pointer_grab *grab) {
|
||||
assert(wlr_seat);
|
||||
|
|
@ -683,7 +670,6 @@ void wlr_seat_pointer_start_grab(struct wlr_seat *wlr_seat,
|
|||
wlr_signal_emit_safe(&wlr_seat->events.pointer_grab_begin, grab);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_pointer_end_grab(struct wlr_seat *wlr_seat) {
|
||||
struct wlr_seat_pointer_grab *grab = wlr_seat->pointer_state.grab;
|
||||
if (grab != wlr_seat->pointer_state.default_grab) {
|
||||
|
|
@ -695,14 +681,12 @@ void wlr_seat_pointer_end_grab(struct wlr_seat *wlr_seat) {
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_pointer_notify_enter(struct wlr_seat *wlr_seat,
|
||||
struct wlr_surface *surface, double sx, double sy) {
|
||||
struct wlr_seat_pointer_grab *grab = wlr_seat->pointer_state.grab;
|
||||
grab->interface->enter(grab, surface, sx, sy);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_pointer_notify_motion(struct wlr_seat *wlr_seat, uint32_t time,
|
||||
double sx, double sy) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event);
|
||||
|
|
@ -710,7 +694,6 @@ void wlr_seat_pointer_notify_motion(struct wlr_seat *wlr_seat, uint32_t time,
|
|||
grab->interface->motion(grab, time, sx, sy);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_seat_pointer_notify_button(struct wlr_seat *wlr_seat,
|
||||
uint32_t time, uint32_t button, uint32_t state) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event);
|
||||
|
|
@ -734,7 +717,6 @@ uint32_t wlr_seat_pointer_notify_button(struct wlr_seat *wlr_seat,
|
|||
return serial;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_pointer_notify_axis(struct wlr_seat *wlr_seat, uint32_t time,
|
||||
enum wlr_axis_orientation orientation, double value) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &wlr_seat->last_event);
|
||||
|
|
@ -742,12 +724,10 @@ void wlr_seat_pointer_notify_axis(struct wlr_seat *wlr_seat, uint32_t time,
|
|||
grab->interface->axis(grab, time, orientation, value);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_seat_pointer_has_grab(struct wlr_seat *seat) {
|
||||
return seat->pointer_state.grab->interface != &default_pointer_grab_impl;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_keyboard_send_key(struct wlr_seat *wlr_seat, uint32_t time,
|
||||
uint32_t key, uint32_t state) {
|
||||
struct wlr_seat_client *client = wlr_seat->keyboard_state.focused_client;
|
||||
|
|
@ -790,7 +770,6 @@ static void handle_keyboard_destroy(struct wl_listener *listener, void *data) {
|
|||
state->keyboard = NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_set_keyboard(struct wlr_seat *seat,
|
||||
struct wlr_input_device *device) {
|
||||
// TODO call this on device key event before the event reaches the
|
||||
|
|
@ -835,12 +814,10 @@ void wlr_seat_set_keyboard(struct wlr_seat *seat,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_keyboard *wlr_seat_get_keyboard(struct wlr_seat *seat) {
|
||||
return seat->keyboard_state.keyboard;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_keyboard_start_grab(struct wlr_seat *wlr_seat,
|
||||
struct wlr_seat_keyboard_grab *grab) {
|
||||
grab->seat = wlr_seat;
|
||||
|
|
@ -849,7 +826,6 @@ void wlr_seat_keyboard_start_grab(struct wlr_seat *wlr_seat,
|
|||
wlr_signal_emit_safe(&wlr_seat->events.keyboard_grab_begin, grab);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_keyboard_end_grab(struct wlr_seat *wlr_seat) {
|
||||
struct wlr_seat_keyboard_grab *grab = wlr_seat->keyboard_state.grab;
|
||||
|
||||
|
|
@ -880,7 +856,6 @@ static void keyboard_resource_destroy_notify(struct wl_listener *listener,
|
|||
wlr_seat_keyboard_clear_focus(state->seat);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_keyboard_send_modifiers(struct wlr_seat *seat,
|
||||
struct wlr_keyboard_modifiers *modifiers) {
|
||||
struct wlr_seat_client *client = seat->keyboard_state.focused_client;
|
||||
|
|
@ -901,7 +876,6 @@ void wlr_seat_keyboard_send_modifiers(struct wlr_seat *seat,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_keyboard_enter(struct wlr_seat *seat,
|
||||
struct wlr_surface *surface, uint32_t keycodes[], size_t num_keycodes,
|
||||
struct wlr_keyboard_modifiers *modifiers) {
|
||||
|
|
@ -981,7 +955,6 @@ void wlr_seat_keyboard_enter(struct wlr_seat *seat,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_keyboard_notify_enter(struct wlr_seat *seat,
|
||||
struct wlr_surface *surface, uint32_t keycodes[], size_t num_keycodes,
|
||||
struct wlr_keyboard_modifiers *modifiers) {
|
||||
|
|
@ -989,18 +962,15 @@ void wlr_seat_keyboard_notify_enter(struct wlr_seat *seat,
|
|||
grab->interface->enter(grab, surface, keycodes, num_keycodes, modifiers);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_keyboard_clear_focus(struct wlr_seat *seat) {
|
||||
// TODO respect grabs here?
|
||||
wlr_seat_keyboard_enter(seat, NULL, NULL, 0, NULL);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_seat_keyboard_has_grab(struct wlr_seat *seat) {
|
||||
return seat->keyboard_state.grab->interface != &default_keyboard_grab_impl;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_keyboard_notify_modifiers(struct wlr_seat *seat,
|
||||
struct wlr_keyboard_modifiers *modifiers) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &seat->last_event);
|
||||
|
|
@ -1008,7 +978,6 @@ void wlr_seat_keyboard_notify_modifiers(struct wlr_seat *seat,
|
|||
grab->interface->modifiers(grab, modifiers);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_keyboard_notify_key(struct wlr_seat *seat, uint32_t time,
|
||||
uint32_t key, uint32_t state) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &seat->last_event);
|
||||
|
|
@ -1016,7 +985,6 @@ void wlr_seat_keyboard_notify_key(struct wlr_seat *seat, uint32_t time,
|
|||
grab->interface->key(grab, time, key, state);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_touch_start_grab(struct wlr_seat *wlr_seat,
|
||||
struct wlr_seat_touch_grab *grab) {
|
||||
grab->seat = wlr_seat;
|
||||
|
|
@ -1025,7 +993,6 @@ void wlr_seat_touch_start_grab(struct wlr_seat *wlr_seat,
|
|||
wlr_signal_emit_safe(&wlr_seat->events.touch_grab_begin, grab);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_touch_end_grab(struct wlr_seat *wlr_seat) {
|
||||
struct wlr_seat_touch_grab *grab = wlr_seat->touch_state.grab;
|
||||
|
||||
|
|
@ -1105,7 +1072,6 @@ static struct wlr_touch_point *touch_point_create(
|
|||
return point;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_touch_point *wlr_seat_touch_get_point(
|
||||
struct wlr_seat *seat, int32_t touch_id) {
|
||||
struct wlr_touch_point *point = NULL;
|
||||
|
|
@ -1118,7 +1084,6 @@ struct wlr_touch_point *wlr_seat_touch_get_point(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_seat_touch_notify_down(struct wlr_seat *seat,
|
||||
struct wlr_surface *surface, uint32_t time, int32_t touch_id, double sx,
|
||||
double sy) {
|
||||
|
|
@ -1141,7 +1106,6 @@ uint32_t wlr_seat_touch_notify_down(struct wlr_seat *seat,
|
|||
return serial;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_touch_notify_up(struct wlr_seat *seat, uint32_t time,
|
||||
int32_t touch_id) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &seat->last_event);
|
||||
|
|
@ -1157,7 +1121,6 @@ void wlr_seat_touch_notify_up(struct wlr_seat *seat, uint32_t time,
|
|||
touch_point_destroy(point);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_touch_notify_motion(struct wlr_seat *seat, uint32_t time,
|
||||
int32_t touch_id, double sx, double sy) {
|
||||
clock_gettime(CLOCK_MONOTONIC, &seat->last_event);
|
||||
|
|
@ -1205,7 +1168,6 @@ static void touch_point_set_focus(struct wlr_touch_point *point,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_touch_point_focus(struct wlr_seat *seat,
|
||||
struct wlr_surface *surface, uint32_t time, int32_t touch_id, double sx,
|
||||
double sy) {
|
||||
|
|
@ -1224,7 +1186,6 @@ void wlr_seat_touch_point_focus(struct wlr_seat *seat,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_touch_point_clear_focus(struct wlr_seat *seat, uint32_t time,
|
||||
int32_t touch_id) {
|
||||
struct wlr_touch_point *point = wlr_seat_touch_get_point(seat, touch_id);
|
||||
|
|
@ -1236,7 +1197,6 @@ void wlr_seat_touch_point_clear_focus(struct wlr_seat *seat, uint32_t time,
|
|||
touch_point_clear_focus(point);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_seat_touch_send_down(struct wlr_seat *seat,
|
||||
struct wlr_surface *surface, uint32_t time, int32_t touch_id, double sx,
|
||||
double sy) {
|
||||
|
|
@ -1257,7 +1217,6 @@ uint32_t wlr_seat_touch_send_down(struct wlr_seat *seat,
|
|||
return serial;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_touch_send_up(struct wlr_seat *seat, uint32_t time, int32_t touch_id) {
|
||||
struct wlr_touch_point *point = wlr_seat_touch_get_point(seat, touch_id);
|
||||
if (!point) {
|
||||
|
|
@ -1273,7 +1232,6 @@ void wlr_seat_touch_send_up(struct wlr_seat *seat, uint32_t time, int32_t touch_
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_seat_touch_send_motion(struct wlr_seat *seat, uint32_t time, int32_t touch_id,
|
||||
double sx, double sy) {
|
||||
struct wlr_touch_point *point = wlr_seat_touch_get_point(seat, touch_id);
|
||||
|
|
@ -1290,23 +1248,19 @@ void wlr_seat_touch_send_motion(struct wlr_seat *seat, uint32_t time, int32_t to
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
int wlr_seat_touch_num_points(struct wlr_seat *seat) {
|
||||
return wl_list_length(&seat->touch_state.touch_points);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_seat_touch_has_grab(struct wlr_seat *seat) {
|
||||
return seat->touch_state.grab->interface != &default_touch_grab_impl;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_seat_validate_grab_serial(struct wlr_seat *seat, uint32_t serial) {
|
||||
return serial == seat->pointer_state.grab_serial ||
|
||||
serial == seat->touch_state.grab_serial;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_seat_client *wlr_seat_client_from_resource(
|
||||
struct wl_resource *resource) {
|
||||
assert(wl_resource_instance_of(resource, &wl_seat_interface,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <wlr/types/wlr_surface.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "server-decoration-protocol.h"
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static const struct org_kde_kwin_server_decoration_interface
|
||||
|
|
@ -128,7 +127,6 @@ static const struct org_kde_kwin_server_decoration_manager_interface
|
|||
.create = server_decoration_manager_handle_create,
|
||||
};
|
||||
|
||||
WLR_API
|
||||
void wlr_server_decoration_manager_set_default_mode(
|
||||
struct wlr_server_decoration_manager *manager, uint32_t default_mode) {
|
||||
manager->default_mode = default_mode;
|
||||
|
|
@ -164,7 +162,6 @@ static void server_decoration_manager_bind(struct wl_client *client, void *data,
|
|||
manager->default_mode);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_server_decoration_manager_destroy(
|
||||
struct wlr_server_decoration_manager *manager) {
|
||||
if (manager == NULL) {
|
||||
|
|
@ -190,7 +187,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_server_decoration_manager_destroy(manager);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_server_decoration_manager *wlr_server_decoration_manager_create(
|
||||
struct wl_display *display) {
|
||||
struct wlr_server_decoration_manager *manager =
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
#include <wlr/types/wlr_surface.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include <wlr/util/region.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static void wlr_surface_state_reset_buffer(struct wlr_surface_state *state) {
|
||||
|
|
@ -531,7 +530,6 @@ const struct wl_surface_interface surface_interface = {
|
|||
.damage_buffer = surface_damage_buffer
|
||||
};
|
||||
|
||||
WLR_API
|
||||
struct wlr_surface *wlr_surface_from_resource(struct wl_resource *resource) {
|
||||
assert(wl_resource_instance_of(resource, &wl_surface_interface,
|
||||
&surface_interface));
|
||||
|
|
@ -607,7 +605,6 @@ static void destroy_surface(struct wl_resource *resource) {
|
|||
free(surface);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_surface *wlr_surface_create(struct wl_resource *res,
|
||||
struct wlr_renderer *renderer) {
|
||||
struct wlr_surface *surface = calloc(1, sizeof(struct wlr_surface));
|
||||
|
|
@ -633,7 +630,6 @@ struct wlr_surface *wlr_surface_create(struct wl_resource *res,
|
|||
return surface;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_surface_get_matrix(struct wlr_surface *surface,
|
||||
float (*matrix)[16],
|
||||
const float (*projection)[16],
|
||||
|
|
@ -650,12 +646,10 @@ void wlr_surface_get_matrix(struct wlr_surface *surface,
|
|||
wlr_matrix_mul(projection, matrix, matrix);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
bool wlr_surface_has_buffer(struct wlr_surface *surface) {
|
||||
return surface->texture && surface->texture->valid;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
int wlr_surface_set_role(struct wlr_surface *surface, const char *role,
|
||||
struct wl_resource *error_resource, uint32_t error_code) {
|
||||
assert(role);
|
||||
|
|
@ -814,7 +808,6 @@ static void subsurface_handle_parent_destroy(struct wl_listener *listener,
|
|||
subsurface->parent = NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_surface_make_subsurface(struct wlr_surface *surface,
|
||||
struct wlr_surface *parent, uint32_t id) {
|
||||
struct wl_client *client = wl_resource_get_client(surface->resource);
|
||||
|
|
@ -864,7 +857,7 @@ void wlr_surface_make_subsurface(struct wlr_surface *surface,
|
|||
wlr_signal_emit_safe(&parent->events.new_subsurface, subsurface);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
|
||||
struct wlr_surface *wlr_surface_get_main_surface(struct wlr_surface *surface) {
|
||||
struct wlr_subsurface *sub;
|
||||
|
||||
|
|
@ -875,7 +868,6 @@ struct wlr_surface *wlr_surface_get_main_surface(struct wlr_surface *surface) {
|
|||
return surface;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_subsurface *wlr_surface_subsurface_at(struct wlr_surface *surface,
|
||||
double sx, double sy, double *sub_x, double *sub_y) {
|
||||
struct wlr_subsurface *subsurface;
|
||||
|
|
@ -908,7 +900,6 @@ struct wlr_subsurface *wlr_surface_subsurface_at(struct wlr_surface *surface,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_surface_send_enter(struct wlr_surface *surface,
|
||||
struct wlr_output *output) {
|
||||
struct wl_client *client = wl_resource_get_client(surface->resource);
|
||||
|
|
@ -921,7 +912,6 @@ void wlr_surface_send_enter(struct wlr_surface *surface,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_surface_send_leave(struct wlr_surface *surface,
|
||||
struct wlr_output *output) {
|
||||
struct wl_client *client = wl_resource_get_client(surface->resource);
|
||||
|
|
@ -938,7 +928,6 @@ static inline int64_t timespec_to_msec(const struct timespec *a) {
|
|||
return (int64_t)a->tv_sec * 1000 + a->tv_nsec / 1000000;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_surface_send_frame_done(struct wlr_surface *surface,
|
||||
const struct timespec *when) {
|
||||
struct wlr_frame_callback *cb, *cnext;
|
||||
|
|
@ -949,7 +938,6 @@ void wlr_surface_send_frame_done(struct wlr_surface *surface,
|
|||
}
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_surface_set_role_committed(struct wlr_surface *surface,
|
||||
void (*role_committed)(struct wlr_surface *surface, void *role_data),
|
||||
void *role_data) {
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@
|
|||
#include <wayland-server.h>
|
||||
#include <wlr/interfaces/wlr_tablet_pad.h>
|
||||
#include <wlr/types/wlr_tablet_pad.h>
|
||||
#include "util/defs.h"
|
||||
|
||||
WLR_API
|
||||
void wlr_tablet_pad_init(struct wlr_tablet_pad *pad,
|
||||
struct wlr_tablet_pad_impl *impl) {
|
||||
pad->impl = impl;
|
||||
|
|
@ -14,7 +12,6 @@ void wlr_tablet_pad_init(struct wlr_tablet_pad *pad,
|
|||
wl_signal_init(&pad->events.strip);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_tablet_pad_destroy(struct wlr_tablet_pad *pad) {
|
||||
if (pad && pad->impl && pad->impl->destroy) {
|
||||
pad->impl->destroy(pad);
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@
|
|||
#include <wayland-server.h>
|
||||
#include <wlr/interfaces/wlr_tablet_tool.h>
|
||||
#include <wlr/types/wlr_tablet_tool.h>
|
||||
#include "util/defs.h"
|
||||
|
||||
WLR_API
|
||||
void wlr_tablet_tool_init(struct wlr_tablet_tool *tool,
|
||||
struct wlr_tablet_tool_impl *impl) {
|
||||
tool->impl = impl;
|
||||
|
|
@ -15,7 +13,6 @@ void wlr_tablet_tool_init(struct wlr_tablet_tool *tool,
|
|||
wl_signal_init(&tool->events.button);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_tablet_tool_destroy(struct wlr_tablet_tool *tool) {
|
||||
if (!tool) {
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -3,9 +3,7 @@
|
|||
#include <wayland-server.h>
|
||||
#include <wlr/interfaces/wlr_touch.h>
|
||||
#include <wlr/types/wlr_touch.h>
|
||||
#include "util/defs.h"
|
||||
|
||||
WLR_API
|
||||
void wlr_touch_init(struct wlr_touch *touch,
|
||||
struct wlr_touch_impl *impl) {
|
||||
touch->impl = impl;
|
||||
|
|
@ -15,7 +13,6 @@ void wlr_touch_init(struct wlr_touch *touch,
|
|||
wl_signal_init(&touch->events.cancel);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_touch_destroy(struct wlr_touch *touch) {
|
||||
if (touch && touch->impl && touch->impl->destroy) {
|
||||
touch->impl->destroy(touch);
|
||||
|
|
|
|||
|
|
@ -8,7 +8,6 @@
|
|||
#include <wlr/types/wlr_surface.h>
|
||||
#include <wlr/types/wlr_wl_shell.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
|
||||
static const char *wlr_wl_shell_surface_role = "wl-shell-surface";
|
||||
|
|
@ -592,7 +591,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_wl_shell_destroy(wl_shell);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_wl_shell *wlr_wl_shell_create(struct wl_display *display) {
|
||||
struct wlr_wl_shell *wl_shell = calloc(1, sizeof(struct wlr_wl_shell));
|
||||
if (!wl_shell) {
|
||||
|
|
@ -617,7 +615,6 @@ struct wlr_wl_shell *wlr_wl_shell_create(struct wl_display *display) {
|
|||
return wl_shell;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_wl_shell_destroy(struct wlr_wl_shell *wlr_wl_shell) {
|
||||
if (!wlr_wl_shell) {
|
||||
return;
|
||||
|
|
@ -633,7 +630,6 @@ void wlr_wl_shell_destroy(struct wlr_wl_shell *wlr_wl_shell) {
|
|||
free(wlr_wl_shell);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_wl_shell_surface_ping(struct wlr_wl_shell_surface *surface) {
|
||||
if (surface->ping_serial != 0) {
|
||||
// already pinged
|
||||
|
|
@ -647,13 +643,11 @@ void wlr_wl_shell_surface_ping(struct wlr_wl_shell_surface *surface) {
|
|||
wl_shell_surface_send_ping(surface->resource, surface->ping_serial);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_wl_shell_surface_configure(struct wlr_wl_shell_surface *surface,
|
||||
uint32_t edges, int32_t width, int32_t height) {
|
||||
wl_shell_surface_send_configure(surface->resource, edges, width, height);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_wl_shell_surface *wlr_wl_shell_surface_popup_at(
|
||||
struct wlr_wl_shell_surface *surface, double sx, double sy,
|
||||
double *popup_sx, double *popup_sy) {
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <wlr/types/wlr_xcursor_manager.h>
|
||||
#include "util/defs.h"
|
||||
|
||||
WLR_API
|
||||
struct wlr_xcursor_manager *wlr_xcursor_manager_create(const char *name,
|
||||
uint32_t size) {
|
||||
struct wlr_xcursor_manager *manager =
|
||||
|
|
@ -20,7 +18,6 @@ struct wlr_xcursor_manager *wlr_xcursor_manager_create(const char *name,
|
|||
return manager;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_xcursor_manager_destroy(struct wlr_xcursor_manager *manager) {
|
||||
if (manager == NULL) {
|
||||
return;
|
||||
|
|
@ -35,7 +32,6 @@ void wlr_xcursor_manager_destroy(struct wlr_xcursor_manager *manager) {
|
|||
free(manager);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
int wlr_xcursor_manager_load(struct wlr_xcursor_manager *manager,
|
||||
float scale) {
|
||||
struct wlr_xcursor_manager_theme *theme;
|
||||
|
|
@ -59,7 +55,6 @@ int wlr_xcursor_manager_load(struct wlr_xcursor_manager *manager,
|
|||
return 0;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_xcursor *wlr_xcursor_manager_get_xcursor(
|
||||
struct wlr_xcursor_manager *manager, const char *name, float scale) {
|
||||
struct wlr_xcursor_manager_theme *theme;
|
||||
|
|
@ -71,7 +66,6 @@ struct wlr_xcursor *wlr_xcursor_manager_get_xcursor(
|
|||
return NULL;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_xcursor_manager_set_cursor_image(struct wlr_xcursor_manager *manager,
|
||||
const char *name, struct wlr_cursor *cursor) {
|
||||
struct wlr_xcursor_manager_theme *theme;
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include <wlr/types/wlr_surface.h>
|
||||
#include <wlr/types/wlr_xdg_shell.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
#include "xdg-shell-protocol.h"
|
||||
|
||||
|
|
@ -1384,7 +1383,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_xdg_shell_destroy(xdg_shell);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_xdg_shell *wlr_xdg_shell_create(struct wl_display *display) {
|
||||
struct wlr_xdg_shell *xdg_shell =
|
||||
calloc(1, sizeof(struct wlr_xdg_shell));
|
||||
|
|
@ -1413,7 +1411,6 @@ struct wlr_xdg_shell *wlr_xdg_shell_create(struct wl_display *display) {
|
|||
return xdg_shell;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_xdg_shell_destroy(struct wlr_xdg_shell *xdg_shell) {
|
||||
if (!xdg_shell) {
|
||||
return;
|
||||
|
|
@ -1423,7 +1420,6 @@ void wlr_xdg_shell_destroy(struct wlr_xdg_shell *xdg_shell) {
|
|||
free(xdg_shell);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_xdg_surface_ping(struct wlr_xdg_surface *surface) {
|
||||
if (surface->client->ping_serial != 0) {
|
||||
// already pinged
|
||||
|
|
@ -1438,7 +1434,6 @@ void wlr_xdg_surface_ping(struct wlr_xdg_surface *surface) {
|
|||
surface->client->ping_serial);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_xdg_toplevel_set_size(struct wlr_xdg_surface *surface,
|
||||
uint32_t width, uint32_t height) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
|
||||
|
|
@ -1448,7 +1443,6 @@ uint32_t wlr_xdg_toplevel_set_size(struct wlr_xdg_surface *surface,
|
|||
return wlr_xdg_surface_schedule_configure(surface);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_xdg_toplevel_set_activated(struct wlr_xdg_surface *surface,
|
||||
bool activated) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
|
||||
|
|
@ -1457,7 +1451,6 @@ uint32_t wlr_xdg_toplevel_set_activated(struct wlr_xdg_surface *surface,
|
|||
return wlr_xdg_surface_schedule_configure(surface);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_xdg_toplevel_set_maximized(struct wlr_xdg_surface *surface,
|
||||
bool maximized) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
|
||||
|
|
@ -1466,7 +1459,6 @@ uint32_t wlr_xdg_toplevel_set_maximized(struct wlr_xdg_surface *surface,
|
|||
return wlr_xdg_surface_schedule_configure(surface);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_xdg_toplevel_set_fullscreen(struct wlr_xdg_surface *surface,
|
||||
bool fullscreen) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
|
||||
|
|
@ -1475,7 +1467,6 @@ uint32_t wlr_xdg_toplevel_set_fullscreen(struct wlr_xdg_surface *surface,
|
|||
return wlr_xdg_surface_schedule_configure(surface);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_xdg_toplevel_set_resizing(struct wlr_xdg_surface *surface,
|
||||
bool resizing) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
|
||||
|
|
@ -1484,13 +1475,11 @@ uint32_t wlr_xdg_toplevel_set_resizing(struct wlr_xdg_surface *surface,
|
|||
return wlr_xdg_surface_schedule_configure(surface);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_xdg_toplevel_send_close(struct wlr_xdg_surface *surface) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
|
||||
xdg_toplevel_send_close(surface->toplevel_state->resource);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_xdg_surface_popup_get_position(struct wlr_xdg_surface *surface,
|
||||
double *popup_sx, double *popup_sy) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_ROLE_POPUP);
|
||||
|
|
@ -1501,7 +1490,6 @@ void wlr_xdg_surface_popup_get_position(struct wlr_xdg_surface *surface,
|
|||
surface->geometry->y;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_xdg_surface *wlr_xdg_surface_popup_at(
|
||||
struct wlr_xdg_surface *surface, double sx, double sy,
|
||||
double *popup_sx, double *popup_sy) {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,6 @@
|
|||
#include <wlr/types/wlr_surface.h>
|
||||
#include <wlr/types/wlr_xdg_shell_v6.h>
|
||||
#include <wlr/util/log.h>
|
||||
#include "util/defs.h"
|
||||
#include "util/signal.h"
|
||||
#include "xdg-shell-unstable-v6-protocol.h"
|
||||
|
||||
|
|
@ -1354,7 +1353,6 @@ static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
|||
wlr_xdg_shell_v6_destroy(xdg_shell);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_xdg_shell_v6 *wlr_xdg_shell_v6_create(struct wl_display *display) {
|
||||
struct wlr_xdg_shell_v6 *xdg_shell =
|
||||
calloc(1, sizeof(struct wlr_xdg_shell_v6));
|
||||
|
|
@ -1383,7 +1381,6 @@ struct wlr_xdg_shell_v6 *wlr_xdg_shell_v6_create(struct wl_display *display) {
|
|||
return xdg_shell;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_xdg_shell_v6_destroy(struct wlr_xdg_shell_v6 *xdg_shell) {
|
||||
if (!xdg_shell) {
|
||||
return;
|
||||
|
|
@ -1393,7 +1390,6 @@ void wlr_xdg_shell_v6_destroy(struct wlr_xdg_shell_v6 *xdg_shell) {
|
|||
free(xdg_shell);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_xdg_surface_v6_ping(struct wlr_xdg_surface_v6 *surface) {
|
||||
if (surface->client->ping_serial != 0) {
|
||||
// already pinged
|
||||
|
|
@ -1408,7 +1404,6 @@ void wlr_xdg_surface_v6_ping(struct wlr_xdg_surface_v6 *surface) {
|
|||
surface->client->ping_serial);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_xdg_toplevel_v6_set_size(struct wlr_xdg_surface_v6 *surface,
|
||||
uint32_t width, uint32_t height) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL);
|
||||
|
|
@ -1418,7 +1413,6 @@ uint32_t wlr_xdg_toplevel_v6_set_size(struct wlr_xdg_surface_v6 *surface,
|
|||
return wlr_xdg_surface_v6_schedule_configure(surface);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_xdg_toplevel_v6_set_activated(struct wlr_xdg_surface_v6 *surface,
|
||||
bool activated) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL);
|
||||
|
|
@ -1427,7 +1421,6 @@ uint32_t wlr_xdg_toplevel_v6_set_activated(struct wlr_xdg_surface_v6 *surface,
|
|||
return wlr_xdg_surface_v6_schedule_configure(surface);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_xdg_toplevel_v6_set_maximized(struct wlr_xdg_surface_v6 *surface,
|
||||
bool maximized) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL);
|
||||
|
|
@ -1436,7 +1429,6 @@ uint32_t wlr_xdg_toplevel_v6_set_maximized(struct wlr_xdg_surface_v6 *surface,
|
|||
return wlr_xdg_surface_v6_schedule_configure(surface);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_xdg_toplevel_v6_set_fullscreen(struct wlr_xdg_surface_v6 *surface,
|
||||
bool fullscreen) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL);
|
||||
|
|
@ -1445,7 +1437,6 @@ uint32_t wlr_xdg_toplevel_v6_set_fullscreen(struct wlr_xdg_surface_v6 *surface,
|
|||
return wlr_xdg_surface_v6_schedule_configure(surface);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
uint32_t wlr_xdg_toplevel_v6_set_resizing(struct wlr_xdg_surface_v6 *surface,
|
||||
bool resizing) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL);
|
||||
|
|
@ -1454,13 +1445,11 @@ uint32_t wlr_xdg_toplevel_v6_set_resizing(struct wlr_xdg_surface_v6 *surface,
|
|||
return wlr_xdg_surface_v6_schedule_configure(surface);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_xdg_toplevel_v6_send_close(struct wlr_xdg_surface_v6 *surface) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_TOPLEVEL);
|
||||
zxdg_toplevel_v6_send_close(surface->toplevel_state->resource);
|
||||
}
|
||||
|
||||
WLR_API
|
||||
void wlr_xdg_surface_v6_popup_get_position(struct wlr_xdg_surface_v6 *surface,
|
||||
double *popup_sx, double *popup_sy) {
|
||||
assert(surface->role == WLR_XDG_SURFACE_V6_ROLE_POPUP);
|
||||
|
|
@ -1471,7 +1460,6 @@ void wlr_xdg_surface_v6_popup_get_position(struct wlr_xdg_surface_v6 *surface,
|
|||
surface->geometry->y;
|
||||
}
|
||||
|
||||
WLR_API
|
||||
struct wlr_xdg_surface_v6 *wlr_xdg_surface_v6_popup_at(
|
||||
struct wlr_xdg_surface_v6 *surface, double sx, double sy,
|
||||
double *popup_sx, double *popup_sy) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue