~ubuntu-branches/ubuntu/quantal/virtualbox/quantal

« back to all changes in this revision

Viewing changes to src/VBox/Additions/x11/vboxvideo/compat-api.h

  • Committer: Package Import Robot
  • Author(s): Timo Aaltonen, Maarten Lankhorst
  • Date: 2012-08-14 15:29:52 UTC
  • Revision ID: package-import@ubuntu.com-20120814152952-xtf89a0043xpybgr
Tags: 4.1.18-dfsg-1ubuntu1
[ Maarten Lankhorst ]
Add 37-fix-ftbfs-xserver-113.patch to build against the new video
ABI.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright 2012 Red Hat, Inc.
 
3
 *
 
4
 * Permission is hereby granted, free of charge, to any person obtaining a
 
5
 * copy of this software and associated documentation files (the "Software"),
 
6
 * to deal in the Software without restriction, including without limitation
 
7
 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
 
8
 * and/or sell copies of the Software, and to permit persons to whom the
 
9
 * Software is furnished to do so, subject to the following conditions:
 
10
 *
 
11
 * The above copyright notice and this permission notice (including the next
 
12
 * paragraph) shall be included in all copies or substantial portions of the
 
13
 * Software.
 
14
 *
 
15
 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 
16
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 
17
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
 
18
 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 
19
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
 
20
 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
 
21
 * DEALINGS IN THE SOFTWARE.
 
22
 *
 
23
 * Author: Dave Airlie <airlied@redhat.com>
 
24
 */
 
25
 
 
26
/* this file provides API compat between server post 1.13 and pre it,
 
27
   it should be reused inside as many drivers as possible */
 
28
#ifndef COMPAT_API_H
 
29
#define COMPAT_API_H
 
30
 
 
31
#ifndef GLYPH_HAS_GLYPH_PICTURE_ACCESSOR
 
32
#define GetGlyphPicture(g, s) GlyphPicture((g))[(s)->myNum]
 
33
#define SetGlyphPicture(g, s, p) GlyphPicture((g))[(s)->myNum] = p
 
34
#endif
 
35
 
 
36
#ifndef XF86_HAS_SCRN_CONV
 
37
#define xf86ScreenToScrn(s) xf86Screens[(s)->myNum]
 
38
#define xf86ScrnToScreen(s) screenInfo.screens[(s)->scrnIndex]
 
39
#endif
 
40
 
 
41
#ifndef XF86_SCRN_INTERFACE
 
42
 
 
43
#define SCRN_ARG_TYPE int
 
44
#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = xf86Screens[(arg1)]
 
45
 
 
46
#define SCREEN_ARG_TYPE int
 
47
#define SCREEN_PTR(arg1) ScreenPtr pScreen = screenInfo.screens[(arg1)]
 
48
 
 
49
#define SCREEN_INIT_ARGS_DECL int index, ScreenPtr pScreen, int argc, char **argv
 
50
 
 
51
#define BLOCKHANDLER_ARGS_DECL int arg, pointer blockData, pointer pTimeout, pointer pReadmask
 
52
#define BLOCKHANDLER_ARGS arg, blockData, pTimeout, pReadmask
 
53
 
 
54
#define CLOSE_SCREEN_ARGS_DECL int scrnIndex, ScreenPtr pScreen
 
55
#define CLOSE_SCREEN_ARGS scrnIndex, pScreen
 
56
 
 
57
#define ADJUST_FRAME_ARGS_DECL int arg, int x, int y, int flags
 
58
 
 
59
#define SWITCH_MODE_ARGS_DECL int arg, DisplayModePtr pMode, int flags
 
60
 
 
61
#define FREE_SCREEN_ARGS_DECL int arg, int flags
 
62
#define FREE_SCREEN_ARGS(x) (x)->scrnIndex, 0
 
63
 
 
64
#define VT_FUNC_ARGS_DECL int arg, int flags
 
65
#define VT_FUNC_ARGS(flags) pScrn->scrnIndex, (flags)
 
66
 
 
67
#define XF86_ENABLEDISABLEFB_ARGS_DECL int arg, Bool enable
 
68
#define XF86_ENABLEDISABLEFB_ARG(x) ((x)->scrnIndex)
 
69
#else
 
70
#define SCRN_ARG_TYPE ScrnInfoPtr
 
71
#define SCRN_INFO_PTR(arg1) ScrnInfoPtr pScrn = (arg1)
 
72
 
 
73
#define SCREEN_ARG_TYPE ScreenPtr
 
74
#define SCREEN_PTR(arg1) ScreenPtr pScreen = (arg1)
 
75
 
 
76
#define SCREEN_INIT_ARGS_DECL ScreenPtr pScreen, int argc, char **argv
 
77
 
 
78
#define BLOCKHANDLER_ARGS_DECL ScreenPtr arg, pointer pTimeout, pointer pReadmask
 
79
#define BLOCKHANDLER_ARGS arg, pTimeout, pReadmask
 
80
 
 
81
#define CLOSE_SCREEN_ARGS_DECL ScreenPtr pScreen
 
82
#define CLOSE_SCREEN_ARGS pScreen
 
83
 
 
84
#define ADJUST_FRAME_ARGS_DECL ScrnInfoPtr arg, int x, int y
 
85
#define SWITCH_MODE_ARGS_DECL ScrnInfoPtr arg, DisplayModePtr pMode
 
86
 
 
87
#define FREE_SCREEN_ARGS_DECL ScrnInfoPtr arg
 
88
#define FREE_SCREEN_ARGS(x) (x)
 
89
 
 
90
#define VT_FUNC_ARGS_DECL ScrnInfoPtr arg
 
91
#define VT_FUNC_ARGS(flags) pScrn
 
92
 
 
93
#define XF86_ENABLEDISABLEFB_ARGS_DECL ScrnInfoPtr arg, Bool enable
 
94
#define XF86_ENABLEDISABLEFB_ARG(x) (x)
 
95
 
 
96
#endif
 
97
 
 
98
#endif