aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs/Xserver/randr/registry.h
diff options
context:
space:
mode:
authorReinhard Tartler <siretart@tauware.de>2011-10-10 17:47:59 +0200
committerReinhard Tartler <siretart@tauware.de>2011-10-10 17:47:59 +0200
commit15cee47a496ef891923949ade073cf4ffabb9c73 (patch)
treea1d5648dfb070a10794384ff119d4d77f91539d3 /nx-X11/programs/Xserver/randr/registry.h
parent964f539648bb74098972b09d576b0bb4dd21a3c5 (diff)
downloadnx-libs-15cee47a496ef891923949ade073cf4ffabb9c73.tar.gz
nx-libs-15cee47a496ef891923949ade073cf4ffabb9c73.tar.bz2
nx-libs-15cee47a496ef891923949ade073cf4ffabb9c73.zip
Imported nx-X11-3.5.0-2.tar.gznx-X11/3.5.0-2nx-X11
Summary: Imported nx-X11-3.5.0-2.tar.gz Keywords: Imported nx-X11-3.5.0-2.tar.gz into Git repository
Diffstat (limited to 'nx-X11/programs/Xserver/randr/registry.h')
-rw-r--r--nx-X11/programs/Xserver/randr/registry.h64
1 files changed, 64 insertions, 0 deletions
diff --git a/nx-X11/programs/Xserver/randr/registry.h b/nx-X11/programs/Xserver/randr/registry.h
new file mode 100644
index 000000000..29e5fdfd3
--- /dev/null
+++ b/nx-X11/programs/Xserver/randr/registry.h
@@ -0,0 +1,64 @@
+/***********************************************************
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+******************************************************************/
+
+#ifndef DIX_REGISTRY_H
+#define DIX_REGISTRY_H
+
+/*
+ * Result returned from any unsuccessful lookup
+ */
+#define XREGISTRY_UNKNOWN "<unknown>"
+
+#ifdef XREGISTRY
+
+#include "resource.h"
+#include "extnsionst.h"
+
+/* Internal string registry - for auditing, debugging, security, etc. */
+
+/*
+ * Registration functions. The name string is not copied, so it must
+ * not be a stack variable.
+ */
+void RegisterResourceName(RESTYPE type, char *name);
+void RegisterExtensionNames(ExtensionEntry *ext);
+
+/*
+ * Lookup functions. The returned string must not be modified or freed.
+ */
+const char *LookupMajorName(int major);
+const char *LookupRequestName(int major, int minor);
+const char *LookupEventName(int event);
+const char *LookupErrorName(int error);
+const char *LookupResourceName(RESTYPE rtype);
+
+/*
+ * Setup and teardown
+ */
+void dixResetRegistry(void);
+
+#else /* XREGISTRY */
+
+/* Define calls away when the registry is not being built. */
+
+#define RegisterResourceName(a, b) { ; }
+#define RegisterExtensionNames(a) { ; }
+
+#define LookupMajorName(a) XREGISTRY_UNKNOWN
+#define LookupRequestName(a, b) XREGISTRY_UNKNOWN
+#define LookupEventName(a) XREGISTRY_UNKNOWN
+#define LookupErrorName(a) XREGISTRY_UNKNOWN
+#define LookupResourceName(a) XREGISTRY_UNKNOWN
+
+#define dixResetRegistry() { ; }
+
+#endif /* XREGISTRY */
+#endif /* DIX_REGISTRY_H */