Trait webkitten::ui::BrowserConfiguration [] [src]

pub trait BrowserConfiguration: Sized {
    fn parse(raw_input: &str) -> Option<Self>;
    fn lookup_bool<'a>(&'a self, key: &'a str) -> Option<bool>;
    fn lookup_str<'a>(&'a self, key: &'a str) -> Option<String>;
    fn lookup_integer<'a>(&'a self, key: &'a str) -> Option<i64>;
    fn lookup_raw_str<'a>(&'a self, key: &'a str) -> Option<String>;
    fn lookup_str_vec(&self, key: &str) -> Option<Vec<String>>;
    fn lookup_str_table(&self, key: &str) -> Option<HashMap<String, String>>;

    fn start_page(&self) -> Option<String> { ... }
    fn new_frame_uses_focused_window(&self) -> bool { ... }
    fn config_dir(&self) -> Option<String> { ... }
    fn command_interpreter(&self) -> Option<String> { ... }
    fn resolved_command_name(&self, name: &str) -> Option<String> { ... }
    fn bar_font(&self) -> Option<(String, i64)> { ... }
    fn command_matching_prefix(&self, text: &str) -> Option<String> { ... }
    fn command_keybindings(&self) -> HashMap<String, (char, usize)> { ... }
    fn command_disabled(&self, name: &str) -> bool { ... }
    fn content_filter_path(&self) -> Option<String> { ... }
    fn skip_content_filter(&self, uri: &str) -> bool { ... }
    fn use_private_browsing(&self, uri: &str) -> bool { ... }
    fn use_javascript(&self, uri: &str) -> bool { ... }
    fn use_plugins(&self, uri: &str) -> bool { ... }
    fn command_search_paths(&self) -> Vec<String> { ... }
    fn default_command(&self) -> Option<String> { ... }
    fn on_buffer_event_commands(&self, event: &BufferEvent) -> Vec<String> { ... }
    fn lookup_site_bool<'a>(&'a self, uri: &str, key: &'a str) -> Option<bool> { ... }
    fn lookup_site_str<'a>(&'a self, uri: &str, key: &'a str) -> Option<String> { ... }
    fn lookup_site_str_vec<'a>(
        &'a self,
        uri: &str,
        key: &'a str
    ) -> Option<Vec<String>> { ... } }

Required Methods

Parse a string literal into a BrowserConfiguration

Look up the bool value of a configuration option matching key

Look up the string value of a configuration option matching key, replacing string variables where possible

Look up the integer value of a configuration option matching key

Look up the string value of a configuration option without any substitutions

Look up the string vector value of a configuration option matching key

Look up the string table value of a configuration option matching key

Provided Methods

The page opened with each new window or empty buffer based on window.start-page

Whether to open a buffer in the focused window or a new window when requesting a new frame. Defaults to false, always opening a new window.

The directory to replace instances of CONFIG_DIR in the configuration file

The name of the scripting engine to use for evaluating command files. Defaults to "lua".

The name of a command resolving any matching alias in commands.aliases

Font to use in the command bar

Find the command to automatically run for a given text prefix

Mapping of commands to keybindings by name to key and modifier mask

Whether a command is disabled based on commands.disabled

The path to the content filter used in buffers based on general.content-filter

Whether to skip content filtering based on the site-specific option sites."[HOST]".general.skip-content-filter. Defaults to false.

Whether to enable private browsing based on the global option general.private-browsing and site-specific option sites."[HOST]".general.private-browsing. Defaults to false.

Whether to allow JavaScript to run in a buffer based on the global option general.allow-javascript and site-specific option sites."[HOST]".general.allow-javascript. Defaults to true.

Whether to allow browser plugins to run in a buffer based on the global option general.allow-plugins and site-specific option sites."[HOST]".general.allow-plugins. Defaults to false.

Paths to search for command scripts using configuration option command.search-paths

Command to run when no other commands are matched using configuration option commands.default

Commands triggered by a buffer event

Events

  • Load: invokes all commands listed in commands.on-load-uri
  • Request: invokes all commands listed in commands.on-request-uri
  • Focus: invokes all commands listed in commands.on-focus-uri
  • Fail: invokes all commands listed in commands.on-fail-uri

Look up the bool value of a configuration option matching key formatted as sites."[HOST]".[key], falling back to [key] if no match is found.

Look up the string value of a configuration option matching key formatted as sites."[HOST]".[key], falling back to [key] if no match is found.

Look up the string vector value of a configuration option matching key formatted as sites."[HOST]".[key], falling back to [key] if no match is found.

Implementors