summaryrefslogtreecommitdiff
path: root/include/nsfb.h
blob: 7b28fcbdb30d323aea02883a377994f602f1ccbc (plain)
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
#ifndef _NSFB_H
#define _NSFB_H 1

#include <stdint.h>


/** NS Framebuffer context
 */
struct nsfb_s {
    int width; /**< Visible width. */
    int height; /**< Visible height. */
    int bpp; /**< Bits per pixel. */

    int refresh; /**< Desired refresh rate for physical displays. */
    char *output_dev; /**> Path to output device for frontends that require it. */

    uint8_t *ptr; /**< Base of video memory. */
    int linelen; /**< length of a video line. */

    nsfb_colour_t palette[256]; /**< palette for index modes */
    nsfb_cursor_t *cursor; /**< cursor */

    struct nsfb_frontend_rtns_s *frontend_rtns; /**< frontend routines. */
    void *frontend_priv; /**< frontend opaque data. */

    nsfb_bbox_t clip; /**< current clipping rectangle for plotters */
    struct nsfb_plotter_fns_s *plotter_fns; /**< Plotter methods */
};


#endif