labwc/include/magnifier.h
Christopher Snowhill 3879f1f080 backend/drm: Implement support for renderer loss recovery
This implementation is nearly identical to Sway's, except that
it also reloads the configuration, to spur on reloading the
server-side decorations.

v2: Fix style.
v3: Add a reset to the magnifier.
v4: Oops, restructure reset handler a bit.
v5: Commit the magnifier reset immediately, before freeing the
    lost allocator and renderer.
v6: Also check for failed render pass, which may return NULL.
v7: Add a second NULL test, just in case.
2024-07-23 14:44:31 +02:00

25 lines
594 B
C

/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef LABWC_MAGNIFIER_H
#define LABWC_MAGNIFIER_H
#include <stdbool.h>
struct server;
struct output;
struct wlr_buffer;
struct wlr_box;
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);
void magnify_reset(void);
#endif /* LABWC_MAGNIFIER_H */