/include/extension.h

https://github.com/robclark/xserver · C Header · 103 lines · 19 code · 13 blank · 71 comment · 0 complexity · 35cc3ab82055d9c1a36204b38ef9843e MD5 · raw file

  1. /***********************************************************
  2. Copyright 1987, 1998 The Open Group
  3. Permission to use, copy, modify, distribute, and sell this software and its
  4. documentation for any purpose is hereby granted without fee, provided that
  5. the above copyright notice appear in all copies and that both that
  6. copyright notice and this permission notice appear in supporting
  7. documentation.
  8. The above copyright notice and this permission notice shall be included in
  9. all copies or substantial portions of the Software.
  10. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  11. IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  12. FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  13. OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
  14. AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
  15. CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  16. Except as contained in this notice, the name of The Open Group shall not be
  17. used in advertising or otherwise to promote the sale, use or other dealings
  18. in this Software without prior written authorization from The Open Group.
  19. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
  20. All Rights Reserved
  21. Permission to use, copy, modify, and distribute this software and its
  22. documentation for any purpose and without fee is hereby granted,
  23. provided that the above copyright notice appear in all copies and that
  24. both that copyright notice and this permission notice appear in
  25. supporting documentation, and that the name of Digital not be
  26. used in advertising or publicity pertaining to distribution of the
  27. software without specific, written prior permission.
  28. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  29. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  30. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  31. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  32. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  33. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  34. SOFTWARE.
  35. ******************************************************************/
  36. /*
  37. * Copyright (c) 1997-2003 by The XFree86 Project, Inc.
  38. *
  39. * Permission is hereby granted, free of charge, to any person obtaining a
  40. * copy of this software and associated documentation files (the "Software"),
  41. * to deal in the Software without restriction, including without limitation
  42. * the rights to use, copy, modify, merge, publish, distribute, sublicense,
  43. * and/or sell copies of the Software, and to permit persons to whom the
  44. * Software is furnished to do so, subject to the following conditions:
  45. *
  46. * The above copyright notice and this permission notice shall be included in
  47. * all copies or substantial portions of the Software.
  48. *
  49. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  50. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  51. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
  52. * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
  53. * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
  54. * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  55. * OTHER DEALINGS IN THE SOFTWARE.
  56. *
  57. * Except as contained in this notice, the name of the copyright holder(s)
  58. * and author(s) shall not be used in advertising or otherwise to promote
  59. * the sale, use or other dealings in this Software without prior written
  60. * authorization from the copyright holder(s) and author(s).
  61. */
  62. #ifndef EXTENSION_H
  63. #define EXTENSION_H
  64. #include <X11/Xfuncproto.h>
  65. #include "dixstruct.h"
  66. typedef void (*InitExtension) (void);
  67. typedef struct {
  68. InitExtension initFunc;
  69. const char *name;
  70. Bool *disablePtr;
  71. } ExtensionModule;
  72. extern _X_EXPORT unsigned short StandardMinorOpcode(ClientPtr /*client */ );
  73. extern _X_EXPORT Bool EnableDisableExtension(const char *name, Bool enable);
  74. extern _X_EXPORT void EnableDisableExtensionError(const char *name,
  75. Bool enable);
  76. extern _X_EXPORT void InitExtensions(int argc, char **argv);
  77. extern _X_EXPORT void CloseDownExtensions(void);
  78. extern _X_EXPORT void LoadExtensionList(const ExtensionModule ext[],
  79. int listSize, Bool external);
  80. #endif /* EXTENSION_H */