Пример #1
0
        /// <summary>
        /// Retrieve the list of file names that are being dragged into the
        /// browser window.
        /// </summary>
        public CefStringList GetFileNames()
        {
            var nList = CefStringList.CreateHandle();

            var success = cef_drag_data_t.invoke_get_file_names(this.ptr, nList) != 0;

            if (success)
            {
                return(CefStringList.From(nList, true));
            }
            else
            {
                CefStringList.DestroyHandle(nList);
                return(null);
            }
        }
Пример #2
0
        /// <summary>
        /// Read the keys for the object's values into the specified vector.
        /// Integer- based keys will also be returned as strings.
        /// </summary>
        public bool TryGetKeys(out CefStringList keys)
        {
            ThrowIfObjectIsInvalid();
            var nList = CefStringList.CreateHandle();

            var success = cef_v8value_t.invoke_get_keys(this.ptr, nList) != 0;

            if (success)
            {
                keys = CefStringList.From(nList, true);
                return(true);
            }
            else
            {
                CefStringList.DestroyHandle(nList);
                keys = null;
                return(false);
            }
        }