1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2 /* vim: set ts=8 sts=2 et sw=2 tw=80: */
3 /* This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #ifndef nsGlobalWindowCommands_h__
8 #define nsGlobalWindowCommands_h__
12 namespace mozilla::layers
{
13 struct KeyboardScrollAction
;
14 } // namespace mozilla::layers
16 class nsControllerCommandTable
;
18 class nsWindowCommandRegistration
{
20 static nsresult
RegisterWindowCommands(
21 nsControllerCommandTable
* aCommandTable
);
24 class nsGlobalWindowCommands
{
26 using KeyboardScrollAction
= mozilla::layers::KeyboardScrollAction
;
29 * Search through nsGlobalWindowCommands to find the keyboard scrolling action
30 * that would be done in response to a command.
32 * @param aCommandName the name of the command
33 * @param aOutAction the result of searching for this command, must not be
35 * @returns whether a keyboard action was found or not
37 static bool FindScrollCommand(const char* aCommandName
,
38 KeyboardScrollAction
* aOutAction
);
41 #endif // nsGlobalWindowCommands_h__