summaryrefslogtreecommitdiff
path: root/minitru-int.h
blob: befb01fa25f279585f6abc9f98044ac8d250f973 (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
32
33
34
35
36
37
38
39
40
41
#ifndef MINITRU_INT_H
#define MINITRU_INT_H

#include "stdlib.h"
#include "stdint.h"
#include "string.h"
#include "math.h"

#if defined(__GNUC__) && (__GNUC__ >= 4)
#define hidden __attribute__((visibility("hidden")))
#elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
#define hidden __hidden
#else /* not gcc >= 4 and not Sun Studio >= 8 */
#define hidden
#endif /* GNUC >= 4 */

struct mt_monitor;

struct mt_backend {
    uint32_t (*probe)(struct mt_monitor *monitor);
    struct mt_mode *(*modes)(struct mt_monitor *monitor);
};

extern hidden struct mt_backend _mt_edid_backend;
extern hidden struct mt_backend _mt_displayid_backend;

struct mt_monitor {
    const struct mt_backend *backend;
    void *block;
    uint32_t len;
};

extern hidden struct mt_mode *mt_mode_alloc(void);
extern struct mt_mode *find_dmt_mode(uint32_t hsize,
                                            uint32_t vsize,
                                            uint32_t refresh,
                                            uint32_t rb);

#include "minitru.h"

#endif