Struct pnmixerlib::hotkeys::Hotkeys
[−]
[src]
pub struct Hotkeys { /* fields omitted */ }
The possible Hotkeys for manipulating the volume.
Methods
impl Hotkeys
[src]
fn new(prefs: &Prefs, audio: Rc<Audio>) -> WResult<Box<Hotkeys>, Error, Error>
Creates the hotkeys subsystem and binds the hotkeys.
fn reload(&mut self, prefs: &Prefs) -> Result<()>
Reload the Hotkeys from the preferences.
If hotkeys are disabled, just sets all members to None
.
This has to be called each time the preferences are modified.
Returns
Ok(())
on success, otherwise Err(str)
if some of the hotkeys
could not be grabbed, where str
is a String that can be
presented via e.g. run_error_dialog()
.
fn bind(&self)
Bind hotkeys manually. Should be paired with an unbind()
call.
fn unbind(&self)
Unbind hotkeys manually. Should be paired with a bind()
call.