Exemplo n.º 1
0
        public static void SetDropCallback(IntPtr window, DropFun cbfun)
        {
            unsafe
            {
                void DropFun(IntPtr win, int count, sbyte **paths)
                {
                    var pathArray = new string[count];

                    for (int i = 0; i < count; i++)
                    {
                        pathArray[i] = new string(*(paths + i));
                    }

                    cbfun(win, count, pathArray);
                }

                //Prevents DropFun from being garbage collected
                currentDropFun = DropFun;

                _SetDropCallback(window, currentDropFun);
            }
        }
Exemplo n.º 2
0
 private static extern void _SetDropCallback(IntPtr window, UnmanagedDropFun cbfun);