예제 #1
0
파일: Structs.cs 프로젝트: tig/winprint
 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);
 }
예제 #2
0
파일: Container.cs 프로젝트: tig/winprint
 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);
     }
 }
예제 #3
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);
        }