Struct webkit6::UserStyleSheet
source · pub struct UserStyleSheet { /* private fields */ }
Expand description
A CSS style sheet which can be injected in loaded pages.
GLib type: Shared boxed type with reference counted clone semantics.
Implementations§
source§impl UserStyleSheet
impl UserStyleSheet
sourcepub fn as_ptr(&self) -> *mut WebKitUserStyleSheet
pub fn as_ptr(&self) -> *mut WebKitUserStyleSheet
Return the inner pointer to the underlying C value.
sourcepub unsafe fn from_glib_ptr_borrow(ptr: &*mut WebKitUserStyleSheet) -> &Self
pub unsafe fn from_glib_ptr_borrow(ptr: &*mut WebKitUserStyleSheet) -> &Self
Borrows the underlying C value.
source§impl UserStyleSheet
impl UserStyleSheet
sourcepub fn new(
source: &str,
injected_frames: UserContentInjectedFrames,
level: UserStyleLevel,
allow_list: &[&str],
block_list: &[&str],
) -> UserStyleSheet
pub fn new( source: &str, injected_frames: UserContentInjectedFrames, level: UserStyleLevel, allow_list: &[&str], block_list: &[&str], ) -> UserStyleSheet
Creates a new user style sheet.
Style sheets can be applied to some URIs
only by passing non-null values for @allow_list or @block_list. Passing a
None
allow_list implies that all URIs are on the allow_list. The style
sheet is applied if an URI matches the allow_list and not the block_list.
URI patterns must be of the form [protocol]://[host]/[path]
, where the
host and path components can contain the wildcard character (*
) to
represent zero or more other characters.
§source
Source code of the user style sheet.
§injected_frames
A #WebKitUserContentInjectedFrames value
§level
A #WebKitUserStyleLevel
§allow_list
An allow_list of URI patterns or None
§block_list
A block_list of URI patterns or None
§Returns
A new #WebKitUserStyleSheet
sourcepub fn for_world(
source: &str,
injected_frames: UserContentInjectedFrames,
level: UserStyleLevel,
world_name: &str,
allow_list: &[&str],
block_list: &[&str],
) -> UserStyleSheet
pub fn for_world( source: &str, injected_frames: UserContentInjectedFrames, level: UserStyleLevel, world_name: &str, allow_list: &[&str], block_list: &[&str], ) -> UserStyleSheet
Creates a new user style sheet for script world.
Creates a new user style sheet for script world with name @world_name. See webkit_user_style_sheet_new() for a full description.
§source
Source code of the user style sheet.
§injected_frames
A #WebKitUserContentInjectedFrames value
§level
A #WebKitUserStyleLevel
§world_name
the name of a #WebKitScriptWorld
§allow_list
An allow_list of URI patterns or None
§block_list
A block_list of URI patterns or None
§Returns
A new #WebKitUserStyleSheet
Trait Implementations§
source§impl Clone for UserStyleSheet
impl Clone for UserStyleSheet
source§impl Debug for UserStyleSheet
impl Debug for UserStyleSheet
source§impl From<UserStyleSheet> for Value
impl From<UserStyleSheet> for Value
source§fn from(s: UserStyleSheet) -> Self
fn from(s: UserStyleSheet) -> Self
source§impl HasParamSpec for UserStyleSheet
impl HasParamSpec for UserStyleSheet
type ParamSpec = ParamSpecBoxed
§type SetValue = UserStyleSheet
type SetValue = UserStyleSheet
type BuilderFn = fn(_: &str) -> ParamSpecBoxedBuilder<'_, UserStyleSheet>
fn param_spec_builder() -> Self::BuilderFn
source§impl Hash for UserStyleSheet
impl Hash for UserStyleSheet
source§impl Ord for UserStyleSheet
impl Ord for UserStyleSheet
source§fn cmp(&self, other: &UserStyleSheet) -> Ordering
fn cmp(&self, other: &UserStyleSheet) -> Ordering
1.21.0 · source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
source§impl PartialEq for UserStyleSheet
impl PartialEq for UserStyleSheet
source§fn eq(&self, other: &UserStyleSheet) -> bool
fn eq(&self, other: &UserStyleSheet) -> bool
self
and other
values to be equal, and is used
by ==
.source§impl PartialOrd for UserStyleSheet
impl PartialOrd for UserStyleSheet
source§fn partial_cmp(&self, other: &UserStyleSheet) -> Option<Ordering>
fn partial_cmp(&self, other: &UserStyleSheet) -> Option<Ordering>
1.0.0 · source§fn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
self
and other
) and is used by the <=
operator. Read moresource§impl StaticType for UserStyleSheet
impl StaticType for UserStyleSheet
source§fn static_type() -> Type
fn static_type() -> Type
Self
.impl Eq for UserStyleSheet
impl StructuralPartialEq for UserStyleSheet
Auto Trait Implementations§
impl Freeze for UserStyleSheet
impl RefUnwindSafe for UserStyleSheet
impl !Send for UserStyleSheet
impl !Sync for UserStyleSheet
impl Unpin for UserStyleSheet
impl UnwindSafe for UserStyleSheet
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§default unsafe fn clone_to_uninit(&self, dst: *mut T)
default unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)