File: render.h

package info (click to toggle)
fuzzel 1.12.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 908 kB
  • sloc: ansic: 13,535; xml: 324; sh: 27; makefile: 9
file content (38 lines) | stat: -rw-r--r-- 1,141 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#pragma once

#include <threads.h>
#include <pixman.h>

#include <fcft/fcft.h>

#include "config.h"
#include "match.h"
#include "shm.h"
#include "tllist.h"

struct render;
struct render *render_init(const struct config *conf, mtx_t *icon_lock);
void render_destroy(struct render *render);

void render_set_subpixel(struct render *render, enum fcft_subpixel subpixel);
bool render_set_font_and_update_sizes(
    struct render *render, struct fcft_font *font, struct fcft_font *font_bold,
    float scale, float dpi, bool size_font_by_dpi,
    int *new_width, int *new_height);
void render_flush_text_run_cache(struct render *render);

void render_background(const struct render *render, struct buffer *buf);

void render_prompt(
    struct render *render, struct buffer *buf,
    const struct prompt *prompt, const struct matches *matches);

void render_match_list(
    struct render *render, struct buffer *buf,
    const struct prompt *prompt, const struct matches *matches);

int render_icon_size(const struct render *render);

size_t render_get_row_num(
        const struct render *render, int y,
        const struct matches *matches);