diff options
Diffstat (limited to 'src/compat-api.h')
-rw-r--r-- | src/compat-api.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/src/compat-api.h b/src/compat-api.h index 1bb77241..2356250d 100644 --- a/src/compat-api.h +++ b/src/compat-api.h @@ -38,4 +38,34 @@ #define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex] #endif +#ifndef XF86_SCRN_INTERFACE + +#define SCRN_ARG_TYPE int +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)] + +#define SCREEN_ARG_TYPE int +#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)] + +#define SCREEN_INIT_ARGS int i, ScreenPtr pScreen, int argc, char **argv + +#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen +#define CLOSE_SCREEN_ARGS scrnIndex, pScreen + +#define VTFUNC_ARGS(flags) pScrn->scrnIndex, (flags) +#else +#define SCRN_ARG_TYPE ScrnInfoPtr +#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1) + +#define SCREEN_ARG_TYPE ScreenPtr +#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1) + +#define SCREEN_INIT_ARGS ScreenPtr pScreen, int argc, char **argv + +#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen +#define CLOSE_SCREEN_ARGS pScreen + +#define VTFUNC_ARGS(flags) pScrn, (flags) + +#endif + #endif |