mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-31 22:25:21 -04:00
Don't use the wlr_ prefix for static functions
This commit is contained in:
parent
71ca45e2c0
commit
625a7a48dc
22 changed files with 306 additions and 302 deletions
|
|
@ -39,7 +39,7 @@ static int dispatch_events(int fd, uint32_t mask, void *data) {
|
|||
* compositor and creates surfaces for each output, then registers globals on
|
||||
* the specified display.
|
||||
*/
|
||||
static bool wlr_wl_backend_start(struct wlr_backend *_backend) {
|
||||
static bool backend_start(struct wlr_backend *_backend) {
|
||||
struct wlr_wl_backend *backend = (struct wlr_wl_backend *)_backend;
|
||||
wlr_log(L_INFO, "Initializating wayland backend");
|
||||
|
||||
|
|
@ -65,7 +65,7 @@ static bool wlr_wl_backend_start(struct wlr_backend *_backend) {
|
|||
return true;
|
||||
}
|
||||
|
||||
static void wlr_wl_backend_destroy(struct wlr_backend *wlr_backend) {
|
||||
static void backend_destroy(struct wlr_backend *wlr_backend) {
|
||||
struct wlr_wl_backend *backend = (struct wlr_wl_backend *)wlr_backend;
|
||||
if (backend == NULL) {
|
||||
return;
|
||||
|
|
@ -110,16 +110,16 @@ static void wlr_wl_backend_destroy(struct wlr_backend *wlr_backend) {
|
|||
free(backend);
|
||||
}
|
||||
|
||||
static struct wlr_renderer *wlr_wl_backend_get_renderer(
|
||||
static struct wlr_renderer *backend_get_renderer(
|
||||
struct wlr_backend *wlr_backend) {
|
||||
struct wlr_wl_backend *backend = (struct wlr_wl_backend *)wlr_backend;
|
||||
return backend->renderer;
|
||||
}
|
||||
|
||||
static struct wlr_backend_impl backend_impl = {
|
||||
.start = wlr_wl_backend_start,
|
||||
.destroy = wlr_wl_backend_destroy,
|
||||
.get_renderer = wlr_wl_backend_get_renderer,
|
||||
.start = backend_start,
|
||||
.destroy = backend_destroy,
|
||||
.get_renderer = backend_get_renderer,
|
||||
};
|
||||
|
||||
bool wlr_backend_is_wl(struct wlr_backend *b) {
|
||||
|
|
@ -172,7 +172,7 @@ void get_wl_output_layout_box(struct wlr_wl_backend *backend,
|
|||
static void handle_display_destroy(struct wl_listener *listener, void *data) {
|
||||
struct wlr_wl_backend *backend =
|
||||
wl_container_of(listener, backend, local_display_destroy);
|
||||
wlr_wl_backend_destroy(&backend->backend);
|
||||
backend_destroy(&backend->backend);
|
||||
}
|
||||
|
||||
struct wlr_backend *wlr_wl_backend_create(struct wl_display *display, const char *remote) {
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ static struct wl_callback_listener frame_listener = {
|
|||
.done = surface_frame_callback
|
||||
};
|
||||
|
||||
static bool wlr_wl_output_set_custom_mode(struct wlr_output *_output,
|
||||
static bool output_set_custom_mode(struct wlr_output *_output,
|
||||
int32_t width, int32_t height, int32_t refresh) {
|
||||
struct wlr_wl_backend_output *output = (struct wlr_wl_backend_output *)_output;
|
||||
wl_egl_window_resize(output->egl_window, width, height, 0, 0);
|
||||
|
|
@ -40,7 +40,7 @@ static bool wlr_wl_output_set_custom_mode(struct wlr_output *_output,
|
|||
return true;
|
||||
}
|
||||
|
||||
static bool wlr_wl_output_make_current(struct wlr_output *wlr_output,
|
||||
static bool output_make_current(struct wlr_output *wlr_output,
|
||||
int *buffer_age) {
|
||||
struct wlr_wl_backend_output *output =
|
||||
(struct wlr_wl_backend_output *)wlr_output;
|
||||
|
|
@ -48,7 +48,7 @@ static bool wlr_wl_output_make_current(struct wlr_output *wlr_output,
|
|||
buffer_age);
|
||||
}
|
||||
|
||||
static bool wlr_wl_output_swap_buffers(struct wlr_output *wlr_output,
|
||||
static bool output_swap_buffers(struct wlr_output *wlr_output,
|
||||
pixman_region32_t *damage) {
|
||||
struct wlr_wl_backend_output *output =
|
||||
(struct wlr_wl_backend_output *)wlr_output;
|
||||
|
|
@ -65,13 +65,13 @@ static bool wlr_wl_output_swap_buffers(struct wlr_output *wlr_output,
|
|||
damage);
|
||||
}
|
||||
|
||||
static void wlr_wl_output_transform(struct wlr_output *_output,
|
||||
static void output_transform(struct wlr_output *_output,
|
||||
enum wl_output_transform transform) {
|
||||
struct wlr_wl_backend_output *output = (struct wlr_wl_backend_output *)_output;
|
||||
output->wlr_output.transform = transform;
|
||||
}
|
||||
|
||||
static bool wlr_wl_output_set_cursor(struct wlr_output *_output,
|
||||
static bool output_set_cursor(struct wlr_output *_output,
|
||||
const uint8_t *buf, int32_t stride, uint32_t width, uint32_t height,
|
||||
int32_t hotspot_x, int32_t hotspot_y, bool update_pixels) {
|
||||
struct wlr_wl_backend_output *output =
|
||||
|
|
@ -157,7 +157,7 @@ static bool wlr_wl_output_set_cursor(struct wlr_output *_output,
|
|||
return true;
|
||||
}
|
||||
|
||||
static void wlr_wl_output_destroy(struct wlr_output *wlr_output) {
|
||||
static void output_destroy(struct wlr_output *wlr_output) {
|
||||
struct wlr_wl_backend_output *output =
|
||||
(struct wlr_wl_backend_output *)wlr_output;
|
||||
if (output == NULL) {
|
||||
|
|
@ -200,19 +200,19 @@ void update_wl_output_cursor(struct wlr_wl_backend_output *output) {
|
|||
}
|
||||
}
|
||||
|
||||
bool wl_output_move_cursor(struct wlr_output *_output, int x, int y) {
|
||||
bool output_move_cursor(struct wlr_output *_output, int x, int y) {
|
||||
// TODO: only return true if x == current x and y == current y
|
||||
return true;
|
||||
}
|
||||
|
||||
static struct wlr_output_impl output_impl = {
|
||||
.set_custom_mode = wlr_wl_output_set_custom_mode,
|
||||
.transform = wlr_wl_output_transform,
|
||||
.destroy = wlr_wl_output_destroy,
|
||||
.make_current = wlr_wl_output_make_current,
|
||||
.swap_buffers = wlr_wl_output_swap_buffers,
|
||||
.set_cursor = wlr_wl_output_set_cursor,
|
||||
.move_cursor = wl_output_move_cursor,
|
||||
static const struct wlr_output_impl output_impl = {
|
||||
.set_custom_mode = output_set_custom_mode,
|
||||
.transform = output_transform,
|
||||
.destroy = output_destroy,
|
||||
.make_current = output_make_current,
|
||||
.swap_buffers = output_swap_buffers,
|
||||
.set_cursor = output_set_cursor,
|
||||
.move_cursor = output_move_cursor,
|
||||
};
|
||||
|
||||
bool wlr_output_is_wl(struct wlr_output *wlr_output) {
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ static struct wlr_input_device *allocate_device(struct wlr_wl_backend *backend,
|
|||
return wlr_device;
|
||||
}
|
||||
|
||||
static void wlr_wl_pointer_handle_output_destroy(struct wl_listener *listener,
|
||||
static void pointer_handle_output_destroy(struct wl_listener *listener,
|
||||
void *data) {
|
||||
struct wlr_wl_pointer *wlr_wl_pointer =
|
||||
wl_container_of(listener, wlr_wl_pointer, output_destroy_listener);
|
||||
|
|
@ -256,7 +256,7 @@ static void seat_handle_capabilities(void *data, struct wl_seat *wl_seat,
|
|||
return;
|
||||
}
|
||||
wlr_wl_pointer->output_destroy_listener.notify =
|
||||
wlr_wl_pointer_handle_output_destroy;
|
||||
pointer_handle_output_destroy;
|
||||
|
||||
struct wlr_input_device *wlr_device;
|
||||
if (!(wlr_device = allocate_device(backend, WLR_INPUT_DEVICE_POINTER))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue