dmxlog.h
Go to the documentation of this file.
00001 /*
00002  * Copyright 2001 Red Hat Inc., Durham, North Carolina.
00003  *
00004  * All Rights Reserved.
00005  *
00006  * Permission is hereby granted, free of charge, to any person obtaining
00007  * a copy of this software and associated documentation files (the
00008  * "Software"), to deal in the Software without restriction, including
00009  * without limitation on the rights to use, copy, modify, merge,
00010  * publish, distribute, sublicense, and/or sell copies of the Software,
00011  * and to permit persons to whom the Software is furnished to do so,
00012  * subject to the following conditions:
00013  *
00014  * The above copyright notice and this permission notice (including the
00015  * next paragraph) shall be included in all copies or substantial
00016  * portions of the Software.
00017  *
00018  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
00019  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
00020  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
00021  * NON-INFRINGEMENT.  IN NO EVENT SHALL RED HAT AND/OR THEIR SUPPLIERS
00022  * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
00023  * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
00024  * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
00025  * SOFTWARE.
00026  */
00027 
00028 /*
00029  * Authors:
00030  *   Rickard E. (Rik) Faith <faith@redhat.com>
00031  *
00032  */
00033 
00038 #ifndef _DMXLOG_H_
00039 #define _DMXLOG_H_
00040 
00042 typedef enum {
00043     dmxDebug,                   
00044     dmxInfo,                    
00045     dmxWarning,                 
00048     dmxError,                   
00051     dmxFatal                    
00053 } dmxLogLevel;
00054 
00055 /* Logging functions used by Xserver/hw/dmx routines. */
00056 extern dmxLogLevel dmxSetLogLevel(dmxLogLevel newLevel);
00057 extern dmxLogLevel dmxGetLogLevel(void);
00058 extern void        dmxLog(dmxLogLevel logLevel, const char *format, ...);
00059 extern void        dmxLogCont(dmxLogLevel logLevel, const char *format, ...);
00060 extern const char  *dmxEventName(int type);
00061 
00062 #ifndef DMX_LOG_STANDALONE
00063 extern void dmxLogOutput(DMXScreenInfo *dmxScreen, const char *format, ...);
00064 extern void dmxLogOutputCont(DMXScreenInfo *dmxScreen, const char *format,
00065                              ...);
00066 extern void dmxLogOutputWarning(DMXScreenInfo *dmxScreen, const char *format,
00067                                 ...);
00068 extern void dmxLogInput(DMXInputInfo *dmxInput, const char *format, ...);
00069 extern void dmxLogInputCont(DMXInputInfo *dmxInput, const char *format, ...);
00070 extern void dmxLogArgs(dmxLogLevel logLevel, int argc, char **argv);
00071 extern void dmxLogVisual(DMXScreenInfo *dmxScreen, XVisualInfo *vi,
00072                          int defaultVisual);
00073 extern const char *dmxXInputEventName(int type);
00074 #endif
00075 
00076 #endif