cagebreak/message.h
project-repo d19c32d7a4 Release 2.3.0
Functionality:
  * Add configuration to anchor position of messages (#60, 71 in Bugs.md).
  * Add output priorisation (#38, 68 in Bugs.md).
  * Print whether output is active in dump.

Bug Fixes:
  * Fix gamma control (72 in Bugs.md).
  * Add missing commands to example config.
  * Add message_config to dump output.

Example Scripts:
  * Add screenshot script.
  * Make example scripts standalone.

Documentation:
  * Escape html tags in config man page. (#68, 69 in Bugs.md)
  * Improve README.md (#62, 70 in Bugs.md).
  * Improve SECURITY.md.
  * Add CONTRIBUTING.md (#62, 70 in Bugs.md).
  * FAQ: Add Firefox screenshare instructions for wayland.
  * FAQ: Add wlroots downgrading instructions for workaround in case of temporary wlroots incompatibility.
  * Update copyright notices to 2024.

Development Tooling:
  * Add new gpg keys (signed by the old ones).
  * Add PR template.
  * Add dev-FAQ.
  * Remove now-unnecessary fanalyzer pragmas.
2024-01-26 10:53:03 +00:00

48 lines
1,016 B
C

// Copyright 2020 - 2024, 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_anchor {
CG_MESSAGE_TOP_LEFT,
CG_MESSAGE_TOP_CENTER,
CG_MESSAGE_TOP_RIGHT,
CG_MESSAGE_BOTTOM_LEFT,
CG_MESSAGE_BOTTOM_CENTER,
CG_MESSAGE_BOTTOM_RIGHT,
CG_MESSAGE_CENTER,
CG_MESSAGE_NOPT
};
struct cg_message_config {
char *font;
int display_time;
float bg_color[4];
float fg_color[4];
enum cg_message_anchor anchor;
};
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_anchor, const char *fmt, ...);
void
message_clear(struct cg_output *output);
#endif /* end of include guard MESSAGE_H */