File: display.h

package info (click to toggle)
buffybox 3.4.2%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 108,056 kB
  • sloc: ansic: 357,060; cpp: 42,613; python: 10,534; xml: 1,214; sh: 823; asm: 665; ruby: 487; makefile: 66
file content (37 lines) | stat: -rw-r--r-- 860 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
/**
 * Copyright 2025 buffybox contributors
 * SPDX-License-Identifier: GPL-3.0-or-later
 */

#ifndef BBX_DISPLAY_H
#define BBX_DISPLAY_H

#include "backends.h"
#include "lvgl/lvgl.h"

/**
 * Display configuration options
 */
typedef struct {
    /* Display resolution override */
    int hor_res;
    int ver_res;
    /* Display offset */
    int x_offset;
    int y_offset;
    /* DPI override */
    int dpi;
    /* Framebuffer force refresh quirk */
    bool fbdev_force_refresh;
} bbx_display_config_t;

/**
 * Initialize LVGL display with the specified backend and configuration.
 *
 * @param backend_id the backend to use
 * @param config display configuration options
 * @return initialized display or NULL on failure
 */
lv_display_t *bbx_display_create(bbx_backends_backend_id_t backend_id, bbx_display_config_t *config);

#endif /* BBX_DISPLAY_H */