1 | /* $XFree86$ */
|
---|
2 | /*
|
---|
3 | * Copyright 2001 Red Hat Inc., Durham, North Carolina.
|
---|
4 | *
|
---|
5 | * All Rights Reserved.
|
---|
6 | *
|
---|
7 | * Permission is hereby granted, free of charge, to any person obtaining
|
---|
8 | * a copy of this software and associated documentation files (the
|
---|
9 | * "Software"), to deal in the Software without restriction, including
|
---|
10 | * without limitation on the rights to use, copy, modify, merge,
|
---|
11 | * publish, distribute, sublicense, and/or sell copies of the Software,
|
---|
12 | * and to permit persons to whom the Software is furnished to do so,
|
---|
13 | * subject to the following conditions:
|
---|
14 | *
|
---|
15 | * The above copyright notice and this permission notice (including the
|
---|
16 | * next paragraph) shall be included in all copies or substantial
|
---|
17 | * portions of the Software.
|
---|
18 | *
|
---|
19 | * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
---|
20 | * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
---|
21 | * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
---|
22 | * NON-INFRINGEMENT. IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
|
---|
23 | * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
|
---|
24 | * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
---|
25 | * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
---|
26 | * SOFTWARE.
|
---|
27 | */
|
---|
28 |
|
---|
29 | /*
|
---|
30 | * Authors:
|
---|
31 | * Rickard E. (Rik) Faith <[email protected]>
|
---|
32 | *
|
---|
33 | */
|
---|
34 |
|
---|
35 | /** \file
|
---|
36 | * This header is included by all files that need to use the DMX logging
|
---|
37 | * facilities. */
|
---|
38 |
|
---|
39 | #ifndef _DMXLOG_H_
|
---|
40 | #define _DMXLOG_H_
|
---|
41 |
|
---|
42 | /** Logging levels -- output is tunable with #dmxSetLogLevel. */
|
---|
43 | typedef enum {
|
---|
44 | dmxDebug, /**< Usually verbose debugging info */
|
---|
45 | dmxInfo, /**< Non-warning information */
|
---|
46 | dmxWarning, /**< A warning that may indicate DMX
|
---|
47 | * will not function as the user
|
---|
48 | * intends. */
|
---|
49 | dmxError, /**< A non-fatal error that probably
|
---|
50 | * indicates DMX will not function as
|
---|
51 | * desired.*/
|
---|
52 | dmxFatal /**< A fatal error that will cause DMX
|
---|
53 | * to shut down. */
|
---|
54 | } dmxLogLevel;
|
---|
55 |
|
---|
56 | /* Logging functions used by Xserver/hw/dmx routines. */
|
---|
57 | extern dmxLogLevel dmxSetLogLevel(dmxLogLevel newLevel);
|
---|
58 | extern dmxLogLevel dmxGetLogLevel(void);
|
---|
59 | extern void dmxLog(dmxLogLevel logLevel, const char *format, ...);
|
---|
60 | extern void dmxLogCont(dmxLogLevel logLevel, const char *format, ...);
|
---|
61 | extern const char *dmxEventName(int type);
|
---|
62 |
|
---|
63 | #ifndef DMX_LOG_STANDALONE
|
---|
64 | extern void dmxLogOutput(DMXScreenInfo *dmxScreen, const char *format, ...);
|
---|
65 | extern void dmxLogOutputCont(DMXScreenInfo *dmxScreen, const char *format,
|
---|
66 | ...);
|
---|
67 | extern void dmxLogOutputWarning(DMXScreenInfo *dmxScreen, const char *format,
|
---|
68 | ...);
|
---|
69 | extern void dmxLogInput(DMXInputInfo *dmxInput, const char *format, ...);
|
---|
70 | extern void dmxLogInputCont(DMXInputInfo *dmxInput, const char *format, ...);
|
---|
71 | extern void dmxLogArgs(dmxLogLevel logLevel, int argc, char **argv);
|
---|
72 | extern void dmxLogVisual(DMXScreenInfo *dmxScreen, XVisualInfo *vi,
|
---|
73 | int defaultVisual);
|
---|
74 | #ifdef XINPUT
|
---|
75 | extern const char *dmxXInputEventName(int type);
|
---|
76 | #endif
|
---|
77 | #endif
|
---|
78 |
|
---|
79 | #endif
|
---|