ddxstubs.c 2.3 KB

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