Move magnifier code to separate module

This commit is contained in:
Simon Long 2024-05-15 11:33:20 +01:00
parent 24e86f095c
commit 18819b1147
6 changed files with 328 additions and 304 deletions

View file

@ -20,12 +20,4 @@ struct wlr_scene_node *lab_wlr_scene_get_prev_node(struct wlr_scene_node *node);
/* A variant of wlr_scene_output_commit() that respects wlr_output->pending */
bool lab_wlr_scene_output_commit(struct wlr_scene_output *scene_output);
enum magnify_dir {
MAGNIFY_INCREASE,
MAGNIFY_DECREASE
};
void magnify_toggle(void);
void magnify_set_scale(enum magnify_dir dir);
#endif /* LABWC_SCENE_HELPERS_H */

23
include/magnifier.h Normal file
View file

@ -0,0 +1,23 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef LABWC_MAGNIFIER_H
#define LABWC_MAGNIFIER_H
#include <stdbool.h>
#include <wayland-server-core.h>
struct server;
struct output;
enum magnify_dir {
MAGNIFY_INCREASE,
MAGNIFY_DECREASE
};
void magnify_toggle(struct server *server);
void magnify_set_scale(struct server *server, enum magnify_dir dir);
bool output_wants_magnification(struct output *output);
void magnify(struct output *output, struct wlr_buffer *output_buffer,
struct wlr_box *damage);
bool is_magnify_on(void);
#endif /* LABWC_MAGNIFIER_H */