cagebreak/message.h
project-repo 4f7be9d5cd Release 2.1.0
- Add -bs (bad security) option
- Fix Issue 57 (SPDX spelling error #39)
- Fix Issue 59 (meson install settings)
- Fix Issue 55 (npd)
- Fix Issue 56 (npd)
- Fix Issue 58 (#40 config)
- Improve release procedure
- Add miniscule test suite
- Adjust Cagebreak to wlroots 0.16.2
- New GPG Keys
2023-04-04 14:00:31 +02:00

44 lines
914 B
C

// Copyright 2020 - 2023, project-repo and the cagebreak contributors
// SPDX-License-Identifier: MIT
#ifndef MESSAGE_H
#define MESSAGE_H
#include <wayland-server-core.h>
struct cg_output;
struct wlr_box;
struct wlr_buffer;
enum cg_message_align {
CG_MESSAGE_TOP_LEFT,
CG_MESSAGE_TOP_RIGHT,
CG_MESSAGE_BOTTOM_LEFT,
CG_MESSAGE_BOTTOM_RIGHT,
CG_MESSAGE_CENTER,
};
struct cg_message_config {
char *font;
int display_time;
float bg_color[4];
float fg_color[4];
};
struct cg_message {
struct wlr_box *position;
struct wlr_scene_buffer *message;
struct wl_surface *surface;
struct wl_list link;
};
void
message_printf(struct cg_output *output, const char *fmt, ...);
void
message_printf_pos(struct cg_output *output, struct wlr_box *position,
enum cg_message_align, const char *fmt, ...);
void
message_clear(struct cg_output *output);
#endif /* end of include guard MESSAGE_H */