Struct xpcom::interfaces::nsIDOMDataTransfer
[−]
[src]
#[repr(C)]pub struct nsIDOMDataTransfer { /* fields omitted */ }
interface nsIDOMDataTransfer : nsISupports
Methods
impl nsIDOMDataTransfer
[src]
pub fn coerce<T: nsIDOMDataTransferCoerce>(&self) -> &T
[src]
Cast this nsIDOMDataTransfer
to one of its base interfaces.
impl nsIDOMDataTransfer
[src]
pub unsafe fn GetDropEffect(&self, aDropEffect: &mut nsAString) -> nsresult
[src]
/**
* The actual effect that will be used, and should always be one of the
* possible values of effectAllowed.
*
* For dragstart, drag and dragleave events, the dropEffect is initialized
* to none. Any value assigned to the dropEffect will be set, but the value
* isn't used for anything.
*
* For the dragenter and dragover events, the dropEffect will be initialized
* based on what action the user is requesting. How this is determined is
* platform specific, but typically the user can press modifier keys to
* adjust which action is desired. Within an event handler for the dragenter
* and dragover events, the dropEffect should be modified if the action the
* user is requesting is not the one that is desired.
*
* For the drop and dragend events, the dropEffect will be initialized to
* the action that was desired, which will be the value that the dropEffect
* had after the last dragenter or dragover event.
*
* Possible values:
* copy - a copy of the source item is made at the new location
* move - an item is moved to a new location
* link - a link is established to the source at the new location
* none - the item may not be dropped
*
* Assigning any other value has no effect and retains the old value.
*/
attribute DOMString dropEffect;
pub unsafe fn SetDropEffect(&self, aDropEffect: &nsAString) -> nsresult
[src]
/**
* The actual effect that will be used, and should always be one of the
* possible values of effectAllowed.
*
* For dragstart, drag and dragleave events, the dropEffect is initialized
* to none. Any value assigned to the dropEffect will be set, but the value
* isn't used for anything.
*
* For the dragenter and dragover events, the dropEffect will be initialized
* based on what action the user is requesting. How this is determined is
* platform specific, but typically the user can press modifier keys to
* adjust which action is desired. Within an event handler for the dragenter
* and dragover events, the dropEffect should be modified if the action the
* user is requesting is not the one that is desired.
*
* For the drop and dragend events, the dropEffect will be initialized to
* the action that was desired, which will be the value that the dropEffect
* had after the last dragenter or dragover event.
*
* Possible values:
* copy - a copy of the source item is made at the new location
* move - an item is moved to a new location
* link - a link is established to the source at the new location
* none - the item may not be dropped
*
* Assigning any other value has no effect and retains the old value.
*/
attribute DOMString dropEffect;
pub unsafe fn GetEffectAllowed(
&self,
aEffectAllowed: &mut nsAString
) -> nsresult
[src]
&self,
aEffectAllowed: &mut nsAString
) -> nsresult
attribute DOMString effectAllowed;
pub unsafe fn SetEffectAllowed(&self, aEffectAllowed: &nsAString) -> nsresult
[src]
attribute DOMString effectAllowed;
pub unsafe fn GetFiles(&self, aFiles: *mut *const nsIDOMFileList) -> nsresult
[src]
/**
* Holds a list of all the local files available on this data transfer.
* A dataTransfer containing no files will return an empty list, and an
* invalid index access on the resulting file list will return null.
*/
readonly attribute nsIDOMFileList files;
pub unsafe fn SetDragImage(
&self,
image: *const nsIDOMElement,
x: int32_t,
y: int32_t
) -> nsresult
[src]
&self,
image: *const nsIDOMElement,
x: int32_t,
y: int32_t
) -> nsresult
/**
* Set the image to be used for dragging if a custom one is desired. Most of
* the time, this would not be set, as a default image is created from the
* node that was dragged.
*
* If the node is an HTML img element, an HTML canvas element or a XUL image
* element, the image data is used. Otherwise, image should be a visible
* node and the drag image will be created from this. If image is null, any
* custom drag image is cleared and the default is used instead.
*
* The coordinates specify the offset into the image where the mouse cursor
* should be. To center the image for instance, use values that are half the
* width and height.
*
* @param image a node to use
* @param x the horizontal offset
* @param y the vertical offset
* @throws NO_MODIFICATION_ALLOWED_ERR if the item cannot be modified
*/
void setDragImage (in nsIDOMElement image, in long x, in long y);
pub unsafe fn AddElement(&self, element: *const nsIDOMElement) -> nsresult
[src]
void addElement (in nsIDOMElement element);
pub unsafe fn GetMozItemCount(&self, aMozItemCount: *mut uint32_t) -> nsresult
[src]
/**
* The number of items being dragged.
*/
readonly attribute unsigned long mozItemCount;
pub unsafe fn GetMozCursor(&self, aMozCursor: &mut nsAString) -> nsresult
[src]
/**
* Sets the drag cursor state. Primarily used to control the cursor during
* tab drags, but could be expanded to other uses. XXX Currently implemented
* on Win32 only.
*
* Possible values:
* auto - use default system behavior.
* default - set the cursor to an arrow during the drag operation.
*
* Values other than 'default' are indentical to setting mozCursor to
* 'auto'.
*/
attribute DOMString mozCursor;
pub unsafe fn SetMozCursor(&self, aMozCursor: &nsAString) -> nsresult
[src]
/**
* Sets the drag cursor state. Primarily used to control the cursor during
* tab drags, but could be expanded to other uses. XXX Currently implemented
* on Win32 only.
*
* Possible values:
* auto - use default system behavior.
* default - set the cursor to an arrow during the drag operation.
*
* Values other than 'default' are indentical to setting mozCursor to
* 'auto'.
*/
attribute DOMString mozCursor;
pub unsafe fn GetMozUserCancelled(
&self,
aMozUserCancelled: *mut bool
) -> nsresult
[src]
&self,
aMozUserCancelled: *mut bool
) -> nsresult
/**
* Will be true when the user has cancelled the drag (typically by pressing
* Escape) and when the drag has been cancelled unexpectedly. This will be
* false otherwise, including when the drop has been rejected by its target.
* This property is only relevant for the dragend event.
*/
readonly attribute boolean mozUserCancelled;
pub unsafe fn GetMozSourceNode(
&self,
aMozSourceNode: *mut *const nsIDOMNode
) -> nsresult
[src]
&self,
aMozSourceNode: *mut *const nsIDOMNode
) -> nsresult
/**
* The node that the mouse was pressed over to begin the drag. For external
* drags, or if the caller cannot access this node, this will be null.
*/
readonly attribute nsIDOMNode mozSourceNode;
pub unsafe fn GetDropEffectInt(&self, aDropEffectInt: *mut uint32_t) -> nsresult
[src]
[noscript] attribute unsigned long dropEffectInt;
pub unsafe fn SetDropEffectInt(&self, aDropEffectInt: uint32_t) -> nsresult
[src]
[noscript] attribute unsigned long dropEffectInt;
pub unsafe fn GetEffectAllowedInt(
&self,
aEffectAllowedInt: *mut uint32_t
) -> nsresult
[src]
&self,
aEffectAllowedInt: *mut uint32_t
) -> nsresult
[noscript] attribute unsigned long effectAllowedInt;
pub unsafe fn SetEffectAllowedInt(
&self,
aEffectAllowedInt: uint32_t
) -> nsresult
[src]
&self,
aEffectAllowedInt: uint32_t
) -> nsresult
[noscript] attribute unsigned long effectAllowedInt;
Methods from Deref<Target = nsISupports>
pub fn coerce<T: nsISupportsCoerce>(&self) -> &T
[src]
Cast this nsISupports
to one of its base interfaces.
pub unsafe fn QueryInterface(
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
[src]
&self,
uuid: &nsIID,
result: *mut *mut c_void
) -> nsresult
void QueryInterface (in nsIIDRef uuid, [iid_is (uuid), retval] out nsQIResult result);
pub unsafe fn AddRef(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt AddRef ();
pub unsafe fn Release(&self) -> nsrefcnt
[src]
[noscript,notxpcom] nsrefcnt Release ();
Trait Implementations
impl XpCom for nsIDOMDataTransfer
[src]
const IID: nsIID
IID: nsIID = nsID(1699772607, 5749, 19104, [164, 141, 161, 51, 232, 100, 206, 87])
fn query_interface<T: XpCom>(&self) -> Option<RefPtr<T>>
[src]
Perform a QueryInterface call on this object, attempting to dynamically cast it to the requested interface type. Returns Some(RefPtr) if the cast succeeded, and None otherwise. Read more
impl RefCounted for nsIDOMDataTransfer
[src]
unsafe fn addref(&self)
[src]
Increment the reference count.
unsafe fn release(&self)
[src]
Decrement the reference count, potentially freeing backing memory.
impl Deref for nsIDOMDataTransfer
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.