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
Source§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§impl PartialOrd for UserStyleSheet
impl PartialOrd for UserStyleSheet
Source§impl StaticType for UserStyleSheet
impl StaticType for UserStyleSheet
Source§fn static_type() -> Type
fn static_type() -> Type
Self.