Struct icrate::WebKit::DOMUIEvent
source · #[repr(C)]pub struct DOMUIEvent { /* private fields */ }WebKit and WebKit_DOMUIEvent only.Implementations§
source§impl DOMUIEvent
impl DOMUIEvent
pub unsafe fn view(&self) -> Option<Id<DOMAbstractView, Shared>>
WebKit_DOMAbstractView only.pub unsafe fn detail(&self) -> c_int
pub unsafe fn keyCode(&self) -> c_int
pub unsafe fn charCode(&self) -> c_int
pub unsafe fn layerX(&self) -> c_int
pub unsafe fn layerY(&self) -> c_int
pub unsafe fn pageX(&self) -> c_int
pub unsafe fn pageY(&self) -> c_int
pub unsafe fn which(&self) -> c_int
pub unsafe fn initUIEvent_canBubble_cancelable_view_detail(
&self,
type: Option<&NSString>,
can_bubble: bool,
cancelable: bool,
view: Option<&DOMAbstractView>,
detail: c_int
)
Foundation_NSString and WebKit_DOMAbstractView only.source§impl DOMUIEvent
impl DOMUIEvent
DOMUIEventDeprecated
pub unsafe fn initUIEvent(
&self,
type: Option<&NSString>,
can_bubble: bool,
cancelable: bool,
view: Option<&DOMAbstractView>,
detail: c_int
)
Foundation_NSString and WebKit_DOMAbstractView only.Methods from Deref<Target = DOMEvent>§
pub unsafe fn type(&self) -> Id<NSString, Shared>
WebKit_DOMEvent and Foundation_NSString only.pub unsafe fn target(
&self
) -> Option<Id<ProtocolObject<dyn DOMEventTarget>, Shared>>
WebKit_DOMEvent only.pub unsafe fn currentTarget(
&self
) -> Option<Id<ProtocolObject<dyn DOMEventTarget>, Shared>>
WebKit_DOMEvent only.pub unsafe fn eventPhase(&self) -> c_ushort
WebKit_DOMEvent only.pub unsafe fn bubbles(&self) -> bool
WebKit_DOMEvent only.pub unsafe fn cancelable(&self) -> bool
WebKit_DOMEvent only.pub unsafe fn timeStamp(&self) -> DOMTimeStamp
WebKit_DOMEvent only.pub unsafe fn srcElement(
&self
) -> Option<Id<ProtocolObject<dyn DOMEventTarget>, Shared>>
WebKit_DOMEvent only.pub unsafe fn returnValue(&self) -> bool
WebKit_DOMEvent only.pub unsafe fn setReturnValue(&self, return_value: bool)
WebKit_DOMEvent only.pub unsafe fn cancelBubble(&self) -> bool
WebKit_DOMEvent only.pub unsafe fn setCancelBubble(&self, cancel_bubble: bool)
WebKit_DOMEvent only.pub unsafe fn stopPropagation(&self)
WebKit_DOMEvent only.pub unsafe fn preventDefault(&self)
WebKit_DOMEvent only.pub unsafe fn initEvent_canBubbleArg_cancelableArg(
&self,
event_type_arg: Option<&NSString>,
can_bubble_arg: bool,
cancelable_arg: bool
)
WebKit_DOMEvent and Foundation_NSString only.Methods from Deref<Target = DOMObject>§
Methods from Deref<Target = WebScriptObject>§
pub unsafe fn callWebScriptMethod_withArguments(
&self,
name: Option<&NSString>,
arguments: Option<&NSArray>
) -> Option<Id<Object, Shared>>
WebKit_WebScriptObject and Foundation_NSArray and Foundation_NSString only.pub unsafe fn evaluateWebScript(
&self,
script: Option<&NSString>
) -> Option<Id<Object, Shared>>
WebKit_WebScriptObject and Foundation_NSString only.pub unsafe fn removeWebScriptKey(&self, name: Option<&NSString>)
WebKit_WebScriptObject and Foundation_NSString only.pub unsafe fn stringRepresentation(&self) -> Option<Id<NSString, Shared>>
WebKit_WebScriptObject and Foundation_NSString only.pub unsafe fn webScriptValueAtIndex(
&self,
index: c_uint
) -> Option<Id<Object, Shared>>
WebKit_WebScriptObject only.pub unsafe fn setWebScriptValueAtIndex_value(
&self,
index: c_uint,
value: Option<&Object>
)
WebKit_WebScriptObject only.pub unsafe fn setException(&self, description: Option<&NSString>)
WebKit_WebScriptObject and Foundation_NSString only.Methods from Deref<Target = Object>§
sourcepub unsafe fn ivar_ptr<T>(&self, name: &str) -> *mut Twhere
T: Encode,
pub unsafe fn ivar_ptr<T>(&self, name: &str) -> *mut Twhere
T: Encode,
Returns a pointer to the instance variable / ivar with the given name.
This is similar to [UnsafeCell::get], see that for more information
on what is and isn’t safe to do.
Usually you will have defined the instance variable yourself with
ClassBuilder::add_ivar, the type of the ivar T must match the
type used in that.
Attempting to access or modify private implementation details of a class that you do no control using this is not supported, and may invoke undefined behaviour.
Library implementors are strongly encouraged to expose a safe interface to the ivar.
Panics
May panic if the object has no ivar with the given name. May also
panic if the type encoding of the ivar differs from the type encoding
of T.
This should purely seen as help while debugging and is not guaranteed
(e.g. it may be disabled when debug_assertions are off).
Safety
The object must have an instance variable with the given name, and it
must be of type T. Any invariants that the object have assumed about
the value of the instance variable must not be violated.
No thread syncronization is done on accesses to the variable, so you must ensure that any access to the returned pointer do not cause data races, and that Rust’s mutability rules are not otherwise violated.
sourcepub unsafe fn ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
pub unsafe fn ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Returns a reference to the instance variable with the given name.
See Object::ivar_ptr for more information, including on when this
panics.
Safety
The object must have an instance variable with the given name, and it
must be of type T.
No thread syncronization is done, so you must ensure that no other
thread is concurrently mutating the variable. This requirement can be
considered upheld if all mutation happens through Object::ivar_mut
(since that takes &mut self).
sourcepub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
👎Deprecated: Use Object::ivar instead.
pub unsafe fn get_ivar<T>(&self, name: &str) -> &Twhere
T: Encode,
Object::ivar instead.sourcepub unsafe fn ivar_mut<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
pub unsafe fn ivar_mut<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Returns a mutable reference to the ivar with the given name.
See Object::ivar_ptr for more information, including on when this
panics.
Safety
The object must have an instance variable with the given name, and it
must be of type T.
This access happens through &mut self, which means we know it to be
the only reference, hence you do not need to do any work to ensure
that data races do not happen.
sourcepub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
👎Deprecated: Use Object::ivar_mut instead.
pub unsafe fn get_mut_ivar<T>(&mut self, name: &str) -> &mut Twhere
T: Encode,
Object::ivar_mut instead.sourcepub unsafe fn set_ivar<T>(&mut self, name: &str, value: T)where
T: Encode,
pub unsafe fn set_ivar<T>(&mut self, name: &str, value: T)where
T: Encode,
Sets the value of the ivar with the given name.
This is just a helpful shorthand for Object::ivar_mut, see that
for more information.
Safety
Same as Object::ivar_mut.
Trait Implementations§
source§impl AsMut<DOMEvent> for DOMUIEvent
impl AsMut<DOMEvent> for DOMUIEvent
source§impl AsMut<DOMObject> for DOMUIEvent
impl AsMut<DOMObject> for DOMUIEvent
source§impl AsMut<DOMUIEvent> for DOMKeyboardEvent
impl AsMut<DOMUIEvent> for DOMKeyboardEvent
source§fn as_mut(&mut self) -> &mut DOMUIEvent
fn as_mut(&mut self) -> &mut DOMUIEvent
source§impl AsMut<DOMUIEvent> for DOMMouseEvent
impl AsMut<DOMUIEvent> for DOMMouseEvent
source§fn as_mut(&mut self) -> &mut DOMUIEvent
fn as_mut(&mut self) -> &mut DOMUIEvent
source§impl AsMut<DOMUIEvent> for DOMUIEvent
impl AsMut<DOMUIEvent> for DOMUIEvent
source§impl AsMut<DOMUIEvent> for DOMWheelEvent
impl AsMut<DOMUIEvent> for DOMWheelEvent
source§fn as_mut(&mut self) -> &mut DOMUIEvent
fn as_mut(&mut self) -> &mut DOMUIEvent
source§impl AsMut<NSObject> for DOMUIEvent
impl AsMut<NSObject> for DOMUIEvent
source§impl AsMut<Object> for DOMUIEvent
impl AsMut<Object> for DOMUIEvent
source§impl AsMut<WebScriptObject> for DOMUIEvent
impl AsMut<WebScriptObject> for DOMUIEvent
source§fn as_mut(&mut self) -> &mut WebScriptObject
fn as_mut(&mut self) -> &mut WebScriptObject
source§impl AsRef<DOMEvent> for DOMUIEvent
impl AsRef<DOMEvent> for DOMUIEvent
source§impl AsRef<DOMObject> for DOMUIEvent
impl AsRef<DOMObject> for DOMUIEvent
source§impl AsRef<DOMUIEvent> for DOMKeyboardEvent
impl AsRef<DOMUIEvent> for DOMKeyboardEvent
source§fn as_ref(&self) -> &DOMUIEvent
fn as_ref(&self) -> &DOMUIEvent
source§impl AsRef<DOMUIEvent> for DOMMouseEvent
impl AsRef<DOMUIEvent> for DOMMouseEvent
source§fn as_ref(&self) -> &DOMUIEvent
fn as_ref(&self) -> &DOMUIEvent
source§impl AsRef<DOMUIEvent> for DOMUIEvent
impl AsRef<DOMUIEvent> for DOMUIEvent
source§impl AsRef<DOMUIEvent> for DOMWheelEvent
impl AsRef<DOMUIEvent> for DOMWheelEvent
source§fn as_ref(&self) -> &DOMUIEvent
fn as_ref(&self) -> &DOMUIEvent
source§impl AsRef<NSObject> for DOMUIEvent
impl AsRef<NSObject> for DOMUIEvent
source§impl AsRef<Object> for DOMUIEvent
impl AsRef<Object> for DOMUIEvent
source§impl AsRef<WebScriptObject> for DOMUIEvent
impl AsRef<WebScriptObject> for DOMUIEvent
source§fn as_ref(&self) -> &WebScriptObject
fn as_ref(&self) -> &WebScriptObject
source§impl Borrow<DOMEvent> for DOMUIEvent
impl Borrow<DOMEvent> for DOMUIEvent
source§impl Borrow<DOMObject> for DOMUIEvent
impl Borrow<DOMObject> for DOMUIEvent
source§impl Borrow<DOMUIEvent> for DOMKeyboardEvent
impl Borrow<DOMUIEvent> for DOMKeyboardEvent
source§fn borrow(&self) -> &DOMUIEvent
fn borrow(&self) -> &DOMUIEvent
source§impl Borrow<DOMUIEvent> for DOMMouseEvent
impl Borrow<DOMUIEvent> for DOMMouseEvent
source§fn borrow(&self) -> &DOMUIEvent
fn borrow(&self) -> &DOMUIEvent
source§impl Borrow<DOMUIEvent> for DOMWheelEvent
impl Borrow<DOMUIEvent> for DOMWheelEvent
source§fn borrow(&self) -> &DOMUIEvent
fn borrow(&self) -> &DOMUIEvent
source§impl Borrow<NSObject> for DOMUIEvent
impl Borrow<NSObject> for DOMUIEvent
source§impl Borrow<Object> for DOMUIEvent
impl Borrow<Object> for DOMUIEvent
source§impl Borrow<WebScriptObject> for DOMUIEvent
impl Borrow<WebScriptObject> for DOMUIEvent
source§fn borrow(&self) -> &WebScriptObject
fn borrow(&self) -> &WebScriptObject
source§impl BorrowMut<DOMEvent> for DOMUIEvent
impl BorrowMut<DOMEvent> for DOMUIEvent
source§fn borrow_mut(&mut self) -> &mut DOMEvent
fn borrow_mut(&mut self) -> &mut DOMEvent
source§impl BorrowMut<DOMObject> for DOMUIEvent
impl BorrowMut<DOMObject> for DOMUIEvent
source§fn borrow_mut(&mut self) -> &mut DOMObject
fn borrow_mut(&mut self) -> &mut DOMObject
source§impl BorrowMut<DOMUIEvent> for DOMKeyboardEvent
impl BorrowMut<DOMUIEvent> for DOMKeyboardEvent
source§fn borrow_mut(&mut self) -> &mut DOMUIEvent
fn borrow_mut(&mut self) -> &mut DOMUIEvent
source§impl BorrowMut<DOMUIEvent> for DOMMouseEvent
impl BorrowMut<DOMUIEvent> for DOMMouseEvent
source§fn borrow_mut(&mut self) -> &mut DOMUIEvent
fn borrow_mut(&mut self) -> &mut DOMUIEvent
source§impl BorrowMut<DOMUIEvent> for DOMWheelEvent
impl BorrowMut<DOMUIEvent> for DOMWheelEvent
source§fn borrow_mut(&mut self) -> &mut DOMUIEvent
fn borrow_mut(&mut self) -> &mut DOMUIEvent
source§impl BorrowMut<NSObject> for DOMUIEvent
impl BorrowMut<NSObject> for DOMUIEvent
source§fn borrow_mut(&mut self) -> &mut NSObject
fn borrow_mut(&mut self) -> &mut NSObject
source§impl BorrowMut<Object> for DOMUIEvent
impl BorrowMut<Object> for DOMUIEvent
source§fn borrow_mut(&mut self) -> &mut Object
fn borrow_mut(&mut self) -> &mut Object
source§impl BorrowMut<WebScriptObject> for DOMUIEvent
impl BorrowMut<WebScriptObject> for DOMUIEvent
source§fn borrow_mut(&mut self) -> &mut WebScriptObject
fn borrow_mut(&mut self) -> &mut WebScriptObject
source§impl ClassType for DOMUIEvent
impl ClassType for DOMUIEvent
source§impl Debug for DOMUIEvent
impl Debug for DOMUIEvent
source§impl Deref for DOMUIEvent
impl Deref for DOMUIEvent
source§impl DerefMut for DOMUIEvent
impl DerefMut for DOMUIEvent
source§impl Hash for DOMUIEvent
impl Hash for DOMUIEvent
source§impl NSObjectProtocol for DOMUIEvent
impl NSObjectProtocol for DOMUIEvent
source§impl PartialEq<DOMUIEvent> for DOMUIEvent
impl PartialEq<DOMUIEvent> for DOMUIEvent
source§fn eq(&self, other: &DOMUIEvent) -> bool
fn eq(&self, other: &DOMUIEvent) -> bool
self and other values to be equal, and is used
by ==.