Exemplo n.º 1
0
        IntPtr GetReusableContentCallback(IntPtr data, IntPtr obj, IntPtr part, IntPtr old)
        {
            IntPtr  reusedHandle = IntPtr.Zero;
            GenItem item         = ItemObject.GetItemById((int)data) as GenItem;

            if (s_HandleToEvasObject.ContainsKey(old))
            {
                reusedHandle = ReusableContentHandler?.Invoke(item?.Data, Marshal.PtrToStringAnsi(part), s_HandleToEvasObject[old]);
            }
            return(reusedHandle);
        }
Exemplo n.º 2
0
        IntPtr GetContentCallback(IntPtr data, IntPtr obj, IntPtr part)
        {
            GenItem    item       = ItemObject.GetItemById((int)data) as GenItem;
            EvasObject evasObject = GetContentHandler?.Invoke(item?.Data, Marshal.PtrToStringAnsi(part));

            if (evasObject != null)
            {
                s_HandleToEvasObject[evasObject.Handle] = evasObject;
                evasObject.Deleted += EvasObjectDeleted;
            }
            return(evasObject);
        }
Exemplo n.º 3
0
        string GetTextCallback(IntPtr data, IntPtr obj, IntPtr part)
        {
            GenItem item = ItemObject.GetItemById((int)data) as GenItem;

            return(GetTextHandler?.Invoke(item?.Data, Marshal.PtrToStringAnsi(part)));
        }