#include "dmx.h"
#include "dmxlog.h"
#include "dmxinput.h"
#include <X11/extensions/XI.h>
#include <X11/extensions/XIproto.h>
Functions | |
dmxLogLevel | dmxSetLogLevel (dmxLogLevel newLevel) |
dmxLogLevel | dmxGetLogLevel (void) |
void | AbortServer (void) |
static void | VFatalError (const char *format, va_list args) |
static void | dmxHeader (dmxLogLevel logLevel, DMXInputInfo *dmxInput, DMXScreenInfo *dmxScreen) |
static void | dmxMessage (dmxLogLevel logLevel, const char *format, va_list args) |
void | dmxLog (dmxLogLevel logLevel, const char *format,...) |
void | dmxLogCont (dmxLogLevel logLevel, const char *format,...) |
void | dmxLogOutput (DMXScreenInfo *dmxScreen, const char *format,...) |
void | dmxLogOutputCont (DMXScreenInfo *dmxScreen, const char *format,...) |
void | dmxLogOutputWarning (DMXScreenInfo *dmxScreen, const char *format,...) |
void | dmxLogInput (DMXInputInfo *dmxInput, const char *format,...) |
void | dmxLogInputCont (DMXInputInfo *dmxInput, const char *format,...) |
void | dmxLogArgs (dmxLogLevel logLevel, int argc, char **argv) |
void | dmxLogVisual (DMXScreenInfo *dmxScreen, XVisualInfo *vi, int defaultVisual) |
const char * | dmxXInputEventName (int type) |
const char * | dmxEventName (int type) |
Variables | |
static dmxLogLevel | dmxCurrentLogLevel = dmxDebug |
This file encapsulated all of the logging functions that are used by DMX for informational, warning, and error messages.
void AbortServer | ( | void | ) |
This function was removed between XFree86 4.3.0 and XFree86 4.4.0.
Referenced by VFatalError().
const char* dmxEventName | ( | int | type | ) |
Translate an event type into a human-readable string.
Referenced by dmxConsoleUpdateFineCursor(), dmxDump(), and dmxEnqueue().
dmxLogLevel dmxGetLogLevel | ( | void | ) |
Returns the log level set by dmxLogLevel.
References dmxCurrentLogLevel.
static void dmxHeader | ( | dmxLogLevel | logLevel, | |
DMXInputInfo * | dmxInput, | |||
DMXScreenInfo * | dmxScreen | |||
) | [static] |
References dmxDebug, dmxError, dmxFatal, dmxInfo, dmxWarning, _DMXScreenInfo::index, _DMXInputInfo::inputIdx, _DMXScreenInfo::name, and _DMXInputInfo::name.
Referenced by dmxLog(), dmxLogInput(), dmxLogOutput(), and dmxLogOutputWarning().
void dmxLog | ( | dmxLogLevel | logLevel, | |
const char * | format, | |||
... | ||||
) |
Log the specified message at the specified logLevel. format can be a printf-like format expression.
References dmxHeader(), and dmxMessage().
Referenced by ddxProcessArgument(), dmxAddDevice(), dmxAttachScreen(), dmxBackendCollectEvents(), dmxBackendInitPrivate(), dmxBECreateColormap(), dmxBECreateCursor(), dmxBELoadFont(), dmxBERestorePixmap(), dmxBERestoreRenderGlyph(), dmxBESavePixmap(), dmxCheckFunctionKeys(), dmxCheckSpecialKeys(), dmxCommonOthOn(), dmxCommonRestoreState(), dmxComputeWidthHeight(), dmxConfigAddDisplay(), dmxConfigAddInput(), dmxConfigConfigure(), dmxConfigCopyData(), dmxConfigCopyFromWall(), dmxConfigFromCommandLine(), dmxConfigFromConfigFile(), dmxConfigReadFile(), dmxConfigStoreConfig(), dmxConfigStoreDisplay(), dmxConfigStoreFile(), dmxConfigStoreInput(), dmxConfigStoreXInput(), dmxConfigWriteFile(), dmxConnectionBlockCallback(), dmxConsoleCreateEmptyCursor(), dmxConsoleDrawWindows(), dmxConsoleFunctions(), dmxConsoleInit(), dmxConsoleUpdateFineCursor(), dmxDetachScreen(), dmxDeviceOnOff(), dmxDisplayInit(), dmxErrorHandler(), dmxFixup(), dmxGetButtonMapping(), dmxGetFontPath(), dmxInitOrigins(), dmxInitOverlap(), dmxInputCopyLocal(), dmxInputInit(), dmxInputLogDevices(), dmxInputScanForExtensions(), dmxLogArgs(), dmxLogVisual(), dmxMapInsert(), dmxOnScreen(), dmxPopulateLocal(), dmxPropertyCheckOtherWindows(), dmxPropertyIterate(), dmxPropertySameDisplay(), dmxPropertyWindow(), dmxReInitOrigins(), dmxSigioRegister(), dmxStatCallback(), dmxSwitchReturn(), dmxSync(), dmxSyncInit(), dmxTranslateAndEnqueueExtEvent(), dmxTryComputeScreenOrigins(), dmxUpdateWindowInformation(), dmxWakeupHandler(), InitInput(), InitOutput(), and othUSBGetInfo().
void dmxLogArgs | ( | dmxLogLevel | logLevel, | |
int | argc, | |||
char ** | argv | |||
) |
Print argc messages, each describing an element in argv. This is maingly for debugging purposes.
References dmxLog().
void dmxLogCont | ( | dmxLogLevel | logLevel, | |
const char * | format, | |||
... | ||||
) |
Continue a log message without printing the message prefix.
References dmxMessage().
Referenced by dmxInputLogDevices(), and dmxStatCallback().
void dmxLogInput | ( | DMXInputInfo * | dmxInput, | |
const char * | format, | |||
... | ||||
) |
Log an informational message (at level dmxInfo) related to input. The message prefix will contain information from dmxInput.
References dmxHeader(), dmxInfo, and dmxMessage().
Referenced by dmxAddDevice(), dmxCommonKbdGetInfo(), dmxCommonRestoreState(), dmxCommonSaveState(), dmxEnqueue(), dmxInputAttachBackend(), dmxInputAttachConsole(), dmxInputAttachOld(), dmxInputDetach(), dmxInputInit(), dmxInputScanForExtensions(), and dmxKeyboardOn().
void dmxLogInputCont | ( | DMXInputInfo * | dmxInput, | |
const char * | format, | |||
... | ||||
) |
Continue a message related to input without printing the message prefix.
References dmxInfo, and dmxMessage().
Referenced by dmxKeyboardOn().
void dmxLogOutput | ( | DMXScreenInfo * | dmxScreen, | |
const char * | format, | |||
... | ||||
) |
Log an informational message (at level dmxInfo) related to ouput. The message prefix will contain backend information from dmxScreen.
References dmxHeader(), dmxInfo, and dmxMessage().
Referenced by _dmxDPMSInit(), dmxAttachScreen(), dmxDetachScreen(), dmxGetScreenAttribs(), dmxInitOrigins(), dmxInitOverlap(), dmxLogVisual(), dmxPrintScreenInfo(), dmxPropertyCheckOtherServers(), and dmxReInitOrigins().
void dmxLogOutputCont | ( | DMXScreenInfo * | dmxScreen, | |
const char * | format, | |||
... | ||||
) |
Continue a message related to output without printing the message prefix.
References dmxInfo, and dmxMessage().
Referenced by dmxInitOverlap(), dmxPrintOverlap(), and dmxPrintScreenInfo().
void dmxLogOutputWarning | ( | DMXScreenInfo * | dmxScreen, | |
const char * | format, | |||
... | ||||
) |
Log a warning message (at level dmxWarning) related to output. The message prefix will contain backend information from dmxScreen.
References dmxHeader(), dmxMessage(), and dmxWarning.
Referenced by dmxGetScreenAttribs(), dmxPrintScreenInfo(), and dmxPropertyCheckOtherServers().
void dmxLogVisual | ( | DMXScreenInfo * | dmxScreen, | |
XVisualInfo * | vi, | |||
int | defaultVisual | |||
) |
Print messages at level dmxInfo describing the visuals in vi.
References dmxInfo, dmxLog(), and dmxLogOutput().
Referenced by dmxConnectionBlockCallback(), and dmxGetVisualInfo().
static void dmxMessage | ( | dmxLogLevel | logLevel, | |
const char * | format, | |||
va_list | args | |||
) | [static] |
References dmxCurrentLogLevel, dmxFatal, and VFatalError().
Referenced by dmxLog(), dmxLogCont(), dmxLogInput(), dmxLogInputCont(), dmxLogOutput(), dmxLogOutputCont(), and dmxLogOutputWarning().
dmxLogLevel dmxSetLogLevel | ( | dmxLogLevel | newLevel | ) |
Set the default level for logging to dmxLogLevel. Returns the previous log level.
References dmxCurrentLogLevel, and dmxFatal.
const char* dmxXInputEventName | ( | int | type | ) |
Translate a (normalized) XInput event type into a human-readable string.
static void VFatalError | ( | const char * | format, | |
va_list | args | |||
) | [static] |
References AbortServer(), and OsVendorFatalError().
Referenced by dmxMessage().
dmxLogLevel dmxCurrentLogLevel = dmxDebug [static] |
Referenced by dmxGetLogLevel(), dmxMessage(), and dmxSetLogLevel().