Struct xpcom::interfaces::nsIDroppedLinkHandler
[−]
[src]
#[repr(C)]pub struct nsIDroppedLinkHandler { /* fields omitted */ }
interface nsIDroppedLinkHandler : nsISupports
Methods
impl nsIDroppedLinkHandler
[src]
pub fn coerce<T: nsIDroppedLinkHandlerCoerce>(&self) -> &T
[src]
Cast this nsIDroppedLinkHandler
to one of its base interfaces.
impl nsIDroppedLinkHandler
[src]
pub unsafe fn CanDropLink(
&self,
aEvent: *const nsIDOMDragEvent,
aAllowSameDocument: bool,
_retval: *mut bool
) -> nsresult
[src]
&self,
aEvent: *const nsIDOMDragEvent,
aAllowSameDocument: bool,
_retval: *mut bool
) -> nsresult
/**
* Determines if a link being dragged can be dropped and returns true if so.
* aEvent should be a dragenter or dragover event.
*
* If aAllowSameDocument is false, drops are only allowed if the document
* of the source of the drag is different from the destination. This check
* includes any parent, sibling and child frames in the same content tree.
* If true, the source is not checked.
*/
boolean canDropLink (in nsIDOMDragEvent aEvent, in boolean aAllowSameDocument);
pub unsafe fn DropLink(
&self,
aEvent: *const nsIDOMDragEvent,
aName: &mut nsAString,
aDisallowInherit: bool,
_retval: &mut nsAString
) -> nsresult
[src]
&self,
aEvent: *const nsIDOMDragEvent,
aName: &mut nsAString,
aDisallowInherit: bool,
_retval: &mut nsAString
) -> nsresult
/**
* Given a drop event aEvent, determines the link being dragged and returns
* it. If a uri is returned the caller can, for instance, load it. If null
* is returned, there is no valid link to be dropped.
*
* A NS_ERROR_DOM_SECURITY_ERR error will be thrown and the event cancelled if
* the receiving target should not load the uri for security reasons. This
* will occur if any of the following conditions are true:
* - the source of the drag initiated a link for dragging that
* it itself cannot access. This prevents a source document from tricking
* the user into a dragging a chrome url, for example.
* - aDisallowInherit is true, and the URI being dropped would inherit the
* current document's security context (URI_INHERITS_SECURITY_CONTEXT).
*
* aName is filled in with the link title if it exists, or an empty string
* otherwise.
*/
AString dropLink (in nsIDOMDragEvent aEvent, out AString aName, [optional] in boolean aDisallowInherit);
pub unsafe fn DropLinks(
&self,
aEvent: *const nsIDOMDragEvent,
aDisallowInherit: bool,
aCount: *mut uint32_t,
aLinks: *mut *mut *const nsIDroppedLinkItem
) -> nsresult
[src]
&self,
aEvent: *const nsIDOMDragEvent,
aDisallowInherit: bool,
aCount: *mut uint32_t,
aLinks: *mut *mut *const nsIDroppedLinkItem
) -> nsresult
/**
* Given a drop event aEvent, determines links being dragged and returns
* them. If links are returned the caller can, for instance, load them. If
* the count of links is 0, there is no valid link to be dropped.
*
* A NS_ERROR_DOM_SECURITY_ERR error will be thrown and the event cancelled if
* the receiving target should not load the uri for security reasons. This
* will occur if any of the following conditions are true:
* - the source of the drag initiated a link for dragging that
* it itself cannot access. This prevents a source document from tricking
* the user into a dragging a chrome url, for example.
* - aDisallowInherit is true, and the URI being dropped would inherit the
* current document's security context (URI_INHERITS_SECURITY_CONTEXT).
*/
void dropLinks (in nsIDOMDragEvent aEvent, [optional] in boolean aDisallowInherit, [optional] out unsigned long aCount, [array, size_is (aCount), retval] out nsIDroppedLinkItem aLinks);
pub unsafe fn QueryLinks(
&self,
aDataTransfer: *const nsIDOMDataTransfer,
aCount: *mut uint32_t,
aLinks: *mut *mut *const nsIDroppedLinkItem
) -> nsresult
[src]
&self,
aDataTransfer: *const nsIDOMDataTransfer,
aCount: *mut uint32_t,
aLinks: *mut *mut *const nsIDroppedLinkItem
) -> nsresult
/**
* Given a dataTransfer, allows caller to determine and verify links being
* dragged. Since drag/drop performs a roundtrip of parent, child, parent,
* it allows the parent to verify that the child did not modify links
* being dropped.
*/
void queryLinks (in nsIDOMDataTransfer aDataTransfer, [optional] out unsigned long aCount, [array, size_is (aCount), retval] out nsIDroppedLinkItem aLinks);
pub unsafe fn GetTriggeringPrincipal(
&self,
aEvent: *const nsIDOMDragEvent,
_retval: *mut *const nsIPrincipal
) -> nsresult
[src]
&self,
aEvent: *const nsIDOMDragEvent,
_retval: *mut *const nsIPrincipal
) -> nsresult
/**
* Given a drop event aEvent, determines the triggering principal for the
* event and returns it.
*/
nsIPrincipal getTriggeringPrincipal (in nsIDOMDragEvent aEvent);
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 nsIDroppedLinkHandler
[src]
const IID: nsIID
IID: nsIID = nsID(565559898, 10409, 18365, [132, 49, 250, 145, 22, 48, 93, 237])
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 nsIDroppedLinkHandler
[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 nsIDroppedLinkHandler
[src]
type Target = nsISupports
The resulting type after dereferencing.
fn deref(&self) -> &nsISupports
[src]
Dereferences the value.