Volume Control
Application-specific hotkeys for Windows
|
Maintains a single message hook for multiple hotkeys with the same key combination to allow them all to be "registered" at the same time. More...
Public Member Functions | |
HotkeyMessageHookAbstractor () | |
Creates a new HotkeyMessageHookAbstractor instance. More... | |
bool | HotkeyHasManagedKeyCombination (IHotkey hotkey) |
Checks if the specified hotkey instance has the same key combination as the one managed by this instance. More... | |
void | AddHotkey (IHotkey hotkey) |
Adds the specified hotkey to this message hook abstractor instance. More... | |
void | AddHotkeys (params IHotkey[] hotkeys) |
Adds the specified hotkeys to this message hook abstractor instance. More... | |
void | RemoveHotkey (IHotkey hotkey) |
Removes the specified hotkey from this message hook abstractor instance. More... | |
Properties | |
IReadOnlyList< IHotkey > | Hotkeys [get] |
Gets the list of hotkeys currently using this message hook abstractor. More... | |
HwndSourceHook | MessageHook [get] |
bool | HasStarted = false [get] |
Gets whether this instance has started managing a specific key combination yet. More... | |
EFriendlyKey | ManagedKey = EFriendlyKey.None [get] |
Gets the key in the key combination that this instance manages. More... | |
EModifierKey | ManagedModifiers = EModifierKey.None [get] |
Gets the modifier keys in the key combination that this instance manages. More... | |
Events | |
EventHandler? | AllHotkeysRemoved |
Occurs when this HotkeyMessageHookAbstractor instance is no longer managing any hotkey message hooks. More... | |
EventHandler< IHotkey >? | OneHotkeyRemaining |
Occurs when there is only one hotkey remaining in this hook abstractor instance. More... | |
Maintains a single message hook for multiple hotkeys with the same key combination to allow them all to be "registered" at the same time.
Hotkeys are automatically removed when they are unregistered (which occurs during re-registration). Anything that uses this must ensure the instance is removed when no hotkeys remain.
VolumeControl.Core.Input.HotkeyMessageHookAbstractor.HotkeyMessageHookAbstractor | ( | ) |
Creates a new HotkeyMessageHookAbstractor instance.
void VolumeControl.Core.Input.HotkeyMessageHookAbstractor.AddHotkey | ( | IHotkey | hotkey | ) |
Adds the specified hotkey to this message hook abstractor instance.
hotkey | An IHotkey that is not being managed by this instance. |
ArgumentException | The specified hotkey is already being managed by this instance. |
InvalidOperationException | The specified hotkey does not have this instance's managed key combination. |
References VolumeControl.Core.Input.HotkeyMessageHookAbstractor.HasStarted, VolumeControl.Core.Input.HotkeyMessageHookAbstractor.HotkeyHasManagedKeyCombination(), VolumeControl.Core.Input.HotkeyMessageHookAbstractor.Hotkeys, VolumeControl.Core.Input.IHotkey.ID, VolumeControl.Core.Input.IHotkey.IsRegistered, VolumeControl.Core.Input.IHotkey.Key, VolumeControl.Core.Input.HotkeyMessageHookAbstractor.ManagedKey, VolumeControl.Core.Input.HotkeyMessageHookAbstractor.ManagedModifiers, VolumeControl.Core.Input.IHotkey.Modifiers, VolumeControl.Core.Input.IHotkey.Unregistered, and VolumeControl.Core.Input.IHotkey.Unregistering.
Referenced by VolumeControl.Core.Input.HotkeyMessageHookAbstractor.AddHotkeys().
void VolumeControl.Core.Input.HotkeyMessageHookAbstractor.AddHotkeys | ( | params IHotkey[] | hotkeys | ) |
Adds the specified hotkeys to this message hook abstractor instance.
hotkeys | Any number of IHotkey instances that are not being managed by this instance. |
ArgumentException | At least one of the hotkeys is already being managed by this instance. |
InvalidOperationException | At least one of the hotkeys does not have the same key combination as the one managed by this instance. |
References VolumeControl.Core.Input.HotkeyMessageHookAbstractor.AddHotkey().
bool VolumeControl.Core.Input.HotkeyMessageHookAbstractor.HotkeyHasManagedKeyCombination | ( | IHotkey | hotkey | ) |
Checks if the specified hotkey instance has the same key combination as the one managed by this instance.
hotkey | A hotkey to check the key combination of. |
true
when the hotkey does have the same key combination; otherwise false
.Referenced by VolumeControl.Core.Input.HotkeyMessageHookAbstractor.AddHotkey().
void VolumeControl.Core.Input.HotkeyMessageHookAbstractor.RemoveHotkey | ( | IHotkey | hotkey | ) |
Removes the specified hotkey from this message hook abstractor instance.
hotkey | An IHotkey that is being managed by this instance. |
ArgumentException | The specified hotkey is not being managed by this instance. |
References VolumeControl.Core.Input.HotkeyMessageHookAbstractor.Hotkeys, VolumeControl.Core.Input.IHotkey.ID, VolumeControl.Core.Input.IHotkey.IsRegistered, VolumeControl.Core.Input.IHotkey.Unregistered, and VolumeControl.Core.Input.IHotkey.Unregistering.
|
get |
Gets whether this instance has started managing a specific key combination yet.
Referenced by VolumeControl.Core.Input.HotkeyMessageHookAbstractor.AddHotkey().
|
get |
Gets the list of hotkeys currently using this message hook abstractor.
Referenced by VolumeControl.Core.Input.HotkeyMessageHookAbstractor.AddHotkey(), and VolumeControl.Core.Input.HotkeyMessageHookAbstractor.RemoveHotkey().
|
get |
Gets the key in the key combination that this instance manages.
Referenced by VolumeControl.Core.Input.HotkeyMessageHookAbstractor.AddHotkey().
|
get |
Gets the modifier keys in the key combination that this instance manages.
Referenced by VolumeControl.Core.Input.HotkeyMessageHookAbstractor.AddHotkey().
EventHandler? VolumeControl.Core.Input.HotkeyMessageHookAbstractor.AllHotkeysRemoved |
Occurs when this HotkeyMessageHookAbstractor instance is no longer managing any hotkey message hooks.
EventHandler<IHotkey>? VolumeControl.Core.Input.HotkeyMessageHookAbstractor.OneHotkeyRemaining |
Occurs when there is only one hotkey remaining in this hook abstractor instance.