public ElementInfo(ElementInfoStruct raw) { PosX = raw.PosX; PosY = raw.PosY; Width = raw.Width; Height = raw.Height; Attributes = Utf8Util.Utf8PtrToString(raw.Attributes); Text = Utf8Util.Utf8PtrToString(raw.Text); }
private int CreateElementWrapper(Utf8Str tag, Utf8Str attributes, [Out, In] ref ElementInfoStruct elementInfo) { if (CreateElementCallback != null) { return(CreateElementCallback(Utf8Util.Utf8PtrToString(tag), Utf8Util.Utf8PtrToString(attributes), new ElementInfo(elementInfo))); } else { return(0); } }
public ElementInfo GetElementInfo(int ID) { IntPtr ptr = Calls.GetElementInfo(Calls.ID, ID); if (ptr == IntPtr.Zero) { return(null); } ElementInfoStruct info = (ElementInfoStruct)Marshal.PtrToStructure(ptr, typeof(ElementInfoStruct)); var el = new ElementInfo(info); return(el); }