summaryrefslogtreecommitdiff
path: root/hw/xfree86/common/vidmodeproc.h
blob: 3cc8fc17d73234c08c3fbcd9ffedb3f613ee9902 (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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82

/* Prototypes for DGA functions that the DDX must provide */

#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif

#ifndef _VIDMODEPROC_H_
#define _VIDMODEPROC_H_

typedef enum {
    VIDMODE_H_DISPLAY,
    VIDMODE_H_SYNCSTART,
    VIDMODE_H_SYNCEND,
    VIDMODE_H_TOTAL,
    VIDMODE_H_SKEW,
    VIDMODE_V_DISPLAY,
    VIDMODE_V_SYNCSTART,
    VIDMODE_V_SYNCEND,
    VIDMODE_V_TOTAL,
    VIDMODE_FLAGS,
    VIDMODE_CLOCK
} VidModeSelectMode;

typedef enum {
    VIDMODE_MON_VENDOR,
    VIDMODE_MON_MODEL,
    VIDMODE_MON_NHSYNC,
    VIDMODE_MON_NVREFRESH,
    VIDMODE_MON_HSYNC_LO,
    VIDMODE_MON_HSYNC_HI,
    VIDMODE_MON_VREFRESH_LO,
    VIDMODE_MON_VREFRESH_HI
} VidModeSelectMonitor;

typedef union {
    const void *ptr;
    int i;
    float f;
} vidMonitorValue;

extern Bool VidModeExtensionInit(ScreenPtr pScreen);

extern Bool VidModeGetCurrentModeline(ScreenPtr pScreen, DisplayModePtr *mode,
                                      int *dotClock);
extern Bool VidModeGetFirstModeline(ScreenPtr pScreen, DisplayModePtr *mode,
                                    int *dotClock);
extern Bool VidModeGetNextModeline(ScreenPtr pScreen, DisplayModePtr *mode,
                                   int *dotClock);
extern Bool VidModeDeleteModeline(ScreenPtr pScreen, DisplayModePtr mode);
extern Bool VidModeZoomViewport(ScreenPtr pScreen, int zoom);
extern Bool VidModeGetViewPort(ScreenPtr pScreen, int *x, int *y);
extern Bool VidModeSetViewPort(ScreenPtr pScreen, int x, int y);
extern Bool VidModeSwitchMode(ScreenPtr pScreen, DisplayModePtr mode);
extern Bool VidModeLockZoom(ScreenPtr pScreen, Bool lock);
extern int VidModeGetNumOfClocks(ScreenPtr pScreen, Bool *progClock);
extern Bool VidModeGetClocks(ScreenPtr pScreen, int *Clocks);
extern ModeStatus VidModeCheckModeForMonitor(ScreenPtr pScreen,
                                             DisplayModePtr mode);
extern ModeStatus VidModeCheckModeForDriver(ScreenPtr pScreen,
                                            DisplayModePtr mode);
extern void VidModeSetCrtcForMode(ScreenPtr pScreen, DisplayModePtr mode);
extern Bool VidModeAddModeline(ScreenPtr pScreen, DisplayModePtr mode);
extern int VidModeGetDotClock(ScreenPtr pScreen, int Clock);
extern int VidModeGetNumOfModes(ScreenPtr pScreen);
extern Bool VidModeSetGamma(ScreenPtr pScreen, float red, float green,
                            float blue);
extern Bool VidModeGetGamma(ScreenPtr pScreen, float *red, float *green,
                            float *blue);
extern DisplayModePtr VidModeCreateMode(void);
extern void VidModeCopyMode(DisplayModePtr modefrom, DisplayModePtr modeto);
extern int VidModeGetModeValue(DisplayModePtr mode, int valtyp);
extern void VidModeSetModeValue(DisplayModePtr mode, int valtyp, int val);
extern vidMonitorValue VidModeGetMonitorValue(ScreenPtr pScreen,
                                              int valtyp, int indx);
extern Bool VidModeSetGammaRamp(ScreenPtr, int, CARD16 *, CARD16 *,
                                CARD16 *);
extern Bool VidModeGetGammaRamp(ScreenPtr, int, CARD16 *, CARD16 *,
                                CARD16 *);
extern int VidModeGetGammaRampSize(ScreenPtr pScreen);

#endif