2019-07-05 10:16:56 +02:00
|
|
|
#pragma once
|
2020-02-25 19:51:03 +01:00
|
|
|
#include <stdbool.h>
|
2019-07-05 10:16:56 +02:00
|
|
|
|
|
|
|
|
#include "terminal.h"
|
2020-01-04 19:49:26 +01:00
|
|
|
#include "fdm.h"
|
|
|
|
|
#include "wayland.h"
|
2022-01-15 14:56:13 +05:30
|
|
|
#include "misc.h"
|
2019-07-05 10:16:56 +02:00
|
|
|
|
2020-01-04 19:49:26 +01:00
|
|
|
struct renderer;
|
|
|
|
|
struct renderer *render_init(struct fdm *fdm, struct wayland *wayl);
|
|
|
|
|
void render_destroy(struct renderer *renderer);
|
2019-07-05 10:16:56 +02:00
|
|
|
|
2024-01-17 15:00:14 -05:00
|
|
|
enum resize_options {
|
|
|
|
|
RESIZE_NORMAL = 0,
|
|
|
|
|
RESIZE_FORCE = 1 << 0,
|
|
|
|
|
RESIZE_BY_CELLS = 1 << 1,
|
|
|
|
|
RESIZE_KEEP_GRID = 1 << 2,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
bool render_resize(
|
|
|
|
|
struct terminal *term, int width, int height, uint8_t resize_options);
|
2020-02-08 14:08:16 +01:00
|
|
|
|
2019-07-24 20:09:49 +02:00
|
|
|
void render_refresh(struct terminal *term);
|
2023-09-04 14:02:05 +02:00
|
|
|
void render_refresh_app_id(struct terminal *term);
|
2024-09-10 18:53:38 +02:00
|
|
|
void render_refresh_icon(struct terminal *term);
|
2020-03-06 19:16:54 +01:00
|
|
|
void render_refresh_csd(struct terminal *term);
|
|
|
|
|
void render_refresh_search(struct terminal *term);
|
2020-03-25 18:23:55 +01:00
|
|
|
void render_refresh_title(struct terminal *term);
|
2021-01-31 11:12:07 +01:00
|
|
|
void render_refresh_urls(struct terminal *term);
|
2022-01-01 13:56:15 +01:00
|
|
|
bool render_xcursor_set(
|
2023-06-27 16:57:33 +02:00
|
|
|
struct seat *seat, struct terminal *term, enum cursor_shape shape);
|
2022-01-01 13:56:15 +01:00
|
|
|
bool render_xcursor_is_valid(const struct seat *seat, const char *cursor);
|
2019-07-29 20:13:26 +02:00
|
|
|
|
|
|
|
|
struct render_worker_context {
|
|
|
|
|
int my_id;
|
|
|
|
|
struct terminal *term;
|
|
|
|
|
};
|
|
|
|
|
int render_worker_thread(void *_ctx);
|
2021-11-19 15:08:46 +01:00
|
|
|
|
|
|
|
|
struct csd_data {
|
|
|
|
|
int x;
|
|
|
|
|
int y;
|
|
|
|
|
int width;
|
|
|
|
|
int height;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct csd_data get_csd_data(const struct terminal *term, enum csd_surface surf_idx);
|