1 module as; 2 import as.def; 3 import std..string; 4 public import as.engine; 5 public import as.mod; 6 public import as.func; 7 public import as.context; 8 public import as.tinf; 9 public import as.obj; 10 11 enum CDECL = asECallConvTypes.asCALL_CDECL; 12 enum DCall = asECallConvTypes.asCALL_DDECL; 13 enum DCallObjLast = asECallConvTypes.asCALL_DDECL_OBJLAST; 14 enum DCallObjFirst = asECallConvTypes.asCALL_DDECL_OBJFIRST; 15 16 /** 17 Gets the version of the angelscript library 18 */ 19 string getLibraryVersion() { 20 return cast(string)asGetLibraryVersion().fromStringz; 21 } 22 23 /** 24 Gets the library options of the angelscript library 25 */ 26 string getLibraryOptions() { 27 return cast(string)asGetLibraryOptions().fromStringz; 28 } 29 30 /** 31 The type of a message 32 */ 33 enum MessageType { 34 35 /** 36 An info message 37 */ 38 Info = asEMsgType.asMSGTYPE_INFORMATION, 39 40 /** 41 A warning message 42 */ 43 Warning = asEMsgType.asMSGTYPE_WARNING, 44 45 /** 46 An error message 47 */ 48 Error = asEMsgType.asMSGTYPE_ERROR 49 } 50 51 alias MessageCallback = extern(C) void function(void*, const(asSMessageInfo)*); 52 alias NativeMessage = const(asSMessageInfo)*; 53 54 /** 55 Message info 56 */ 57 struct MessageInfo { 58 public: 59 this(const(asSMessageInfo)* info) { 60 this.section = cast(string)info.section.fromStringz; 61 this.row = info.row; 62 this.col = info.col; 63 this.type = cast(MessageType)info.type; 64 this.message = cast(string)info.message.fromStringz; 65 } 66 67 /** 68 The section the message occured at 69 */ 70 string section; 71 72 /** 73 The row the message occured at 74 */ 75 int row; 76 77 /** 78 The column the message occured at 79 */ 80 int col; 81 82 /** 83 The type of the message 84 */ 85 MessageType type; 86 87 /** 88 The message body 89 */ 90 string message; 91 }