1 module dmagick.c.log; 2 3 import core.stdc.stdio; 4 import core.vararg; 5 6 import dmagick.c.exception; 7 import dmagick.c.magickType; 8 import dmagick.c.magickVersion; 9 10 extern(C) 11 { 12 static if (MagickLibVersion >= 0x663) 13 { 14 enum LogEventType 15 { 16 UndefinedEvents, 17 NoEvents = 0x00000, 18 TraceEvent = 0x00001, 19 AnnotateEvent = 0x00002, 20 BlobEvent = 0x00004, 21 CacheEvent = 0x00008, 22 CoderEvent = 0x00010, 23 ConfigureEvent = 0x00020, 24 DeprecateEvent = 0x00040, 25 DrawEvent = 0x00080, 26 ExceptionEvent = 0x00100, 27 ImageEvent = 0x00200, 28 LocaleEvent = 0x00400, 29 ModuleEvent = 0x00800, 30 PolicyEvent = 0x01000, 31 ResourceEvent = 0x02000, 32 TransformEvent = 0x04000, 33 UserEvent = 0x09000, 34 WandEvent = 0x10000, 35 X11Event = 0x20000, 36 AccelerateEvent = 0x40000, 37 AllEvents = 0x7fffffff 38 } 39 } 40 else 41 { 42 enum LogEventType 43 { 44 UndefinedEvents, 45 NoEvents = 0x00000, 46 TraceEvent = 0x00001, 47 AnnotateEvent = 0x00002, 48 BlobEvent = 0x00004, 49 CacheEvent = 0x00008, 50 CoderEvent = 0x00010, 51 ConfigureEvent = 0x00020, 52 DeprecateEvent = 0x00040, 53 DrawEvent = 0x00080, 54 ExceptionEvent = 0x00100, 55 LocaleEvent = 0x00200, 56 ModuleEvent = 0x00400, 57 PolicyEvent = 0x00800, 58 ResourceEvent = 0x01000, 59 TransformEvent = 0x02000, 60 UserEvent = 0x04000, 61 WandEvent = 0x08000, 62 X11Event = 0x10000, 63 AllEvents = 0x7fffffff 64 } 65 } 66 67 struct LogInfo {} 68 69 static if (MagickLibVersion >= 0x689) 70 { 71 alias void function(const LogEventType, const(char)*) MagickLogMethod; 72 } 73 74 char** GetLogList(const(char)*, size_t*, ExceptionInfo*); 75 76 const(char)* GetLogName(); 77 const(char)* SetLogName(const(char)*); 78 79 const(LogInfo)** GetLogInfoList(const(char)*, size_t*, ExceptionInfo*); 80 81 LogEventType SetLogEventMask(const(char)*); 82 83 MagickBooleanType IsEventLogging(); 84 MagickBooleanType ListLogInfo(FILE*, ExceptionInfo*); 85 MagickBooleanType LogComponentGenesis(); 86 MagickBooleanType LogMagickEvent(const LogEventType, const(char)*, const(char)*, const size_t, const(char)*, ...); 87 MagickBooleanType LogMagickEventList(const LogEventType, const(char)*, const(char)*, const size_t, const(char)*, va_list); 88 89 void CloseMagickLog(); 90 void LogComponentTerminus(); 91 void SetLogFormat(const(char)*); 92 93 static if (MagickLibVersion >= 0x689) 94 { 95 void SetLogMethod(MagickLogMethod); 96 } 97 }