Add patch that contain Mali fixes.
[deb_xorg-server.git] / test / ddxstubs.c
1 /**
2 * Copyright © 2012 Apple 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
24 /* This file contains stubs for some symbols which are usually provided by a
25 * DDX. These stubs should allow the unit tests to build on platforms with
26 * stricter linkers (eg: darwin) when the Xorg DDX is not built.
27 */
28
29 #ifdef HAVE_DIX_CONFIG_H
30 #include <dix-config.h>
31 #endif
32
33 #include "input.h"
34 #include "mi.h"
35
36 void
37 DDXRingBell(int volume, int pitch, int duration)
38 {
39 }
40
41 void
42 ProcessInputEvents(void)
43 {
44 mieqProcessInputEvents();
45 }
46
47 void
48 OsVendorInit(void)
49 {
50 }
51
52 void
53 OsVendorFatalError(const char *f, va_list args)
54 {
55 }
56
57 void
58 AbortDDX(enum ExitCode error)
59 {
60 OsAbort();
61 }
62
63 void
64 ddxUseMsg(void)
65 {
66 }
67
68 int
69 ddxProcessArgument(int argc, char *argv[], int i)
70 {
71 return 0;
72 }
73
74 void
75 ddxGiveUp(enum ExitCode error)
76 {
77 }
78
79 Bool
80 LegalModifier(unsigned int key, DeviceIntPtr pDev)
81 {
82 return TRUE;
83 }
84
85 #ifdef XQUARTZ
86 #include <pthread.h>
87
88 BOOL serverRunning = TRUE;
89 pthread_mutex_t serverRunningMutex = PTHREAD_MUTEX_INITIALIZER;
90 pthread_cond_t serverRunningCond = PTHREAD_COND_INITIALIZER;
91
92 int darwinMainScreenX = 0;
93 int darwinMainScreenY = 0;
94
95 BOOL no_configure_window = FALSE;
96
97 void
98 darwinEvents_lock(void)
99 {
100 }
101
102 void
103 darwinEvents_unlock(void)
104 {
105 }
106 #endif
107
108 #ifdef DDXBEFORERESET
109 void
110 ddxBeforeReset(void)
111 {
112 }
113 #endif